Remove plugfest branch - merged to trunk.
authorbradh <bradh@71d39326-ef09-db11-b2a4-00e04c779ad1>
Mon, 14 Feb 2011 00:01:47 +0000 (00:01 +0000)
committerbradh <bradh@71d39326-ef09-db11-b2a4-00e04c779ad1>
Mon, 14 Feb 2011 00:01:47 +0000 (00:01 +0000)
git-svn-id: https://svn.openchange.org/openchange@2650 71d39326-ef09-db11-b2a4-00e04c779ad1

388 files changed:
branches/plugfest/.bzrignore [deleted file]
branches/plugfest/COPYING [deleted file]
branches/plugfest/ChangeLog [deleted file]
branches/plugfest/Doxyfile.in [deleted file]
branches/plugfest/IDL_LICENSE.txt [deleted file]
branches/plugfest/Mainpage.doxy [deleted file]
branches/plugfest/Makefile [deleted file]
branches/plugfest/README [deleted file]
branches/plugfest/VERSION [deleted file]
branches/plugfest/autogen.sh [deleted file]
branches/plugfest/config.guess [deleted file]
branches/plugfest/config.mk.in [deleted file]
branches/plugfest/config.sub [deleted file]
branches/plugfest/configure.ac [deleted file]
branches/plugfest/doc/doxygen/apidocs.css [deleted file]
branches/plugfest/doc/doxygen/footer.html [deleted file]
branches/plugfest/doc/doxygen/header.html [deleted file]
branches/plugfest/doc/doxygen/index.html [deleted file]
branches/plugfest/doc/doxygen/libmapi-concepts.doxy [deleted file]
branches/plugfest/doc/doxygen/libmapi-examples.doxy [deleted file]
branches/plugfest/doc/doxygen/libmapi-mainpage.doxy [deleted file]
branches/plugfest/doc/doxygen/pictures/24px-Cc-by_white.svg.png [deleted file]
branches/plugfest/doc/doxygen/pictures/24px-Cc-sa_white.svg.png [deleted file]
branches/plugfest/doc/doxygen/pictures/CC_SomeRightsReserved.png [deleted file]
branches/plugfest/doc/doxygen/pictures/body_top_bg2.jpg [deleted file]
branches/plugfest/doc/doxygen/pictures/header.jpg [deleted file]
branches/plugfest/doc/doxygen/pictures/middle_bg.jpg [deleted file]
branches/plugfest/doc/doxygen/pictures/nav_tab.gif [deleted file]
branches/plugfest/doc/doxygen/pictures/pixel_grey.gif [deleted file]
branches/plugfest/doc/examples/Makefile [deleted file]
branches/plugfest/doc/examples/fetchappointment.c [deleted file]
branches/plugfest/doc/examples/fetchmail.c [deleted file]
branches/plugfest/doc/examples/mapi_sample1.c [deleted file]
branches/plugfest/doc/examples/multiple_notif.c [deleted file]
branches/plugfest/doc/howto.txt [deleted file]
branches/plugfest/doc/man/man1/exchange2ical.1 [deleted file]
branches/plugfest/doc/man/man1/exchange2mbox.1 [deleted file]
branches/plugfest/doc/man/man1/mapiprofile.1 [deleted file]
branches/plugfest/doc/man/man1/mapitest.1 [deleted file]
branches/plugfest/doc/man/man1/openchangeclient.1 [deleted file]
branches/plugfest/doc/man/man1/openchangepfadmin.1 [deleted file]
branches/plugfest/doc/man/man3/mapidump.3 [deleted file]
branches/plugfest/exchange.idl [deleted file]
branches/plugfest/idl_types.h [deleted file]
branches/plugfest/install-sh [deleted file]
branches/plugfest/libexchange2ical/exchange2ical.c [deleted file]
branches/plugfest/libexchange2ical/exchange2ical.h [deleted file]
branches/plugfest/libexchange2ical/exchange2ical_component.c [deleted file]
branches/plugfest/libexchange2ical/exchange2ical_property.c [deleted file]
branches/plugfest/libexchange2ical/exchange2ical_utils.c [deleted file]
branches/plugfest/libexchange2ical/ical2exchange.c [deleted file]
branches/plugfest/libexchange2ical/ical2exchange_property.c [deleted file]
branches/plugfest/libexchange2ical/libexchange2ical.c [deleted file]
branches/plugfest/libexchange2ical/libexchange2ical.h [deleted file]
branches/plugfest/libexchange2ical/libical2exchange.c [deleted file]
branches/plugfest/libmapi++.pc.in [deleted file]
branches/plugfest/libmapi++/Doxyfile.in [deleted file]
branches/plugfest/libmapi++/attachment.h [deleted file]
branches/plugfest/libmapi++/clibmapi.h [deleted file]
branches/plugfest/libmapi++/examples/foldertree.cpp [deleted file]
branches/plugfest/libmapi++/examples/messages.cpp [deleted file]
branches/plugfest/libmapi++/folder.h [deleted file]
branches/plugfest/libmapi++/libmapi++-example.doxy [deleted file]
branches/plugfest/libmapi++/libmapi++-mainpage.doxy [deleted file]
branches/plugfest/libmapi++/libmapi++.h [deleted file]
branches/plugfest/libmapi++/mapi_exception.h [deleted file]
branches/plugfest/libmapi++/message.h [deleted file]
branches/plugfest/libmapi++/message_store.h [deleted file]
branches/plugfest/libmapi++/object.h [deleted file]
branches/plugfest/libmapi++/profile.h [deleted file]
branches/plugfest/libmapi++/property_container.h [deleted file]
branches/plugfest/libmapi++/session.h [deleted file]
branches/plugfest/libmapi++/src/attachment.cpp [deleted file]
branches/plugfest/libmapi++/src/folder.cpp [deleted file]
branches/plugfest/libmapi++/src/mapi_exception.cpp [deleted file]
branches/plugfest/libmapi++/src/message.cpp [deleted file]
branches/plugfest/libmapi++/src/object.cpp [deleted file]
branches/plugfest/libmapi++/src/profile.cpp [deleted file]
branches/plugfest/libmapi++/src/session.cpp [deleted file]
branches/plugfest/libmapi++/tests/attach_test.cpp [deleted file]
branches/plugfest/libmapi++/tests/exception_test.cpp [deleted file]
branches/plugfest/libmapi++/tests/profile_test.cpp [deleted file]
branches/plugfest/libmapi++/tests/test.cpp [deleted file]
branches/plugfest/libmapi.pc.in [deleted file]
branches/plugfest/libmapi/Doxyfile.in [deleted file]
branches/plugfest/libmapi/FXICS.c [deleted file]
branches/plugfest/libmapi/IABContainer.c [deleted file]
branches/plugfest/libmapi/IMAPIContainer.c [deleted file]
branches/plugfest/libmapi/IMAPIFolder.c [deleted file]
branches/plugfest/libmapi/IMAPIProp.c [deleted file]
branches/plugfest/libmapi/IMAPISession.c [deleted file]
branches/plugfest/libmapi/IMAPISupport.c [deleted file]
branches/plugfest/libmapi/IMAPITable.c [deleted file]
branches/plugfest/libmapi/IMSProvider.c [deleted file]
branches/plugfest/libmapi/IMessage.c [deleted file]
branches/plugfest/libmapi/IMsgStore.c [deleted file]
branches/plugfest/libmapi/IProfAdmin.c [deleted file]
branches/plugfest/libmapi/IStoreFolder.c [deleted file]
branches/plugfest/libmapi/IStream.c [deleted file]
branches/plugfest/libmapi/IUnknown.c [deleted file]
branches/plugfest/libmapi/IXPLogon.c [deleted file]
branches/plugfest/libmapi/async_emsmdb.c [deleted file]
branches/plugfest/libmapi/cdo_mapi.c [deleted file]
branches/plugfest/libmapi/conf/build.sh [deleted file]
branches/plugfest/libmapi/conf/codepage-lcid [deleted file]
branches/plugfest/libmapi/conf/mapi-codes [deleted file]
branches/plugfest/libmapi/conf/mapi-named-properties [deleted file]
branches/plugfest/libmapi/conf/mapi-properties [deleted file]
branches/plugfest/libmapi/conf/mparse.pl [deleted file]
branches/plugfest/libmapi/emsmdb.c [deleted file]
branches/plugfest/libmapi/emsmdb.h [deleted file]
branches/plugfest/libmapi/freebusy.c [deleted file]
branches/plugfest/libmapi/fxparser.c [deleted file]
branches/plugfest/libmapi/fxparser.h [deleted file]
branches/plugfest/libmapi/libmapi.h [deleted file]
branches/plugfest/libmapi/libmapi_private.h [deleted file]
branches/plugfest/libmapi/lzfu.c [deleted file]
branches/plugfest/libmapi/mapi_context.h [deleted file]
branches/plugfest/libmapi/mapi_id_array.c [deleted file]
branches/plugfest/libmapi/mapi_id_array.h [deleted file]
branches/plugfest/libmapi/mapi_nameid.c [deleted file]
branches/plugfest/libmapi/mapi_notification.h [deleted file]
branches/plugfest/libmapi/mapi_object.c [deleted file]
branches/plugfest/libmapi/mapi_object.h [deleted file]
branches/plugfest/libmapi/mapi_profile.h [deleted file]
branches/plugfest/libmapi/mapi_provider.h [deleted file]
branches/plugfest/libmapi/mapicode.h [deleted file]
branches/plugfest/libmapi/mapidefs.h [deleted file]
branches/plugfest/libmapi/mapidump.c [deleted file]
branches/plugfest/libmapi/mapidump.h [deleted file]
branches/plugfest/libmapi/nspi.c [deleted file]
branches/plugfest/libmapi/nspi.h [deleted file]
branches/plugfest/libmapi/property.c [deleted file]
branches/plugfest/libmapi/simple_mapi.c [deleted file]
branches/plugfest/libmapi/socket/interface.c [deleted file]
branches/plugfest/libmapi/socket/netif.c [deleted file]
branches/plugfest/libmapi/socket/netif.h [deleted file]
branches/plugfest/libmapi/utils.c [deleted file]
branches/plugfest/libmapi/x500.c [deleted file]
branches/plugfest/libmapiadmin.pc.in [deleted file]
branches/plugfest/libmapiadmin/Doxyfile.in [deleted file]
branches/plugfest/libmapiadmin/libmapiadmin-mainpage.doxy [deleted file]
branches/plugfest/libmapiadmin/libmapiadmin.h [deleted file]
branches/plugfest/libmapiadmin/mapiadmin.c [deleted file]
branches/plugfest/libmapiadmin/mapiadmin_user.c [deleted file]
branches/plugfest/libocpf.pc.in [deleted file]
branches/plugfest/libocpf/Doxyfile.in [deleted file]
branches/plugfest/libocpf/examples/common_OLEGUID.ocpf [deleted file]
branches/plugfest/libocpf/examples/sample_appointment.ocpf [deleted file]
branches/plugfest/libocpf/examples/sample_task.ocpf [deleted file]
branches/plugfest/libocpf/lex.h [deleted file]
branches/plugfest/libocpf/lex.l [deleted file]
branches/plugfest/libocpf/ocpf-documentation.doxy [deleted file]
branches/plugfest/libocpf/ocpf.h [deleted file]
branches/plugfest/libocpf/ocpf.y [deleted file]
branches/plugfest/libocpf/ocpf_api.c [deleted file]
branches/plugfest/libocpf/ocpf_api.h [deleted file]
branches/plugfest/libocpf/ocpf_bison.supp [deleted file]
branches/plugfest/libocpf/ocpf_context.c [deleted file]
branches/plugfest/libocpf/ocpf_dump.c [deleted file]
branches/plugfest/libocpf/ocpf_dump.h [deleted file]
branches/plugfest/libocpf/ocpf_private.h [deleted file]
branches/plugfest/libocpf/ocpf_public.c [deleted file]
branches/plugfest/libocpf/ocpf_server.c [deleted file]
branches/plugfest/libocpf/ocpf_write.c [deleted file]
branches/plugfest/mapiproxy/Doxyfile.in [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy.c [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy.h [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy_nspi.c [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy_proto.h [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy_rfr.c [deleted file]
branches/plugfest/mapiproxy/dcesrv_mapiproxy_unused.c [deleted file]
branches/plugfest/mapiproxy/documentation/Mainpage.doxy [deleted file]
branches/plugfest/mapiproxy/documentation/mapiproxy-documentation.doxy [deleted file]
branches/plugfest/mapiproxy/documentation/mapistore-documentation.doxy [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_false_nspi.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true_custom_nspi.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/devdoc.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_emsmdb_graph.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001_fix.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_002.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_hook_life.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_logo.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_overview.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_struct.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapistore.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mapistore_logo.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_one.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_two.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_pack.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_unpack.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/mpm_stack.png [deleted file]
branches/plugfest/mapiproxy/documentation/pictures/userdoc.png [deleted file]
branches/plugfest/mapiproxy/libmapiproxy.pc.in [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_module.c [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_server.c [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.c [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/entryid.c [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/libmapiproxy.h [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/mapi_handles.c [deleted file]
branches/plugfest/mapiproxy/libmapiproxy/openchangedb.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver.pc.in [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver.h [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcdata.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfold.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfxics.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcmsg.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcnotif.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcperm.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcprpt.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcstor.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxctabl.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxomsg.c [deleted file]
branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxorule.c [deleted file]
branches/plugfest/mapiproxy/libmapistore.pc.in [deleted file]
branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/database/mapistoredb.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/database/mapistoredb_conf.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_backend.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_backend.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_backend_public.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_defs.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_errors.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_indexing.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_interface.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_ldb_wrap.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_namedprops.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_private.h [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_processing.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/mapistore_tdb_wrap.c [deleted file]
branches/plugfest/mapiproxy/libmapistore/tests/mapistore_test.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_cache.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_cache.h [deleted file]
branches/plugfest/mapiproxy/modules/mpm_cache_ldb.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_cache_stream.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_downgrade.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_dummy.c [deleted file]
branches/plugfest/mapiproxy/modules/mpm_pack.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.h [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp_object.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcfold.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcmsg.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcnotif.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcperm.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcprpt.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxcstor.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxctabl.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxomsg.c [deleted file]
branches/plugfest/mapiproxy/servers/default/emsmdb/oxorule.c [deleted file]
branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c [deleted file]
branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.h [deleted file]
branches/plugfest/mapiproxy/servers/default/nspi/emsabp.c [deleted file]
branches/plugfest/mapiproxy/servers/default/nspi/emsabp_property.c [deleted file]
branches/plugfest/mapiproxy/servers/default/nspi/emsabp_tdb.c [deleted file]
branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.c [deleted file]
branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.h [deleted file]
branches/plugfest/missing [deleted file]
branches/plugfest/ndr_mapi.c [deleted file]
branches/plugfest/property.idl [deleted file]
branches/plugfest/pymapi/msg_store.c [deleted file]
branches/plugfest/pymapi/object.c [deleted file]
branches/plugfest/pymapi/pymapi.c [deleted file]
branches/plugfest/pymapi/pymapi.h [deleted file]
branches/plugfest/pymapi/session.c [deleted file]
branches/plugfest/pyopenchange/pymapi.c [deleted file]
branches/plugfest/pyopenchange/pymapi.h [deleted file]
branches/plugfest/pyopenchange/pymapistore.c [deleted file]
branches/plugfest/pyopenchange/pymapistore.h [deleted file]
branches/plugfest/pyopenchange/pymapistoredb.c [deleted file]
branches/plugfest/pyopenchange/pyocpf.c [deleted file]
branches/plugfest/pyopenchange/pyocpf.h [deleted file]
branches/plugfest/pyopenchange/tests/mapistore_test.py [deleted file]
branches/plugfest/pyopenchange/tests/mapistoredb_test.py [deleted file]
branches/plugfest/pyopenchange/tests/ocpf_test.py [deleted file]
branches/plugfest/pyopenchange/tests/properties.py [deleted file]
branches/plugfest/python/openchange/__init__.py [deleted file]
branches/plugfest/python/openchange/mailbox.py [deleted file]
branches/plugfest/python/openchange/provision.py [deleted file]
branches/plugfest/python/openchange/tests/__init__.py [deleted file]
branches/plugfest/python/openchange/tests/test_mailbox.py [deleted file]
branches/plugfest/python/openchange/tests/test_provision.py [deleted file]
branches/plugfest/python/openchange/urlutils.py [deleted file]
branches/plugfest/qt/demo/demoapp.cpp [deleted file]
branches/plugfest/qt/demo/demoapp.h [deleted file]
branches/plugfest/qt/demo/main.cpp [deleted file]
branches/plugfest/qt/lib/foldermodel.cpp [deleted file]
branches/plugfest/qt/lib/foldermodel.h [deleted file]
branches/plugfest/qt/lib/messagesmodel.cpp [deleted file]
branches/plugfest/qt/lib/messagesmodel.h [deleted file]
branches/plugfest/script/check_exchange [deleted file]
branches/plugfest/script/installman.sh [deleted file]
branches/plugfest/script/installoc.sh [deleted file]
branches/plugfest/script/installsamba4.sh [deleted file]
branches/plugfest/script/mapi_object_init.prop [deleted file]
branches/plugfest/script/mkproto.pl [deleted file]
branches/plugfest/script/mkrelease.sh [deleted file]
branches/plugfest/script/mkversion.sh [deleted file]
branches/plugfest/script/samba4_ver.sh [deleted file]
branches/plugfest/script/smoketest.sh [deleted file]
branches/plugfest/script/uninstallman.sh [deleted file]
branches/plugfest/script/uno.dfn [deleted file]
branches/plugfest/setup/AD/oc_provision_configuration.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_attributes.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_auxiliary_class.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_container.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_modify.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_objectCategory.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_possSuperior.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_sub_CfgProtocol.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_sub_mailGateway.ldif [deleted file]
branches/plugfest/setup/AD/oc_provision_schema_subcontainer.ldif [deleted file]
branches/plugfest/setup/AD/prefixMap.txt [deleted file]
branches/plugfest/setup/AD/provision_schema_basedn_modify.ldif [deleted file]
branches/plugfest/setup/openchange_newuser [deleted file]
branches/plugfest/setup/openchange_provision [deleted file]
branches/plugfest/setup/openchangedb/oc_provision_openchange_init.ldif [deleted file]
branches/plugfest/setup/openchangedb/oc_provision_openchange_mailbox.ldif [deleted file]
branches/plugfest/setup/profiles/oc_profiles_init.ldif [deleted file]
branches/plugfest/setup/profiles/oc_profiles_schema.ldif [deleted file]
branches/plugfest/testprogs/blackbox/expected_output--help.txt [deleted file]
branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax1.txt [deleted file]
branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax2.txt [deleted file]
branches/plugfest/testprogs/blackbox/expected_output--usage.txt [deleted file]
branches/plugfest/testprogs/blackbox/expected_output--version.txt [deleted file]
branches/plugfest/testprogs/blackbox/subunit.sh [deleted file]
branches/plugfest/testprogs/blackbox/test_mapiprofile.sh [deleted file]
branches/plugfest/testprogs/blackbox/test_openchangeclient.py [deleted file]
branches/plugfest/testprogs/check_fasttransfer.c [deleted file]
branches/plugfest/testprogs/check_mbox.py [deleted file]
branches/plugfest/testprogs/test_asyncnotif.c [deleted file]
branches/plugfest/utils/backup/openchangebackup.c [deleted file]
branches/plugfest/utils/backup/openchangebackup.h [deleted file]
branches/plugfest/utils/backup/openchangemapidump.c [deleted file]
branches/plugfest/utils/exchange2ical_tool.c [deleted file]
branches/plugfest/utils/exchange2mbox.c [deleted file]
branches/plugfest/utils/mapiprofile.c [deleted file]
branches/plugfest/utils/mapitest/Doxyfile.in [deleted file]
branches/plugfest/utils/mapitest/data/lzfu/testcase.rtf [deleted file]
branches/plugfest/utils/mapitest/data/lzxpress/001_Outlook_2007_in_ModifyRecipients_comp.dat [deleted file]
branches/plugfest/utils/mapitest/data/lzxpress/002_Outlook_2007_in_Tables_operations_comp.dat [deleted file]
branches/plugfest/utils/mapitest/mapitest.c [deleted file]
branches/plugfest/utils/mapitest/mapitest.h [deleted file]
branches/plugfest/utils/mapitest/mapitest_common.c [deleted file]
branches/plugfest/utils/mapitest/mapitest_print.c [deleted file]
branches/plugfest/utils/mapitest/mapitest_stat.c [deleted file]
branches/plugfest/utils/mapitest/mapitest_suite.c [deleted file]
branches/plugfest/utils/mapitest/module.c [deleted file]
branches/plugfest/utils/mapitest/modules/mapitest.doxy [deleted file]
branches/plugfest/utils/mapitest/modules/module_errorchecks.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_lcid.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_lzxpress.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_mapidump.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_noserver.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_nspi.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcfold.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcfxics.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcmsg.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcnotif.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcperm.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcprpt.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxcstor.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxctable.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxomsg.c [deleted file]
branches/plugfest/utils/mapitest/modules/module_oxorule.c [deleted file]
branches/plugfest/utils/mapitrace/Makefile.PL [deleted file]
branches/plugfest/utils/mapitrace/lib/MAPI/Dump_EcDoRpc.pm [deleted file]
branches/plugfest/utils/mapitrace/lib/MAPI/EcDoRpc.pm [deleted file]
branches/plugfest/utils/mapitrace/lib/MAPI/Graph.pm [deleted file]
branches/plugfest/utils/mapitrace/lib/MAPI/Regression.pm [deleted file]
branches/plugfest/utils/mapitrace/lib/MAPI/Statistic.pm [deleted file]
branches/plugfest/utils/mapitrace/mapitrace [deleted file]
branches/plugfest/utils/openchange-tools.c [deleted file]
branches/plugfest/utils/openchange-tools.h [deleted file]
branches/plugfest/utils/openchangeclient.c [deleted file]
branches/plugfest/utils/openchangeclient.h [deleted file]
branches/plugfest/utils/openchangepfadmin.c [deleted file]
branches/plugfest/utils/openchangepfadmin.h [deleted file]
branches/plugfest/utils/schemaIDGUID.c [deleted file]

diff --git a/branches/plugfest/.bzrignore b/branches/plugfest/.bzrignore
deleted file mode 100644 (file)
index deb99c7..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-aclocal.m4
-config.h
-config.h.in
-config.log
-config.status
-libmapi.pc
-configure
-gen_ndr
-libmapi/mapicode.c
-libmapi/mapicode.h
-libmapi/mapitags.c
-libmapi/mapitags.h
-libmapi/proto.h
-libmapi/utf8_convert.yy.c
-server/dcesrv_proto.h
-torture/torture_proto.h
-libmapi.so.*
-mapicodes_enum.h
-mapitags_enum.h
-bin/*
-libmapi/proto_private.h
-providers/providers_proto.h
-tags
-*.pc
-*.so.*
-libmapiadmin/proto.h
-libmapiadmin/proto_private.h
-*.po
-libmapi/mapi_nameid_private.h
-Doxyfile
-libmapi/version.h
-config.mk
-libocpf/ocpf.tab.c
-libocpf/ocpf.tab.c
-libocpf/lex.yy.c
-libocpf/proto.h
-libocpf/proto_private.h
-libocpf/proto_private.h
-libocpf/ocpf.tab.h
-autom4te.cache
-apidocs
-utils/mapitest/mapitest_proto.h
-utils/mapitest/proto.h
-samba4
-tags
-libmapi/mapi_namedid.h
-libmapi/mapi_nameid.h
-libmapi++/examples/foldertree
-libmapi++/examples/messages
-_trial_temp
-mapiproxy/libmapiproxy/openchangedb_property.c
-stamp-h1
-libmapi/codepage_lcid.c
-pyopenchange/pymapi_properties.c
-setup/mapistore/mapistore_namedprops.ldif
diff --git a/branches/plugfest/COPYING b/branches/plugfest/COPYING
deleted file mode 100644 (file)
index 94a9ed0..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/branches/plugfest/ChangeLog b/branches/plugfest/ChangeLog
deleted file mode 100644 (file)
index 92e80a7..0000000
+++ /dev/null
@@ -1,7467 +0,0 @@
-2010-08-29
-    jkerihuel
-       [r2144]
-               Add CopyProfile and DuplicateProfile to IProfAdmin interface
-
-2010-08-27
-    jkerihuel
-       [r2142]
-               Add the localaddress patch prior Samba4 integration. Pending new
-               Samba4 localaddress patch fixing memory leaks in the pipe.
-       [r2141]
-               Include a mapitest test suite / challenge for lzxpress
-               
-               The idea of this test is to check if lzxpress compressed blobs
-               provided by OpenChange are the same than Outlook ones. The test takes
-               a Outlook->Exchange capture file with compressed blob, pull the
-               content, decompressed the content, recompress the content and check
-               the output for differing bytes.
-               
-               This challenge code should give us good information when lzxpress
-               compress code is fixed. Additionally you can uncomment the compression
-               code in libmapi/emsmdb.c to do further testing.
-       [r2140]
-               - Add implementation for EcDoRpcExt2 (0xB) RPC opnum. Current code
-                 doesn't provide compression for request and use obfuscation
-                 instead. However mapi_response makes use of xpress and are
-                 decompressed properly.
-               
-               - EcDoRpcExt2 implemented without subcontexts but uint8_t array
-               
-               - add a wrapper for emsmdb transaction to switch between
-                 EcDoConnect/EcDoRpc and EcDoConnectEx/EcDoRpcExt2 depending on MAPI
-                 profile 'exchange version' attribute.
-               
-               NOTE: emsmdb.c implements the logic for using compressed blob and
-               checks whether compressed or obfuscation should be used depending on
-               blob length. However this behavior has been commented out because
-               comrpessed blobs are rejected by Exchange (ecRpcFormat 0x4B6 error).
-2010-08-26
-    jkerihuel
-       [r2139]
-               Reference profile structure in mapitest structure.
-               
-               Use profile->mailbox instead of szDisplayName for sending mapitest
-               emails. This also fix ResolveNames mapitest issues when conflicts
-               between usernames exist (e.g. user1, user11, user100).
-    bradh
-       [r2137]
-               Prevent segfault if we don't have any appointments.
-               
-               Resolves issue #284.
-               
-               Also prevent leaking talloc context in a couple of error cases.
-       [r2136]
-               Merge Rev 2133 from branches/current-samba4 to trunk.
-               
-               I inadvertently committed this to the wrong branch.
-               
-               This pushes the fix for #229 into trunk.
-
-2010-08-23
-    jelmer
-       [r2134]
-               Update bzr ignores.
-
-2010-08-18
-    jkerihuel
-       [r2131]
-               Add a git update case in installsamba.sh script and make it available
-               within OpenChange Makefile.
-
-2010-08-17
-    jkerihuel
-       [r2127]
-               Manually commit remaining changes from current-samba4 into trunk
-       [r2126]
-               Merge current-samba4 branch back into trunk
-
-2010-08-11
-    bradh
-       [r2117]
-               Microsoft confirmed that RopGetValidAttachments isn't supported in Exchange 2010.
-       [r2114]
-               fix missing part of r2113.
-       [r2113]
-               Fixes to better work with Exchange 2010.
-               
-               Still some open issues to resolving bug 227.
-       [r2112]
-               Fix handling of "not applicable" tests when using --mapi-calls
-               
-               Prior to this, if you asked for a test that was after a test that was
-               flagged as suppressed, the test you asked for didn't get run, and the
-               flagged test was reported instead.
-2010-08-10
-    bradh
-       [r2111]
-               Correctly handle cases where the start date of the range is after the first calendar appointment.
-               
-               Resolves bug:272.
-               
-               Thanks to Eric Reischer for reporting the problem and testing the fix.
-
-2010-08-03
-    bradh
-       [r2107]
-               trivial comment cleanup.
-
-2010-08-01
-    jkerihuel
-       [r2105]
-               Move from auto-generated mapicode.h to static code.
-       [r2104]
-               Add configure.ac support for gthread implementation but give preferences to pthread
-               Add THREAD_CFLAGS to config.mk.in
-               ifdef between pthread and gthread in libmapi_private.h
-       [r2103]
-               Check for libpthread in configure.ac and make this lib optional
-               Add references to config.h in libmapi_private.h
-               Replace references to config.h with libmapi_private.h
-
-2010-07-31
-    jkerihuel
-       [r2101]
-               - Add an exchange-version parameter to mapiprofile structure and tool
-                 which let user choose between 0x0/0x2 or 0xA/0xB
-               - Tweak libmapi implementation to allow EcDoConnectEx usage
-               - Improve mapiprofile --dump to show more useful parameters
-       [r2100]
-               - Add custom NDR implementation for EcDoConnectEx to bypass pointers/array problems
-               - make use of mapi2k7_AuxInfo structure for rgbAuxOut
-               
-               - Create a subcontext for AUX_HEADER structures to jump over unknown cases properly.
-       [r2099]
-               Handle the no obfuscation nor compression RPC_HEADER_EXT flags case 
-    bradh
-       [r2098]
-               Trivial api documentation change.
-
-2010-07-29
-    bradh
-       [r2095]
-               Another trivial API documentation fix.
-       [r2094]
-               More trivial API documentation fixes.
-       [r2093]
-               Minor API documentation fix.
-       [r2092]
-               Implement some null pointer checks.
-               
-               Also rewords some API documentation.
-               
-               Original issue and patch by Erik Hovland - thanks again. I implemented it
-               with some slight changes.
-
-2010-07-28
-    bradh
-       [r2090]
-               Fix RecipientRow IDL to match MS-OXCDATA 2.9.3
-               
-               This allows handling of addresses that contain X400 format content.
-               
-               Patch by Samuel Sieb and I, resolves ticket #250.
-
-2010-07-26
-    jkerihuel
-       [r2087]
-               Fix a crash in openchangeclient vs Exchange 2010:
-               When Queryrows is called on Exchange 2010 and no rows are available, QueryRows returns MAPI_E_NOT_IMPLEMENTED error (0x8004FFFF).
-               Ensure we have at least one message to fetch in openchangeclient --fetchmail prior calling QueryRows.
-
-2010-07-24
-    jkerihuel
-       [r2079]
-               Very basic use of OpenUserMailbox in openchangeclient.
-               Doesn't handle clustered Exchange servers.
-    bradh
-       [r2077]
-               Rename a few function arguments to avoid doxygen warnings.
-               
-               This is a workaround, but will allow easier checking for the future.
-       [r2076]
-               Update doxygen configuration to match latest version
-       [r2075]
-               Add missing doxygen parameter information.
-       [r2074]
-               Fix a couple of doxygen issues.
-
-2010-07-23
-    jkerihuel
-       [r2072]
-               Use sed in Makefile to replace local headers reference in installed headers
-       [r2071]
-               Use local headers rather than installed ones
-               Propagate this behavior to torture test suites and bindings
-       [r2070]
-               Remove libmapi/defs_private.h
-               Remove references to libmapi/defs_private.h in OpenChange tree
-       [r2069]
-               Remove auto-generated headers for libmapi:
-               - Add libmapi_private.h for private definitions
-               - Use libmapi.h for public definitions
-               
-               - Merge libmapi_private.h and defs_private.h
-               
-               Use local headers rather than installed ones
-               
-               Change libmapi compilation list to have ndr_exchange_c.h 
-               available for other libmapi C files.
-               
-               Remove references to libmapi/proto_private.h in OpenChange tree
-               Remove references to libmapi/defs_private.h in OpenChange tree
-
-2010-07-20
-    bradh
-       [r2065]
-               Modify the samba build script to make it more flexible.
-               
-               Heavily based on changes provided by Andrew Tridgell. Thanks!
-
-2010-07-15
-    jkerihuel
-       [r2063]
-               Use local includes rather than installed ones for openchange tools/utils
-       [r2062]
-               Use local includes rather than installed ones for mparse.pl
-       [r2061]
-               Use local includes rather than installed ones for mapiproxy and server components
-       [r2060]
-               Use local includes rather than installed ones
-       [r2059]
-               Use local includes rather than installed ones for libexchange2ical
-               Sanitize function declarations
-       [r2058]
-               Remove proto and proto_private.h from ignore list
-       [r2057]
-               Remove auto-generated headers for libmapiadmin
-               Use local includes rather than installed ones for libmapiadmin
-       [r2056]
-               Remove proto and proto_private.h from ignore list
-       [r2055]
-               Remove auto-generated headers for libocpf
-               Use local includes rather than installed ones for libocpf
-       [r2054]
-               Fix bug #248 misnamed PR_RECIPIENTS_FLAGS
-       [r2053]
-               Add IDL implementation for WritePerUserInformation.
-               
-               Note: This IDL suffers from the same problems than SetMessageReadFlags. It depends on logon_id and Logon flags.
-
-2010-07-14
-    jkerihuel
-       [r2051]
-               Add server-side preliminary ReloadCachedInformation implementation.
-               The Rop only support a specific case and it is expected to work better after
-               integration of the OCPF contexts for message transaction.
-       [r2050]
-               Missing header for stat()
-
-2010-07-06
-    bradh
-       [r2048]
-               Implement RopSetReceiveFolder
-               
-               There is a part of this missing (relating to modification times) that will be implemented
-               as part of the RopGetReceiveFolderTable implementation.
-               
-               This updates the mapitest code, including a change to the function signature for the
-               mapitest_print_retval_step() function to take an explicit MAPISTATUS value instead of
-               relying on GetLastError().
-
-2010-07-04
-    bradh
-       [r2046]
-               Enhance the GetReceiveFolder ROP.
-               
-               This now tries all available MessageClass entries.
-       [r2045]
-               Enhance GetReceiveFolder mapitest.
-
-2010-07-03
-    bradh
-       [r2043]
-               Make sure objects are correctly init()'d and release()'d even in fault condition.
-       [r2042]
-               Make sure objects are correctly init()'d and release()'d even in failure case.
-       [r2041]
-               Make sure all objects are initialised, even in failure cases.
-       [r2040]
-               Trivial comment change.
-       [r2039]
-               Add a few more null pointer protections into fsocpf backend.
-               
-               Trying to get mapitest running...
-
-2010-07-02
-    bradh
-       [r2037]
-               Add mapitest unit test for DeleteMessages with multiple messages.
-       [r2036]
-               Implement DeleteMessages ROP.
-               
-               Adds message deletion support to mapistore core and fsocpf backend.
-               
-               I've been testing this with OXCMSG-SAVE-CHANGES-MESSAGE from mapitest. 
-       [r2035]
-               Make it a bit easier to use alternative GIT tree.
-       [r2034]
-               Ensure we return the correct MID from SaveChangesMessage
-
-2010-06-28
-    jkerihuel
-       [r2031]
-               Fix a segfault when releasing handles. We kept 
-               processing the handles list after releasing the element.
-    bradh
-       [r2030]
-               Add some simple tests for openchangeclient.
-       [r2029]
-               Unbreak compilation problems from previous commit.
-       [r2028]
-               Ensure we don't duplicate folder names.
-               
-               This adds appropriate checks for both system (openchangedb) and normal (mapistore)
-               folders. The mapitest code also checks that the OPEN_IF_EXISTS flag works. 
-               
-               I had to add an additional mapitest_print_retval() variation, since successful operations
-               don't reset errno.
-
-2010-06-26
-    jkerihuel
-       [r2026]
-               add support for PT_CLSID and PT_SVREID in cast_mapi_SPropValue
-       [r2024]
-               Add a memory context argument to cast_mapi_SPropValue to be less
-               dependent to libmapi and allow better memory allocation handling.
-               
-               Propagate API change among OpenChange source tree
-               
-               Add doxygen documentation for cast_mapi_SPropValue
-    bradh
-       [r2025]
-               Make sure we always set the opnum and handle, even for error cases.
-       [r2023]
-               Suppress compilation noise in a few places for consistency with the rest of the Makefile
-2010-06-25
-    jkerihuel
-       [r2022]
-               Add ocpf_write support for PT_MV_STRING8, PT_MV_UNICODE, PR_MV_BINARY
-               and PT_MV_LONG
-       [r2021]
-               - Add documentation for PT_MV_LONG
-               - Update PT_BINARY section
-       [r2020]
-               - Fix PT_BINARY to now parse uint8_t 0x00 - 0xFF instead of previous
-                 (and incorrect) long items
-               
-               - Add implementation for PT_MV_LONG
-               - Clean up useless code
-       [r2018]
-               Add  mapidump_SPropValue for PT_MV_LONG
-       [r2017]
-               Add support for PT_MV_UNICODE type
-       [r2016]
-               Add  mapidump_SPropValue for PT_MV_UNICODE
-       [r2015]
-               Add support for PT_MV_BINARY type
-               
-               This implementation required to add a Binary_r within ocpf_context to
-               union SPropValue_CTR content consistent among recursive parsing.
-       [r2014]
-               Add PT_MV_BINARY support in cast_SPropValue
-       [r2013]
-               Add mapidump_SPropValue entry for PT_MV_BINARY
-       [r2012]
-               Do not search context if context_id is NULL
-       [r2011]
-               - Add a function to synchronize data on filesystem after a write
-                 commit (close/fopen) and change open and context flags depending on
-                 their previous value.
-               
-               - If PR_MESSAGE_CLASS or PR_MESSAGE_CLASS_UNICODE is used for
-                 set_SPropValue, update context type.
-
-2010-06-23
-    jkerihuel
-       [r2009]
-               Fix warnings generating by the incorrect .tp_new first argument type
-       [r2007]
-               - Implement server-side skeleton for ReadPerUserInformation (0x63)
-       [r2006]
-               - Use external TALLOC context for cast_SPropValue rather than
-               global_mapi_ctx->mem_ctx. This was preventing from using this function
-               properly in a context different from libmapi based application
-               (server).
-               
-               - Add cast_SPropValue support for PT_CLSID and PT_MV_LONG
-               
-               - add message path + id in the indexing database for mapistore case in
-                 SaveChangesMessage
-       [r2005]
-               Add default owner/full rights to new root folders created. Works with
-               Outlook 2003 (shift + delete for hard delete)
-       [r2004]
-               Add PT_SRVEID support in SPropValue (0xFB proptype)
-       [r2003]
-               Add owner / full-access rights for mailbox folders. It introduces less
-               stabilitity but offers wider range of available features.
-       [r2002]
-               Generate PidTagRights for PR_RIGHTS (used in openchangedb)
-2010-06-22
-    jkerihuel
-       [r2001]
-               - Complete fsocpf_get_path implementation
-               - Register message into indexing.tdb after SubmitMessage
-       [r2000]
-               Add ocpf_server_set_type python bindings.
-               
-               Ohhh looks like we have reached r2000 ;-)
-               
-                .-.                ,                                                     
-               `._ ,                           
-                  \ \                 o         
-                   \ `-,.                        
-                  .'o .  `.[]           o        
-               <~- - , ,[].'.[] ~>     ___                                               
-                :               :     (-~.)    
-                 `             '       `|'     
-                  `           '         |      
-                   `-.     .-'          |      
-               -----{. _ _ .}-------------------                                         
-       [r1998]
-               - Add SetProps server side implementation for mapistore messages
-               
-               - Add a preliminary set of properties within CreateMessage (not
-                 complete yet) as stated in MS-OXCMSG 3.2.5.2
-               
-               - Add SaveChangeMessages preliminary server side implementation
-               - Add SubmitMessage preliminary server side implementation
-               
-               - add mapistore and fsocpf backend implementation for
-                 SaveChangeMessages and SubmitMessage. Note: SubmitMesage is just a
-                 hack for now.
-       [r1997]
-               - Add a wrapper to set OCPF file TYPE
-               - Free/Allocate type on purpose
-       [r1996]
-               storing a mapistore_message within the message object is useless for
-               the moment. Clean-up this bit introduced with last commit.
-       [r1995]
-               - Add preliminary OCPF API for server purposes (used by
-                 mapistore_fsocpf)
-               
-               - ocpf_server API now allows caller to dynamically update
-                 properties. If the properties was already existing, updates its
-                 value.
-               
-               - Update ocpf_test.py to reflect this behavior
-               
-               - Add preliminary server side implementation for CreateMessage (server
-                 + mapistore + fsocpf backedn)
-               
-               - Add preliminary mapistore + fsocpf backend skeleton for SetProps
-                 operation
-    bradh
-       [r1994]
-               Typo fix in constant name.
-2010-06-21
-    jkerihuel
-       [r1993]
-               - Only prevent file opened in read-only to use write_commit
-               - Position the stream at the beginning of the file before writing
-       [r1992]
-               Defer ocpf file creation (fopen with w+) to ocpf_write_commit
-       [r1990]
-               Add rmdir support to mapistore python bindings
-       [r1989]
-               - Add mapistore python C/API support for:
-                 - add_context_indexing
-                 - add_context_ref_count
-                 - opendir
-                 - closedir
-                 - mkdir
-                 - errstr MAPISTORE error to string conversion
-               
-               - Update mapistore python test script to demonstrate
-               how to create a new folder using mapistore 
-       [r1988]
-               I may be wrong here, but that was the only way I could pass
-               a folderID from python's layer to mapistore C/API
-       [r1987]
-               If context is manually deleted using public API, we need to remove the destructor
-               we set during context init, otherwise talloc_free segfault occurs
-       [r1986]
-               talloc_strdup SPropValue strings
-       [r1985]
-               Add preliminary python bindings for mapistore
-2010-06-20
-    jkerihuel
-       [r1984]
-               Add FILETIME support for SPropValue
-       [r1982]
-               Add TypeCheck on SPropValue rather than blind cast
-       [r1981]
-               Add python binding for ocpf_write
-               Add quick test code to ensure it works as expected
-       [r1980]
-               - Use SPropValue python object in ocpf module
-               - Add a function binding to retrieve SPropValue array from OCPF file
-               - Modify sample to test this behavior
-       [r1979]
-               - Move OCPF python bindings to pyopenchange directory
-               - Install ocpf module within openchange/
-       [r1978]
-               - Check property type for SPropValue
-               - Add auto-generated pyopenchange/pymapi_properties.c to the ignore list
-       [r1977]
-               - Add preliminary OCPF python bindings
-               - Add a new pyopenchange python bindings directory:
-                 - Preliminary handling of SPropValue data structure
-               - Add some python bindings test files
-               - Add a mparse parser to generate python bindings declaration for mapi
-                 properties
-               - Build automatically python bindings ** We need to add Python as a
-                 required dependency **
-    bradh
-       [r1976]
-               Implement EmptyFolder and enhance DeleteFolder.
-               
-               This still has quite a way to go, but it does mostly work for folders, including recursion.
-       [r1975]
-               Add extended test code for folder creation / deletion.
-       [r1974]
-               Add libmapiserver support for EmptyFolder size calculations.
-
-2010-06-19
-    bradh
-       [r1972]
-               Trivial typo fix.
-       [r1971]
-               Fix comment.
-
-2010-06-17
-    jkerihuel
-       [r1969]
-               New test.
-       [r1968]
-               Second test commit.
-       [r1967]
-               Test commit
-
-2010-06-16
-    jkerihuel
-       [r1964]
-               Fix OOM used in sample_appointment.ocpf
-       [r1963]
-               Consolidate PSETID array and rely on libmapi definitions.
-
-2010-06-14
-    jkerihuel
-       [r1958]
-               Add server-side skeleton for WriteStream Rop.
-       [r1957]
-               Add server-side skeleton for SetSearchCriteria and GetSearchCritera
-               Rop.
-               
-               Improve GetSearchCriteria IDL and work around the null restriction
-               response size in GetSearchCriteria reply by tweaking generated code
-               into nopull,nopush,noprint
-               
-               Add generated mapistore ldif file to the ignore list
-       [r1955]
-               - Add preliminary implementation for named properties support in
-                 mapistore. The API is yet very preliminary (init + get mapped
-                 property ID), but is enough to return consistent data to Outlook and
-                 make its behavior more reliable.
-               
-               - mparse.pl now generates a LDIF file for the mapistore namedprops LDB
-                 database which maps named properties within namespaces and store
-                 default values for common/standard named properties Outlook is
-                 using.
-               
-               - add a custom ldb_connect wrapper in mapistore to allow mapistore to
-                 open multiple instances of the same mapi named properties ldb
-                 database.
-               
-               - Complete preliminary implementation of GetIDsFromNames in oxcprpt.c.
-2010-06-13
-    jkerihuel
-       [r1944]
-               - Fix some named properties
-               - Add a referenced propID value once it is mapped.
-               Will be used by mapistore to populate/generate the initial
-               nameid props database
-       [r1938]
-               Fix a bug with unmapped named properties lookup.
-               For convenience purposes GetProps accepts within input SPropTagArray
-               unmapped named properties we internally turn into mapped ones using
-               GetIDsFroNames. This behavior was incorrect cause we were looking for
-               properties within specific ranges. Replace this behavior with a global
-               lookup over named properties we know about.
-               
-               One limitation of this fix is that custom nameid properties (not referenced
-               within libmapi/conf/mapi-named-properties) won't be lookup. However it is
-               acceptable for the moment.
-    bradh
-       [r1943]
-               Fix signed / unsigned issue in openchangebackup utility.
-       [r1942]
-               Fix some signed/unsigned issues in libmapi.
-       [r1941]
-               Fix up signed / unsigned issues with libocpf.
-               
-               This changes the API to allow easy testing of failure vs results.
-       [r1940]
-               make sure that the 0 is interpreted as unsigned.
-       [r1939]
-               Fix a signed / unsigned comparison warning in libmapi.
-       [r1937]
-               Fix some signed / unsigned warnings in torture suite.
-       [r1936]
-               Avoid signed / unsigned comparison in libmapiadmin.
-       [r1935]
-               Avoid signed / unsigned comparison in openchangedb.
-       [r1934]
-               Avoid signed / unsigned comparisions in mapitest
-       [r1933]
-               Avoid signed / unsigned comparisons in FSOCPF backend.
-       [r1932]
-               Fill in initialisers.
-               
-               Avoids warning with gcc's -Wmissing-field-initializers option.
-    jelmer
-       [r1947]
-               Fix imports, clean up.
-       [r1946]
-               Raise exception on invalid arguments to openchange_mapistore_url.
-2010-06-12
-    jkerihuel
-       [r1931]
-               Fix duplicate
-    bradh
-       [r1930]
-               Use calculated len inside the loop, instead of calling strlen each time.
-2010-06-11
-    jkerihuel
-       [r1929]
-               Add new properties and PSETID
-2010-06-10
-    bradh
-       [r1928]
-               Change variable name to avoid shadowed variable name warning with ICC.
-       [r1927]
-               Add newline at end of file to avoid compiler warning with ICC.
-2010-06-09
-    bradh
-       [r1922]
-               Ensure server modules work when building with coverage enabled.
-    jelmer
-       [r1925]
-               Consistently use spaces rather than tabs.
-       [r1924]
-               Remove string exception.
-       [r1923]
-               Remove duplication of openchange name in namespace.
-2010-06-08
-    jkerihuel
-       [r1921]
-               We didn't set a valid error_code for FindRow skeleton.
-       [r1920]
-               - Add server-side skeleton for ReadStream ROP.
-               - Add preliminary sanity checks on server-side FindRow
-2010-06-07
-    jkerihuel
-       [r1919]
-               Activate correct handling of retval in CreateFolder, despite Outlook
-               2007 bad behavior. Currently working on fixing this.
-       [r1918]
-               My small Outlook 2007 'Search missing ROP implementation' shouldn't
-               have been pushed ;-)
-       [r1917]
-               Add server-side skeleton for DeleteProperties Rop.
-       [r1916]
-               Implement server-size skeleton for GetPerUserGuid Rop.
-       [r1915]
-               Add server-side skeleton for GetPerUserLongTermIds Rop.
-       [r1914]
-               Add a preliminary stream object implementation
-               Add stream to emsmdbp convenient functions
-               
-               Create a handle in OpenStream
-       [r1913]
-               Add skeleton server side implementation for OpenStream
-       [r1912]
-               Forgot to redo changes here.
-       [r1911]
-               - Undo the SetMessageReadFlag IDL change and add an explanation, so we
-               don't make the same error twice and have pointers when we want to fix
-               it.
-               - Improve OpenMessage IDL and add the Reserved uint16_t bit.  
-               - Replace sizeof() with known types to prevent from IDL mismatch types
-               getting used.
-       [r1910]
-               For single process implementation, this code was fine.
-               For multi-process/contexts, when we need to cache information
-               to limit disk access, we should be using the ocpf element as
-               a memory context.
-               
-               This patch makes it possible.
-       [r1909]
-               Fix SetMessageReadFlag IDL.
-       [r1908]
-               Add server side skeleton for SetMessageReadFlag Rop.
-       [r1907]
-               the previous "or"ed value used in LogonType union was non handled
-               properly by pidl. Replace them with static values instead. This
-               prevent Outlook rom reconnecting in different situations.
-       [r1906]
-               This was causing the ndr push error. Outlook now receive OpenMessage
-               replies.
-2010-06-06
-    jkerihuel
-       [r1905]
-               With current implementation messages loaded and added to the mapistore
-               fsocpf private list were never released/unloaded/free'd.
-               
-               Similar behavior would have occured in the future with folders.  Add a
-               mapistore release_record function which will free/delete
-               information/data associated to a given folder/message.
-       [r1904]
-               - Add a preliminary OpenMessage reply implementation
-               - Add a function to resolve recipients against AD
-               - Add implementation of GetProps for mapistore messages
-               - Add mapistore getprops semantic
-               - Add fsocpf getprops implementation
-               
-               Note: current implementation does not free message object and memory
-               allocation needs to be revised.
-               
-               Note 2: openchangeclient --fetchmail works with this version :-)
-       [r1903]
-               Fix OpenMessage response size calculation. Subcontext size is already
-               calculated when we add the RecipientRow.length size to the global size.
-       [r1902]
-               - Make ocpf_recipClass public
-               - Turn path to headers to local in the lexer
-    bradh
-       [r1901]
-               Avoid leaking file descriptors on error.
-       [r1900]
-               Check return type for vasprintf in libocpf.
-2010-06-05
-    jkerihuel
-       [r1899]
-               Change mapistore openmessage semantics to fetch/retrieve recipients
-               and properties from mapistore. Modify OpenMessage ROP to dump
-               mapistore_message structure contents retrieved from mapistore.
-       [r1898]
-               Add a function to retrieve recipients from a parsed OCPF message.
-       [r1897]
-               This is a wip commit, so there is a lot of DEBUG across the code. This
-               will go away in further commits when the implementation is complete.
-               
-               - Add indexing API to mapistore. This API adds an indexing.tdb file
-                 within user's mapistore private space and associate MID and FID to
-                 their full mapistore path. Current implementation expects folder and
-                 mid are repsented under their hexadecimal representation and using
-                 the 0.16PRIx64 format string. It is not robust, but should do the
-                 trick for the moment. Among features available:
-                       - create/open the indexing database
-                       - search of existing indexing context
-                       - ref count assessors
-                       - add/delete fid/mid records
-                       - retrieve the list of folders pointing to an element (parsing
-                         of the mapistore URI)
-               
-               - Calls to the API have been added to the emsmdb provider
-                 implementation for initialization and automatic attempt to add
-                 entries whenever we open a folder.
-               
-               - Add preliminary code (relying on indexing API) for OpenMessage when
-                 parent handle is the store object. The entire set of cases for
-                 mailbox have been included.
-               
-               - Add mapistore code for op_openmessage operation.
-               - Add message list to the fsocpf context
-               - Add preliminary fsocpf backend code to open a message and store it
-                 within ocpf_context.
-    bradh
-       [r1896]
-               Refactored some of the FSOCPF backend.
-               
-               Basically some Extract Method refactoring to improve code re-use.
-       [r1895]
-               Use PRIx64 macro to avoid compiler warning.
-
-2010-06-03
-    jkerihuel
-       [r1893]
-               Add a new OCPF error OCPF_E_EXIST returned if a context already exist.
-               Prevent ocpf_new_context from adding a context to the list if it
-               already existed
-       [r1892]
-               Clean up debug code introduced while working on new libocpf version
-       [r1891]
-               - Make libocpf reentrant and use contexts/ref_count: No more globals
-                 are used in libocpf, they are all specific to contexts. libOCPF is
-                 now multi-process/thread friendly.
-               
-               - Remove Makefile bison compiling option with a bison %option in
-                 ocpf.y
-               
-               - Propagate libocpf changes to openchange server and utils
-               
-               - Fix a bug in file/folder listing when we have both folders and
-                 files.
-
-2010-06-01
-    jkerihuel
-       [r1889]
-               Untested code:
-               - add libmapiserver calculation for OpenMessage + related OXCDATA structures
-               - add skeleton implementation for server-side OpenMessage ROP
-               - add preliminary emsmdbp_object_message implementation/initialization
-       [r1888]
-               - Flush ocpf output when an error occurs
-               - Fix retrieval of message list in fsocpf backend
-       [r1887]
-               Add QueryRows implementation for mapistore in fsocpf backend.
-       [r1886]
-               - Add implementation for mapistore GetContentsTable
-               - Fix error reply for GetHierarchyTable
-       [r1885]
-               Fix how PT_DOUBLE data is passed among libmapi layers.
-       [r1884]
-               Fix an issue introduced in r1858. PT_DOUBLE patch is valid
-               for EMSMDB, not for NSPI. Rollback change for SPropValue
-       [r1883]
-               Add IPM.Note as a default receive folder for Inbox. This is used by
-               Outlook 2003 in the Send/Receive process.
-       [r1882]
-               Add server-side skeleton for GetAttachmentTable operation.
-       [r1881]
-               Implement SetSpooler server-side function. The function looks like a
-               skeleton ... and is one until we figure out what should be the
-               associated server-side mechanism when clients tells OpenChange server
-               they want to act as a mail spooler.
-       [r1880]
-               The LogonType cases were not handled properly
-       [r1879]
-               Replace existing method to retrieve emsabp_ctx in NSPI server code
-               with mpm session management API and comparison to actual dce_call structure.
-               
-               Replace MAPI_E_LOGON_FAILED rather than MAPI_E_NOT_ENOUGH_RESOURCES in emsmdb server
-               code when session is not found.
-2010-05-31
-    jkerihuel
-       [r1878]
-               Fix commit typo
-       [r1877]
-               We were adding context the list but were never removing them while the
-               context_id was added to the free list. This was causing
-               inconsistencies in mapistore context management + invalid
-               record/pointers to remain and cause OpenChange server to crash.
-               
-               Also add commented code to CreateFolder ROP that will need to be
-               enabled when we understand related Outlook behavior.
-       [r1875]
-               Patch from Bharath Acharya <abharath@gnome.org>:
-               
-               Print calendar items created at half hours
-       [r1874]
-               Minor warning fix - unused variable, not initialized
-       [r1873]
-               Fix a bug with invalid session leading to OpenChange server crash.
-               
-               We are now retrieving the emsmdbp_context pointer from our session
-               management API, after a comparison check vs dcesrv_call_state rather
-               than blindling and directly from dce_call.
-    bradh
-       [r1876]
-               Add better error path handling for the OXCFOLD-CREATE mapitest module.
-2010-05-30
-    jkerihuel
-       [r1872]
-               Extend mapistore API to have a mapistore URI associated to the backend
-               context. We want to limit creation of new contexts to the strict
-               minimum.
-               
-               Propagate this change to emsmdbp_object_folder_init. Only create a new
-               context if the uri intended to be opened is not already associated to
-               an existing context.
-       [r1870]
-               Handle additional LogonFlags cases for mailbox store in Logon_repl
-       [r1869]
-               Fix empty EcDoRpc replies. Outlook 2007 is now happy and stops from
-               disconnecting untimely.
-       [r1868]
-               Add server-side skeleton implementation for GetPermissionsTable
-       [r1867]
-               Pass parent mapi_handles to emsmdbp_object_folder_init rather than
-               specific parameters.
-               
-               Improve emsmdbp_object_folder_init to handle all the different folder
-               creation cases (root folder, mapistore or not, within mapistore or
-               openchangedb etc.) OpenChange server now passes mapistest folder
-               creation test properly.
-               
-               Fix a bug with context_id and mapistore. We were passing the parent
-               context, then deleting it at some point, causing the parent object to
-               be invalid. Now makes use of a reference counter we manage to keep
-               consistency.
-               
-               Add a convenient function to emsmdbp_object API to retrieve the
-               contextID associated to an object.
-               
-               It looks like we still have some issues when running both Outlook 2007
-               and Outlook 2003 at the same time with OpenChange server. There may be
-               some additional session checks to perform in the future.
-       [r1866]
-               Fix a bug in session management API:
-               
-               The mpm_session API uses id, id2, node and context_id from the dcerpc
-               session to uniquely identify a session context. 
-               
-               However when Outlook calls EcDoConnect multiple times, it still uses
-               the same dcerpc session. With previous API we were freeing the session
-               while it was still in used - which lead in unstable and unpredictable
-               crashes.
-               
-               The following patch adds a ref_count to the mpm_session API and server
-               code has been changed for emsmdb and nspi server to increment the
-               ref_count when the session already exists or create a new session if
-               none is already stored.
-               
-               Also the mpm_session code checks for the ref_count value and ensures
-               it is 0 before calling the destructor.
-       [r1865]
-               Call emsmdbp_object_folder_init in any case when creating a
-               folder. The emsmdbp_object function now do required checks and
-               initialize the folder's object properly.
-    bradh
-       [r1871]
-               trivial comment cleanup.
-       [r1864]
-               Minor cleanups for RopCreateFolder in the server.
-               
-               Prefix the mapistore_uri folder name in the path with "0x"
-               
-               Use ulFolderType (the folder) instead of ulType (ansi vs unicode) when
-               deciding which folder type to create.
-       [r1863]
-               Trivial comment fixes.
-2010-05-29
-    jkerihuel
-       [r1862]
-               Complete the opendir implementation for mapistore folders. Outlook
-               doesn't crash anymore when attempting to open mapistore folders.
-       [r1861]
-               was using the wrong function emsmdbp_is_mapistore instead of
-               mailboxstore.
-       [r1860]
-               Commit Brad Hards's implementation for Public Folders support.
-               Personal changes wrt initial patch:
-               
-               - remove mapistore_uri from openchangedb PF record at
-                 provisioning. Only new created folders should be mapistored.
-               - Add a mailboxstore boolean to folder and mailbox emsmdbp so we can
-                 select the correct basedn for searches.
-               - Fix GetProps to provide an accurate answer to Outlook when fetching
-                 public folder's store specific properties.
-               - Use get_PublicFolderId rather than SpecialFolderId when we open a
-                 public folder store.
-
-2010-05-28
-    jkerihuel
-       [r1858]
-               Patch from Milan Crha <mcrha@readhat.com>:
-               
-               Fix PT_DOUBLE support in openchange
-       [r1857]
-               Fix unicode ocpf format in ocpf_write
-       [r1856]
-               - Fix PT_I8 support in libocpf: PT_I8 support was incorrectly
-               processed as PT_DOUBLE and prevented properties with 0x0014 proptag
-               (e.g. PR_PARENT_FID) to be added properly to ocpf files.
-               
-               - Add PR_PARENT_FID to the set of properties when creating folders
-       [r1855]
-               Fix mkdir prototype in sqlite3 backend
-
-2010-05-27
-    jkerihuel
-       [r1853]
-               Outlook uses GetProps with the PidTagSubFolders property to check if a
-               folder has subfolders. Add this property at provisioning (set to
-               FALSE), then set it to true on system/specialfolders if folder
-               creation in mapistore went OK.
-       [r1852]
-               - Implement mkdir operation at mapistore level
-               
-               - Update PidTagFolderChildCount of parent folder when parent is the
-                 root folder of a mapistore context (folder attributes stored in
-                 openchange.ldb)
-               
-               - Improve RopCreateFolder implementation
-               
-               - Clean-up emsmdb_object_folder_init implementation
-               
-               - Add a convenient function to turn ROPs parameters into MAPI
-                 properties. This prevents from having endless number of parameters.
-               
-               - Commit remaining parts of the provision changes
-       [r1851]
-               This TODO doesn't belong here
-       [r1850]
-               Add a convenient function to retrieve the distinguishedName of a
-               folder given its folder identifier. This function is useful when
-               building dn for openchangedb ldb_add operations.
-       [r1849]
-               Add PidTagComment so it can be used in openchange.ldb when root
-               folders are created with a comment CreateFolder parameter.
-       [r1848]
-               Make it possible to retrieve MailboxRoot folder using
-               olFolderMailboxRoot in GetDefaultFolders.
-       [r1847]
-               Outlook 2007 tries to create a To-Do search folder under user
-               mailbox. Creates the folder at provision time to be kind with it.
-               
-               Set PidTagParentFolderId to 0 for mailbox root
-       [r1846]
-               The wrong index in mapi_repl was causing the crash I've investigated
-               over the past 10 hours.
-               
-               Please always use idx for mapi_response->mapi_repl[] index ;-)
-2010-05-26
-    jkerihuel
-       [r1845]
-               In current architecture, we need to retrieve root mapistore folder properties
-               from openchangedb, then use mapistore for operations such as GetHierarchyTable or
-               GetContentsTable. This was not possible with the current design where we only
-               switch between mapistore: true or false.
-               
-               I have introduced a mapistore_root boolean associated to folder object which we
-               set to true if the folder initializes a mapistore context (otherwise false).
-               
-               This boolean is used in GetProps so we retrieve mapistore container properties
-               from openchangedb and not mapistore.
-    bradh
-       [r1844]
-               Add size calculations for public folder RopLogon
-               response.
-2010-05-25
-    jkerihuel
-       [r1843]
-               We'll change CreateFolder to generic code later.
-               For the moment change from sqlite to fsopcf backend for system folders
-       [r1842]
-               Fix handling of flagged property row in GetProps (Mailbox case).
-       [r1841]
-               Missing break added, now makes Outlook 2003 launhes properly.
-       [r1840]
-               Ensure PidTagAttr is valid and prevent ldb layer from segfaulting
-       [r1839]
-               Send a flagged PropertyRow when GetProps is called with mapistore
-               Add a nasty hack and call this fake MAPI_E_NOT_FOUND property value for
-               GetProps if the object doesn't exist.
-               
-               In openchangeclient we are calling get_container_class using the parent object
-               (Mailbox root folder) and the FID of the 2-level down folder. This causes
-               openchange server to crash. The hack exposed above will help temporary workaround
-               this problem while we figure out/remember the real problem: Why do we have
-               to call the parent to retrieve the container class?
-       [r1838]
-               Remove last references to systemfolder in libmapiproxy API 
-       [r1837]
-               release objects properly in the mailbox recursive function
-       [r1836]
-               After we release ocpf_context, strings are destroyed.
-               Prevent from happening by stealing the overall context and
-               talloc_strdup strings.
-               
-               We'll need to find a better/encapsulated way to do this on long term.
-       [r1835]
-               Add a small hack to handle StandardPropertyRow properly
-               StandardPropertyRow have no errors and have a prefixing flag set to 0
-       [r1834]
-               Get ride of the previous way to detect 
-               systemfolder/mailbox/mapistore folders.
-               
-               This was barely understandable and error prone. 
-               
-               It is now replaced by a mapistore boolean set for every object
-               + a convenient emsmdbp_object function to check mapistore value
-               for given handle quickly.
-2010-05-24
-    jkerihuel
-       [r1833]
-               Add mapistore implementation for QueryRows ROPs relying on
-               GetHierarchyTable objects (folders properties listing).
-               
-               Add fsocpf backend implementation to fetch folders properties from a
-               .properties OCPF file stored within the folder (identified by its
-               PR_FID).
-               
-               Customized emsmdbp table object to have:
-               - a context_id and whether the table is within mapistore or not.
-               - to know if the table comes from GetHierarchyTabke or
-                 GetContentsTable
-               
-               Add a path element to the folder_list structure in fsocpf backend to
-               quickly use the full path and open the .properties file.
-               
-               Note: current code is for developers only. It is known to have bugs
-               (e.g. memory allocation), furthermore there is some manual
-               openchangedb and filesystem operation to perform in order to have the
-               commit intended results.
-       [r1832]
-               Add a convenient function for openchange server that lets build the
-               SPropValue array with known properties.
-       [r1830]
-               Replace the hardcoded fsocpf_ctx->fid with a basic code searching for last elements
-               in mapistore_uri path.
-       [r1829]
-               Fix typo in PidTag name
-       [r1828]
-               Add PidTagFolderChildCount
-       [r1827]
-               Add libocpf as a dependency to mapistore_fsocpf backend
-       [r1826]
-               Add a ulType to emsmdbp table object.
-               We need to make the difference between folders table (hierarchy) and messages ones (contents).
-       [r1825]
-               This is a large work in progress commit:
-               
-               - Do not add mapistore_uri for Mailbox and IPM Subtree. These are only
-                 openchange.ldb containers.
-               
-               - Fix a memory issue with emsmdbp object destruction: use a different
-                 context for folder object. This was preventing from having a valid
-                 DIR * when releasing the object at mapistore layer.
-               
-               - Add preliminary implementation for OpenFolder (GenericFolder) in
-                 emsmdbp server code and mapistore. It can't yet be tested properly
-                 with openchangeclient --mailbox because we need to extend QueryRows
-                 implementation first. This will be achieved in further commits
-               
-                 We are now using mapistore_uri attribute value (valid or NULL) to
-                 detect whether it is a systemfolder (blank container) or if we need
-                 to initialize a mapistore backend context.
-               
-               - Add mapistore implementation of GetHierarchyTable and backend
-                 implementation for fsocpf. Since we don't have a working
-                 Createfolder/mkdir implementation yet, you need to add
-                 PidTagFolderChildCount = 1 to the folder record in openchange.ldb +
-                 manually create the directory on the filesytem.
-       [r1824]
-               Missing mapi_object_release call added
-2010-05-23
-    jkerihuel
-       [r1823]
-               - Add libmapi as a dependency to libmapistore. We need libmapi to
-                 benefit from operations on MAPI properties.
-               
-               - Add a MAPISTORE_RETVAL_IF macro and a MAPISTORE_SANITY_CHECKS one
-                 for common checks.
-               
-               - Refactor the search of the backend context given its context id in a
-                 function and propagate the change to related functions.
-               
-               - Add skeletons for opendir, closedir, mkdir and rmdir. Prototypes of
-                 these function may change in the future.
-       [r1822]
-               Implement create_context and delete_context for fsocpf backend. Patch
-               initially from Brad Hards.
-               
-               Add a double linked list with fid/DIR couples for folders operations
-               to be developed.
-       [r1821]
-               Fix a bug in NSPI server which was preventing NspiGetMatches
-               from retrieving the correct DN from the in-memory tdb database.
-               
-               Should fix the profile creation error users were experiencing.
-                
-       [r1819]
-               Add a reference to the libocpf documentation for ospf backend
-    bradh
-       [r1820]
-               Add forgotten part of r1818.
-       [r1818]
-               Support provisioning mailboxes with either fsocpf or sqlite backends.
-               
-               fsocpf is the default at this stage.
-               
-               OK'd by Julien.
-2010-05-22
-    jkerihuel
-       [r1817]
-               Fix paths to related pages
-       [r1816]
-               Patch from Brad, fix doc typo, grammar - makes it sound more English.
-2010-05-21
-    jkerihuel
-       [r1815]
-               Add API documentation for init, backend connection contexts
-               Add programming samples
-       [r1814]
-               Install libmapistore pc file
-       [r1813]
-               0.2 version of mapistore documentation. 
-               Merge some of the initial mapistore wiki page content.
-               Add a section on FSOCPF backend
-    bradh
-       [r1812]
-               Various API documentation fixes. All trivial.
-       [r1811]
-               Fix some hard-coded formatting in mapitest common code.
-       [r1810]
-               Add a simple create / delete folder test to mapitest.
-               
-               I've been using this to test the basic operations.
-       [r1809]
-               Enable DeleteFolder rop, now we have a partial implementation.
-       [r1808]
-               Implement RopDeleteFolder, and handle the case where a folder already exists in RopCreateFolder
-               
-               This still only works for a top level folder.
-       [r1807]
-               Add convenience API to obtain the FID for a given folder (by name).
-               
-               This is useful to tell if a folder exists, which we need to do before
-               we create it.
-               
-               Also fixes a nuisance warning about printf specifiers. 
-       [r1806]
-               Extend CreateFolder size calculations to handle some of the optional elements
-               
-               We still don't properly handle the variable length server element.
-2010-05-20
-    jkerihuel
-       [r1805]
-               Add general overview of what mapistore is and 
-               how it can be used from a user perspective
-       [r1804]
-               Fix doxygen warnings
-       [r1803]
-               Refactor mapiproxy documentation into a global mapiproxy / openchange server doc.
-               - Add a mapistore documentation skeleton
-               - Add related pictures
-2010-05-19
-    jkerihuel
-       [r1801]
-               Add folder atomic operation to mapistore and skeleton to backends:
-               mkdir,rmdir,opendir,closedir,readdir
-    bradh
-       [r1802]
-               API documentation typo fix.
-
-2010-05-18
-    jkerihuel
-       [r1799]
-               - Push Brad's CreateFolder implementation after turning hardcoded fields to generic one.
-               
-               Note: current implementation is incorrect as it states that any folder is referenced
-               within openchange.ldb while only system/top folders are. We have a mapistore URI for
-               system/top folders, not for subfolders which are stored directly within specified
-               mapistore backend.
-               
-               However the implementation is almost correct when it comes to create folders directly
-               under / in the user mailbox.
-       [r1798]
-               - Add a 'fsocpf' mapistore backend skeleton (FileSystem + OCPF)
-               - Fix some doxygen in mapistore sqlite3 backend
-               - Add an op_mkdir skeleton to mapistore
-               - Add fsocpf:// namespace test to mapistore_test
-               - Compile fsocpf only if libocpf gets compiled
-                
-       [r1797]
-               Add defs_private.h so we can use PRIx64 where appropriate
-       [r1796]
-               It makes more sense to directly return the next available and formated FID rather
-               than the GlobalCount raw value.
-       [r1795]
-               Add exchange username to emsmdbp_ctx structure for convenient purposes
-       [r1794]
-               After openchange_ldb is opened, map attributes of the @ROOTDSE record
-               with ldb_set_opaque so ldb_get_default_basedn and ldb_get_root_basedn work.
-2010-05-17
-    jkerihuel
-       [r1793]
-               Implement a convenient function to retrieve the GlobalCount value from
-               the objectClass=server record in openchangedb - which is the next FID
-               to be available.
-               
-               Note: the function currently lacks locking mechanisms. We should
-               introduce some to prevent from race conditions.
-               
-               This code was originally designed by Brad. I've just refactored it.
-       [r1792]
-               Add a rootDSE entry to openchangedb.
-               This change makes possible to call:
-                    - ldb_get_root_basedn() to retrieve CN=server,DC=domain,DC=ext
-                    - ldb_get_default_basedn() to retrieve CN=firstou,CN=firstorg,CN=server,DC=comain,DC=ext
-       [r1790]
-               Add server-side skeleton for ROPs:
-                   - ModifyRecipients
-                   - DeleteMessage
-                   - SubmitMessage
-                   - GetTransportFolder
-               
-               NOTE: GetTransportFolder is using hardcoded data that will be removed
-               in futher commits.
-       [r1789]
-               Add libmapiserver size calculation for ROPs:
-                   - RopDeleteMessage
-                   - RopModifyRecipients
-                   - RopSubmitMessage
-                   - RopGetTransportFolder
-2010-05-16
-    jkerihuel
-       [r1787]
-               Fix provisioning script and push a master-git samba4 version known to compile
-               and work properly with openchange.
-               
-               There is probably a small typo left in installsamba.sh post_install script to fix
-    bradh
-       [r1788]
-               Update docs for new samba version.
-               
-               Looks like we now have real complexity requirements for passwords...
-2010-05-14
-    bradh
-       [r1786]
-               Fix the container class for the Drafts folder.
-               
-               This is per MS-OXCSFLD
-       [r1785]
-               Add PT_I8 for cast_SPropValue().
-2010-05-13
-    jkerihuel
-       [r1784]
-                 Fix openchange vs latest samba4 git-master branch
-               
-               - Fix OpenChange schema: Had to split our 1-file schema into multiple
-                 files in order to be compliant with Samba4 LDB schema validation
-                 policy/rules.
-               
-               - Fix openchange provision script
-               - Fix calls to smb_iconv_convenience_init
-               - Fix the copied libmapi/socket code to work with latest samba4 code
-               - Fix openchange server SIGSEGV when EcDoConnectEx is called
-               
-               I have tested the following to ensure nothing is broken:
-               - mapitest with Exchange 2003. All tests are OK
-               - openchangepfadmin (user creation/deletion OK)
-               - openchange server provisioning
-               - openchange server vs Outlook 2003:
-                 - profile creation OK
-                 - Outlook can open the user mailbox and display it properly
-2010-05-10
-    jkerihuel
-       [r1783]
-               Skeleton server code for DeleteFolder ROP
-       [r1782]
-               Just add more skeleton code to select between available folder types
-       [r1781]
-               Server side skeleton for CreateFolder operation
-
-2010-05-08
-    bradh
-       [r1779]
-               Implement some more properties for cast_mapi_SPropValue().
-               
-               Patch mostly by Milan Crha, some changes by me.
-       [r1778]
-               Use retval instead of GetLastError() in a couple of places.
-       [r1777]
-               Add missing failure path handling.
-       [r1776]
-               Avoid assigning a boolean result to an enum MAPISTATUS.
-               
-               Fixes problem noted with mapitest on OXCFOLD-MOVECOPY-MESSAGES.
-
-2010-05-06
-    bradh
-       [r1774]
-               Add comment about the number for each ROP in the server.
-
-2010-05-03
-    bradh
-       [r1772]
-               Make sure we can load a server module when it is built with coverage testing enabled.
-
-2010-05-02
-    bradh
-       [r1770]
-               Fix some mapitest issues reported by valgrind.
-               
-               These only occur when running against the openchange server - mostly problems with failure paths.
-       [r1769]
-               Fix up a few segfaults found when running against openchange server.
-
-2010-05-01
-    bradh
-       [r1767]
-               Add support for EcDoRpc GetAddressTypes (0x49) and OptionsData (0x6f) to server.
-               
-               This is completely driven by the server provisioning - no hard coding.
-               
-               This makes a binary incompatible change, so if you get crashes, please try a
-               clean rebuild.
-
-2010-04-29
-    bradh
-       [r1765]
-               Add PT_DOUBLE support for set_SPropValue().
-
-2010-04-28
-    bradh
-       [r1763]
-               Add support for PT_ERROR in mapi_SPropValue casting function.
-       [r1762]
-               Add support for a couple more types in the casting code.
-               
-               Also adds a development-version "OPENCHANGE_ASSERT()" that flags incomplete code.
-
-2010-04-23
-    jkerihuel
-       [r1760]
-               Add a convenient function to retrieve the total 
-               number of records in the Global Address List.
-               
-               Modify openchangeclient to expose this change in
-               the --userlist option.
-
-2010-04-20
-    jkerihuel
-       [r1758]
-               Fix OpenChange notification subsystem to handle multiple session properly
-               Patch OpenChange trunk to reflect this API change
-               
-               Add quick and dirty doc/examples/multiple_notif.c to show how to setup
-               multiple sessions + notifications with threads. 
-       [r1757]
-               Add PidTag for transport message headers
-
-2010-03-04
-    bradh
-       [r1755]
-               One more server API documentation fix.
-       [r1754]
-               More server side api documentation work.
-
-2010-03-03
-    bradh
-       [r1752]
-               Mix of api documentation fixes for server side.
-       [r1751]
-               Add MAPI_E_NOT_IMPLEMENTED.
-               
-               This is based on information at 
-               http://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/d3c860a8-f131-4c7a-aa11-b9ec328d06c4
-
-2010-03-02
-    bradh
-       [r1749]
-               Implement RopOptionsData (0x6F).
-               
-               Updates IDL, adds implementation and mapitest coverage.
-               
-               This has no practical use, but might be useful for testing the server.
-
-2010-02-28
-    bradh
-       [r1747]
-               Add talloc leak checking options to mapitest.
-
-2010-02-27
-    bradh
-       [r1745]
-               Update man page for mapiprofile to reflect new --language option format.
-
-2010-02-26
-    bradh
-       [r1743]
-               Add special handling for PS_MAPI property name mapping.
-               
-               This fixes a long-standing mapitest failure.
-               
-               The logic is based on MS-OXCPRPT, section 2.2.12.2.2 PropertyIds.
-       [r1742]
-               Minor API documentation fix.
-
-2010-02-24
-    bradh
-       [r1740]
-               Build fix for example code
-
-2010-02-23
-    jkerihuel
-       [r1738]
-               Fix format string problem #184 ticket
-    bradh
-       [r1737]
-               Add status reporter classes to allow redirecting the progress
-               messages.
-       [r1736]
-               Update man page to reflect mapitest --subunit option.
-       [r1735]
-               Implement basic subunit output protocol format for mapitest.
-               
-               There are a couple of documentation bits to follow.
-
-2010-02-20
-    bradh
-       [r1733]
-               Trivial API dox addition.
-
-2010-02-17
-    bradh
-       [r1731]
-               Update the IDL and implementation for RopGetPermissionsTable (0x3e)
-               and RopModifyPermissions (0x40) to match MS-OXCPERM.
-               
-               The function signature for GetTable() and ModifyTable() has changed.
-               They are now called GetPermissionsTable() and ModifyPermissions()
-               respectively, and there is an additional "flags" argument, which you
-               almost certainly want to pass as 0x00 if you are porting from some
-               older implementation.
-               
-               Updates all users, and adds mapitest unit tests.
-
-2010-02-11
-    jkerihuel
-       [r1729]
-               Add country codes to codepage-lcid description file
-    bradh
-       [r1727]
-               Remove copied code from samba (ldb) and just use the ldb
-               version.
-               
-               Resolves ticket #167
-       [r1726]
-               Allow building if popt isn't available.
-               
-               The changes are to:
-               - remove unnecessary include in libmapiadmin
-               - only build mapistore test tool if popt is available
-               - only build torture tests if popt is available.
-               
-               The last change could be finer (e.g. only leaving out the
-               part of the torture test that actually requires popt) but
-               that seemed more fragile and generally unnecessary.
-               
-               Resolves ticket #233.
-    jelmer
-       [r1728]
-               Update bzrignore.
-
-2010-02-10
-    bradh
-       [r1724]
-               Ensure we always initialise before trying to cleanup (e.g. in a failure scenario).
-               
-               Issue identified and patch provided by Erik Hovland, minor changes by me.
-               
-               Resolves ticket #236.
-       [r1723]
-               prop is declared within the switch statement.
-               
-               Fix by Erik Hovland - thanks very much.
-               
-               Resolves ticket #239.
-       [r1722]
-               Use strncpy instead of strcpy.
-               
-               Patch by Erik Hovland, plus a minor change by me to ensure the string is null terminated.
-               
-               Resolves ticket #237.
-       [r1721]
-               Add missing break statements
-               
-               Patch by Erik Hovland <erik@hovland.org>
-               
-               Resolves ticket #238.
-       [r1720]
-               Mark appropriate constructors as explicit.
-               
-               Patch by Erik Hovland - thanks very much.
-               
-               Resolves ticket #240.
-       [r1719]
-               Add newline.
-               
-               Patch from Erik Hovland - thanks again.
-               
-               Resolves ticket #242.
-       [r1718]
-               Fix spelling errors.
-               
-               Patch by Erik Hovland - thanks very much.
-               
-               Resolves ticket #241.
-       [r1717]
-               Make sure we actually can compile when using --enable-openchange-qt4
-               
-               This patch ensures that $(MOC) gets set in the Makefile.
-
-2010-02-09
-    jkerihuel
-       [r1715]
-               Add canonical names for codepage related properties (involved in
-               PT_STRING8 encoding/decoding)
-
-2010-02-08
-    jkerihuel
-       [r1711]
-               - Add parser for codepage-lcid
-               
-               - Add entire set of conversion functions for lcid, codepage, language
-                 and locale
-               
-               - mapiprofile now uses codepage/lcid matching LC_CTYPE environment
-                 variable for language detection, otherwise codepage/lcid matching
-                 language list. Language list is now dumped from codepage-lcid
-                 auto-generaed code.
-               
-               - Remove deprecated util and tests directory from libmapi and from
-                 build system. We now only rely on codepage_lcid.c
-               
-               - Update openchange code (utils, mapiprofile, mapitest and
-                 exchange2ical libs) to use this new API.
-               
-               - I have not looked into icalparameter_get_language, but assuming it
-                 is relying on previous API, I may have introduced a bug here. Looks
-                 like the function outputs for example "en-US" while we now checks
-                 for "en_US" to match setlocale output.
-    bradh
-       [r1710]
-               Minor API documentation adds.
-       [r1709]
-               Add unit test coverage for the GetGALTable() function.
-               
-               This is mostly lifted from utils/openchangeclient.c
-       [r1708]
-               Switch to only building Qt4 bindings if specifically asked for.
-               
-               This is a bit experimental for now, so lets go safer...
-
-2010-02-05
-    jkerihuel
-       [r1706]
-               In this particular case (error returned, mapi_response shouldn't
-               be free'd)
-       [r1705]
-               Fix bug 605827 - SRowSet was free'd while still needed
-
-2010-02-04
-    jkerihuel
-       [r1703]
-               Template file which associates Language, LCID, Locale and Codepage.
-               Furthermore commits will implement the mparse parser which will
-               auto-generate the associated C files. This should give us a reliable
-               way to use it in mapiprofile, MAPI profiles database and for
-               PT_STRING8 proper conversion purposes.
-               
-               If anything is missing or is incorrect, updating the file will
-               be trivial.
-
-2010-02-03
-    bradh
-       [r1701]
-               Fix bug where you couldn't select another messages in the default folder without
-               changing folder first.
-               
-               Looks like this is just a bit I forgot to update when changing from an initial
-               cut to the "more working" implementation.
-
-2010-02-02
-    jkerihuel
-       [r1699]
-               - Fix trac ticket #183: PT_UNICODE properties are now turned to UTF-8
-                 directly.
-               
-               - Remove deprecated utf8_convert lexer and windows_to_utf8 routine
-               
-               - Change openchange tools to use _UNICODE tag version instead
-               
-               - octool_get_propval now prefer UNICODE properties over PT_STRING8
-                 ones (default behavior).
-               
-               - Change mapidump_message API to take an optional mapi_object_t
-                 message parameter. If the message object is specified, we can have
-                 access to the subject, and recipients (to, cc, bcc) without having
-                 to query them within a GetProps call.
-    bradh
-       [r1698]
-               Fix an ugly cut-n-paste error.
-       [r1697]
-               Add pkg-config support for libmapi++.
-
-2010-02-01
-    jkerihuel
-       [r1695]
-               Fix ticket #123 (known as 562948 on gnome bugzilla):
-               "Unable to send mails containing UTF8 strings"
-               
-               OpenChange was using strlen(str) * 2 + 2 to calculate the 
-               expected size for utf16 string. This patch fixes this and
-               replaces it with a function that make proper utf8 to utf16 
-               conversion.
-               
-               This commit also replaces PT_STRING8 properties in openchangeclient.c
-               with PT_UNICODE ones to ensure utf8 strings get converted properly.
-
-2010-01-26
-    jkerihuel
-       [r1693]
-               - Add NormalizedSubject and SubjectPrefix strings to object_message_t
-                 structure.
-               - Add a function to retrieve TypedString value
-               - Add a mapidump function for obj_message (only retrieve subject and
-                 recipients)
-               - Add --fetchsummary option to openchangeclient: Dumps properties from
-                 OpenMessage response only (subject and recipients) rather than going
-                 through GetProps and dumping a more complete version.
-    bradh
-       [r1692]
-               Move make distclean to the end again.
-
-2010-01-23
-    bradh
-       [r1690]
-               Remove a copy of the dlinklist.h header, and just use the samba
-               version instead.
-
-2010-01-20
-    bradh
-       [r1688]
-               Install missing file.
-
-2010-01-13
-    bradh
-       [r1686]
-               Allow us to find samba python code on 64-bit machines.
-
-2010-01-10
-    jkerihuel
-       [r1684]
-               Update EcDoConnectEx IDL to match latest specifications
-    bradh
-       [r1683]
-               Minor additions to "make clean" / "make distclean" to remove
-               generated python bits, and also the config.h file.
-
-2010-01-08
-    bradh
-       [r1681]
-               Implement IsMailboxFolder for public folder types.
-               
-               Involves some refactoring of the way we handled the mapi_object_store_t,
-               such that we now talloc_zero the structure. 
-               
-               Adds mapitest coverage for these.
-               
-               Resolves Ticket #134.
-
-2010-01-06
-    bradh
-       [r1679]
-               Add unit tests for IsMailboxFolder
-               
-               Also use 0xFFFFFFFFF instead of -1 for no-such-mailbox, consistent with the unsigned data type.
-
-2010-01-04
-    jkerihuel
-       [r1677]
-               Change location of .cpp.o and .ccp.po to the correct location
-               and inhibit compilation line output for moc and cpp compilation.
-    bradh
-       [r1676]
-               Try harder to clean up libmapi++ bits.
-
-2010-01-03
-    jkerihuel
-       [r1673]
-               Ignore moc files and generated binary
-       [r1672]
-               Update OpenChange version to 0.10 NOMAD
-               
-               Nomad is a mechanical explorer sent from Earth in 2002. 
-               It was melded with an alien device named Tan Ru and the resulting robotic
-               hybrid began destroying anything that was imperfect including, in 2267,
-               itself. 
-    bradh
-       [r1674]
-               Add documentation for qt/ subdirectory.
-       [r1671]
-               Try harder to find moc.
-       [r1670]
-               Initial commit of some Qt-style bindings.
-               
-               This is mostly for testing, although hopefully the library will
-               emerge with a set of mostly-useful widgets for implementing
-               real clients.
-
-2009-12-31
-    bradh
-       [r1668]
-               Quiet the build here.
-               
-               Inadvertent removal in a previous patch.
-       [r1667]
-               Some support for ReviewBoard.
-
-2009-12-29
-    bradh
-       [r1665]
-               Update OpenMessage flags to match specification values.
-       [r1664]
-               Cleanup libmapi++ code when we "make clean".
-       [r1663]
-               Add svn ignore entries.
-       [r1662]
-               Remove inline from shared library class.
-               
-               Fixes build on Intel C++ compiler.
-
-2009-12-27
-    clsk
-       [r1660]
-               libmapi++ is no longer a header-only library
-
-2009-12-26
-    bradh
-       [r1658]
-               Add first part of Restrictions support.
-       [r1657]
-               A little more documentation fixes.
-2009-12-25
-    jkerihuel
-       [r1654]
-               Fix MAPIUninitialize() crash when leaving after an unsuccessful call.
-               In such situation, mapi_response is not allocated but has a destructor
-               associated. This fix removes the destructor whenever the error code is
-               different from MAPI_E_SUCCESS.
-               
-               Also add a minor (probably useless) check on mapi_response pointer validity
-               before attempting any other child's free.
-    bradh
-       [r1656]
-               A couple of minor API documentation fixes.
-
-2009-12-24
-    jkerihuel
-       [r1651]
-               Rename libmapi into openchange in our release script.
-               Makes more sense given the scope of our releases.
-       [r1650]
-               Fix format string warnings.
-       [r1649]
-               New ModifyRecipients IDL and implementation.
-               
-               This patch improves the logic within the RecipientFlags bitmask
-               calculation function and make use of different MAPI properties for
-               ModifyRecipients. 
-               
-               Fix trac ticket #125 and https://bugzilla.gnome.org/show_bug.cgi?id=568763
-    bradh
-       [r1648]
-               Minor API documentation fix.
-2009-12-23
-    bradh
-       [r1647]
-               Fix some exchange2ical memory leaks / "still reachable" memory.
-       [r1645]
-               Fix property tag array count, so we get the language in Summary
-               lines in the ical output.
-       [r1644]
-               Add protection against null CN values.
-               
-               Resolves ticket #232.
-               
-               Thanks to Arnout Engelen for the bug report and the patch to fix the problem.
-       [r1643]
-               Handle all day events for UTC+  timezones.
-               
-               This resolves ticket #217. Thanks to Arnout Engelen for both reporting
-               the problem, and providing a patch. In the end I heavily modified the 
-               patch, and implemented a much simpler version while we sort out the
-               timezone identifier problems.
-
-2009-12-22
-    bradh
-       [r1641]
-               Minor documentation update to reflect GSoC exchange2ical merge.
-       [r1640]
-               temporary fix for building on FreeBSD 7.2.
-       [r1639]
-               Remove this file - converted it to trac tasks.
-2009-12-21
-    jkerihuel
-       [r1635]
-               Patch from Johnny Jacob <johnnyjacob@gmail.com>:
-               
-               Changed MonitorNotification to be non-blocking.
-               Also checks whether to process notifications using a callback.
-       [r1634]
-               Open Profile Store using global_mapi_ctx for the memory context. This
-               fix removes 20 context errors when running valgrind on mapitest.
-       [r1633]
-               - Fix important memory leaks in OpenChange NSPI stack. The memory
-                 context modifications applied to the EMSMDB stack have been
-                 propagated to the NSPI one. NSPI dcerpc_* functions now rely on a
-                 temporary context passed in parameter to the nspi_* functions from
-                 libmapi/nspi.c.
-               
-               - Changes propagated to torture, mapitest, IProfAdmin interface and
-                 ResolveNames function to match the internal API.
-               
-               - Add missing MAPIFreeBuffer call in mapitest modules
-       [r1632]
-               Minor cosmetic change
-       [r1631]
-               Minor changes to match our coding convention more closely
-       [r1630]
-               Return (const void *) instead of (void *) where missing
-       [r1629]
-               - Fix important memory leaks within the OpenChange stack. Most of the
-                 leaks came from the pipe memory context used in emsmdb_transaction
-                 which was only released on MAPIUninitialize and sometimes leaded in
-                 lost blocks. This fix makes extensive usage of the temporary memory
-                 context used in top MAPI calls implementation. This context is
-                 passed in argument to emsmdb_transaction and used for dcerpc_*
-                 operations.
-               
-                 When we return from any libmapi call implementation, this context is
-                 destroyed. This guarantee no extra memory within NDR layer is kept.
-               
-                 The only requirement for this patch to work is to make sure the data
-                 we return from MAPI calls is either reparent to another memory
-                 context or copied properly.
-    bradh
-       [r1638]
-               Add support for skipping tests that don't apply to some
-               server versions.
-       [r1637]
-               Change the format of the server version, so it matches the Microsoft
-               way of doing versions.
-
-2009-12-20
-    jkerihuel
-       [r1627]
-               Fix store version info assignment - Exchange version now works again
-               in mapitest.
-       [r1626]
-               Clarify the developer's task when using GetPropList.
-               
-               We were allocating the SPropTag proptag array with the session context
-               pointer, which was not released with a MAPIFreeBuffer(SPropTagArray).
-               
-               We are now using SPropTagArray pointer as parent context and clarify
-               that the developer must pass an allocated SPropTagArray pointer to the
-               function.
-       [r1625]
-               Missing mapi_object_release leading in small leaks.
-       [r1624]
-               Sanitize RfrGetNewDSA function and memory usage.
-               
-               The function was returning either a const char * passed in parameter
-               or the string returned by RfrGetNewDSA call. Furthermore we were using
-               the session pointer for the memory context. Finally the function description
-               was not matching its behavior.
-               
-               What this patch does:
-               - use a named memory context for RfrGetNewDSA call
-               - return an allocated string on success otherwise NULL
-               - release RFR memory context properly
-               
-               valgrind before patch (mapitest):
-               ==28876== LEAK SUMMARY:
-               ==28876==    definitely lost: 0 bytes in 0 blocks
-               ==28876==    indirectly lost: 0 bytes in 0 blocks
-               ==28876==      possibly lost: 3,193,529 bytes in 23,296 blocks
-               ==28876==    still reachable: 345 bytes in 2 blocks
-               ==28876==         suppressed: 0 bytes in 0 blocks
-               ==28876==
-               ==28876== For counts of detected and suppressed errors, rerun with: -v
-               ==28876== ERROR SUMMARY: 2351 errors from 2351 contexts (suppressed: 45 from 10)
-               
-               valgrind after patch (mapitest):
-               ==29083== LEAK SUMMARY:
-               ==29083==    definitely lost: 0 bytes in 0 blocks
-               ==29083==    indirectly lost: 0 bytes in 0 blocks
-               ==29083==      possibly lost: 3,190,285 bytes in 23,256 blocks
-               ==29083==    still reachable: 345 bytes in 2 blocks
-               ==29083==         suppressed: 0 bytes in 0 blocks
-               ==29083==
-               ==29083== For counts of detected and suppressed errors, rerun with: -v
-               ==29083== ERROR SUMMARY: 2338 errors from 2338 contexts (suppressed: 45 from 10)
-       [r1623]
-               This patch fixes most of the leaks coming from pull_emsmdb_property() function.
-               pull_emsmdb_property is using pointers and allocate memory to prevent from
-               returning a local variable address. Such pointers include PT_I2, PT_I8, PT_LONG, 
-               PT_ERROR or PT_BOOLEAN. Pointer's values are assigned in set_SPropValue but were
-               never released/free'd. This patch implements free_emsmdb_property to fix this problem.
-               
-               valgrind before patch (mapitest):
-               ==26674== LEAK SUMMARY:
-               ==26674==    definitely lost: 0 bytes in 0 blocks
-               ==26674==    indirectly lost: 0 bytes in 0 blocks
-               ==26674==      possibly lost: 3,264,485 bytes in 23,387 blocks
-               ==26674==    still reachable: 345 bytes in 2 blocks
-               ==26674==         suppressed: 0 bytes in 0 blocks
-               ==26674==
-               ==26674== For counts of detected and suppressed errors, rerun with: -v
-               ==26674== ERROR SUMMARY: 2370 errors from 2370 contexts (suppressed: 45 from 10)
-               
-               valgrind after patch (mapitest):
-               ==27270== LEAK SUMMARY:
-               ==27270==    definitely lost: 0 bytes in 0 blocks
-               ==27270==    indirectly lost: 0 bytes in 0 blocks
-               ==27270==      possibly lost: 3,127,733 bytes in 23,293 blocks
-               ==27270==    still reachable: 345 bytes in 2 blocks
-               ==27270==         suppressed: 0 bytes in 0 blocks
-               ==27270==
-               ==27270== For counts of detected and suppressed errors, rerun with: -v
-               ==27270== ERROR SUMMARY: 2348 errors from 2348 contexts (suppressed: 45 from 10)
-    bradh
-       [r1622]
-               Minor API documentation fixes.
-
-2009-12-19
-    jkerihuel
-       [r1620]
-               - Add a macro to mparse.pl to free both mapi_response 
-                 and mem_ctx within OpenChange calls implementation.
-                 For the moment it is only implemented in OpenUserMailbox call.
-               
-               - Fix a memory leak in OpenUserMailbox: When the call failed 
-                 (ecUnknownUser or ecUseEnryption) mapi_response was not free'd
-                 properly.
-       [r1619]
-               Minor indentation fix
-    bradh
-       [r1618]
-               Add some missing newlines to reduce compilation noise.
-       [r1617]
-               Merge in Ryan Lepinski's Google Summer of Code work on exchange2ical.
-               
-               See the gsoc_exchange2ical branch history for commits.
-               
-               I also made a change to address ticket #216, and
-               fixed a couple of typos.
-
-2009-12-18
-    bradh
-       [r1615]
-               Minor updates to provisioning instructions.
-               
-               Thanks to Girish Venkatachalam for some suggestions.
-
-2009-12-17
-    jkerihuel
-       [r1611]
-               Fix 'unused variable' warning on FreeBSD for exchange2mbox
-    bradh
-       [r1613]
-               Add documentation for the --freebusy option.
-       [r1612]
-               Warning fix.
-
-2009-12-16
-    jkerihuel
-       [r1607]
-               Fix segfaults in mapitest launched with exchange2010
-       [r1606]
-               Fix compilation warnings
-    bradh
-       [r1609]
-               Add missing -L directory specifier.
-               
-               Looks like this was tolerated by gnu ld, but not by opensolaris ld.
-               
-               Patch by Brian Lu (Sun). Thanks again.
-       [r1608]
-               Add documentation for new mapiprofile --encrypt option, introduced in r1602.
-       [r1605]
-               Fix a couple of typos that trash CFLAGS during build.
-
-2009-12-15
-    jkerihuel
-       [r1603]
-               Automatically switch from connect to seal on the emsmdb pipe if
-               ecNotEncrypted is returned by EcDoConnect.
-       [r1602]
-               - Make OpenChange natively working with Exchange 2010
-               - Factorize binding string construction code within a single function
-               - the seal flag is mandatory to connect to Exchange 2010
-               - add seal boolean value to MAPI profile creation and mapi_profile
-                 structure
-               - add --encrypt option to mapiprofile to set the seal value
-
-2009-12-14
-    bradh
-       [r1600]
-               Add documentation for set_SPropTagArray().
-               
-               Thanks to Brian Lu (Sun) for reporting.
-
-2009-12-13
-    jkerihuel
-       [r1598]
-               This doesn't really fix ticket #149, but this should
-               at least prevent from triggering segmentation fault when
-               PR_EMAIL_ADDRESS_UNICODE doesn't have any cn=Recipients,cn= substring 
-    bradh
-       [r1597]
-               Trivial fix (newline) for warning on FreeBSD compiler.
-       [r1596]
-               Add support for manually creating the library symlinks for FreeBSD
-               
-               This is a somewhat speculative commit. 
-               
-               Also fixes a couple of cosmetic whitespace issues.
-
-2009-12-12
-    jkerihuel
-       [r1594]
-               Patch from Bryan Lu <brian.lu@sun.com>:
-               
-               Create symbol link only on Solaris
-               
-               This closes ticket #221 and makes it possible to compile openchange
-               on Solaris.
-       [r1593]
-               Temporary bug fix in emsabp.c - If restrictions are NULL in
-               emsabp_search, return MAPI_E_INVALID_OBJECT. This prevents from using
-               invalid res pointer leading in segmentation fault.
-               
-               Initial fix proposed by Erik Hovland <erik@hovland.org>
-       [r1592]
-               Patch from Erik Hovland <erik@hovland.org>:
-               
-               fid might be null. Check it before dereferencing in the
-               ocpf_folder_lookup() call. Similar behavior fixed in openchangeclient
-               folder_lookup() function.
-       [r1591]
-               Patch from Erik Hovland <erik@hovland.org>:
-               
-               NotificationData 'could' be null. Check it before handing it to
-               notification-callback(). This is important because eventually
-               NotificationData will be dereferenced in the code path.
-       [r1590]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               Fix MAPI Warning error codes
-       [r1589]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               bugfix: Bugs in abp_tdb layer fixed.
-               
-               emsabp_tdb_traverse_MId() returns 'false' (i.e. not found) in most of
-               the cases.
-       [r1588]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               Implement NspiQueryRows() address list enumeration
-               
-               We can now run openchangeclient --userlist on OpenChange NSPI server
-               and Outlook 2003 is able to query GAL.
-               
-               Note: the initial patch was proposing:
-               "(&%s(showInAddressBook=*))", purportedSearch
-               
-               I replaced it with "%s", purportedSearch only since we don't have yet
-               any showInAddressBook attribute in AD.
-       [r1587]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               - Add server side implementation for NspiResolveNamesW
-               - Refactor and split emsabp_verify_user in two functions
-               
-               A new function emsabp_get_account_info() implemented to fetch info
-               about given user name.  emsabp_verify_user() uses the above function
-               check if authenticated account_name is valid mail account and if so,
-               account_name is cached in emsabp context for future use
-       [r1586]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               NspiGetProps() reimplemented to match [MS-NSPI] specification more
-               closely.
-               
-               As a side-effect, emsabp_fetch_attrs() was altered to return
-               MAPI_E_INVALID_BOOKMARK in case requested MId is not found.  This way
-               the function returns more meaningful error codes - if requested MId is
-               not found this surely means InvalidBookmark rather than CorruptStore
-
-2009-12-11
-    jkerihuel
-       [r1584]
-               Path from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               Propagate dwFlags for incoming call to get EntryIDs correctly.
-               
-               Actually we need to propagate dwFlags so that emsabp_query()
-               function to be able to determine whether EphemeralEntryID
-               or PermanentEntryID is requested to be built.
-       [r1583]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               Implement PR_SEARCH_KEY attribute getter
-       [r1582]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>
-               
-               Add PR_ADDRTYPE_UNICODE and PR_EMS_AB_PROXY_ADDRESSES_UNICODE getters.
-       [r1581]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               - Extend NspiDNToMId() to search in Configuration and Domain
-                 partitions.
-               
-               - NspiDNToMId() has been extended to cache returned data properly,
-                 i.e. DNs from Configuration partition are cached in ttb_ctx db, DNs
-                 from Domain partition are cached in in-memory db ttdb_ctx.
-       [r1580]
-               Patch from Kamen Mazdrashki <kamen.mazdrashki@postpath.com>:
-               
-               emsabp_set_PermanentEntryID() implements MS specification more
-               closely.  For reference: [MS-NSPI] and [MS-OXOABK]
-       [r1579]
-               - Replace emsabp_get_server_GUID with samdb_ntds_objectGUID Samba4
-                 function.
-               - Change the way we initially fetched server GUID
-               
-               Credits to Kamen Mazdrashki <kamen.mazdrashki@postpath.com> for
-               initial patch and associated research:
-               
-               It turns out MS implementation for NSPI reads the guid from: "CN=NTDS
-               Settings,CN=<NETBIOS_NAME>,CN=Servers,CN=Default-First-Site-Name,CN=Sites,<CONFIG_DN>" entry.
-       [r1578]
-               Fix samdb_connect warning.
-               Add function prototype to nsp,emsmdb header files.
-               Change samdb_ctx from void * to ldb_context *
-    bradh
-       [r1577]
-               Update docs to match those in mapiproxy doxygen docs.
-       [r1576]
-               Roll to the latest Samba4 version.
-               
-               This should have no noticeable difference over the
-               Samba4 alpha9 release, but its nice to use the latest
-               version, and it might make a difference on the server
-               side.
-2009-12-10
-    jkerihuel
-       [r1575]
-               Fix OpenChange server code and access to Samba4 databases.
-               Starting with samba4-alpha9, there is no more configuration.ldb or users.ldb.
-               All information can be accessed through a single access to SamDB and configuration records
-               accessed through ldb_get_config_basedn.
-               
-               The following implementation has been tested and is working with:
-               - mapiprofile profile creation
-               - openchangeclient --mailbox
-               - Outlook 2003 account creation
-               - Outlook 2003 mailbox opening
-
-2009-12-09
-    jkerihuel
-       [r1573]
-               Fix openchange user provisioning scripts
-       [r1572]
-               Forgot to commit this LDIF modifications for openchange provisioning
-
-2009-12-08
-    jkerihuel
-       [r1570]
-               - Fix OpenChange server provisioning (exchange classes and attribute only)
-               - Remove deprecated provisioning steps
-               - OpenChange user provisioning is still broken at this point, but will be
-               fixed in further revisions.
-
-2009-12-02
-    jkerihuel
-       [r1568]
-               Fix a cast warning at compilation time for libmapi++
-       [r1567]
-               - Update openchange libraries to 0.9: close trac ticket #165
-               - Propagate pkgconfig solution in trac ticket #94 to other libs
-       [r1566]
-               - Update openchange code to work with samba4-alpha9 release
-               - Apply minor fix to ldb_wrap_connect (number of parameters)
-               - Update mapiproxy code to handle new Samba4 assoc_group implementation properly
-               - Update samba4 version script to match alpha9 and related git commit
-
-2009-11-27
-    bradh
-       [r1564]
-               Ensure we get output if sqlite3 isn't found at configure time.
-               
-               Now outputs "no" instead of a blank.
-
-2009-11-26
-    bradh
-       [r1562]
-               Fix attribution, per IRC discussion.
-
-2009-11-25
-    bradh
-       [r1560]
-               Ensure API documentation gets generated for utilities functions.
-               
-               Some undocumented stuff in here to look at later.
-       [r1559]
-               Add additional mapidump functions for notifications
-               
-               This is a patch from Johnny Jacob (Novell), with unit tests and some extra checks by me.
-               
-               Maintains good test coverage for this file.
-
-2009-11-23
-    bradh
-       [r1557]
-               Avoid use-after-free for the number of rows in the SRowSet.
-               
-               Resolves issue #212, which has the valgrind error.
-
-2009-11-22
-    bradh
-       [r1555]
-               Add test for get_proptag_value().
-       [r1554]
-               Minor cleanups for mapidump functions.
-               
-               - Add support for dumping property tags using PT_SHORT.
-               - Modify the tag for PR_whatever_ERROR results to include the _ERROR bit
-               - Minor format change for PT_BINARY (training colon)
-               - Ensure PT_SYSTIME respects the seperator value (API change)
-               - Add a conditional assert() using infrastructure introduced in r1553.
-               
-               Implement mapitest support for all of libmapi/mapidump.c
-               
-               Update openchangeclient for the API change.
-       [r1553]
-               Introduce a compile time definition that is set for SVN snapshot releases.
-               
-               The intent is to use this to protect assert() calls that indicate incomplete code.
-
-2009-11-19
-    bradh
-       [r1551]
-               Improved Sun Studio compiler support.
-               
-               Patch by Brian Lu (Sun) - thanks again.
-       [r1550]
-               Revert inadvertent part from previous commit (r1549)
-       [r1549]
-               Add coverage testing support.
-               
-               ./configure now supports --enable-coverage, which builds with the right options
-               to support gcov. Also adds a new makefile target ("coverage") that runs the
-               required post-processing steps.
-               
-               Also added a test script that does a range of openchange related (client side)
-               operations. This is useful for generating the test load for coverage checks.
-               
-               So the basic recipe here is
-               1. Add the --enable-coverage option at configure time.
-               2. Do a clean build
-               3. Install it, or otherwise ensure that coverage-enabled libs are used
-               4. generate the test load (e.g. run ./script/smoketest.sh)
-               5. "make coverage"
-               6. Inspect the results in ./covresults
-
-2009-11-13
-    bradh
-       [r1547]
-               Add support for the SunStudio compiler.
-               
-               I previously special-cased the Intel C compiler, and relied on some ugly ordering requirements to
-               ensure it all worked.
-               
-               This approach is cleaner, allowing options to be build up separately for each compiler, and for
-               the C and C++ versions.
-               
-               Tested on Linux with all three compilers.
-
-2009-11-09
-    bradh
-       [r1545]
-               Adding missing include.
-               
-               Ticket #220.
-               
-               Patch from Brian Lu (Sun). Thanks very much.
-
-2009-11-07
-    bradh
-       [r1543]
-               Additional portability fixes for SunOS.
-               
-               Based on a patch (ticket #220) by Brian Lu (Sun). Thanks very much.
-               
-               I modified the patch to try to use autoconf where possible.
-               
-               Resolves ticket #220.
-       [r1542]
-               Remove MAP_FILE flag from mmap(). Looks like this is only required on really
-               old unix systems (e.g. NetBSD prior to 1.0), which we probably won't ever support.
-               
-               Patch by Brian Lu (Sun) - thanks very much.
-               
-               Partly resolves ticket #220 - still need to handle the first patch.
-
-2009-11-02
-    bradh
-       [r1540]
-               Fix build problem using Sun Studio compiler.
-               
-               Reported by Brian Lu (Sun), including a patch (Ticket #219)
-               
-               I slightly modified the patch, but nothing substantial.
-
-2009-10-21
-    jkerihuel
-       [r1538]
-               Patches provided by raboof:
-               - Ticket #213 deprecated include directive removal
-               - Ticket #214 missing sanity check
-               - Ticket #215 fix some DEBUG macro level for sain ouput
-
-2009-10-19
-    bradh
-       [r1536]
-               spello fixes.
-
-2009-10-18
-    clsk
-       [r1534]
-               Use mapi_profile_get_ldif_path to find ldif path when one is not given
-
-2009-10-09
-    clsk
-       [r1531]
-               Added libmapi++ wrapper function for CreateProfileStore
-
-2009-10-08
-    bradh
-       [r1529]
-               Update buildsystem to avoid using bash-specific (well, not sh-supported) +=
-               mechanism.
-               
-               Should allow FreeBSD to be supported.
-
-2009-10-06
-    bradh
-       [r1527]
-               Alternative solution to ticket #179, provided by Alan Alvarez.
-               
-               This alternative avoids the need for the user to clean up the string returned by what().
-               
-               Also includes a test case, which I've used to validate that the original (prior to r1524) code 
-               is faulty, and that both fixes (From Erik Hovland and from Alan Alvarez) deal with it.
-               
-               Resolves Ticket #179 (again).
-
-2009-09-26
-    bradh
-       [r1524]
-               Make sure that the string given by what() can be used. 
-               
-               Patch by Erik Hovland - thanks very much.
-               
-               Resolves ticket #179.
-       [r1523]
-               Ensure that the libmapi++ messages example works even if there is no
-               PR_CONVERSATION_TOPIC (subject).
-    jelmer
-       [r1525]
-               Add 'make dist'.
-
-2009-09-20
-    bradh
-       [r1521]
-               Modify mapi_object_set_logon_id() to be able to report errors.
-               
-               Original patch by Erik Hovland, I made some changes.
-
-2009-09-19
-    bradh
-       [r1519]
-               Implement RopReloadCachedInformation (0x10).
-               
-               Minor change to IDL (previously implemented), and adds
-               implementaiton and mapitest code.
-               
-               Also editorial comment fix in some related mapitest stuff.
-               
-               Resolves ticket #186
-       [r1518]
-               Implement GetValidAttachments ROP (0x52).
-               
-               Includes IDL, implementation and mapitest.
-               
-               mapitest also checks DeleteAttach behaviour, which I don't think we previously
-               covered anywhere. 
-               
-               Also includes a comment fix in the mapitest code.
-
-2009-09-16
-    bradh
-       [r1516]
-               Whitespace cleanup.
-               
-               Patch by Erik Hovland <erik at hovland.org>
-
-2009-09-14
-    bradh
-       [r1514]
-               Update the properties list.
-               
-               Patch from Girish Venkatachalam <girish at gayatri-hitech.com>
-
-2009-09-12
-    bradh
-       [r1512]
-               Update API to use MAPITAGS enum.
-       [r1511]
-               Update to match API change.
-       [r1510]
-               Use appropriate enum here.
-       [r1509]
-               Use enum for OpenEmbeddedMessage call.
-       [r1508]
-               Use enums where appropriate.
-       [r1507]
-               Update users of FindRow to use enums.
-       [r1506]
-               We are supposed to be returning a MAPISTATUS, so switch to using 
-               the OPENCHANGE_RETVAL_ERR macro here.
-       [r1505]
-               Use appropriate enums instead of int types.
-       [r1504]
-               Use enums instead of ints / hardcoded values.
-       [r1503]
-               Use enum types where appropriate.
-               
-               Fixes warnings from Intel C compiler.
-       [r1502]
-               Return a suitable MAPISTATUS if we can't talloc sufficient memory here.
-               
-               Fixes warning from Intel compiler.
-
-2009-09-11
-    bradh
-       [r1500]
-               Only pass "-Wmissing-prototypes -Wstrict-prototypes" to CFLAGS,
-               not to CXXFLAGS as well.
-               
-               Avoids g++ warnings.
-       [r1499]
-               Use enumerated type instead of integer.
-       [r1498]
-               Remove unreachable code.
-       [r1497]
-               Add "static" to avoid the need for additional declarations.
-               
-               Avoids noise from the intel c compiler.
-       [r1496]
-               Namespace variable in macro, so we don't get noise about shadowing a
-               declaration of "i"
-       [r1495]
-               Help icc find comparison_fn_t.
-       [r1494]
-               Match up data types in argument and format string.
-       [r1493]
-               Remove unused variable, and change a name to avoid a "shadowed declaration" 
-               warning.
-
-2009-09-10
-    bradh
-       [r1491]
-               Portability fixes for Intel C Compiler.
-               
-               Set CFLAGS early, otherwise AC_PROG_CC will set
-               CFLAGS to "-O2 -g", which later has -O3 appended, which
-               icc complains about.
-               
-               Check if we're really icc, and if so, turn off some warnings.
-               Also turn off the "FORTIFY_SOURCE" define which causes problems
-               with missing builtins.
-               
-               The warnings can (and should) be turned back on later, after we
-               fix the current issues.
-
-2009-09-02
-    bradh
-       [r1489]
-               Correct diagnostics messages.
-
-2009-08-29
-    bradh
-       [r1487]
-               Remove explicit -Wstrict-aliasing=3 from command line.
-               
-               This is implied by gcc -Wall option, and icc produces nuisance warnings
-               with it enabled (related to the -W option, not the code being compiled).
-       [r1486]
-               Fix some memory leaks and a bug in mapiprofile.
-               
-               I introduced the bug in r1467, there could be others that are similar.
-
-2009-08-24
-    bradh
-       [r1484]
-               Minor rewording of description
-       [r1483]
-               Minor cleanups.
-
-2009-08-18
-    bradh
-       [r1477]
-               Move initialisation up, to make sure everything is valid in the failure paths
-               
-               Patch by Erik Hovland. Thanks once again.
-               
-               This closes out ticket #178.
-       [r1476]
-               Remove unreachable code.
-               
-               Patch by Erik Hovland. Thanks again.
-               
-               This is the second part of ticket #177. This completes the checkin of that ticket.
-       [r1475]
-               Remove unreachable code.
-               
-               Patch by Erik Hovland. Thanks very much.
-               
-               This is the first part of ticket #177.
-
-2009-08-17
-    bradh
-       [r1473]
-               Ensure that we check the result of the operation we just performed.
-               
-               Patch by Erik Hovland. Thanks very much for continuing to provide these.
-               
-               This is the third part of the patch in ticket #177. The first two parts are yet to be addressed.
-       [r1472]
-               Make sure that return values are checked and report that given status if there is an error. 
-               
-               Patch from Erik Hovland, with minor additional changes. Thanks again for the patch.
-               
-               Resolves #176.
-       [r1471]
-               More cleanups of memory leaks for setting up database and an associated failure case.
-       [r1468]
-               fix leak in openchangeclient
-               
-               (as seen with valgrind of "openchangeclient -m")
-       [r1467]
-               Fix memory leak in mapiprofile utility
-
-2009-08-14
-    bradh
-       [r1465]
-               Ensure that when we pass --profile to mapitest, that profile
-               gets used instead of the default.
-               
-               Also fix a small memory leak when using --profile, and add some
-               extra comments.
-       [r1464]
-               Fix error handling case.
-               
-               Patch from Erik Hovland - thanks very much.
-               
-               Resolves ticket #175.
-
-2009-08-13
-    bradh
-       [r1461]
-               Remove unused enum values.
-       [r1460]
-               Remove unused code - no simple tests.
-
-2009-08-09
-    bradh
-       [r1454]
-               Update the script version of samba4 to alpha8.
-
-2009-08-05
-    jelmer
-       [r1450]
-               Add tevent to dependencies.
-
-2009-08-03
-    bradh
-       [r1448]
-               Remove unused headers.
-               
-               Patch by Erik Hovland - thanks very much,
-               
-               Resolves ticket #164.
-       [r1447]
-               Apply patch from Erik Hovland, from ticket #162.
-               
-               From the original patch:
-               "The problem is that when you do stat first w/ a file string anyone can
-               exploit the time in between to do whatever they want with the file that
-               the string is a name for. Instead, try to open straight away. Then fstat
-               w/ the file descriptor."
-               
-               I think the patch is fine, although I didn't run the torture test.
-
-2009-08-02
-    bradh
-       [r1444]
-               Avoid duplicate call to mapi_object_get_logon_id
-               
-               Based on a patch proposed by Erik Hovland, but adapted to follow the
-               pattern used in OpenStream().
-               
-               Resolves issue #163.
-       [r1443]
-               Applied modified version of patch from Erik Hovland to address unused variables.
-               
-               See http://trac.openchange.org/attachment/ticket/160/unused-values for
-               the rationale.
-               
-               This resolves #160.
-               
-               My version removes variables (rather than commenting them out) since we don't need
-               them now. I also updated the documentation for options that are no longer available
-               
-               The origin of the unused PR_FOLDER_CHILD_COUNT is a bit strange. It was introduced
-               in r808 (to resolve #103), and looks like it might have been used for debugging - no
-               impact on the code. I pulled out the whole lot.
-               
-               Tested with openchangeclient --fetchmail --folder="Sent Mail" and mapitest.
-       [r1442]
-               Use array form of delete (error identified with libmapixx-attach test, using valgrind).
-       [r1441]
-               Fix potentially unused variable.
-               
-               Tested with mapitest (even though nothing should have been affected) and
-               with libmapixx-test and libmapixx-attach under valgrind.
-               
-               Patch is remaining part of http://trac.openchange.org/ticket/153
-               
-               Thanks to Erik Hovland for the patch.
-
-2009-07-29
-    bradh
-       [r1433]
-               Remove dead / unused code.
-               
-               See http://trac.openchange.org/ticket/152#comment:1 for rationale.
-               
-               Original patch by Erik Hovland - thanks again.
-       [r1432]
-               Update test case to reflect new behaviour
-
-2009-07-18
-    jelmer
-       [r1423]
-               Link libmapistore against tdb.
-       [r1422]
-               Update copies of config.guess and config.sub.
-       [r1421]
-               Link libmapiproxy against tdb.
-       [r1420]
-               Declare a SOVERSION for libmapistore.
-       [r1419]
-               Use LDFLAGS when linking exchange2ical.
-       [r1418]
-               Create symlink for libmapistore.
-       [r1417]
-               Link libmapi against tevent since it uses tevent_context_init, link ndr_exchange.po into libmapiserver since it uses some ndr_push_* symbols.
-       [r1416]
-               Fix typo in variable name.
-
-2009-06-21
-    jelmer
-       [r1365]
-               Fix typo in Python variable name.
-       [r1364]
-               Keep separate flags for libraries around in config.mk.
-       [r1362]
-               Link libmapiserver against all libraries.
-
-2009-06-18
-    jkerihuel
-       [r1357]
-               Add some PidTag* mapping involved with Recipients and RecipientRow
-
-2009-05-28
-    jkerihuel
-       [r1350]
-               Patch from Erik Hovland <erik@hovland.org>:
-               
-               Initializes variables to make sure they aren't used uninitialized.
-               
-               Ref ticket #153
-       [r1349]
-               - Add sanity check on mapitest_common creation routines within
-                 mapitest modules
-               
-               - Apply patch from Erik Hovland <erik@hovland.org>: check return
-                 types.
-       [r1348]
-               Patch From Erik Hovland <erik@hovland.org>
-               
-               In torture_rpc_mapi_sendattach a call is made to the system function
-               read at line 199. The return value of read is assigned to read_size,
-               which happens to be of unsigned type. So if read returns -1 (which it
-               can) it will not be noticed. The patch changes the type to ssize_t
-               (signed) and checks for -1 as well as zero to break out of the loop.
-               
-               Ref ticket #156
-       [r1347]
-               Patch from Erik Hovland <erik@hovland.org>
-               
-               1. In mapiproxy, the directory handle dir will be leaked after it is
-               done being used.
-               2. exchange2mbox main() should use exit at line 785 just like all of
-               the other error paths so that we don't leak anything
-               
-               ref. ticket #157
-       [r1346]
-               Patch from Erik Hovland <erik@hovland.org>
-               
-               Adds a #include config.h to suppress compiler warnings for vasprintf
-       [r1345]
-               Patch from Erik Hovland <erik@hovland.org>:
-               
-               Make sure pointers are valid before dereferencing
-               1. lpProps 'might' be null
-               2. Add folder to variables checked before moving on.
-               4. Check nprop->guid before giving to strcmp, two times
-               6. Check definition before handing to strlen (which will dereference
-               it) Reworked this one to include talloc_free
-               7. Check MessageClass? before handing to strncasecmp
-               8. Check backend, return if null.
-               10. Don't print out anything if lpProp is null
-               11. Check attach_size before dereferencing
-
-2009-05-25
-    jkerihuel
-       [r1343]
-               Fix pull structure for QueryRows reply when no RowData is available
-
-2009-05-07
-    jkerihuel
-       [r1341]
-               - Add preliminary IDL support for Exchange 2003/2007 EMSMDB RPC calls:
-                 * EcDoConnectEx
-                 * EcDoRpcExt2
-               
-               - Add LZxpress and XorMagic support to EcDoRpcExt2 request/reply
-                 blob. However it doesn't yet support Chained calls.
-               
-               - Add AuxInfo/AUX_HEADER structures and IDL
-               
-               - Refactor mapi_request and mapi_response: move obfuscate_data calls
-                 up to the EcDoRpc layer
-
-2009-04-27
-    jkerihuel
-       [r1339]
-               Patch from Paolo Abeni <paolo.abeni@gmail.com>:
-               
-               call ProcessNotification() after each successful 
-               emsmdb_transaction() in all the libmapi calls.
-       [r1338]
-               Patch from Paolo Abeni <paolo.abeni@gmail.com>:
-               
-               Mapi notifications can occurs inside any emsmdb_transaction; currently
-               only the notification send by the server inside the
-               emsmdb_transaction_null() in MonitorNotification() are
-               parsed/processed/delivered to the appropriate callback.
-               
-               To be able to process all the received notifications, the notification
-               structure must comprise the private data to be passed to the
-               notification callback, since in the average mapi call this data is not
-               available. This patch modifies the Subscribe() call and the 
-               mapi_notification structure, adding the private_data parameter (also the 
-               related Subscribe() calls are update)  and add a libmapi call 
-               (DispatchNotifications) to force the notification dispatching in
-               a [quite] non blocking way
-
-2009-04-26
-    jkerihuel
-       [r1336]
-               Patch from Paolo Abeni <paolo.abeni@gmail.com>:
-               
-               ProcessNotification() is ignoring the handle value contained into the
-               processed notifications. This means that if many Subscribe() calls are
-               performed on different folders but with the same flags, all the
-               registered callback are [incorrectly] signaled with each received
-               notification.
-               
-               The attached patch match the handler contained into the notification
-               message against the notification object handle to avoid such
-               replication.
-
-2009-04-23
-    jkerihuel
-       [r1331]
-               Make sure delayed authenication is not called when server mode is enabled
-    bradh
-       [r1333]
-               Update property list to reflect current OAB props.
-               
-               This deletes a few incompatible properties. Cannot determine the history of the PR_MAILBEAT_ props.
-       [r1332]
-               Fix display of Folder ID values (one is filled with ., the other is prefixed with .16 instead of being filled.
-               
-               Also remove duplicate close() of file descriptor.
-       [r1330]
-               Typo fix.
-
-2009-04-22
-    bradh
-       [r1328]
-               Warning fix.
-
-2009-04-21
-    bradh
-       [r1326]
-               Implement RopTransportNewMail (0x51).
-               
-               Includes IDL, libmapi implementation, and basic mapitest coverage.
-               
-               Also fix a few doxygen / formatting things.
-
-2009-04-19
-    jkerihuel
-       [r1324]
-               - Add Redirect buffer support for OpenMsgStore and OpenPublicFolder.
-               This commit fixes the ecWrongServer (0x478) error users encounter
-               while running openchange based software in a clustered Exchange 
-               environment.
-
-2009-04-18
-    bradh
-       [r1322]
-               Implement RopCloneStream (0x3b) and RopWriteAndCommitStream (0x90).
-               
-               Includes IDL, implementation and mapitest tests.
-
-2009-04-17
-    bradh
-       [r1320]
-               Fix Search notifications.
-               
-               MS concurred that the docs are wrong.
-               
-               Patch by Paolo Abeni - thanks very much for the
-               investigation and the patch.
-       [r1319]
-               Update GetStoreState documentation.
-       [r1318]
-               Implement RopSetPropertiesNoReplicate (0x79).
-               
-               IDL was already done. mapitest for DeletePropertiesNoReplicate was
-               reused / updated.
-
-2009-04-16
-    bradh
-       [r1316]
-               Implement (IDL, libmapi, mapitest) RopHardDeleteMessagesAndSubfolders (0x92)
-               
-               Also fix some bugs in mapitest common code, and an incorrect sanity check in CreateFolder().
-
-2009-04-15
-    bradh
-       [r1314]
-               Implement RopHardDeleteMessages (0x91). 
-               
-               Includes IDL, implementation and mapitest.
-    jelmer
-       [r1313]
-               Ignore generated property file.
-
-2009-04-13
-    bradh
-       [r1311]
-               Add PT_ACTIONS to list of data types.
-               
-               Not fully/correctly handled yet.
-
-2009-04-12
-    jkerihuel
-       [r1309]
-               - Add dcerpc_mapiproxy:delegated_auth option 
-               This option delays mapiproxy-remote server authentication when
-               the client sends the first request on a given pipe. This is
-               mandatory in order to have delegated credentials to work.
-               
-               - Factor remote connection into mapiproxy_op_connect
-
-2009-04-11
-    bradh
-       [r1307]
-               Add session state to the notification.
-               Patch by Paolo Abeni - thanks for the investigation and fix.
-               
-               Also remove a stray debug message.
-       [r1306]
-               Add a new mapitest suite for OXCNOTIF (Core Notifications).
-               
-               Add a test to the OXCNOTIF suite based on test case provided by Paolo Abeni.
-
-2009-04-10
-    bradh
-       [r1304]
-               Update IDL for ModifyRules (0x41) and add IDL for 
-               UpdateDeferredActionMessages (0x57).
-               
-               This is a checkpoint commit, pending further investigation
-               into how we handle PtypRestriction and PtypRuleAction.
-
-2009-04-08
-    bradh
-       [r1302]
-               Mapitest cleanups - remove GetLastError(), and other minor edits.
-       [r1301]
-               Implement LockRegionStream and UnlockRegionStream ROPs.
-               
-               These appear to be a relatively recent addition to the 
-               documentation, possibly only used in Exchange 2007 / Outlook
-               2007.
-               
-               This is complete except for testing of whether the locking
-               actually works.
-
-2009-04-06
-    jkerihuel
-       [r1299]
-               Use parent folder full replica ID: 2 bytes instead of 1 byte
-       [r1297]
-               - Add Implementation for Logon redirect response buffer in OpenChange IDL
-               - Update libmapiserver size calculation routine for Logon call to handle this case
-
-2009-03-30
-    jkerihuel
-       [r1293]
-               Add session and logon_id to the list of parameters to copy between objects.
-               This patch fixes a problem in openchangeclient when using the --folder parameter.
-    bradh
-       [r1294]
-               Remove code relating to free'ing the bookmark returned
-               by SetCollapseState. Initial investigations with MS
-               lead me to believe that you can't free that resource.
-               
-               May be more work in this area as investigation continues.
-
-2009-03-25
-    jkerihuel
-       [r1291]
-               Fix memory leaks for functions relying on pull_emsmdb_property
-
-2009-03-16
-    jkerihuel
-       [r1289]
-               Fix emsabp valgrind errors
-
-2009-03-12
-    jkerihuel
-       [r1287]
-               Make it possible to specify a version number for release different
-               from major/minor from configure.ac
-
-2009-03-11
-    jkerihuel
-       [r1285]
-               Make it possible to open and control up to 255 mailboxes within a 
-               single MAPI session.
-               
-               It implements an internal management of a logon_id array at session
-               level + enable transparent transport/copy of current logon_id value
-               among MAPI calls + finally transparently free the logon_id value when
-               the store object (PF or mailbox) is being released.
-       [r1284]
-               - Retrieve recipients from OpenEmbeddedMessage reply
-               - Test the implementation in mapitest
-               - Avoid potential memory leak: steal context for returned ulPropTags.
-
-2009-03-08
-    jkerihuel
-       [r1282]
-               Be more tolerant with Logon request flags
-       [r1281]
-               Set retval to MAPI_E_INVALID_BOOKMARK rather than returning.
-               This case still needs to be fixed though.
-       [r1280]
-               Delete debug message
-       [r1279]
-               Create a default GetProps reply on error
-
-2009-03-06
-    jkerihuel
-       [r1277]
-               Fix retval problem in libmapi/nspi.c for GetIDsFromNames.
-               Function returns MAPI_E_SUCCESS, but errno is set to 0x0000000b.
-               Set errno to retval to work around this problem.
-               
-               
-               NSPI-GETIDSFROMNAMES
-       [r1276]
-               OXCPRPT-NAME-ID mapitest now passes: The QueryNamedProperties ecMemory retval
-               has been worked-around by setting QueryFlags to NoStrings to limite the results
-               scope. This means the MNID_STRING case is not fully checked anymore. We should maybe
-               add additional tests to do full coverage.
-       [r1275]
-               Fix GetNamesFromIDs IDL and implementation.
-               
-               Note: We should probably update the function prototype
-               so it takes a mapi_SPropTagArray rather than a single property.
-    bradh
-       [r1274]
-               Protect against bad results from GetGALTable().
-               
-               Resolves ticket #142
-
-2009-03-04
-    jkerihuel
-       [r1272]
-               Patch from Paolo Abeni: Add sanity check to Subscribe
-               and prevent applications from crashing if notify context 
-               is uninitialized.
-
-2009-03-03
-    jkerihuel
-       [r1270]
-               Ensure NSPI server functions have a valid dcesrv_handle
-       [r1269]
-               Add quick/additional configuration information on how to setup openchange server
-       [r1268]
-               This commit adds a retval check on private data retrieval function and prevents QueryPosition from causing a 
-               segfault when parent object is meant to come from GetContentsTable.
-       [r1267]
-               - Fix NspiGetMatches server reply when specified username is invalid and
-               search fails.
-               - Make use of talloc hierarchy for NspiGetProps properties fetch + fix
-               a talloc_free bug leading to segfault on failure.
-       [r1265]
-               Prevent from registering same mapistore backend multiple times
-    bradh
-       [r1266]
-               Howto updates.
-
-2009-03-02
-    jkerihuel
-       [r1261]
-               Add skeleton for GetRulesTable 
-       [r1258]
-               - return MAPI_E_SUCCESS when QueryRows reply count is 0
-               - Move Reminders from IPM Subtree to Mailbox root
-       [r1257]
-               - Add QueryPosition implementation
-               - Move from offset to numerator/denominator couple for table objects
-               
-               Outlook now opens properly using openchange server and display the
-               mailbox folder list with icons ;-)
-       [r1256]
-               - Add skeletons for Restrict, SortTable, FindRow calls
-               - Introduce emsmdb provider table object
-               - Add preliminary table implementation for system/special folders
-               - Add preliminary implementation of GetHierarchyTable, SetColumns and QueryRows
-               - Improve creation of GetProps reply blob for Mailbox folder
-               - Fix bug in EcRRegisterPushNotification when associated handle is invalid
-               - Remove some usage of ldb_filter and use format string instead 
-               - Update libmapiserver sanity checks and look for error_code != MAPI_E_SUCCESS
-                 so openchange server is able to return failed replies to MAPI clients
-               - Introduce flaggedPropertyRows in libmapiserver_push_property (needed by QueryRows)
-               
-               This commit makes openchange server work with "openchangeclient --mailbox" ;-)
-               
-               Still preliminary but anyway worthwhile enough to be mentioned ...
-       [r1255]
-               - Add a function to count subfolders of a container
-               - Add a function to wrap MAPI tables over openchangedb
-               - Factorize code used to fetch property values from LDB records
-       [r1254]
-               - Add default properties to folder records while provisioning mailbox
-               - Add few more mapping for PR_* to PidTag
-               - Add a new MAPI property to the list
-       [r1253]
-               Avoid openchangeclient --mailbox to segfault when run vs openchange server
-    bradh
-       [r1263]
-               Remove some ldb_filters, and just use varargs into ldb_search
-       [r1262]
-               warning fix for 64-bit arch.
-       [r1260]
-               Revert previous commit.
-       [r1259]
-               Experimental commit to fix build problems resulting
-               from property changes.
-
-2009-03-01
-    jkerihuel
-       [r1251]
-               - Add PidTagDisplayName property to Mailbox object
-               - Add PidTagParentFolderId to all system/special folders
-       [r1250]
-               - handles array depends if a valid mapi_repl exists. This commit
-                 fixes the destructor semantics.
-               - Fix a mapitest segfault encountered while run vs openchange server
-               - Return 1 in SRowSet_propcpy if an error was encountered.
-       [r1249]
-               Fix libmapi stack segfault when MAPI calls returns 
-               with error_code different from MAPI_E_SUCCESS.
-       [r1248]
-               Do not process NSPI request if we can't find the handle
-       [r1247]
-               Remove unnecessary ldb_filter parameter and replace it
-               with ldb_search format string.
-
-2009-02-28
-    jkerihuel
-       [r1245]
-               - GetPropertyIdsFromNames skeleton added
-       [r1244]
-               - Fix how Release replies are handled in mapi_repl[] array
-               - Remove Release size calculation
-               - Fix QueryRows size in libmapiserver
-               - Add a dummy/skeleton GetPropertiesSpecific function for mapistore objects.
-               - GetHierarchyTable skeleton added
-               - SetProperties skeleton added
-               - CreateMessage skeleton added
-               - SaveChangesMessage skeleton added
-                
-
-2009-02-27
-    jkerihuel
-       [r1241]
-               Set mapi_response to NULL upon init ... just to get sure
-       [r1240]
-               Fix MAPIUninitialize segfault
-    bradh
-       [r1242]
-               Warning fix.
-
-2009-02-26
-    jkerihuel
-       [r1238]
-               - Add skeleton for GetContentsTable Rop
-               - Add skeleton for some [MS-OXCTABL] Rops: SetColumns, SortTable, QueryRows, SeekRows
-               - Add libmapiserver size calculation functions for all the above
-               - Ensure we only set objects parameter if it exists
-               - Return when dcesrv handle is not available
-       [r1236]
-               Merge s4-alpha7 branch back into trunk
-
-2009-02-25
-    jkerihuel
-       [r1227]
-               - Add several PidTag to openchange.ldb folders
-               - Add provisioning convenient function which adds attribute/value pair
-               to a given folder record
-               - Replace existing special folders reference within Inbox with PidTagIpm* tags
-               - Add new PidTag values to mapi-properties
-               - Add a function to libmapiproxy to build a folder EntryID as described in MS-OXODATA
-               - Add a function which builds special properties for openchangedb folders
-               - Add PT_BOOLEAN case to openchangedb folder get property function
-               - Keep a reference to the mailbox username within emsmdb provider context
-               - Create and return a handle in RegisterNotification
-                
-       [r1226]
-               Improve PT_I8 dump
-       [r1225]
-               Wrong MessageClass size calculation fixed 
-    jelmer
-       [r1229]
-               Remove duplicate _GNU_SOURCE definition (already specified by Makefile)
-       [r1228]
-               Ignore new binary and trial output.
-
-2009-02-24
-    jkerihuel
-       [r1223]
-               - Fix systemfolder value for System/Special folders
-               - Add GetProps support to System/Special folders
-       [r1222]
-               Add auto-generated parser to the ignore list
-       [r1221]
-               - Add auto-generated parser for MAPI property to PidTag mapping
-               - Add some PidTag values
-               - Add a lookup and get property functions on system folders
-       [r1220]
-               - tuple SystemIdx in the dictionnary to workaround the ordering problem
-               - Add ParentFolderId attribute to System Folders
-       [r1217]
-               - Add creation of "Special folders" to mailbox provisioning
-               - Rename fid attribute to PidTagFolderId
-               - Rename name attribute to PidTagDisplayName
-               - Rename ExplicitContainerClass to PidTagContainerClass
-       [r1216]
-               Fix GlobalCount increment
-       [r1215]
-               Fix mailbox provisioning
-    bradh
-       [r1219]
-               Add test for FILETIME structure.
-       [r1218]
-               Update docs for mapiproxy entry.
-    jelmer
-       [r1214]
-               Fix handling of fids.
-2009-02-23
-    jkerihuel
-       [r1208]
-               - Fix openchangedb mailbox hierarchy and introduces subfolders
-               as described in [MS-OXOFOLDS] specifications.
-               - Update openchangedb API to reflect this change.
-       [r1207]
-               Rename private mailbox folder "non_ipm_subtree" to "mailbox_root"
-               to fit with MS-OXOFOLDS specifications.
-       [r1206]
-               - Add provisioning code for GetReceiveFolder defaults
-               - Check if mapistore content repository already exists for the user
-               - Make mailbox creation verbose
-    jelmer
-       [r1213]
-               Fix parentfolder reference.
-       [r1212]
-               Fix syntax error.
-       [r1211]
-               Use recursive call to create folders.
-       [r1210]
-               Simplify list iteration, PEP8, avoid using string exceptions.
-
-2009-02-22
-    jkerihuel
-       [r1204]
-               Fix 'dereferencing type-punned pointer' warnings
-       [r1203]
-               - Add strict-aliasing compiler flags
-               - Fix format string warnings on ubuntu buildbot
-       [r1202]
-               - Add _FORTIFY_SOURCE=2 to the compiler CFLAGS
-               - Fix warnings introduced by -D_FORTIFY_SOURCE
-    bradh
-       [r1201]
-               I might have been a bit hasty with that last commit...
-               
-               Need sqlite3.
-       [r1200]
-               Try harder to find sqlite3.
-               
-               Seems to be in sqlite.pc on Ubuntu.
-       [r1198]
-               Fix warning on 64-bit arch.
-2009-02-21
-    jkerihuel
-       [r1197]
-               - Add RopGetReceiveFolder (0x27) implementation
-               The function respects should respect the semantics and behavior
-               as described in MS-OXCSTOR specifications. However the python's
-               code modification required: add ExplicitMessageClass attributes
-               to folder records is not yet effective.
-               
-               - Add GetReceiveFolder size calculation function to libmapiserver
-               - Add a function to openchangedb API to retrieve the FID/ExplicitMessageClass
-               couple for a given SystemFolder within user's mailbox.
-       [r1196]
-               - Provision scripts: create a mapistore default storage space within ${private}/mapistore/${username}
-               - Provision scripts: add default sqlite:// mapistore URI for system folders
-               - Add mapistore context initialization when calling OpenFolder on SystemFolder
-               - Add mapistore context release for folders in emsmdbp object destructor
-       [r1195]
-               Factorize emsmdbp objects
-               Add emsmdbp_object generic talloc destructor
-    bradh
-       [r1194]
-               Add test for PT_MV_LONG.
-       [r1193]
-               Add tests for PT_I8 and PT_BINARY
-       [r1192]
-               Fix warning about no newline at end of file.
-               
-               Remove most recently added tests from "to be done" list.
-       [r1191]
-               Add a couple more mapi_SPropValue tests.
-
-2009-02-19
-    jkerihuel
-       [r1189]
-               - Initialize mapistore within emsmdb provider context
-               - Add destructors for MAPI handles and mapistore contexts
-               - Remove emsmdbp_ctx memory context structure member and
-               allocate directly with emsmdbp_ctx
-       [r1188]
-               I don't see any good reason why we would pad MAPI replies with some bytes. 
-               I guess it comes from some prehistoric openchange code.
-       [r1187]
-               Fix systemfolder assignment depending on IsSystemFolder value
-       [r1186]
-               - Initialize OpenFolder server reply
-       [r1185]
-               - Wrap TDB connections to mapistore (code from samba4) so
-               multiple instances can open read/write to the same TDB database
-               - Remove static id_mapping_context (replaced with tdb_wrap calls)
-               - Update mapistore linkage rules so mapistore can be used with exchange_emsmdb server
-               - Link mapistore with exchange_emsmdb
-       [r1183]
-               Fix aclocal warning for AC_DEFINE comparison_fn_t
-       [r1182]
-               Remove useless GetProfilePtr from IProfAdmin interface
-               Closes trac ticket #131
-       [r1181]
-               Add missing script - prevent configure from generating warning vs missing file.
-       [r1180]
-               Remove stamp-h1 file during distclean and add it
-               to the ignore list.
-       [r1179]
-               - Add server-side GetReceiveFolder (0x27) skeleton
-       [r1178]
-               Work around the comparison_fn_t redefinition problem
-               between libocpf and ndr.h
-       [r1177]
-               FreeBSD doesn't have time.h daylight global variable
-    bradh
-       [r1184]
-               start testing mapi_SPropValue_array.
-               This also tests some underlying functions.
-
-2009-02-18
-    jkerihuel
-       [r1175]
-               Add comparison_fn_t support to ndr.h
-               This was the latest change require to make openchange compiles under FreeBSD
-               
-               = samba4/openchange FreeBSD support completed =
-
-2009-02-17
-    jkerihuel
-       [r1173]
-               Remove duplicated post_install call
-       [r1172]
-               Add a post_install operation on FreeBSD
-               Make sure pidl is installed properly.
-       [r1171]
-               Patch samba4 tarball so it compiles properly on FreeBSD 7.0
-               Note: this is a dirty hack which needs to be removed in the future
-       [r1170]
-               Install Samba4 correctly although user's PKG_CONFIG_PATH env variable
-               may not be adjusted properly.
-       [r1169]
-               Avoid download samba4 release tarball if already available
-               in current directory.
-       [r1168]
-               - Add test for comparison_fn_t in configure.ac
-               - libocpf auto-generated files include stdlib.h and prevent from
-               having the proper comparison_fn_t typedef. This commit works around this
-               problem and define comparison_fn_t within a private header.
-       [r1165]
-               getline is a stdio GNU_SOURCE extension not available under FreeBSD.
-               Use fgetln instead when it is compiled on this OS.
-       [r1164]
-               FreeBSD doesn't define sighandler_t but sig_t
-       [r1163]
-               Replace open() call with O_DIRECTORY flag (Linux specific) with opendir
-       [r1162]
-               - Add non-default search path /usr/local/{include,lib} to
-               CFLAGS and LDFLAGS when compiling OpenChange under FreeBSD
-               - Make use of LDFLAGS while compiling openchange tools
-    bradh
-       [r1167]
-               A few improvements for property handling.
-               
-               Also add unit tests to verify behaviour is correct.
-               
-               The implementation for the FlatUID (GUID) structure appears broken. Perhaps I'm not using it correctly.
-       [r1166]
-               Microsoft confirmed the LCID is wrong in the spec, and will be updated in the next rev.
-
-2009-02-16
-    jkerihuel
-       [r1160]
-               Check for Flex version < 2.5.35
-               Make sure users can define the FLEX environment variable
-       [r1159]
-               Add automake scripts for AC_CANONICAL_HOST support
-               Needed for FreeBSD OS detection in configure.ac
-
-2009-02-14
-    bradh
-       [r1153]
-               Fix warnings from lexer output.
-       [r1152]
-               Fixes for warnings on 64-bit architectures.
-       [r1151]
-               Fix warning on 64-bit architecture.
-    jelmer
-       [r1157]
-               Add some more tests for openchange.mailbox.
-       [r1156]
-               Fix creation of new mailbox after provision.
-       [r1155]
-               Always use the same URL when connecting to openchangedb.
-       [r1154]
-               Fix arguments to openchangedb_provision.
-
-2009-02-13
-    jkerihuel
-       [r1149]
-               Fix libmapi 64-bit machine cast warnings mentioned in Brad's devel email
-    bradh
-       [r1148]
-               Warning fix for 64-bit arch.
-
-2009-02-12
-    jkerihuel
-       [r1146]
-               Add doxygen definition for RopRelease
-       [r1145]
-               - Add server-side skeleton implementation for RopOpenFolder and RopRegisterNotification
-               - Add preliminary size calculation functions in libmapiserver for the 2 calls above
-               - Fix size bug for serialized requests
-               - Add skeleton case for RopGetPropertiesSpecific on SystemFolders
-               - Make sure the GetProps reply blob is initialized whatever happen
-               - Add a skeleton emsmdbp folder object init function
-
-2009-02-11
-    jkerihuel
-       [r1143]
-               Remove debug strings for GetPropertiesSpecific Rop
-       [r1142]
-               Enable verbose output in server mode - useful during development
-       [r1141]
-               Implement preliminary server-side RopGetPropertiesSpecific call for mailbox object.
-       [r1140]
-               - Fix GetProps blob for PT_BINARY: use SBinary_short instead of Binary_r
-               - Fix GetProps size: subcontext is not added to the fixed size calculation
-       [r1133]
-               - GetPropsSpecific size calculation function added to libmapiserver
-               - Function to create a GetProps reply property blob added to libmapiserver
-    jelmer
-       [r1139]
-               Add tests for provisioning.
-       [r1138]
-               Several cleanups in python code, add tests for schema use.
-       [r1137]
-               Don't clear PYTHONPATH override.
-       [r1136]
-               Remove unused imports, add extra tests.
-       [r1135]
-               Use member variable for Ldb, rather than subclassing.
-       [r1134]
-               Remove print statements to avoid cluttering test output.
-       [r1130]
-               Add simple and incomplete testcase for OpenChangeDB.
-       [r1129]
-               Move wipe of data to mailbox.py, simplify arguments to add_root_mailbox.
-       [r1128]
-               Move adding a server to mailbox.py.
-       [r1127]
-               Move ldif from oc_provision_openchange.ldif into Python.
-       [r1126]
-               Stop providing setup_path to OpenChangeDB, as it's no longer used.
-       [r1125]
-               Avoid using separate LDIF file when creating folder mailboxes.
-       [r1124]
-               Avoid using separate LDIF file when creating mailboxes.
-       [r1123]
-               Avoid passing full names object.
-       [r1122]
-               Add check-python target.
-
-2009-02-10
-    jelmer
-       [r1120]
-               fix openchange_newuser.
-       [r1119]
-               Use SamDB for actual SAM databases, Ldb otherwise.
-       [r1118]
-               Remove unused parameters, don't make parameters optional if they are mandatory.
-       [r1117]
-               remove unused parameters.
-       [r1116]
-               make mailbox object-oriented, remove creds/lp parameters.
-       [r1115]
-               Fix OpenChangeDB syntax.
-
-2009-02-09
-    jkerihuel
-       [r1113]
-               - Add a systemfolder member to the MAPI handle structure to make a difference
-                 between objects managed by mapistore and those stored within openchange.ldb 
-                 (root mailbox folders).
-               
-               - Add opaque functions to set/get private_data and systemfolder to the MAPI 
-                 handles API.
-       [r1112]
-               Minor doxygen fix/improvement
-       [r1109]
-               Add libmapistore object files to the ignore list
-       [r1108]
-               - Add a very preliminary and light libmapistore implementation.
-               mapistore only supplies init/release and add/del backend contexts.
-               This commit also includes a sqlite3 backend skeleton (open/close sqlite db)
-               - A temporary mapistore testing tool has been added locally for implementation checks.
-    jelmer
-       [r1111]
-               Use convenience function for connecting to openchange.ldb.
-       [r1110]
-               Use standard LDB functions - openchange.ldb is not a SAM database.
-
-2009-02-08
-    bradh
-       [r1106]
-               Implement support the SUMMARY language tag.
-       [r1105]
-               Initial checking of libical based exchange2ical code.
-               
-               This has a long way to go, so think of this as more of a checkpoint
-               than a release.
-               
-               See http://sourceforge.net/projects/freeassociation/ for the library, or
-               see if your distro has a package.
-       [r1104]
-               Reduce warnings.
-       [r1103]
-               Add missing parameter to API documentation.
-               
-               Resolves ticket #130.
-       [r1102]
-               API documentation fixes for OpenEmbeddedMessage()
-       [r1101]
-               Implement OpenEmbeddedMessage ROP (0x46).
-               
-               Resolves Ticket #93
-       [r1100]
-               Factor out message creation and message fill actions.
-               
-               Also remove GetLastError() where appropriate.
-       [r1099]
-               Add some API documentation.
-
-2009-02-07
-    jkerihuel
-       [r1097]
-               Update openchangepfadmin description
-               Fix tool relying on libmapiadmin
-    bradh
-       [r1096]
-               Minor code tweak.
-               
-               Fix ticket #132.
-       [r1095]
-               Add more explanation for README
-       [r1094]
-               Reimplement RTF decompression.
-               
-               Add unit tests from MS-OXRTFCP.
-       [r1093]
-               Fix warnings in example code
-       [r1092]
-               Add description for libmapiadmin
-       [r1091]
-               Add description for libmapi / libmapi++
-       [r1090]
-               Start on the directory descriptions.
-       [r1089]
-               doc/ pointers
-2009-02-06
-    bradh
-       [r1088]
-               Add overview. Extracted from API docs.
-       [r1087]
-               Additional docs.
-       [r1084]
-               Outline of README file.
-               
-               (also using this to test buildbot without changing real code)
-2009-02-05
-    jkerihuel
-       [r1081]
-               Add Version field - avoid breaking pkg-config --list-all
-       [r1080]
-               Fix warnings (gcc 4.2.4)
-    jelmer
-       [r1083]
-               Use variable for package version rather than hardcoding it.
-
-2009-02-04
-    jkerihuel
-       [r1078]
-               Fix pc file libs
-
-2009-02-03
-    jkerihuel
-       [r1070]
-               - Add an implementation of the MAPI handles management API. The API
-                 internally uses an in-memory TDB database to keep object hierarchy
-                 and a doubled chained list to associate private data to handles.
-               
-               The API currently provides add, search and delete facilities. Note
-               that while untested, the delete operation is designed to recursively
-               delete children of the 'meant to be deleted' handle.
-               
-               Finally the API doesn't remove TDB records but mark them as free so
-               they can be reused across MAPI session and prevent from handle counter
-               growing indefinitely.
-               
-               - Add a preliminary implementation of the Release call
-               - Add Release size calculation to libmapiserver
-               - Update EMSMDB provider to use MAPI handles API
-    bradh
-       [r1075]
-               Minor api documentation fix.
-       [r1074]
-               Minor API docs fix.
-       [r1073]
-               Minor API docs fix.
-       [r1072]
-               Minor API docs tweak.
-       [r1071]
-               Token commit of tiny API docs fix.
-    jelmer
-       [r1076]
-               Look for GNU make harder (gmake on BSDs).
-
-2009-02-02
-    jkerihuel
-       [r1068]
-               - Add preliminary EMSMDB provider implementation for RopLogon (0xFE)
-               - Add common routines for OpenChange LDB context init and search
-                 within libmapiproxy
-               - Add libmapiserver skeleton with size calculation routine for RopLogon
-               - Change DSO linking dependencies for mapiproxy shared libraries
-               - Propagate _GNU_SOURCE change from libmapi.h to mapiproxy
-2009-02-01
-    jkerihuel
-       [r1067]
-               Remove .po and .o objects within libmapiproxy subdirectory
-       [r1066]
-               Move libmapiproxy into its own directory and rebase mapiproxy headers accordingly
-               Fix make uninstall for AD and profiles directories
-       [r1064]
-               doxygen typo fix
-       [r1063]
-               Add python code and ldif files needed to create and populate the experimental
-               openchange dispatcher database.
-       [r1062]
-               Add 5-Minute configuration documentation for OpenChange server mode
-       [r1061]
-               - Rebase ldif files into sub directories:
-                 * AD for OpenChange AD modifications
-                 * profiles for OpenChange IProfAdmin interface
-               - Makes it easier figuring out LDIF files scope
-               - Prepare setup folder for LDIF openchangedb files integration
-               - Update install/uninstall Makefile rules for ldif files and
-                 make sure everything got removed
-    bradh
-       [r1060]
-               Add forgotten file.
-       [r1059]
-               Add support for short language names (e.g. en-AU) for lcid.
-
-2009-01-31
-    jkerihuel
-       [r1057]
-               Delete deprecated libmapi setup Perl script
-    bradh
-       [r1056]
-               Add summary report for tests.
-       [r1055]
-               Make mapitest return the number of failed tests.
-
-2009-01-29
-    jkerihuel
-       [r1052]
-               - Add pkg-config pc file for libmapiproxy
-               - Improve mapiproxy rules so libmapiproxy gets installed and cleaned properly
-       [r1051]
-               Free memory allocated by the fake subcontext in
-               ndr_pull_mapi_response.
-               
-               This fix saves 300kb of memory and removes 700 loss records while
-               valgrinding mapitest.
-       [r1050]
-               Fix segfault - Add sanity check - when SPropTagArray is NULL in
-               NspiQueryRows request
-       [r1048]
-               Fix openchange_newuser name typo
-       [r1047]
-               Fix server provisioning command line examples
-       [r1045]
-               Fix several libmapi leaks.
-               
-               mapi_response was allocated using emsmdb_ctx->mem_ctx memory context
-               and was not free'd when libmapi function released their
-               context. Furthermore we need to release mapi_response->mapi_repl and
-               mapi_response->handles which are now automatically free'd when
-               mapi_response destructor is called.
-               
-               However note that this fix is not perfect: mapi_response memory is not
-               free'd properly when calls exit with an error.
-               
-               This commit also make use of talloc_steal where necessary to keep
-               returned fields allocated.
-2009-01-28
-    jkerihuel
-       [r1040]
-               Use named context rather than autofree
-       [r1039]
-               Fix memory leak in emsmdb.c: Use a temporary memory context for
-               request and length allocation in emsmdb_transaction.
-               
-               - This removes 827 loss records and approximatively saves 41kb of
-                 memory while valgrinding mapitest
-       [r1038]
-               - Fix memory leak in GetDefaultProfile and GetProfileTable.
-               - Save from 10 loss records while valgrinding mapitest
-               - Developers are now responsible from freeing the GetDefaultProfile
-                 string the function allocates.
-               - Apply changes to all openchange tools.
-       [r1037]
-               Add blackbox subunit tests for mapiprofile tool
-    bradh
-       [r1043]
-               One more trivial fix.
-       [r1042]
-               Typo fixes.
-               
-               (Yep, more trivial changes)
-       [r1041]
-               Fix incorrect LCID for en-CA.
-               
-               (OK, its token, I admit).
-    jelmer
-       [r1044]
-               Don't define _GNU_SOURCE unconditionally.
-2009-01-27
-    jkerihuel
-       [r1036]
-               Prevent mapiproxy from multiple init and modules/server register
-               when an smb client connect to the server (e.g. windows browser or smbclient)
-2009-01-26
-    bradh
-       [r1033]
-               According to [MS-OXOCAL] Section 2.2.1.44.1 
-               "RecurrencePattern Structure", a monthly recurrence
-               also has a Day specific parameter.
-               
-               Add that here.
-    jelmer
-       [r1035]
-               Simply run autogen.sh rather than replicating it inside the Makefile.
-       [r1034]
-               need to run aclocal before autoconf for the pkg-config macros.
-2009-01-25
-    jkerihuel
-       [r1032]
-               Use a autofree context rather than a named one - makes sure memory is free'd when we exit the test.
-               Saves from 4 loss records while valgrind'ing mapitest.
-       [r1031]
-               Use temporary memory context for EcDoConnect.
-               Saves from 20 loss records when valgrind'ing mapitest.
-       [r1030]
-               Free PropertyProblem structures returned by CopyTo.
-       [r1029]
-               Replace deprecated talloc_init calls with talloc_named
-               This commit removes some valgrind loss records talloc_init was responsible for
-       [r1028]
-               Free everything
-               Free everything when running mapitest --list-all.
-               Valgrind however shows a loss record related to talloc_init ...
-    bradh
-       [r1027]
-               Minor Intel C compiler warning fixes.
-       [r1026]
-               Minor apidocs cleanups.
-2009-01-24
-    jkerihuel
-       [r1024]
-               Use double pointer for lp_ctx in GetLoadparmContext assessor
-       [r1023]
-               Fix memory leak in utf8 lexer.
-       [r1022]
-               - Remove custom iconv_convenience from pull_emsmdb_property and use 
-               lp_iconv_convenience on loadparm_context argument instead. 
-               
-               - Change OpenChange libmapi API to reflect this change
-               
-               - Introduce a lp_ctx assessor in libmapi/cdo_mapi.c 
-               (mostly for mapitest modules). libmapi/mapiproxy developers
-               should never have to make use of it.
-               
-               - Remove pointless duplicated call to lp_load_default in MAPIInitialize.
-       [r1021]
-               Free lpProps returned by GetProps, Fix context error in valgrind
-       [r1020]
-               - Fix memory leak bug: release ndr context in pull_emsmdb_property before returning
-               - Terminate SPropValue and SPropTagArray using an element with ulPropTag = 0. This
-               prevent from "invalid read size of 4" messages from valgrind and remove context errors.
-    jelmer
-       [r1025]
-               Don't install mapiproxy if python wasn't found, since 
-               we wouldn't know where to install the provisioning scripts or be able 
-               to use them.
-2009-01-20
-    jkerihuel
-       [r1018]
-               Merge libmapi-0.8 branch r1015 to 1017 into trunk
-       [r1015]
-               ** Start libmapi-0.9 COCHRANE development **
-       [r1014]
-               Merge libmapi-0.8 branch changes into trunk
-2009-01-18
-    jkerihuel
-       [r1007]
-               Add python install/uninstall rules to provision rather than mapiproxy-servers
-       [r1006]
-               - Remove server Makefile rules
-               - Remove dead code
-               
-               Note: server and providers have been merged within mapiproxy,
-               so there is no reason keeping this deprecated code.
-2009-01-17
-    jkerihuel
-       [r1005]
-               Undoing change committed in r1004.
-       [r1004]
-               Use .po files instead of .o files for openchange tools
-       [r1003]
-               Add --version to openchange tools
-       [r1002]
-               Add COPYING file with GPLv3 license
-2009-01-16
-    jkerihuel
-       [r1001]
-               - Add RenameProfile function to IProfAdmin API
-               - Remove pointless CopyProfile from IProfAdmin API
-               - Add --rename option to mapiprofile tool
-               - Update man page to reflect this addition
-               
-               (close trac ticket #124)
-       [r1000]
-               Fix libmapi from crashing when mapi_repl is NULL.
-       [r999]
-               Update Samba4 git rev to fix the charcnv segfault met in openchange
-               tools
-    jelmer
-       [r998]
-               Try to find the Samba python modules if they're not installed in the system 
-               python directory.
-2009-01-15
-    jkerihuel
-       [r997]
-               - Fix Subscribe semantic bug and add WholeStore boolean parameter
-               - propagate API change to tools/torture callers
-       [r996]
-               - Add assessor functions to set dumpdata and debug level in libmapi
-                 (SetMAPIDumpData and SetMAPIDebugLevel)
-               - OpenChange tools modified to use these function rather than set these
-                 parameters on their own
-       [r995]
-               - Fix --debuglevel segfault in openchange tools
-               - Enable logging to stdout in MAPIInitialize
-2009-01-14
-    jkerihuel
-       [r994]
-               * OpenChange libmapi function now returns MAPI error instead of -1
-               - use OPENCHANGE_RETVAL_IF instead of MAPI_RETVAL_IF
-               - add doxygen documentation for some missing functions/files
-       [r993]
-               - Missed this event->tevent change in previous commit
-       [r992]
-               - Update openchange to use latest Samba4 master git rev (990491d)
-               - Fix references to tevent_context structures
-               - Fix iconv_convenience init in MAPIInitialize
-               - Remove errorchecks mapitest module warning
-    jelmer
-       [r991]
-               Use tevent_context_init.
-       [r990]
-               Ignore binaries.
-2009-01-13
-    jkerihuel
-       [r989]
-               Some Exchange server (stand-alone) return MAPI_E_LOGON_FAILED when setting EssDN with username rather than
-               using profile's mailbox string directly. This commit fixes the bug.
-       [r988]
-               - Add EcDoConnect and EcDoDisconnect preliminary support to
-                 dcesrv_exchange_emsmdb.c
-               - Add internal session management mechanism to EMSMDB server
-               - Add init and unbind modules function to EMSMDB server
-               - Add emsmdbp_context and session to dcesrv_exchange_emsmdb.h
-    bradh
-       [r987]
-               Fix valgrind errors caused by using free'd memory.
-2009-01-12
-    jkerihuel
-       [r986]
-               Implement 'mapiproxy downgrade' behavior in EMSMDB server and force
-               Outlook to use EcDoConnect (0x0) and EcDoRpc (0x2) rather than 0xA and
-               0xB (opnums using LZ based compression).
-       [r985]
-               - Add Preliminary implementation for RfrGetFQDNFromLegacyDN DS RFR server
-2009-01-11
-    jkerihuel
-       [r984]
-               - Preliminary implementation of NspiGetProps NSPI server function
-               - Makes sure emsabp_tdb_traverse_MId uses the correct dbuf size
-               - Use correct ldb context (users or conf) depending on where MId is
-                 located (on-memory or on-disk)
-               - Add PR_EMS_AB_NETWORK_ADDRESS mapping to emsabp_property
-               
-               *** Outlook is now able to create MAPI profile using OpenChange Server ONLY! ***
-       [r983]
-               - Preliminary implementation of NspiDNToMId NSPI server function
-               - Add emsabp_search_legacyExchangeDN to search for a record given its
-                 legacyExchangeDN attribute.
-       [r982]
-               - Preliminary implementation of NspiQueryRows NSPI server function added
-               - fix a bug in the MID TDB traversal routine: cut dptr to dsize length
-                 rather assuming it is NULL terminated
-               - Add support for "referenced" property tags
-               - Add support for PR_MV_STRING8
-               - Add emsabp_search_dn which search for a DN within AD and return the
-                 associated LDB message
-               - Add PR_EMS_AB_HOME_MDB and PR_EMS_AB_PROXY_ADDRESSES to
-                 emsabp_property array
-       [r981]
-               Prevent from trying to add a NULL element to profile database and segfault on strlen
-       [r980]
-               Prevent x500_get_dn_element from segfaulting when an incorrect DN string parameter is supplied
-       [r979]
-               - Preliminary implementation of NspiGetMatches NSPI server function
-               - Make use of a on-memory TDB database for Ephemeral Entry IDs
-               - Add TDB traversal routines to retrieve DN associated to MId
-               - Move lp_ctx within emsabp_ctx for convenience
-               - Add EphemeralEntryID to Binary_r routine
-               - add emsabp_query (Find attribute matching given property tag and
-                 return associated data)
-               - add emsabp_fetch_attrs which builds a SRow array given a MId and
-                 requested property tags.
-               - add emsabp_search which searches AD given input search criteria
-               - add a preliminary Property Tag to AD attribute mapping + associated
-                 functions in emsabp_property.c
-               
-               Note: This NspiGetMatches is limited to MAILUSER which means we only
-               look for users (located within users.ldb). This limitation will be
-               removed when we have a preliminary working emsmdb server, so we can do
-               more extensive NSPI server tests.
-       [r978]
-               Add sanity check to get_SPropValue_SRowSet, prevents the function
-               from segfault when RowSet is NULL (e.g. crafted NspiQueryRows replies)
-       [r977]
-               Prevent IProfAdmin based code from crashing when a crafted NspiGetMatches reply
-               with NULL ppOutMIds is returned.
-                
-2009-01-10
-    jkerihuel
-       [r976]
-               - Preliminary NspiGetSpecialTable implementation added to NSPI
-                 server/EMSABP provider: Hierarchy Table supported (required during
-                 profile creation)
-               - add PT_BINARY support for mapidump_SPropValue
-               - fix a bug when PT_STRING8 or PT_UNICODE pointer is set to
-                 MAPI_E_NOT_FOUND
-
-2009-01-06
-    jkerihuel
-       [r974]
-               Add new Display Type values (used by EMSABP provider)
-       [r973]
-               Change DEBUGLEVEL for RfrGetNewDSA
-       [r972]
-               - preliminary implementation of RFR server (RfrGetNewDSA): makes Outlook happy
-               - mapiproxy-servers-install now installs openchange python scripts and ldif file
-2009-01-05
-    jkerihuel
-       [r971]
-               Move auth_serversupplied_info structure from dcesrv_exchange_nsp.h to libmapiproxy.h
-               This structure is required for NTLM_AUTH_IS_OK macro
-       [r969]
-               - Add doxygen comments for all OpenChange server modules
-               - Fix doxygen return value for exchange_nsp
-       [r968]
-               - Add mapiproxy server unbind function and hook in dcesrv_mapiproxy.c
-               - Add exchange handle enum to dcesrv_mapiproxy.h
-               - Add authentication verifier macro to libmapiproxy.h
-               - Add preliminary EMSABP Address Book Provider implementation:
-                 * supports initialization, destructor (talloc)
-                 * implements user and codepage check routines
-                 * retrieve NSPI server GUID
-               - Add NspiBind and NspiUnbind support to dcesrv_exchange_nsp.c
-               - Add internal session mechanism management to NSPI server
-               - Add init and unbind modules function to NSPI server
-               - Add doxygen comments to all dcesrv_exchange_nsp.c functions
-               - Add emsabp_context, session and non-exported Samba structure to dcesrv_exchange_nsp.h
-       [r967]
-               OpenChange configuration schema updated with Addressing schema
-               (Address-Templates, Address-Types and Display-Templates - Exchange 2003 based)
-       [r966]
-               Execute server modules init function when loaded
-    bradh
-       [r965]
-               A few API documentation fixes.
-
-2009-01-04
-    jkerihuel
-       [r963]
-               Add documentation for MAPIProxy 'server mode'
-
-2009-01-02
-    jkerihuel
-       [r961]
-               - Implement mapiproxy server mode architecture
-               - Add server modules management API
-               - Add skeletons for default OpenChange servers (nspi, emsmdb, ds_rfr)
-               - Add temporary provision Makefile rule
-
-2008-12-30
-    jkerihuel
-       [r959]
-               Initial text was correct - rollback
-       [r958]
-               Fix path typo
-    bradh
-       [r957]
-               Ensure that GetLastError() also returns the correct value.
-       [r956]
-               Start changing the MAPI_RETVAL_IF() usage to two new macros:
-               OPENCHANGE_RETVAL_IF() and OPENCHANGE_RETVAL_ERR().
-               
-               simple_mapi.c is the only one converted at this stage.
-               
-               Also added a set of unit tests that verify at least some initial
-               sanity checks.
-       [r955]
-               Remove unreachable code.
-               
-               Partly resolves ticket #124
-
-2008-12-29
-    jkerihuel
-       [r953]
-               Remove references to ldap.h header file - not installed anymore with samba4 git rev openchange uses
-       [r952]
-               mapiproxy documentation update: 3 questions added to FAQ section
-       [r951]
-               Patch from Corentin Chary:
-                       - Add PR_CONTENT_FILTER_SCL property to libmapi
-       [r950]
-               - Update openchange to work with samba4 master git rev f308c2f
-               - Replace reference to events.h with tevent.h
-               - Update installsamba4.sh script to reflect latest samba4 compilation changes/requirements 
-
-2008-12-27
-    jkerihuel
-       [r948]
-               Fix mapidump date/month when freebusy period covers end of one year - beginning of next year
-               Update openchangeclient to reflect these changes.
-
-2008-12-24
-    jelmer
-       [r946]
-               Export PKG_CONFIG_PATH if it wasn't exported yet. Patch by Metze
-       [r945]
-               Fix PIC object flags for SWIG build. Patch by metze.
-
-2008-12-21
-    bradh
-       [r943]
-               User %u format specifier for unsigned integer.
-       [r942]
-               Make return value match signature.
-       [r941]
-               Miscellaneous minor cleanups. Mainly making return types
-               match signatues, format conversion (%u for unsigned values) and
-               matching up result variable types (bool instead of enum MAPISTATUS).
-       [r940]
-               Return an enum MAPISTATUS, instead of a bool, to match function signature.
-       [r939]
-               Use %u instead of %d for unsigned values.
-
-2008-12-20
-    bradh
-       [r937]
-               Another minor APIdox edit.
-       [r936]
-               API documentation tweak.
-       [r935]
-               API dox fix.
-       [r934]
-               API dox fix.
-       [r933]
-               Minor apidox fixes.
-       [r932]
-               More apidox triviality.
-       [r931]
-               Trivial APIdox edits.
-       [r930]
-               Supplement the user's PKG_CONFIG_PATH rather than 
-               overriding it.
-    jelmer
-       [r929]
-               Add bindings for GetBestBody(), GetDefaultFolder(), GetDefaultPublicFolder(), AddUserPermission(), ModifyUserPermission().
-       [r928]
-               Add bindings for create_message, delete_messages, get_message_status, set_read_flags.
-       [r927]
-               Add Python bindings for Unsubscribe(), get_task_status(), get_importance(), get_proptag_name(), get_proptag_value(), DeleteFolder(), CreateFolder(), EmptyFolder(), RemoveUserPermissions(), IsMailboxFolder().
-
-2008-12-19
-    jelmer
-       [r925]
-               Actually use pymapi variables in Makefile.
-       [r924]
-               Add configure flags for building and installing Python MAPI bindings (disabled by default).
-
-2008-12-18
-    bradh
-       [r922]
-               Add namespace prefix to scanner.
-
-2008-12-16
-    jkerihuel
-       [r920]
-               - spnego / gssapi_krb5 authentication now available for mapiprofile
-               - add the --realm | -R option
-               - update mapiprofile man page
-
-2008-12-14
-    bradh
-       [r912]
-               Remove entries for --properties and --priority, which have been removed from the openchangeclient utility.
-               
-               Partly fixes #113.
-       [r911]
-               Don't generate / install man3 pages for libmapi++ or mapitest.
-               
-               Resolves ticket #121.
-               
-               Also don't install man3 pages that are just copies of the C implementation files, or just document bugs / todo items.
-    jelmer
-       [r918]
-               Allow retrieving id and session of MAPI objects.
-       [r917]
-               Add MessageStore and Object Python classes, add bindings for OpenMsgStore, OpenUserMailbox, OpenPublicFolder.
-       [r916]
-               Add stubs for Session class.
-       [r915]
-               Add infrastructure for MAPI python module.
-       [r914]
-               Look for python and python-config binaries.
-       [r913]
-               Remove empty directory.
-2008-12-13
-    jkerihuel
-       [r910]
-               Remove obsolete --properties option and related code
-
-2008-12-10
-    jkerihuel
-       [r908]
-               Fix RecipientRow member's order
-
-2008-12-09
-    jkerihuel
-       [r906]
-               - Update to latest samba4 git master revision (3508a66)
-               - Fix references to samr info24 struct
-               - Add support for assoc_group_id proxy
-               - Add support in mapiproxy for bind/alter connections using assoc_group_id
-               - Update mapiproxy documentation
-
-2008-12-07
-    bradh
-       [r904]
-               Improve building. Partially addresses #94.
-               
-               More work required on this as we work on the 
-               portability in the future.
-       [r903]
-               Expose the underlying session.
-
-2008-11-30
-    bradh
-       [r901]
-               Remove unused --priority option.
-       [r900]
-               These offsets / values can be negative, so we shouldn't
-               use unsigned int type to represent them.
-
-2008-11-29
-    jkerihuel
-       [r898]
-               Fix Logon problem for users running Exchange 2k7 in a clustered Exchange environment.
-               
-               This patch first tries to forge EssDN Logon string from "o" and "ou" 
-               attributes stored in the profile. If Logon fails with ecUnknownUser,
-               then try to open the mailbox using the mailbox attribute stored in 
-               the profile.
-
-2008-11-28
-    bradh
-       [r896]
-               Document the --label option.
-
-2008-11-26
-    jkerihuel
-       [r893]
-               Make openchange compile and work against latest samba4 master git rev (58db2be)
-    jelmer
-       [r894]
-               Remove check for unused type 'uint_t'.
-
-2008-11-22
-    bradh
-       [r888]
-               More tweaks on the openchangeclient man1 page.
-       [r887]
-               More updates for man1 page for openchangeclient.
-               Still doesn't fully address #113.
-       [r886]
-               Update the openchangeclient man1 page.
-               
-               Partly addresses ticket #113.
-               
-               There is still some work to do on this.
-       [r885]
-               Fix a typo, and try to make the descriptions more
-               consistent.
-
-2008-11-21
-    bradh
-       [r883]
-               Initial version of man1 page for mapitest
-       [r882]
-               Initial man1 page for exchange2ical utility.
-
-2008-11-14
-    bradh
-       [r879]
-               Update man1 page for openchangepfadmin
-       [r878]
-               Minor updates for the man pages.
-
-2008-11-13
-    jkerihuel
-       [r875]
-               Fix build errors: wrong number of arguments for ocpf_propvalue
-       [r874]
-               Fix warnings when compiling with -Wextra
-       [r873]
-               Fix warnings when compiling with -Wextra
-       [r872]
-               Fix warnings when compiling with -Wextra
-    bradh
-       [r876]
-               Complete initializers here.
-
-2008-11-10
-    bradh
-       [r870]
-               Update to reflect latest state of mapiprofile.
-
-2008-11-09
-    bradh
-       [r868]
-               Prevent segfault when running mapitest. Looks like the we can
-               return MAPI_E_SUCCESS even if one of the property values is
-               MAPI_E_NOTFOUND. That error then get turned into a char*, and
-               strncmp faults.
-               
-               Also fix a possible bug relating to operator precedence, and 
-               a couple of warnings (one for signed / unsigned comparison, and
-               the other for an unsigned value never being less than zero).
-
-2008-11-08
-    bradh
-       [r866]
-               Enable output to stdout.
-               
-               Resolves ticket #106.
-               
-               Thanks to raboof for the report and fix.
-
-2008-11-07
-    bradh
-       [r864]
-               Fix missing initialisers (issue #110).
-               
-               Also fix some signed/unsigned warnings.
-       [r863]
-               Fix problems with incorrect initialisers (#110) and
-               operator precedence.
-               
-               Also fix a couple of places with signed/unsigned confusion.
-       [r862]
-               Partial fix for issue #110, and a couple of very minor cleanups.
-
-2008-11-06
-    bradh
-       [r860]
-               Minor cleanups.
-       [r859]
-               We probably want to return here, not do nothing.
-
-2008-11-05
-    jkerihuel
-       [r855]
-               Fix empty patch function problem: add a retval
-    bradh
-       [r857]
-               Typo fix.
-       [r856]
-               Explain the boost-thread trick.
-       [r854]
-               Minor documentation tweaks.
-
-2008-11-04
-    jkerihuel
-       [r852]
-               - remove usage of global_loadparm in libmapiadmin
-               - make use of session context rather than global_mapi_ctx in libmapiadmin
-               - use local context rather than mapiadmin context in libmapiadmin
-               - libmapiadmin now uses ldb helper rather than raw implementation (ldb async code)
-               - libmapiadmin and openchangepfadmin now works again (user creation/deletion) !! ;-)
-               - remove global_loadparm in torture test and replace it with torture context
-               - fix dcerpc_init to match latest samba4 API
-               - update samba4 version required to build openchange
-    bradh
-       [r850]
-               More API documentation tweaks.
-       [r849]
-               More API documentation tweaks.
-       [r848]
-               Some API dox fixes for libmapi++.
-    jelmer
-       [r851]
-               Remove unnecessary patching of lib/events/events.h.
-
-2008-11-03
-    bradh
-       [r846]
-               Update to a more recent Samba4.
-    jelmer
-       [r845]
-               Remove some usages of deprecated global_loadparm.
-       [r844]
-               Cope with new argument to dcerpc_log_packet().
-
-2008-11-01
-    jelmer
-       [r842]
-               Fix includes for DEBUG(), fix some more warnings.
-       [r841]
-               Use same_net_v4 rather than deprecated same_net().
-       [r840]
-               Fix Samba 4 git revision.
-       [r839]
-               Fix includes - debug.h can only be included once.
-       [r838]
-               Include debug header.
-       [r837]
-               Cope with API changes in Samba functions.
-       [r836]
-               Use new function is_zero_ip_v4 rather than removed is_zero_ip.
-
-2008-10-31
-    jkerihuel
-       [r833]
-               Fix OpenMsgStore binding in swig perl and fetchmail script
-
-2008-10-21
-    jkerihuel
-       [r824]
-               Fix pointless const definition for GetFreeBusyYear return type
-2008-10-20
-    jkerihuel
-       [r823]
-               - Add the IsFreeBusyConflict convenient function which checks if a
-                 given date conflicts with existing FreeBusy Busy/OOF events
-               
-               - Modify openchangeclient --sendappointment behavior to check whether
-                 start or end date conflicts with FreeBusy published data for the
-                 user.
-               
-               - Add the --force option to openchangeclient to override this behavior
-               
-               - Fix a counter bug in mapidump_freebusy_events
-       [r821]
-               Fix doxygen typo error
-       [r820]
-               - Add GetUserFreeBusyData convenient function which retrieves FreeBusy
-                 data in public folders for a given user. Note: Ambiguous name is not
-                 supported at the moment.
-               
-               - Add convenient FreeBusy mapidump routines
-               
-               - Add FreeBusy read support to openchangelient
-               
-               - Add PT_MV_LONG and PT_MV_BINARY support to pull_emsmdb_property and
-                 property.c functions
-               
-               - Add OpenUserMailbox which let developers open other mailboxes
-                 instead of the default profile one.
-               
-               - Add GetABRecipientInfo: convenient function which retrieves Address
-                 Book information for a given recipient
-
-2008-10-17
-    jkerihuel
-       [r818]
-               - Add libmapi implementation for DeletePropertiesNoReplicate
-               - Add mapitest test units for DeleteProps and DeletePropertiesNoReplicate
-       [r817]
-               Fix doxygen documentation
-
-2008-10-16
-    jkerihuel
-       [r815]
-               - Implement multisession into libmapi
-               - Update openchange tools and suite to reflect these changes
-               - Fix SRow_addprop behavior
-               
-               NOTE: OpenMsgStore, ResolveNames, GetGALTable and RFR functions
-               now take a mapi_session parameter.
-    jelmer
-       [r814]
-               Use my openchange.org email address.
-
-2008-10-09
-    jkerihuel
-       [r812]
-               - Add a session management API for mapiproxy modules. Similar code
-                 already existed for mpm_cache module. Common functions are now
-                 available to all mapiproxy modules through libmapiproxy
-               
-               - replace smbd with samba in mapiproxy documentation
-       [r811]
-               - Cache calendar, contact, journal, note, task and drafts folders IDs
-                 when GetDefaultFolder call is performed on one of these folders and
-                 keep them until obj_store is released.
-               
-               - Add a reverse lookup routine which says whether a given FID belongs
-                 to a default folder and which olFolderType it is.
-       [r810]
-               - Remove pointless memory context in GetDefaultFolder
-               - Move entryID to FID code into a separated routine (GetFIDFromEntryID)
-       [r809]
-               Restore install rule for mapi profiles ldif files in
-               libmapi-installscript. Fix the MAPI_E_NO_ACCESS bug when mapiprofile
-               tries to create a new mapi profile store.
-2008-10-08
-    jkerihuel
-       [r808]
-               - Ticket #103 resolved. openchangeclient can now perform custom folder lookup, fetch, mkdir and rmdir.
-               - mapi_object_copy routine added to mapi_object.c
-
-2008-10-06
-    jkerihuel
-       [r806]
-               Fix missing Month field in LogonTime structure
-2008-10-05
-    jkerihuel
-       [r805]
-               propagate IDL warning fix to property.idl
-    jelmer
-       [r804]
-               Add target for building python API documentation.
-2008-10-01
-    jkerihuel
-       [r802]
-               Fix samba4 release and git revision
-       [r801]
-               Fix installsamba4.sh script paths
-    jelmer
-       [r803]
-               Avoid warning.
-       [r800]
-               Install OpenChange python modules.
-       [r799]
-               Check for python dir during configure.
-       [r798]
-               ignore generated files.
-       [r797]
-               Stop installing js files.
-       [r796]
-               Use autoconf cache prefix.
-       [r795]
-               Use newer version of Samba 4.
-2008-09-30
-    jkerihuel
-       [r791]
-               Remove dcesrv_exchange.so from server Makefile rule and
-               move mapiproxy from TOOLS to SERVER.
-               
-               dcesrv_exchange and providers Makefile rules are orphan, planned
-               to be removed (with their associated code) when emsabp merge process 
-               into mapiproxy is over.
-2008-09-23
-    bradh
-       [r790]
-               Export the Binary_r structure.
-2008-09-22
-    bradh
-       [r789]
-               Use more descriptive variable names in messages example code.
-       [r788]
-               Add a description of messages to libmapi++ API documentation.
-       [r787]
-               Add messages binary to the ignore list.
-       [r786]
-               Add new example showing libmapi++ message handling, and
-               associated API documentation and build system changes.
-2008-09-21
-    bradh
-       [r785]
-               Update the API documentation main page for libmapi++
-2008-09-19
-    jkerihuel
-       [r784]
-               Add foldertree binary to the ignore list
-       [r783]
-               - Add missing Input parameter
-               - Add sanity check on ppNames
-               - Fix ticket #102
-       [r781]
-               - Fix a bug in NspiUpdateStat: make plDelta mandatory and use it for in,out
-               - Add a NspiGetSpecialTable test for Address Creation Template
-    bradh
-       [r780]
-               Fix valgrind-reported error, per ticket #101.
-       [r779]
-               Make sure we clean up after mapitest runs.
-               
-               Resolves ticket #84
-2008-09-17
-    jkerihuel
-       [r778]
-               - Add msExchUserAccountControl attribute to extended user record
-               - openchange_newuser can now create/enable/disable an OpenChange account
-       [r776]
-               Exit the test if the WriteStream operation fails
-       [r773]
-               Fix ncacn_ip_tcp binding string for OpenChange server object
-       [r772]
-               With new NSPI IDL, using cValues - 1 is incorrect and lead to errors. Use cValues directly instead
-       [r771]
-               Fix pipe function check and use ndr autogenerated defines rather than static strings
-               Fix calls to NspiDNToMId
-    bradh
-       [r774]
-               Make sure we set the body and body format properties, to
-               ensure that the message is shown correctly with 
-               openchangeclient -F.
-2008-09-16
-    jkerihuel
-       [r770]
-               - Fix provisioning
-               - Rename oc_* python scripts to openchange_*
-               - Add Full Exchange 2003 schema (classes and attributes)
-               - Full Exchange 2003 modified classes and attributes support 
-               - Add prefixmap OID for some Exchange classes and attributes
-               - Add missing ADSC classes and attributes
-               - Improve configuration LDIF file with new objects
-               
-               NOTE: provision.py should find a way to handle firstorg properly
-               NOTE: oc_provision_configuration.ldif is still incomplete
-    bradh
-       [r768]
-               API documentation improvements.
-2008-09-15
-    bradh
-       [r767]
-               Add an example to the libmapi++ documentation, and 
-               the right build magic and doxygen linkage.
-       [r766]
-               Minor API documentation fix
-2008-09-14
-    bradh
-       [r765]
-               Add forgotten part of API documentation fixes for mapitest.
-       [r764]
-               Improve mapitest API documentation.
-2008-09-13
-    bradh
-       [r763]
-               Use new DeleteFolder flags to clean up folders on deletion.
-               
-               This doesn't completely resolve ticket #84, but it does help.
-       [r762]
-               Ignore API documentation.
-       [r761]
-               Add Doxyfile to ignore list.
-       [r760]
-               Add initial support for Doxygen API documentation
-               for libmapiadmin.
-2008-09-12
-    bradh
-       [r759]
-               Implement the remainder of the standard public folders.
-2008-09-10
-    bradh
-       [r758]
-               Only do header line removal at the start of the file
-               (lines 20 through 40 seems like a good compromise).
-       [r757]
-               libmapi++ is C++, not C, so we should not optimise
-               Doxygen output for C.
-2008-09-09
-    jkerihuel
-       [r755]
-               - Update the Logon_repl IDL (0xFE) and implementation
-               - Add new folders to the mapi_obj_store for PF folders
-               - rename pf_finder to pf_search 
-    bradh
-       [r756]
-               Suppress some more unwanted headers.
-2008-09-08
-    jkerihuel
-       [r754]
-               - Add GetStoreState (0x7b) IDL, implementation and mapitest unit
-       [r753]
-               Fix typo error
-       [r752]
-               - Update the EmptyFolder IDL
-       [r751]
-               - Update the SearchFlags enum, GetSearchCriteria and SetSearchCriteria IDL
-               - Add mapitest units for GetSearchCriteria and SetSearchCriteria
-       [r750]
-               Link libmapi++ documentation to main apidocs page
-       [r749]
-               Update GetAttachmentTable IDL and remove the unknown field
-       [r748]
-               - Update DeleteFolder IDL and implementation
-               - It now supports DeleteFolderFlags as input parameter and can return the ParticalCompletion state
-               - Sanity checks added at the beginning of the function
-       [r747]
-               - Rename GetRowCount to QueryPosition
-               - IDL, implementation, documentation and openchange code updated
-               - ActionType enum fields prefixed with 'ActionType_'. Original
-               values were causing conflicts while building Perl bindings with
-               'i386-linux-thread-multi/CORE/opnames.h where OP_DELETE was already defined'
-       [r746]
-               Change enum SaveFlags to uint8_t for doxygen documentation to be generated properly
-       [r743]
-               - Update SaveChangesMessage IDL and implementation
-               - Add a SaveFlags parameter to SaveChangesMessage function
-               - update openchange code to reflect this change
-    bradh
-       [r745]
-               Build fix / fix for ticket #99.
-       [r744]
-               Filter out some new #include lines.
-               
-               This needs to be applied to other modules too.
-2008-09-07
-    jkerihuel
-       [r742]
-               Update SRow and SRowSet IDL
-       [r741]
-               Delete obsolete input_locale and instance_key structures
-       [r740]
-               Fix WStringArray_r IDL
-       [r739]
-               - Move from MV_UNICODE_STRUCT and LPWSTR to WStringArray
-               - LPWSTR structure removed
-       [r738]
-               Rename SDateTimeArray to DateTimeArray_r
-       [r737]
-               Rename SGuidArray to FlatUIDArray_r and fix the IDL
-       [r736]
-               Rename MV_LONG_STRUCT to LongArray_r
-       [r735]
-               Rename SBinary to Binary_r
-       [r734]
-               - Add removal of libmapi++ Doxyfile in make distclean rule
-               - Add Doxyfile to svn:ignore 
-       [r733]
-               Rename SShortArray to ShortArray_r
-       [r732]
-               - Move from SLPSTRArray to StringArray_r
-               - LPSTR structure removed
-       [r731]
-               Rename MAPIUID to FlatUID_r
-       [r730]
-               Fix lexer warnings during compilation (ticket #100)
-       [r729]
-               - Update the EcDoConnect IDL (ref. ticket #99)
-               - Add new fields to the emsmdb info structure
-               - Add doxygen comments to libmapi/emsmdb.c
-    bradh
-       [r728]
-               Reduce warnings when compiling with 64-bit arch.
-       [r727]
-               Initial checkin of infrastructure for libmapi++ API documentation.
-2008-09-06
-    jkerihuel
-       [r726]
-               - MAJOR NSPI protocol and libmapi stack update
-               - All NSPI protocol functions implemented
-               - NSPI stack fully documented
-               - NspiGetHierarchyInfo renamed to NspiGetSpecialTable
-               - NspiDNToEph renamed to NspiDNToMId
-               - instance_key removed from nspi_context and set as a parameter to NSPI functions
-               - SPropertyRestriction renamed to PropertyRestriction_r
-               - FlagList structure removed and replaced by a SPropTagArray
-               - MAPI_SETTINGS removed and replaced by a STAT structure
-               - new MAPI property tags added to libmapi/conf/mapi-properties
-               - NSPI module added to mapitest
-    bradh
-       [r725]
-               Clean up on failure.
-       [r724]
-               Clean up on failure.
-       [r723]
-               Minor improvements to ensure cleanup on failure.
-       [r722]
-               API documentation fix
-       [r721]
-               API documentation fix.
-       [r720]
-               API documentation fix.
-       [r719]
-               API documentation fix.
-       [r718]
-               API documentation fixes.
-2008-09-05
-    bradh
-       [r717]
-               API documentation fixes.
-2008-09-04
-    jkerihuel
-       [r716]
-               Fix EMSMDB 0xb function name
-       [r715]
-               - update EcRRegisterPushNotification IDL
-               - update Notify IDL
-               - implement complete MAPI notifications
-               - update libmapi to reflect these changes
-               - make openchangeclient prints a brief summary for each notification found
-               - update ulEventMask used in openchangeclient
-2008-09-03
-    jkerihuel
-       [r714]
-               - Rename Advise MAPI call to RegisterNotification
-               - Update RegisterNotification IDL and implementation
-2008-09-02
-    jkerihuel
-       [r713]
-               - Fix Restrict IDL and implementation
-               - Add a new parameter to the Restrict function
-               - close ticket #32
-       [r712]
-               Add mapi_nameid.h to the ignore list
-       [r711]
-               - Replace libmapi/mapi_nameid.h with a generated mparse file
-               - Add a mapi_nameid.h parser to mparse.pl
-               - Add canonical names for named properties
-               - GetProps and SetProps resolves named properties if they exist
-               - named properties can now be set directly and make mapi_nameid API be
-                 optional.
-               - replace named property tags hex value with their canonimal names
-               - replace several use of the mapi_nameid API with smaller code
-       [r710]
-               - Add new IDL file (property.idl) to push/pull structures from binary
-                 blobs and not directly related to any MAPI calls. Include the
-                 generated property.h file into libmapi.h
-               
-               - Add PT_MV_STRING8 support in pull_emsmdb_property (GetProps reply
-                 parsing) and mapidump_SPropValue
-               
-               - Add functions to property.c to retrieve RecurrencePattern,
-                 TimeZoneStruct and GlobalObjectId structures (see property.idl).
-               
-               - add a preliminary version of exchange2ical tool. This version only
-                 dumps calendar folder appointments into ICS file on standard output.
-2008-08-30
-    jkerihuel
-       [r709]
-               - Update mapi-nameid-properties with a more complete set of properties
-               - Add a header to mapi-nameid-properties for sanity purposes
-               - Move named properties with PT_STRING8 type to PT_UNICODE
-               - update openchange code to reflect these changes
-               - Add PSETID_Attachment to mapidefs.h
-2008-08-28
-    jkerihuel
-       [r707]
-               Add missing check on password for the create command
-       [r706]
-               Fix incorrect usage of realm in mapiproxy
-2008-08-27
-    jkerihuel
-       [r705]
-               Check for provider_rpc_connection retval for RFR functions.
-       [r704]
-               Update Doxyfile to parse mapiproxy/modules files and
-               include documentation on static functions.
-       [r703]
-               - Add NSPI hook on NspiQueryRows and NspiDNToEph and replace the
-                 Exchange server name with mapiproxy one.
-               - documentation updated to reflect these changes
-               - new FAQ question added
-               - developer documentation improved
-       [r702]
-               Add the RFR mapiproxy file.
-       [r701]
-               - Implement RfrGetNewDSA DN replacement in mapiproxy
-               - use lp_realm rather than sockaddr in NspiGetProps (FQDN rather than IP address)
-               - update mapiproxy documentation to reflect these changes
-2008-08-26
-    jkerihuel
-       [r698]
-               - Add implementation of the NSPI Referral protocol (exchangeRFR)
-               - update dcesrv_exchange and mapiproxy prototypes for RFR
-               - add references to the RFR pipe in mapiproxy
-               - prefix NSPI client connections with a RfrGetNewDSA call
-               - add RFR functions implementation in libmapi/IMSProvider.c
-               - add a --getfqdn option to mapiprofile
-               - fix a minor mapiprofile option parsing bug
-2008-08-25
-    jkerihuel
-       [r697]
-               Fix mapiproxy dummy module unbind prototype
-       [r696]
-               - Remove flags in EcDoRpc top function, fix compilation vs latest samba4-git version
-               - EcDoRpc indent updated
-2008-08-15
-    clsk
-       [r694]
-               Get rid of initialization order warning
-2008-08-11
-    jkerihuel
-       [r691]
-               - add unbind hook for mapiproxy
-               - add ahead mapiproxy mode
-               - add read ahead in cache module
-               - add synchronization mechanism in cache module
-               - update mapiproxy documentation to reflect these changes
-2008-08-08
-    bradh
-       [r690]
-               Temporarily comment out installation of files removed
-               in r683.
-2008-08-01
-    jelmer
-       [r685]
-               Fix arguments, paths in provision scripts.
-       [r683]
-               Merge python provision/newuser scripts.
-       [r681]
-               Simplify installation of manpages a bit.
-2008-07-29
-    jkerihuel
-       [r679]
-               Add configure check for libboost-thread. Add libmapi++ to the build
-               only if it is available.
-2008-07-27
-    clsk
-       [r678]
-               - session constructor doesn't login to the server anymore, it calls MAPIInitialize().
-               - Created session::login() members.
-               - test applications use default profile.
-2008-07-26
-    jkerihuel
-       [r676]
-               - Import Alan Alvarez work from libmapi++ into trunk
-               - Add a g++ check in configure.ac: don't call libmapi++ rules if g++
-                 is missing
-               - Add libmapi++ to the build system
-               - Add a patch function to installsamba4.sh: rename private to
-                 private_data in samba4 events.h header file
-               - Change #include directives so it uses <libmapi++ ... rather than
-                 relative paths.
-2008-07-24
-    jkerihuel
-       [r674]
-               - Add a statitic function monitoring streams over OpenStream and Last
-                 ReadStream operations. Monitoring stream Release is not relevant
-                 since Outlook does not close the handle directly after last
-                 ReadStream operation. Should put in evidence difference between
-                 non-cached(1st retrieval) and cached (further retrieval).
-               
-               - Fix a few memory leaks
-2008-07-23
-    jkerihuel
-       [r672]
-               - Commit initial revision for the mapiproxy cache module
-               - Update mapiproxy hook API for the dispatch routine
-               - Introduce the mapiproxy structure for modules to control top-level
-                 mapiproxy behavior.
-               - Update mapiproxy documentation to reflect these changes
-2008-07-21
-    jkerihuel
-       [r670]
-               * Fix remaining ByteRead parameter size for ReadStream operations.
-2008-07-20
-    jkerihuel
-       [r669]
-               * Improve/Update Open/Read/WriteStream IDLs
-               * Fix ByteRead parameter size for ReadStream operation.
-2008-07-19
-    jkerihuel
-       [r668]
-               Improve OpenAttach, CreateAttach and DeleteAttach IDL - remove unknown
-               parameters.
-       [r667]
-               Propagate r666 changes to OpenMsgStore and fix build
-    bradh
-       [r666]
-               Minor rename of bitmap value to avoid conflict with
-               Private as a class name.
-2008-07-17
-    jkerihuel
-       [r663]
-               Minor change: remove old debugging string from mapitest
-       [r660]
-               Fix incorrect header
-       [r658]
-               Remove deprecated mapi_handles API
-    bradh
-       [r665]
-               Initial checkin of some uno (static checker) support
-               files.
-               
-               There will be a script to run uno with the right options,
-               but that requires more work.
-2008-07-16
-    jkerihuel
-       [r655]
-               Fix OXOMSG-ABORT-SUBMIT return value and return success when expected
-               error values (MAPI_E_UNABLE_TO_ABORT, ecNoDelSubmitMsg) are encountered.
-       [r654]
-               - Call mapi_object_release in GetDefaultFolder
-               - Remove pointless references to mapi_object_t
-    bradh
-       [r656]
-               Fix little memory leak.
-2008-07-15
-    jkerihuel
-       [r653]
-               Fix invalid OpenFolder calls in mapitest modules
-       [r652]
-               Remove references to SaveChanges in doxygen see also statement
-       [r651]
-               - Rename SaveChanges to SaveChangesAttachment (0x25)
-               - Update SaveChangesAttachment IDL
-               - Update references to SaveChanges
-       [r650]
-               - Fix the huge memory leak described in Ticket #91
-               - Rewrite the mapitest NameID test to use the mapi_nameid convenient
-                 API
-2008-07-12
-    jkerihuel
-       [r648]
-               - Add mapi_get_errstr auto-generated routine which returns the MAPI
-                 retval as a string
-               - Add print routine for MAPI retval in mapitest
-               - Add a color mode (--color) which prints either green or red MAPISTATUS
-               - Update mapitest modules to use these new routines
-    bradh
-       [r647]
-               Minor API documentation fix.
-2008-07-11
-    jkerihuel
-       [r646]
-               Add all MAPI errors
-       [r645]
-               - Add GetOwningServers (0x42) implementation (IDL + libmapi + mapitest)
-       [r644]
-               - Report and make consistent usage of PropertyProblem in the IDL:
-                 SetProps, DeleteProps and CopyProperties
-               
-               - Remove unknown field in GetProps and GetPropsAll and replace them
-                 with the correct IDL mapping.
-               
-               - Add IDL for SetPropertiesNoReplicate (0x79) MAPI call
-               
-               - Minor typo fix in IMAPIProp.c
-       [r643]
-               Improve CreateMessage request IDL
-       [r642]
-               Improve OpenMessage response IDL
-       [r641]
-               - Add PublicFolderIsGhosted (0x45) MAPI call (IDL + libmapi + mapitest)
-               
-               - Improve OpenFolder, CreateFolder and OpenPublicFolderByName response
-                 IDL: make these call able to check whether the folder is ghosted or
-                 not.
-       [r640]
-               Revert emsmdb pipe version to the hacked one. Makes mapiproxy work with samba4-alpha5 release.
-       [r639]
-               SeekRow and SeekRowBookmark IDL improved
-       [r638]
-               Improve the SetColumns IDL: remove unknown fields
-2008-07-06
-    jkerihuel
-       [r637]
-               Minor code convention fix
-       [r636]
-               Check NTSTATUS return value from dcerpc_ndr_request. Prevent mapiproxy
-               from segfault when invalid dcerpc response is received.
-       [r635]
-               Expose MAPISTATUS error in OXCTABLE-CATEGORY::FreeBookmark. 
-               Requires investigation
-    bradh
-       [r634]
-               Implement GetIdFromLongTermId and GetLongTermIdFromId
-               functions (ROP:0x43 and 0x44), and associated mapitest.
-       [r633]
-               Documentation typo fix.
-       [r632]
-               Change the QueryNamesFromIDs() call to match
-               MSDN, including changing the name to QueryNamedProperties().
-               
-               Also implement mapitest for QueryNamedProperties(),
-               GetNamesFromIDs() and GetIDsFromNames().
-               
-               Update torture test to match.
-2008-07-05
-    jkerihuel
-       [r631]
-               - Build system update: use samba4-alpha5 release with wget method
-               - introduce 'make samba' and 'make samba-git'
-2008-07-04
-    bradh
-       [r630]
-               Make sure we have names[] array large enough.
-               
-               Problem identified using default uno run.
-               
-               Resolves #87.
-2008-07-03
-    jkerihuel
-       [r629]
-               Fix a small errno bug in GetBestBody
-               Add dump-data and debug options to exchange2mbox
-2008-06-30
-    jkerihuel
-       [r627]
-               - Move emsmdb interface version back to 0.81 (patch applied in samba4 trunk)
-               - remove sed hack, modifications applied in samba4 trunk
-               - update required samba4 git rev required
-    bradh
-       [r628]
-               Typo fix.
-2008-06-25
-    jkerihuel
-       [r626]
-               Minor documentation update: remove deprecated reference to ./bin/smbpython
-       [r625]
-               Fix torture suite entry point name
-               Fix torture module installation path
-       [r624]
-               - Add implementation for the BestBody algorithm
-               - Add MAPI_E_NOT_ENOUGH_MEMORY error code
-               - Remove trailing }}\0 from lzfu code
-               - Update openchange tools to use GetBestBody rather than
-               the initial check on PR_MSG_EDITOR_FORMAT
-       [r623]
-               Add a very basic stat module for mapitest: gives a quick overview
-               of tests which failed at the end of the report.
-       [r622]
-               - Defines a global stream size in mapitest.h
-               - Decrease stream size from 0x4000 to 0x3000
-                 Sounds like Exchange 2003 SP2 doesn't support 0x4000, return MAPI_E_CALL_FAILED
-                
-2008-06-24
-    jkerihuel
-       [r621]
-               Fix OC_CHECK_SAMBA_VERSION string
-       [r620]
-               - Move samba4_ver.sh from top dir to script
-               - update parts of openchange relying on samba4_ver.sh
-       [r619]
-               Add configure check for lib Z
-                
-       [r618]
-               - Temporary fix ldb.pc problem and patch ldb.pc.in
-               - Update samba4 version to the latest revision
-               - Add libmapiproxy to svn:ignore proplist
-    bradh
-       [r617]
-               Try a different git revision, just for now.
-2008-06-17
-    jkerihuel
-       [r614]
-               - Update Samba4 version needed
-               - Change entry point function from init_module to samba_init_module
-               - update documentation
-2008-06-16
-    jelmer
-       [r613]
-               Fix calls of ldb_init() as required by newer versions of Samba.
-       [r612]
-               Avoid bashisms.
-       [r611]
-               Support newer versions of Samba4.
-2008-06-14
-    bradh
-       [r609]
-               Add some other standard GUIDs
-2008-06-11
-    jelmer
-       [r605]
-               Fix silly typo.
-       [r604]
-               Fix linking.
-       [r603]
-               Use version and soversion in mapiproxy library.
-       [r602]
-               Make modules directory overridable.
-2008-06-10
-    bradh
-       [r601]
-               Change API as identified on devel mailing list.
-               
-               Here is the email:
-               After some investigation into an error reported by valgrind, I'm proposing an
-               API change for the MoveCopyMessages() function.
-               
-               The signature is currently
-               enum MAPISTATUS MoveCopyMessages(mapi_object_t *obj_src,  mapi_object_t 
-               *obj_dst,  mapi_id_t *message_id,  bool WantCopy)
-               
-               The problem is the message_id array. The subtle part is that it needs to be 
-               terminated with a null mapi_id_t*, because of this:
-               for (request.count = 0; message_id[request.count]; request.count++);
-               
-               That is a bit error prone - enough so to be wrong in the mapitest.
-               
-               Now we could just fix the mapitest and document the requirements, or we could 
-               change the signature.
-               
-               Two ideas for a different signature:
-               1. We could add a uint16_t count to the signature, that says how long the 
-               array is.
-               2. We could use a better data structure than mapi_id_t*. I'm suggesting
-               mapi_id_array_t:
-               enum MAPISTATUS MoveCopyMessages(mapi_object_t *obj_src,
-                                                         mapi_object_t *obj_dst,
-                                                         mapi_id_array_t *message_id,
-                                                         bool WantCopy)
-2008-06-09
-    bradh
-       [r600]
-               Add mapitest coverage for CopyTo operations on 
-               folders and attachments, and update API docs.
-               
-               Also fix one place where we inadvertently used
-               CopyProps instead of CopyTo...
-2008-06-08
-    bradh
-       [r597]
-               Typo fixes in comments.
-       [r596]
-               Minor documentation updates.
-       [r595]
-               Clean up created message for SpoolerLockMessage() test.
-2008-06-07
-    bradh
-       [r594]
-               Update samba4 version test.
-       [r593]
-               typo fix.
-       [r592]
-               Make sure properties are copies into the last valid 
-               location in the extended array (i.e. count-1) not the
-               count location.
-               
-               Also, make sure we cast the data to a uint8_t for
-               conversion to boolean.
-               
-               Also fix compile warning about returning integer instead
-               of pointer.
-       [r591]
-               We may read up to 0x1000 bytes, so ensure there is
-               enough room to add the terminating null.
-       [r590]
-               Minor cleanup of the talloc context for FreeBookmark().
-               
-               Also change around some code to protect things a bit
-               better against null pointer inputs.
-2008-06-06
-    bradh
-       [r588]
-               Implement a bit more mapitest for CopyTo (0x39), in
-               support of #83.
-               
-               Also make it clean up and report failures properly.
-2008-06-05
-    bradh
-       [r587]
-               Implement the CopyTo operation (0x39), including initial mapitest.
-               JK previously committed the IDL for this.
-               
-               Also make CopyProps (0x67) use an appropriate data structure for
-               its IDL and update implementation to match.
-2008-06-04
-    bradh
-       [r586]
-               Minor documentation updates/corrections.
-2008-06-02
-    jkerihuel
-       [r583]
-               Introduce a default case for MAPI Restriction. In some circumstances -
-               while Outlook creates an OOF Rules - it sets a PT_SRESTRICT mapi
-               property tag which value is set to 0xFF. However 0xFF doesn't match
-               any restriction case.
-2008-06-01
-    jkerihuel
-       [r582]
-               - Add IDL for OpenEmbeddedMessage (0x46) MAPI call
-       [r581]
-               - Add IDL for ReloadCachedInformation (0x10) MAPI call
-       [r580]
-               - Add IDL for CopyTo (0x39) MAPI call
-       [r573]
-               - Update the Samba4 GIT revision needed to run openchange properly
-       [r572]
-               - import mapiproxy project from mapiproxy branch
-               - add custom proxypack MAPI call
-               - remove deprecated dcesrv_exchange_remote
-    bradh
-       [r579]
-               Add missing part of mapitest for SetReadFlags
-               
-               This should have been part of r578.
-       [r578]
-               mapitest for SetReadFlags
-       [r577]
-               Implement SetReadFlags (operation 0x66).
-               
-               Also minor API docs fix.
-       [r576]
-               Move some test infrastructure from the oxctable.c module
-               into the common area.
-       [r575]
-               Fix IDL error for SetReadFlags, and use existing flags
-               define (MSGFLAGS_READ) instead of creating a new set.
-       [r574]
-               Build fix for relocation of mapiproxy/ to be under the
-               top level directory (instead of under the utils/
-               directory)
-2008-05-31
-    jkerihuel
-       [r571]
-               merge from mapiproxy branch:
-                     * ndr_push Logon_req manually
-       [r568]
-               merge from mapiproxy branch:
-                     * Add IDL and server boiler template for EcDoConnectEx (0xA)
-                       EMSMDB RPC function
-               
-                     * Fix ndr_push_mapi_response code in ndr_mapi.c
-               
-                     * Add the ndr_push_EcDoRpc_MAPI_REPL function in
-                       ndr_mapi.c. Handles special Notify and Pending cases
-               
-                     * Handle op_MAPI_Pending case properly in
-                       ndr_pull_EcDoRpc_MAPI_REPL
-               
-                     * Add code to ndr_push QueryRows in ndr_mapi.c: Do not push any
-                       DATA_BLOB if there is no RowCount
-       [r565]
-               merge from mapiproxy branch:
-                     * Fix GetReceiveFolder [out] IDL
-                     * Fix some naming convention typo
-       [r564]
-               merge from mapiproxy branch:
-                     * Fix SetMessagReadFlag [out] IDL
-       [r563]
-               - Add [flag(NDR_REMAINING)] to SetMessageReadFlag. This is not
-                 perfect, but it will prevent mapiproxy from ndr_pull error while
-                 setting message read flag on public folders messages.
-       [r562]
-               merge from mapiproxy branch:
-                     * Fix CreateMessage [out] IDL
-       [r561]
-               merge from mapiproxy branch:
-                     * rename OpenModeFlags to OpenFolder_OpenModeFlags in OpenFolder
-                     * rewrite OpenMessage [in] IDL and report changes in
-                       libmapi/IStoreFolder.c
-       [r560]
-               merge from mapiproxy branch:
-                     * Add IDL for Pending (0x6e) MAPI call
-                     * Reorder some MAPI calls in EcDoRpc_MAPI_REPL_UNION
-       [r559]
-               - Add SetReadFlags to EcDoRpc_MAPI_{REQ,REPL}_UNION
-       [r558]
-               merge from mapiproxy branch:
-                     * Add IDL for SetSyncNotificationGuid (0x88) MAPI call
-       [r557]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncGetTransferState (0x82) MAPI call
-       [r556]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncImportReadStateChanges (0x80) MAPI call
-               
-               Note: This IDL is temporary and should be improved after completion of
-               the merging process.
-       [r555]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncOpenCollector (0x7e) MAPI call
-       [r554]
-               merge from mapiproxy branch:
-                     * Add IDL for DeletePropertiesNoReplicate (0x7a) MAPI call
-       [r553]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncImportMessageMove (0x78) MAPI call
-       [r552]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncUploadStateStreamBegin (0x75) MAPI call
-                     * Add IDL for SyncUploadStateStreamContinue (0x76) MAPI call
-                     * Add IDL for SyncUploadStateStreamEnd (0x77) MAPI call
-       [r551]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncImportDeletes (0x74) MAPI call
-       [r550]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncImportHierarchyChange (0x73) MAPI call
-       [r549]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncImportMessageChange (0x72) MAPI call
-       [r548]
-               merge from mapiproxy branch:
-                     * Add IDL for SyncConfigure (0x70) MAPI call
-       [r547]
-               merge from mapiproxy branch:
-                     * Add IDL for RegisterOptions (0x6f) MAPI call
-               
-               Note: This call is undocumented in Microsoft documentation, but MSDN
-               RegisterOptions function generates this call on the wire.
-       [r546]
-               merge from mapiproxy branch:
-                     * Add IDL for Progress (0x50) MAPI call
-       [r545]
-               merge from mapiproxy branch:
-                     * Add IDL for FastTransferSourceGetBuffer (0x4a) MAPI call
-       [r544]
-               merge from mapiproxy branch:
-                     * Add IDL for GetPerUserLongTermIds (0x60) MAPI call
-                     * Add IDL for GetPerUserGuid (0x61) MAPI call
-                     * Add IDL for ReadPerUserInformation (0x63) MAPI call
-       [r543]
-               merge from mapiproxy branch:
-                     * Add IDL for LongTermIdFromId (0x43) MAPI call
-                     * Add IDL for IdFromLongTermId (0x44) MAPI call
-       [r542]
-               merge from mapiproxy branch:
-                     * Add IDL for ModifyRules (0x41) MAPI call
-       [r541]
-               merge from mapiproxy branch:
-                     * Add PT_SRESTRICT support in mapi_SPropValue_CTR
-               
-                     * Add PT_ACTIONS and RuleAction support in mapi_SPropValue_CTR
-               
-                     * Fix mapi_SNotRestriction NDR push routine - add a wrapper to
-                       work around the no-pointer deep recursion pb and remove
-                       existing nopull,nopush,noprint code from ndr_mapi.c
-               
-                     * Fix mapi_SComment_Restriction IDL
-                     
-       [r540]
-               - Introduce PT_MV_UNICODE support in mapi_SPropValue_CTR (IDL only)
-               - use mapi_LPWSTR for PT_MV_UNICODE
-               - rename mapi_LPWSTR structure to mapi_name in Kind structure and
-                 change its field names.
-       [r536]
-               - Fix emsmdb version
-               - Change MAPI opnum enum identation -- Helps to fine down merging from
-                 mapiproxy branch
-    bradh
-       [r539]
-               API docs typo fix.
-       [r538]
-               Minor API documentation fixes.
-       [r537]
-               Update label to reflect SetReadFlags -> SetMessageReadFlag 
-               renaming.
-               
-               This should have been part of r529 - missed it.
-2008-05-30
-    jkerihuel
-       [r535]
-               merging from mapiproxy branch:
-                       - Fix MV_UNICODE_STRUCT and unicode strings
-                       - Keep LPWSTR for exchange_nsp and move from LPWSTR to
-                         mapi_LPWSTR for exchange_emsmdb
-                       - Add the NspiGetTemplateInfo IDL
-                       - Fix the NspiUpdateStat IDL
-       [r534]
-               Fix build: SetMessageReadFlag function name was not propagated in the
-               module_oxcmsg.c
-    bradh
-       [r529]
-               Initial merge of changes for rename of SetReadFlags to
-               SetMessageReadFlags (op 0x11) and IDL for SetReadFlags 
-               (op 0x66).
-       [r528]
-               Use private_data instead of private, for C++ happiness.
-       [r527]
-               Minor cleanup. Using "try" confuses my c++ compiler...
-       [r526]
-               This is really part of r525. It moved to IMAPITable.c
-       [r525]
-               Update the table operations:
-                - implement ExpandRow and CollapseRow
-                - implement GetCollapseState and SetCollapseState
-                - add mapitest coverage for the above, plus the Restrict call
-                - implement ResetTable
-                - implement FreeBookmark
-                - add mapitest coverage for SRowSet parsing code
-                - minor IDL fixes
-                - various API documentation bits
-    jelmer
-       [r533]
-               Use right directory for samba4_ver.sh script.
-       [r532]
-               Use common location for Samba 4 git revision.
-2008-05-27
-    bradh
-       [r522]
-               Use PT_ERROR where appropriate.
-       [r521]
-               Update the SRowSet parser, fixing breakage I introduced.
-2008-05-26
-    bradh
-       [r518]
-               Update examples to reflect recent API changes.
-    jelmer
-       [r520]
-               Don't rely on absolute file paths since the distribution may be installing 
-               in other locations.
-       [r519]
-               make scripts executable.
-2008-05-25
-    bradh
-       [r515]
-               Avoid segfaulting if you ask for a specific test or tests and 
-               forgot to start the server.
-               
-               Here is an example:
-               [bradh@conferta trunk]$ ./bin/mapitest --mapi-calls=OXCTABLE-CATEGORY --mapi-calls=OXCTABLE-RESTRICT --mapi-calls=NOSERVER-LZFU
-               Failed to connect host 192.168.11.77 on port 135 - NT_STATUS_HOST_UNREACHABLE
-               Failed to connect host 192.168.11.77 (192.168.11.77) on port 135 - NT_STATUS_HOST_UNREACHABLE.
-                   MapiLogonEx              : MAPI_E_RESERVED (0xFFFFFFFF)
-               #############################[mapitest report]#################################
-                       [*] Date                     : Sun May 25 11:45:29 2008
-                       [*] Confidential mode        : [no]
-                       [*] Samba Information        : 4.0.0alpha4-GIT-44d8b70
-                       [*] OpenChange Information   : 0.8-SVN-build-510 (Romulus)
-               
-                       [*] System Information       :
-                               Kernel name          : Linux
-                               Kernel release       : 2.6.23.17-88.fc7
-                               Processor            : x86_64
-               ###############################################################################
-               
-               
-               [*] NOSERVER-LZFU
-               [TEST] NOSERVER-LZFU
-               ------------------------------------------------------------------------
-                       * uncompress_rtf2                    : 0x00000000
-                       * uncompress_rtf2                    : PASSED
-               ------------------------------------------------------------------------
-               [RESULT] NOSERVER-LZFU: [SUCCESS]
-               ========================================================================
-               
-               [*] OXCTABLE-RESTRICT
-               Server is offline, skipping test: "OXCTABLE-RESTRICT"
-               [*] OXCTABLE-CATEGORY
-               Server is offline, skipping test: "OXCTABLE-CATEGORY"
-2008-05-24
-    bradh
-       [r510]
-               ignores objects that contain invalid handlers in mapi_object_release().
-               
-               Patch by Alan Alvarez. Compile tested, passes mapitest on SBS2003.
-2008-05-23
-    bradh
-       [r507]
-               Fix API documentation to match signature.
-2008-05-20
-    bradh
-       [r504]
-               Update QueryRows IDL and implementation to match
-               msdn documentation.
-               
-               The main work here is reworking the SRowSet parsing
-               routine.
-2008-05-18
-    bradh
-       [r501]
-               Typo fix - allow cleanup to work properly.
-2008-05-17
-    bradh
-       [r497]
-               Make sure it has a return value.
-2008-05-11
-    bradh
-       [r495]
-               Rename GetColumns remote operation to GetColumnsAll, and 
-               fix up IDL and implementation to match.
-               
-               Add some more unit test coverage, and pretty-up the
-               output a little.
-       [r494]
-               Fix up breakage introduced in r493.
-    jelmer
-       [r496]
-               Make sure nagios directory gets created if it didn't exist yet.
-2008-05-10
-    bradh
-       [r493]
-               Refactor the unit tests.
-               
-               Extract out the setup and some of the cleanup code.
-2008-05-08
-    jkerihuel
-       [r490]
-               - Update openchange code to work with Samba4 4.0.0alpha4-GIT-44d8b70
-               - Use event_context structure
-               - update installsamba4.sh script to revert to this revision.
-               - update torture modulesdir reference
-    jelmer
-       [r492]
-               Look a little bit harder for the Samba installation.
-2008-05-05
-    jkerihuel
-       [r489]
-               - Add GetLocalReplicaIds MAPI call (IDL + implementation + mapitest)
-               - Add OXCFXICS mapitest module
-2008-05-03
-    jkerihuel
-       [r488]
-               - Fix "the very secret" openchange coding style
-               - Add Copyright for our humble new libmapi developer ;-)
-    bradh
-       [r487]
-               Implement the CopyProperties operation, including
-               a mapitest for this.
-2008-05-02
-    jkerihuel
-       [r485]
-               - Add TransportSend MAPI call (IDL + implementation + mapitest). This
-               code maybe needs some review regarding memory.
-       [r484]
-               - Add the GetTransportFolder MAPI call (IDL + implementation +
-                 mapitest)
-       [r483]
-               - Add SpoolerLockMessage MAPI call (IDL + implementation + mapitest)
-       [r482]
-               - Add SetSpooler MAPI call (IDL + implementation + mapitest)
-       [r481]
-               - Add GetRulesTable (IDL + implementation + mapitest)
-               - Add the OXORULE mapitest suite
-    bradh
-       [r480]
-               Typo fix.
-    jelmer
-       [r486]
-               Make sure config.mk is the last file removed during distclean.
-2008-05-01
-    jkerihuel
-       [r479]
-               - Add the Abort MAPI call (IDL + implementation)
-               
-               OpenChange doesn't support yet asynchronous operation which explains
-               why no associated mapitest test has been implemented. This should be
-               done in the future.
-       [r478]
-               - Add the MoveFolder MAPI call (IDL + implementation + mapitest)
-               - Fix some typo in mapitest doxygen
-       [r477]
-               - Add MoveFolder MAPI call (IDL + implementation + mapitest)
-               - Fix some doxygen stuff
-               - add a common function within mapitest which looks for a folder name
-                 within a container and return the opened folder object on success.
-       [r476]
-               Add auto-generated Doxyfile to the svn ignore list
-       [r475]
-               - Add AbortSubmit MAPI call (IDL + implementation + mapitest)
-       [r473]
-               - Uninitialize MAPI and general memory context at the end of mapitest
-    bradh
-       [r474]
-               Clean up / flush the stream after use. 
-               
-               Saves a bit more "still reachable" in valgrind too.
-2008-04-30
-    jkerihuel
-       [r470]
-               - Rename CopyMessages to MoveCopyMessages
-               - Improve IDL + implementation and mapitest added
-    bradh
-       [r471]
-               Make sure the version shown for mapitest documentation
-               is automatically set to match the package version.
-       [r468]
-               complete the rest of the API documentation autonumbering.
-    jelmer
-       [r472]
-               Remove duplicate use of $(SHLIBEXT).
-       [r469]
-               Avoid parallel builds for now.
-2008-04-29
-    jkerihuel
-       [r467]
-               Fix GetContentsTable binding in perl swig
-       [r466]
-               - Improve the GetHierarchyTable and GetContentsTable IDL and public
-                 IDL implementation (new parameters in,out)
-    bradh
-       [r465]
-               Initial part of automatic list numbering for doxygen comments.
-               
-               This doesn't work correctly with the current apidocs.css, which
-               turns the list numbers into bullet points for reasons I don't 
-               understand.
-2008-04-28
-    jkerihuel
-       [r464]
-               - Improve the DeleteMessages IDL request
-       [r463]
-               - Update libmapi version from 0.7 to 0.8
-               
-               - Public API change for the GetReceiveFolder function; now takes a
-                 message class as 3rd parameter.
-       [r458]
-               - Improve GetSearchCriteria request IDL (unknown removed)
-               - update libmapi copyright headers 2007 -> 2007-2008.
-       [r457]
-               - Improve the SubmitMessage IDL
-               - minor indentation fixed in IMessage.c
-       [r456]
-               - Add CopyToStream MAPI call (IDL + implementation + mapitest)
-       [r455]
-               - Add SeekStream MAPI call (IDL + implementation + mapitest)
-               - Add SetStreamSize MAPI call (IDL + implementation + mapitest)
-       [r454]
-               - Add CommitStream MAPI call (IDL + implementation + mapitest)
-               - Add GetStreamSize MAPI call (IDL + implementation + mapitest)
-               - refactor the stream test to include all stream related operations
-               - add a common function which generates a random ASCII blob of data
-    bradh
-       [r453]
-               Add doxygen support for the mapitest examples.
-    jelmer
-       [r459]
-               Allow cleaning individual parts.
-2008-04-27
-    jkerihuel
-       [r452]
-               - Add GetStatus call (IDL + implementation + mapitest)
-       [r451]
-               - Fix format string problem in mapitest headers
-       [r450]
-               Run offline suites by default.
-       [r449]
-               - Introduce the online/offline mode for suite
-               - Fix Exchange headers print bug when server is offline
-               - reset errno to 0 before running new test
-    bradh
-       [r447]
-               Install the libmapiadmin.h header.
-       [r446]
-               Fix a compile-time warning on amd64, for the second
-               argument to the getline() call - incompatible pointer
-               type.
-               
-               I'm assuming that size_t is equivalent to uint32_t
-               on a 32-bit architecture, but not on a 64-bit arch.
-               
-               A quick test showed no difference in actual output.
-    jelmer
-       [r448]
-               Remove bashisms in installsamba4.sh
-2008-04-26
-    jkerihuel
-       [r445]
-               - Add ReadRecipients MAPI call (IDL + implementation + mapitest)
-               - Improve some ModifyRecipients and Recipients structure naming
-2008-04-25
-    jkerihuel
-       [r444]
-               - Add RemoveAllRecipients call (IDL + implementation + mapitest)
-       [r443]
-               - Add OpenPublicFolderByName call added (IDL and implementation).
-               
-               - Note: the reply IDL doesn't handle Server and ServerCount yet.
-               
-               - Note: this call only refers to NNTP folders (e.g: folders located
-               within "Internet Newsgroups". If developers use this call within "All
-               Public Folders", then the call with return MAPI_E_NOT_FOUND.
-               
-               - Call not added to mapitest cause it require RightsAuthor permissions
-               on Internet Newsgroups which is not the case by default.
-               
-               - dump-data and debug options added to mapitest
-               - FOLDER suite renamed to OXCFOLD (naming convention)
-       [r441]
-               Rename module folder to oxcfold
-       [r440]
-               Replace the existing mapitest tool with a new implementation. It is
-               less complete but more modular.
-    jelmer
-       [r442]
-               Add proto headers to ignore file.
-2008-04-20
-    jkerihuel
-       [r438]
-               OpenFolder request: replace unknown field with OpenModeFlags
-       [r437]
-               - Rename 0xFE opnum from OpenMsgStore to Logon
-               - Update the Logon request IDL
-    bradh
-       [r439]
-               Add BEGIN_DECLS for private_proto.h.
-       [r436]
-               Add forgotten part of rev435.
-       [r435]
-               Add unit test framework for compressed RTF decoding.
-               
-               Refactor lzfu.c to improve testability.
-2008-04-19
-    jkerihuel
-       [r434]
-               Fix openchangeclient --mailbox --pf with wasn't launched anymore due
-               to some incorrect sanity check tests.
-       [r433]
-               - Remove deprecated fuzzer_msgstore torture test
-               - replace mapi_flags with logon_id in EcDoRpc_MAPI_REQ
-2008-04-16
-    bradh
-       [r432]
-               A couple of minor fixes to make it read better.
-    jelmer
-       [r431]
-               properly clean up sofiles
-       [r430]
-               Import exchange nagios check script by Bill Edmunds.
-       [r429]
-               Add support for creating libocpf soname symlink.
-       [r428]
-               Use standard include for uint64_t definition.
-       [r427]
-               Cleanup talloc and tdb before building samba4.
-2008-04-14
-    jkerihuel
-       [r426]
-               Check for ocpf_set_Recipients retval (MAPI_E_NOT_FOUND)
-       [r425]
-               - Reset ocpf to NULL after release so the ocpf_init/release couple can be called more than once.
-               - Sanity check on recipient, avoid parsing if no recipient is set. Return MAPI_E_NOT_FOUND instead.
-       [r424]
-               Add reference to the ocpf lib within the pc file.
-2008-04-09
-    jelmer
-       [r423]
-               Remove duplicate SWIG instructions (already covered by stdint.i).
-       [r422]
-               Ignore files created by swig.
-       [r421]
-               Use config.mk in swig/perl/Makefile.
-       [r420]
-               Allow sambaprefix and prefix to be different. Allow building with unknown 
-               Samba git revisions (will still warn though).
-       [r419]
-               Add --with-samba argument to configure so samba and openchange can be installed in different directories.
-2008-04-08
-    jkerihuel
-       [r418]
-               Add domain to the mapiprofile dump output.
-       [r417]
-               Fix OpenMessage IDL and GetRecipientTable fetched data
-               
-               -This line, and those below, will be ignored--
-               
-               _M   trunk
-               M    trunk/exchange.idl
-               M    trunk/libmapi/IStoreFolder.c
-               M    trunk/libmapi/emsmdb.c
-               M    trunk/libmapi/IMessage.c
-2008-04-07
-    jelmer
-       [r416]
-               Fix typo, change samba-config -> samba-hostconfig.
-2008-04-06
-    jkerihuel
-       [r415]
-               - Add openchangepfadmin to make install
-               - Add openchangemapidump and locale_codepage to make clean
-2008-04-05
-    jelmer
-       [r413]
-               Merge the samba4-latest branch.
-2008-04-03
-    jkerihuel
-       [r408]
-               Revert so version number to 0.7
-       [r407]
-               Fix Perl bindings: update mapidump_message
-       [r405]
-               ** Start libmapi-0.8 ROMULUS development **
-       [r402]
-               Add ChangeLog and apidocs to the releases
-       [r400]
-               - Delete unmaintained regression suite
-               - Fix typo error in torture-clean rule
-       [r399]
-               Add modified release script originally from abartlett/samba4
-       [r398]
-               - Check for specific Samba4 git revision in configure.ac
-               - Prefix locale functions with lcid and make them _PUBLIC_
-    bradh
-       [r406]
-               API documentation update.
-    jelmer
-       [r403]
-               Fix some typos.
-2008-04-02
-    jkerihuel
-       [r397]
-               Add installation script for samba4
-       [r396]
-               - Apply the nspi pointer patch - make openchange works with
-               samba4-alpha3 git 41309dc
-               
-               - update howto.txt
-    bradh
-       [r390]
-               Move the top level API documentation to an "overview"
-               section and add a redirect to that overview.
-               
-               This keeps the doxygen output more nicely separated for
-               packaging.
-               
-               Also, generate the man pages where the install expects
-               to find them.
-2008-04-01
-    jkerihuel
-       [r388]
-               - Fix strsep bug in openchangeclient
-               - Add RECIPIENT support to libocpf
-       [r383]
-               - escape/unescape strings support added
-               - PT_MV_STRING8 type added to OCPF write API
-2008-03-31
-    jkerihuel
-       [r382]
-               - return MAPI_E_NOT_FOUND if NspiGetMatches doesn't return any results
-                 (based upon patch from lofi@mountproc.org)
-               - makes the workstation parameter of mapiprofile optional (use
-                 gethostname if not defined by the user on command line)
-       [r381]
-               - Fix an allocation memory problem in cast_SPropValue
-               - update svn:ignore proplist
-2008-03-30
-    jkerihuel
-       [r380]
-               Update the documentation build so it keeps generating an embedded
-               website in with apidocs/html as root directory.
-       [r378]
-               - Add support for PT_UNICODE and PT_SHORT to libocpf
-               - Initial implementation of the libocpf write API
-               - Update libocpf documentation
-               - add --ocpf-dump option in openchangeclient
-               - Fix realdistclean rules for server
-               - add cast_SPropValue function to libmapi/property.c which cast
-                 mapi_SPropValue to SPropValue
-    bradh
-       [r379]
-               Split API documentation into two separate sections - one
-               for libmapi and one for libocpf.
-               
-               Also add in a top level intro page.
-2008-03-27
-    jkerihuel
-       [r376]
-               New build system which gathers a list of things that can be built with
-               the libraries/utilities the user has installed and build that when
-               "make all" is run.
-2008-03-26
-    jkerihuel
-       [r375]
-               Add missing allocation for OLEGUID
-       [r373]
-               --ocpf-syntax doesn't require MAPI to be initialized. Furthermore
-                 makes ocpf-syntax "exclusive" (quit after performing the operation).
-    bradh
-       [r372]
-               r371 was bad. What was I thinking with that nonsense!
-               
-               Revert to something sane.
-       [r371]
-               Make the ./bin/ directory if it doesn't exist.
-               
-               This should resolve ticket #33.
-2008-03-23
-    bradh
-       [r370]
-               Improve language handling when creating profiles.
-               
-               You can now get a list of valid languages and use either
-               the language code ID or the language name to specify what
-               language later versions of Exchange should reply with.
-       [r369]
-               Typo fix - duplicate ; at the end of the structure.
-       [r368]
-               Match format to unsigned int argument.
-       [r367]
-               Make the format specifier match the unsigned argument.
-2008-03-22
-    jkerihuel
-       [r366]
-               propset svn:ignore update
-       [r365]
-               Update propset svn:ignore on doc/examples and libocpf targets
-       [r364]
-               - Fix ticket #29: http://trac.openchange.org/ticket/29
-               
-               - use access(2) to see if the database already exists
-               - test if the profile already exists prior trying to add it
-               - add descriptive error messages
-               - catch CTRL-C signal and run a profile deletion routine
-    bradh
-       [r363]
-               Update API documentation for ocpf_nproperty_add().
-       [r362]
-               Typo fix.
-2008-03-16
-    jkerihuel
-       [r361]
-               Fix mapidump_message call parameters
-2008-03-13
-    jkerihuel
-       [r360]
-               Add fid/mid parameters to mapidump_message and changed
-               openchangeclient_fetchitems to reflect these changes.
-       [r359]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-               updates the OCPF doxygen file.
-       [r358]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-               adds the doc/examples into the build system and enables make examples.
-       [r357]
-               Patch From Brad Hards, <bradh@frogmouth.net>:
-               API documentation update and minor fix for the error value change.
-2008-03-09
-    jelmer
-       [r355]
-               Update bzr ignores.
-2008-03-06
-    jkerihuel
-       [r354]
-               - Add PT_BINARY property support to OCP
-               - Add stream support to OCPF for large PT_BINARY blobs.
-               - Fix a bug which prevented from having no/empty PROPERTY or NPROPERTY
-                 sections.
-2008-03-05
-    jkerihuel
-       [r353]
-               - Prevent from assigning a value which type doesn't match with
-                 the property one.
-               - Add missing substitution variable support for some named properties
-                 declaration
-               - Improve sample_appointment.ocpf example
-               - Add PT_MV_STRING8 keyword to the list of supported property type
-                 identifiers.
-2008-03-04
-    jkerihuel
-       [r352]
-               Improve OCPF PT_MV_STRING8 support.
-       [r351]
-               - Initial revision for libocpf and its documentation
-               - YACC support added to the build system
-               - custom lid and string support in mapi_nameid
-               - lookup functions added for OOM, lid and string
-               - OCPF commands added to openchangeclient (ocpf-file, ocpf-syntax,
-                 ocpf-sender)
-               - PR_FID displayed in openchangeclient --mailbox
-               - PT_MV_STRING8 support added to cast_mapi_SPropValue
-2008-03-02
-    jkerihuel
-       [r350]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-                       updates code to build with current API
-       [r349]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-                       little update for some API dox
-2008-02-21
-    jkerihuel
-       [r348]
-               - Add --update option to openchangeclient and allow users to modify
-                 existing messages (calendar, task, contact, note)
-               - Add --delete option to openchangeclient and allow users to delete
-                 existing messages (calendar, task, contact, note)
-               - Add some folder/message unique ID to mapidump outputs and send*
-                 openchangeclient functions.
-               - Fix a bug in set_SPropValue: add sanity check on unicode
-                 string. Thanks to Suman Manjunath for this patch.
-               - Fix mapidump_task function and identifiers of named properties used.
-2008-02-19
-    jkerihuel
-       [r347]
-               Fix missing sanity check on priority
-       [r346]
-               Fix a bug in openchangeclient when tasks are created without body
-       [r345]
-               private flag added to openchangeclient appointments
-       [r344]
-               Fix folder IDs problem for Exchange 2007 SP1
-2008-02-09
-    jkerihuel
-       [r343]
-               Fix names IDL against Samba4 4.0.0alpha3-GIT-41309dc
-2008-01-24
-    jkerihuel
-       [r342]
-               - Fix a bug in IStoreFolder.c:OpenMessage which was also affecting
-                 GetRecipientTable. We were extending SPropTagArray prior calling
-                 emsmdb_get_SRow. This was causing ndr_pull_error in OpenMessage_repl
-                 and erroneous data to be inserted in the SRow.
-               
-               - Fix libmapi/socket/interface.c:
-                    - Use the latest version from Samba4 which removes reference to
-                      global_loadparm.
-                    - Moves struct interface declaration to netif.h
-                    - Report changes to emsmdb.c notification functions.
-               
-               - Change GetGALTable prototype to match general libmapi policy. Remove
-                 the usage of bool and replace it with uint8_t. Possible values added
-                 to mapidefs.h
-2008-01-22
-    jkerihuel
-       [r341]
-               - Improve NspiQueryRows IDL and implementation
-               - Add GetGALTable implementation: fetch all the Global Address List
-                 recipients
-               - Add --userlist option to openchangeclient
-               - Add a convenient and basic dumping function for Global Address List
-                 recipients.
-       [r340]
-               - Improve OpenMessage reply IDL
-               - Fetch mapi recipients from OpenMessage reply
-               - Add GetRecipientTable convenient function
-               - Add OPENCHANGE-MAPI-RECIPIENT torture test to test
-                 GetRecipientTable implementation.
-               - Add convenient SPropTagArray_add function
-               - Add internal emsmdb_get_SRow routine
-2008-01-21
-    jkerihuel
-       [r339]
-               Patch from Suman Manjunath <msuman@novell.com>:
-               
-               - Adds named-properties which define recurrence patterns for
-                 appointment and task. 
-               - Adds named properties for appointment timezone
-       [r338]
-               - Fix the SNotRestriction IDL and write custom push,pull,print
-                 functions
-               - Add 2 new MAPI calls to the IDL: 
-                 * GetSearchCriteria,
-                 * SetSearchCriteria
-               - add sample {Get,Set}SearchCriteria torture test
-               - add convenient mapi_id_array implementation
-               - add GetDefaultFolder support for CommonView and Finder folders
-2008-01-20
-    jelmer
-       [r337]
-               Make sure directory exists.
-2008-01-18
-    jkerihuel
-       [r336]
-               - Fix tiny 'nail down samba4 version' bug
-               - update the minimal Samba4 required version
-       [r335]
-               - Add FindRow call to the IDL
-               - Improve mapi_Restriction support
-               - Remove deprecated ndr_print_QueryRows function
-               - Add a print function for fuzzyLevel
-               - Add preliminary FindRow implementation test to MAPI-RESTRICTIONS
-                 torture test
-               - Add couple of new MAPI tags to mapi-properties
-               - change initial bookmark index to 3
-2008-01-16
-    jkerihuel
-       [r334]
-               - Add 2 new MAPI calls to the IDL and mapitest:
-                 * SetReceiveFolder
-                 * GetReceiveFolderTable
-               
-               - Fix a bug in the SortTable test when no messages are returned by
-                 QueryRows
-       [r333]
-               - Add SeekRowApprox to the IDL and mapitest
-               - Fix some doxygen typo
-       [r332]
-               - New calls added to the IDL, torture suite and mapitest:
-                   * CreateBookmark
-                   * SeekRowBookmark
-               - Internal mapi_object_bookmark_t implementation added to
-                 mapi_object_table_t
-               - SBinary_short default ndr_print function changed to custom
-2008-01-14
-    jkerihuel
-       [r331]
-               Temporary fixes unexpected segfault in SortTable test. Emails sent
-               during the Submit test have sometimes not yet been dispatched when the
-               SortTable test begins. This fix adds a sleep(1) and an arbitrary
-               number of attempts (5).
-       [r330]
-               Add 2 new MAPI calls to the IDL and libmapi:
-                   * AddressTypes
-                   * SortTable
-               
-               Tests for SortTable added to mapitest and the torture suite
-               Test  for AddressTypes added to mapitest.
-2008-01-13
-    jkerihuel
-       [r329]
-               Fix perl bindings and fetchmail test
-       [r328]
-               2 new MAPI call added to the IDL and mapitest: 
-                 * GetMessageStatus
-                 * SetMessageStatus
-2008-01-11
-    jkerihuel
-       [r327]
-               - Add DeleteAttach MAPI call
-               - Add new mapi unit tests:
-                 * QueryColumns
-                 * CreateAttach
-                 * SaveChanges
-                 * GetAttachmentTable
-                 * DeleteAttach
-               - Update mapitest README
-               - Add some convenient functions to mapitest_common.c
-2008-01-10
-    jkerihuel
-       [r326]
-               Add a preliminary draft of the mapitest standalone MAPI test suite.
-2008-01-05
-    jkerihuel
-       [r324]
-               Add missing files
-       [r323]
-               - Fix the build with the latest Samba4 version.
-               
-               - Add a basic libmapi/version.h auto-generated 
-                 file (based on Samba4 one)
-               - Remove some warnings when compiling the utf8 
-                 lexer
-               - Add a emsmdb_info structure to fetch some 
-                 information from the Exchange server
-               
-               WARNING: Please note that EMSABP is definitely broken and 
-                        requires a review and update.
-    jelmer
-       [r325]
-               DESTDIR should never get into any source files, that would defeat its purpose.
-2008-01-04
-    jkerihuel
-       [r322]
-               Fix the torture suite.
-2007-12-28
-    jelmer
-       [r321]
-               provide extra required argument.
-       [r320]
-               Store a loadparm context in the global mapi context.
-       [r319]
-               Deal with samba version.h's that don't contain the Subversion revision.
-2007-12-15
-    jelmer
-       [r318]
-               Use SWIG-provided typemaps for stdint.
-2007-11-29
-    ali
-       [r317]
-               Fix Content-Type field in exchange2mbox
-               Reported by Yuriy Filatov <yuriy.filatov@gmail.com>
-2007-11-28
-    jkerihuel
-       [r316]
-               - Improve the CreateMessage IDL
-               - Add new parameters to IMAPIFolder CreateMessage libmapi function
-               - Add --mkdir --rmdir options to openchangeclient
-               - Update the CreateFolder API and openchangeclient documentation
-               - Fix CreateFolder calls in openchange tools and torture suite
-               - Fix gendb_search warning
-2007-11-25
-    jkerihuel
-       [r315]
-               Add new PSETID_Address named properties 
-       [r314]
-               Fix a few code convention typos 
-               
-               Patch from Suman Manjunath <msuman@novell.com> applied:
-               converts a 'struct timeval' to 'NTTIME'.
-               minor extension of 'set_SPropValue_proptag', used while setting PT_SYSTIME properties.
-2007-11-21
-    jkerihuel
-       [r313]
-               update Samba4 first revision to 26100
-    jelmer
-       [r312]
-               Cope with ndr updates.
-2007-11-12
-    jkerihuel
-       [r311]
-               Patch from Brad Hards: Fix possible Heap overflow in lzfu code
-2007-11-07
-    jkerihuel
-       [r310]
-               Fix profile creation in a clustered Exchange 2007 environment.
-2007-11-02
-    jkerihuel
-       [r309]
-               Fix QueryColumns req size.
-2007-11-01
-    jkerihuel
-       [r308]
-               ** Start libmapi-0.7 PHASER development **
-               
-               add --dump-data option to mapiprofile for debugging purpose
-2007-10-31
-    jkerihuel
-       [r306]
-               openchangepfadmin (1) man page added
-       [r305]
-               Store messageID in the object when SaveChangesMessage is called
-       [r304]
-               Nail down Samba4 version for libmapi-0.6
-2007-10-30
-    jkerihuel
-       [r303]
-               - Add PR_MSG_EDITOR_FORMAT property to the sendmail operation
-               - Fix body dump bug when PR_MSG_EDITOR_FORMAT property is missing (default set to PLAINTEXT)
-               - Continue to process the mailbox when a problem is encountered with mesage contents (not attachment)
-               - Fix a typo bug in openchangeclient body help string
-       [r302]
-               Update doxygen section
-2007-10-29
-    jkerihuel
-       [r301]
-               - Add doxygen man (3) pages to installman and uninstallman rules
-               - do not run doxygen if apidocs already exists
-2007-10-28
-    jkerihuel
-       [r300]
-               Move documentation to doxygen 
-2007-10-25
-    jkerihuel
-       [r299]
-               Add convenient date related functions for implementors:
-               returns a timeval struct matching a PT_SYSTIME property
-               for improved date manipulation in 3rd party softwares
-2007-10-24
-    jkerihuel
-       [r298]
-               Fix build to work with latest Samba4 revision (4.0.0alpha2-SVN-build-25722)
-       [r297]
-               Fix make realdistclean when swig perl is enabled
-       [r296]
-               Fix swig perl bindins compilation: move *.o to *.po
-       [r295]
-               use talloc_memdup to copy const data in the body DATA_BLOB
-               Should only provide valid pointer to talloc_free 
-2007-10-23
-    jkerihuel
-       [r294]
-               Fix the DeleteMessages [out] IDL.
-               
-               The remaining bytes were not part of DeleteMessages but
-               MAPI notification (0x2a)
-2007-10-22
-    jkerihuel
-       [r293]
-               - Add RTF support in exchange2mbox
-               - Use openchange-tools public functions
-               - Replace GetPropsAll calls with GetProps
-       [r292]
-               - fetchmail: 
-                       * Use GetProps rather than GetPropsAll for message dump
-                       * Rely on PR_MSG_EDITOR_FORMAT to select the type of body
-                       * Open a stream for PR_BODY and PR_HTML if the size exceeds max property size
-               
-               -This line, and those below, will be ignored--
-               
-               M    trunk/Makefile.in
-               A    trunk/utils/openchange-tools.c
-               M    trunk/utils/openchangeclient.c
-               M    trunk/utils/openchange-tools.h
-               M    trunk/utils/openchangeclient.h
-               M    trunk/libmapi/mapidefs.h
-2007-10-20
-    jelmer
-       [r291]
-               Fix ignores.
-2007-10-19
-    ali
-       [r290]
-               Remove useless svn:ignore
-    jkerihuel
-       [r289]
-               Add WrapCompressedRTFStream function for PR_RTF_COMPRESSED content.
-               
-               Original lzfu decompress routine fetched from libpst-0.5.2
-       [r288]
-               make enum MAPISTATUS variables naming uniform in libmapi
-2007-10-16
-    jkerihuel
-       [r287]
-               Add PT_CLSID case to get_SPropValue_data
-       [r286]
-               Add/Fix pull property support for PT_UNICODE and PT_CLSID (used by GetProps)
-       [r285]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-               Fix compilation for x86_64 platforms.
-2007-10-14
-    ali
-       [r284]
-               More svn:ignore updates
-       [r283]
-               Update of svn:ignore
-2007-10-10
-    jkerihuel
-       [r282]
-               added the IDL license
-       [r281]
-               Convert OpenChange to GPLv3
-       [r280]
-               - Add .po files to make clean 
-               - Fix a couple of warnings in the utf8 conversion lexer 
-               - Prefer long filenames to truncated one for attachments in openchangeclient
-2007-10-09
-    jkerihuel
-       [r279]
-               Prevent exchange2mbox from segfault when PR_MESSAGE_DELIVERY_DATE is unset
-       [r278]
-               Add PT_CLSID and PT_MV_CLSID support to the IDL
-       [r274]
-               - Add new named properties
-               - Convenient function for MNID_STRING props lookup added
-    jelmer
-       [r277]
-               Make .po a recognized suffix.
-       [r276]
-               Fix compile error.
-       [r275]
-               Use -fPIC for library objects.
-2007-10-08
-    jkerihuel
-       [r273]
-               - Rename GetAllNamesFromIDs to QueryNamesFromIDs (better naming)
-               - fix SPropValue_CTR boolean to uint8_t in the IDL and emsmdb.c
-               
-               - add mapi_nameid convenient interface and headers
-               - mapi-named-properties populated, parser added to mparse.pl, file
-                 added to the build system
-               
-               - remove any incorrect reference to named properties in openchange
-                 tree
-               
-               - remove deprecated libmapi/mapi.h file
-               - remove unused ulFlag parameter from IProfAdmin functions
-               - remove unused memory context from libmapi/x500.c
-               
-               - support sendnote operation in openchangeclient
-               - optimize check/list oc_element functions in openchangeclient
-               
-               - update swig interface
-2007-10-05
-    jkerihuel
-       [r272]
-               - New MAPI calls: Named properties support
-                        * GetNamesFromIDs
-                        * GetIDsFromNames
-                        * GetAllNamesFromIDs
-               
-               - Modified MAPI calls:
-                        * OpenMessage
-                        * SaveChanges
-               These calls now have more granularity in libmapi with flags support
-               
-               - sample mapi-named-properties file introduced in libmapi/conf
-               
-               - Torture test suite:
-                       * suite temporary fixed (import torture_rpc_* functions from
-                         Samba4)
-                       * torture_namedprops test added
-               
-               - SWIG Perl bindings fixed according to changes described above
-               - minor improvements in libmapi/mapidump.c
-2007-10-02
-    jkerihuel
-       [r271]
-               - Decrease MAX_READ_SIZE to 0x1000
-               - Clean-up Read/WritreStream related code
-               - add dump-data option to openchangepfadmin (debugging purpose)
-2007-10-01
-    jkerihuel
-       [r270]
-               Fix build: 
-                       - remove reference to core/nterr.h
-                       - add global_loadparm reference where missing
-                       - add reference to core/error.h where needed
-    jelmer
-       [r269]
-               Improve output during build.
-       [r268]
-               Fix lp_load().
-       [r267]
-               Pass loadparm contexts, should fix the build with newer Samba revisions.
-2007-09-28
-    jkerihuel
-       [r266]
-               - WriteStream API changed: now returns the number of bytes written
-               - WriteStream man page updated
-               - 16 bytes extra-data bug fixed when sending attachments in openchangeclient
-               - Set open mode to 0600 when attachments are stored on the filesystem
-                
-2007-09-19
-    jkerihuel
-       [r265]
-               Fix preliminary Perl bindings so it works with Samba4 alpha2
-               and latest libmapi revision.
-       [r264]
-               Patch from Andrew Gaylard <ag@computer.org>:
-               
-               - When calling openchangeclient with the --dump-data switch, it will
-               dump core, since the global_mapi_ctx pointer isn't initialised yet.
-               The fix is to wait until it's set before accessing it.
-       [r263]
-               Patch from Andrew Gaylard <ag@computer.org>:
-               - Leaving any blank lines before .TH directives appears to cause a blank page
-               to be output when converting man pages to DVI files (which is a step to converting
-               them to PDF). The following patch remove the blank line above the .TH in each man page file. 
-               
-               - mapiprofile doesn't understand the -A switch, as mentioned in it's man page.
-               It should be -I.
-2007-09-13
-    jkerihuel
-       [r262]
-               - Add objectClass to the object: container, message or attachment
-               - Rename content to message in openchangebackup functions
-               - add objectClass parameter to ocb_record_init
-2007-09-12
-    jkerihuel
-       [r261]
-               - Move debug options to their correct location (after MAPIInitialize)
-               - Improve code related to LDB transactions
-               - Add convenient error checking macros
-2007-09-11
-    jkerihuel
-       [r260]
-               - Add preliminary openchangemapidump draft
-               - Fix lp_parm_* 1st parameter in the torture suite
-               - New functions in property.c for MAPI data retrieval
-2007-09-09
-    jelmer
-       [r259]
-               Use configure definition for mandir.
-2007-09-08
-    dan
-       [r258]
-               Activate debugs this time
-       [r257]
-               Replaced remaining gotos with MAPI_RETVAL_IF so errno is set correctly
-       [r256]
-               MAPI_RETVAL_IF missing ";" could cause surprises ;-)
-       [r255]
-               Add error check for samr call.
-               set errno with MAPI_RETVAL_IF.
-2007-09-06
-    dan
-       [r254]
-               Make required packaged more clear (LinuxMagazin input)
-2007-09-05
-    jelmer
-       [r253]
-               Remove invalid comment.
-2007-09-04
-    jkerihuel
-       [r252]
-               - Clean-up function prototypes
-               - Dump email when NEWMAIL notification is received
-2007-08-31
-    jelmer
-       [r251]
-               Proper dependencies.
-       [r250]
-               Don't regenerate proto headers unless necessary.
-       [r249]
-               Add 'make check'.
-       [r248]
-               Use install for installing files/directories.
-       [r247]
-               Actually use replacement variable for libmagic.
-2007-08-30
-    jkerihuel
-       [r246]
-               Remove forgotten BOOL
-       [r245]
-               Remove mapi_session pointer in mapi_objects
-               Add public function to IProfAdmin: retrieve default ldif path location outside the OC tree
-2007-08-28
-    jkerihuel
-       [r244]
-               Prevent users from creation of *undeletable* folders in Outlook and
-               perform sanity check on dirclass + display possible values. 
-       [r243]
-               Provides a way to modify Default and Anonymous permissions for a given folder.
-       [r242]
-               Fix errno in getdir function + add sanity check on opt_rmdir
-       [r241]
-               - Fix a memory related bug in mapiadmin_add_user
-               - Add latest howto.txt modifications from Dan
-       [r240]
-               - Fix bug in *UserPermission function: return when user is not found
-               - Add sanity checks to mapi_object API functions
-               - mapi_object_release reset errno to 0: need to release object
-               after displaying the potential error message.
-       [r239]
-               Fix a mapidump_appointment bug
-               Add PF folder support to fetch-items operation
-2007-08-27
-    jkerihuel
-       [r238]
-               openchangeclient now support send/read/delete operation on custom PF directories.
-       [r233]
-               - Add libmapiadmin library draft: Add/Remove Exchange user
-               - openchangepfadmin tool added: Public Folders management
-               - Add Sanity check to CreateFolder
-    jelmer
-       [r237]
-               Update ignore list.
-       [r236]
-               Fix last references to BOOL, True and False.
-       [r235]
-               Fix more references to BOOL, False and True.
-       [r234]
-               Use standard type and values for booleans since Samba no longer exports 
-               BOOL, True and False.
-2007-08-21
-    jkerihuel
-       [r232]
-               - Add OpenPublicFolder function to libmapi, Open Public Folder store
-               - change torture suite API to match latest Samba4 pidl changes
-               - utf8_convert regexp improved
-               - minor changes: printf to DEBUG
-               - howto.txt patch from Dan included
-               - Samba4 torture code related to user account creation included in the
-                 torture suite.
-2007-08-06
-    jkerihuel
-       [r231]
-               Fix segmentation fault when running update prior populating the database.
-2007-07-31
-    jkerihuel
-       [r230]
-               Remove obsolete file from the torture suite 
-       [r229]
-               - Add Exchange Administration test to the torture suite: Create Exchange user
-       [r228]
-               Dan update on howto.txt
-2007-07-10
-    jkerihuel
-       [r227]
-               - Add Exchange ACLs support to MAPI library
-               - Add 2 new MAPI opnum: GetTable and ModifyTable
-               - Improve mapidump functions
-2007-07-04
-    jkerihuel
-       [r226]
-               - Improve aclocal check in autogen.sh
-               - Fix flex binary detection in configure.ac
-2007-06-22
-    jkerihuel
-       [r225]
-               Same player ...
-       [r224]
-               Fix libmapi symlink
-       [r223]
-               Create libmapi.so symlink
-2007-06-21
-    jkerihuel
-       [r222]
-               Fix mandir installation path
-               Add ldconfig intructions to openchange installation documentation
-       [r221]
-               Fix build.
-2007-06-20
-    jkerihuel
-       [r220]
-               RES_AND and RES_OR preliminary implementation.
-2007-06-19
-    jkerihuel
-       [r218]
-               - doc patch from Brad Hards
-               - rename PROFILE_NOPASSWORD to OC_PROFILE_NOPASSWORD
-               - fix a warning in property.c
-2007-06-16
-    jelmer
-       [r210]
-               Add some 'const' (fixes compile warnings).
-       [r209]
-               Use sonames (required for the Debian packages).
-       [r208]
-               Add .bzrignore file.
-       [r207]
-               Update version number and use globally defined version number in libmapi.pc.
-2007-06-15
-    jkerihuel
-       [r205]
-               - Add IDL implementation for restrictions Content, Property,
-               CompareProps, Bitmask, Size, Exist.
-               - Add Restrict MAPI call handling the restrictions above
-               - OPENCHANGE-MAPI-RESTRICTIONS torture test added to the suite.
-               - convenient sendmail function added to mapi_common.c
-               - get property size function for mapi_SPropValue added to property.c
-               
-               test --This line, and those below, will be ignored--
-               
-               M    Makefile.in
-               M    exchange.idl
-               M    torture/openchange.c
-               A    torture/mapi_restrictions.c
-               M    torture/mapi_common.c
-               M    libmapi/property.c
-               M    libmapi/IMAPITable.c
-2007-06-11
-    jkerihuel
-       [r204]
-               Documentation update: Perl bindings installation
-2007-06-10
-    jkerihuel
-       [r203]
-               - Add mapitags and mapicode support to Perl SWIG bindings
-               - SPropTagArray support
-               - SRowSet preliminary support
-               - new constructor/destructor for mapi objects
-2007-06-09
-    jkerihuel
-       [r202]
-               - IProfAdmin patch applied: having password outside of the profile
-               
-               - Perl bindings draft added to the trunk and to the build system:
-                 --enable-swig-perl=yes
-               
-               - datarootdir fixed in libmapi.pc.in
-2007-06-06
-    jkerihuel
-       [r201]
-               - Add CopyMessages IDL and COPYMAIL torture implementation
-               - Fix man page install dir according to latest Samba4 changes
-               - Add datarootdir var to libmapi.pc.in and fix configure warning
-2007-06-01
-    jkerihuel
-       [r199]
-               convenient function which retrieve a value from a SPropValue array
-               given its property tag name, otherwise NULL
-2007-05-31
-    jkerihuel
-       [r198]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-               openchangeclient man page updated
-       [r197]
-               - Add Windows UTF8 to classic UTF8 conversion through a lexer
-               - openchangeclient --mailbox option changed to use it
-               - flex and bison support added to configure.ac
-               - windows_to_utf8 function added: wrapper over yyparse_utf8 routine
-2007-05-29
-    jkerihuel
-       [r196]
-               - features added to openchangeclient:
-                       * --send-appointment
-                       * --send-contact
-                       * --send-task
-                       * custom parameters
-               - openchangeclient man page updated
-               - new properties added to mapi-properties
-       [r195]
-               - Add man pages for simple_mapi.c functions:
-                * GetDefaultFolder
-                * GetFolderItemsCount
-       [r194]
-               - Remove deprecated functions from IMsgStore.c
-               - Update man pages documentation
-       [r193]
-               Fix install rule in Makefile: add missing headers
-               Move callback retval from uint32_t to int
-       [r192]
-               Fix notification callback retval
-       [r191]
-               - Advise opnum added to the IDL
-               - Parts of the Notify response IDL implementation
-               - Add Notification support to libmapi
-               - Add --notifications option to openchangeclient
-2007-05-28
-    jkerihuel
-       [r190]
-               Patch from Brad Hards <bradh@frogmouth.net>:
-                       - PR_BUSINESS_FAX_NUMBER 
-                       - improves the information provided on a contact by 
-                         mapidump_contact()
-2007-05-25
-    jkerihuel
-       [r189]
-               - Fix the release call in,out
-               - Call Release from mapi_release_object
-               - Add sanity check to OpenMsgStore
-               - clean up parts of the mapi_newmail test
-       [r188]
-               EcDoDisconnect code now sounds to work properly
-               Tested against Exchange 2000 / Exchange 2003
-       [r187]
-               - Fix SpropValue property pull problem when GetProps layout is set
-               - Add a dumpdata boolean to mapi_ctx_t so tools can dump hex data
-               - Add PR_CONTAINER_CLASS fetch to openchangeclient --mailbox
-               - Add debuglevel and dumpdata options support to openchangeclient
-2007-05-24
-    jkerihuel
-       [r186]
-               - Remove useless memory allocation in mapidump.c
-               - Improve mapidump_appointment
-               - Add sample mapidump_note
-               - Add --fetchitems option to openchangeclient:
-               This command offers an easy way to fetch calendar, contacts,
-               tasks, notes and mails from the Exchange server.
-               - Add IPF container class defines to mapidefs.h
-               - Add and Fix property tags
-2007-05-22
-    jkerihuel
-       [r185]
-               - Commit the EcDoRpc max_data patch proposed on the devel list
-               - Clean up folders related functions from the torture suite 
-               (GetDefaultFolder makes this code obsolete)
-2007-05-21
-    jkerihuel
-       [r184]
-               Add the --mailbox option to openchangeclient which recursively
-               lists the full mailbox folder hierarchy
-       [r183]
-               - Add PT_SYSTTIME support to get_SPropValue_data
-               - Add mapidump_SPropValue_date dumping function
-               - Add PT_SYSTIME support to mapidump_SPropValue
-       [r182]
-               - Add multi-valued SBinary_short support to mapi_SPropValue_CTR in the
-               IDL
-               
-               - Add GetDefaultFolder implementation to simple_mapi.c. This function
-               provides a convenient way to retrieve default folders ID. const
-               olFolder values are stored in libmapi/mapidefs.h
-               
-               - Modify the torture test suite to reflect these changes.
-               
-               - OpenMsgStore now decodes all the fid returned in the response
-               
-               - fix a bug size in libmapi/property.c
-2007-05-18
-    jkerihuel
-       [r181]
-               - Fix SMTP recipient in libmapi
-               - Add SMTP recipient support to openchangeclient
-               and the torture test suite
-               - Fix a bug in SRow_addprop
-2007-05-17
-    jkerihuel
-       [r180]
-               - OpenMessage IDL changed: we have a permission field.
-               It is now set by default to 0x3 (read/write) until we 
-               change OpenMessage prototype.
-               
-               - Add a sanity check to MAPIInitialize when no profdb
-               is specified
-2007-05-15
-    jkerihuel
-       [r179]
-               Remove remaining MAPISTATUS and replace them with enum MAPISTATUS
-       [r178]
-               - SetReadFlags IDL and implementation added to libmapi
-               - Warning fixed in emsabp.h
-       [r177]
-               Fix a bug in openchangeclient when attachments are using
-               PR_ATTACH_LONG_FILENAME rather than PR_ATTACH_FILENAME to store
-               attachment filename.
-       [r176]
-               Patch supplied by Brad Hards <bradh@frogmouth.net> which renames 
-               private structure member to private_data for C++ compatibility.
-       [r175]
-               Add libmapi/simple_mapi.c designed to hold convenient 
-               functions for application development.
-               
-               - GetFolderItemsCount added which returns the number of
-               total and unread messages for a given folder.
-2007-05-14
-    jkerihuel
-       [r174]
-               - Fix a body openchangeclient bug which now prevent openchangeclient
-               from segfault when no body is specified.
-               - Add GetDefaultProfile call to exchange2mbox for the default
-               operation.
-               - Improve fuzzer_msgtore output
-2007-05-13
-    jkerihuel
-       [r173]
-               Add a fuzzer torture test on OpenMsgStore which
-               test all the possible max_data value.
-               
-               Should help to understand if libmapi fails because
-               of max_data or not. 
-2007-05-12
-    jkerihuel
-       [r171]
-               exchange2mbox improved:
-               - tdb dependency removed
-               - message-id are now stored in the profile database
-               - it now mirrors deletion operation from the mbox file back to the
-               Exchange server.
-               - man page updated to reflect these changes
-       [r170]
-               - GetProfileAttr function prototype modified. It now returns the
-               results count for the given attribute and store values in a string
-               array.
-               - GetProfileAttr man page updated to reflect these changes
-               - Fix mapiprofile attribute search command
-               - migrate from open/write calls to stream ones in exchange2mbox
-    texane
-       [r172]
-               newmail torture + notifications implementation
-               
-               -- texane
-2007-05-11
-    jkerihuel
-       [r169]
-               Fix the SambaXP live demo segfault: When an ambiguous recipient is
-               specified, it now skips the name properly and maintain a correct
-               SRowSet.
-       [r168]
-               - Fix a bug when storing attachments into mbox
-               - Add default path support to exchange2mbox
-2007-05-10
-    jkerihuel
-       [r167]
-               - Update libmapi version according to the roadmap
-               - Fix nspi_resolvenames to use default profile database and profile
-2007-05-09
-    jkerihuel
-       [r166]
-               - Add default profile database and profile support in the torture suite.
-               - Fix a bug in mapidump_task
-2007-05-08
-    jkerihuel
-       [r165]
-               - Change MAPILogonEx to MAPILogonProvider and avoid potential
-               emsmdb endpoint related problem
-               - add sanity check on global session pointer
-2007-05-06
-    ali
-       [r164]
-               Merged MAILOOK-branch changes r64:163 into the trunk.
-2007-03-04
-    jkerihuel
-       [r79]
-               Remove ChangeLog, use svn log instead ;p
-2007-02-13
-    jkerihuel
-       [r63]
-               - libmapi includes moved from libmapi/include to libmapi
-               - Remove arguments from prototype definitions generation in mkproto.pl
-               - __BEGIN_DECLS __END_DECLS support in header files
-               - united libmapi/libmapi.h header file
-               - openchange.h header removed
-               - PIDL generated files moved to gen_ndr
-               - compilation rule for libmapi header installation added
-               - useless torture tests removed
-               
-               jkerihuel.
-2007-02-12
-    jkerihuel
-       [r62]
-               Replace OpenProperty and ReadAttach calls with OpenStream and ReadStream call
-               Add GetAttachmentTable call
-               
-               jkerihuel.
-2007-02-09
-    jkerihuel
-       [r58]
-               Remove -Werror CFLAGS until I figure out how to fix
-               our problem definitively.
-               
-               Remove static from dcesrv_exchange.c functions definition
-               
-               jkerihuel.
-    texane
-       [r61]
-               . reimplement GetProps
-               . retrieve attachment size
-               . modify fetchmail and fetchattach torture
-               
-               -- texane
-       [r60]
-               
-               . add GetPropList to exchange.idl
-               . add GetPropList implementation to IMAPIProp.c
-               -- texane
-       [r59]
-               - Add fetchattach torture; Attachment size is not yet
-               defined and 42 is used.
-               - add 3 new EcDoRpc opnums:
-                       - OpenAttach
-                       - ReadAttach
-                       - OpenProperty
-               
-               -- texane
-2007-02-08
-    jkerihuel
-       [r57]
-               Forgot to add IMAPISession.c
-               
-               jkerihuel.
-2007-02-07
-    jkerihuel
-       [r56]
-               Remove spurious warnings at compile time and
-               add -Werror -Wstrict-prototypes to CC.
-               
-               jkerihuel.
-       [r55]
-               Dispatch libmapi functions into filenames matching
-               the MAPI interface they belong to.
-               
-               jkerihuel.
-       [r54]
-               Fix the attach issue by value and add torture test to
-               the openchange torture suite.
-               
-               jkerihuel.
-    texane
-       [r53]
-               attachment torture test implementation
-               
-               -- texane
-2007-02-06
-    jkerihuel
-       [r52]
-               Add a null element at the end of MAPI_REQ array
-               so we can exit from the loop in ndr_print_mapi_request
-               
-               jkerihuel.
-       [r49]
-               - Add the DeleteMessages IDL
-               - New torture tests added:
-                       * OPENCHANGE-MAPI-SENDMAIL
-                       * OPENCHANGE-MAPI-DELETEMAIL
-               
-               These are experimental implementation
-               
-               jkerihuel.
-    texane
-       [r51]
-               subject option for delete message torture test
-               
-               -- texane
-       [r50]
-               added (recipients == null) check
-               added default body
-               added default subject
-               -- texane
-2007-02-03
-    jkerihuel
-       [r48]
-               Add NspiResolveNames and the associated torture test.
-               
-               jkerihuel.
-2007-02-01
-    jkerihuel
-       [r47]
-               Fix nspi decoding problem due to the usage of
-               a hyper instead of a dlong.
-               
-               jkerihuel.
-       [r46]
-               - Add a preliminary NspiUpdateStat IDL
-               - Fix the new server code convention naming 
-               (function prefixed with dcesrv_)
-               - Fix a security bug in emsabp provider code
-               
-               jkerihuel.
-       [r45]
-               Fix the allocation memory for the EcDoRpc_{MAPI_REQ,MAPI_REPL} pointer.
-               
-               jkerihuel.
-       [r44]
-               Add SetProps [out] support.
-               
-               Temporary allocation pb fixed in ndr_pull_mapi_response.
-               Final fix in next commit.
-               
-               jkerihuel.
-2007-01-31
-    jkerihuel
-       [r43]
-               Fix the SetProps [in] IDL
-               
-               New mapi call support added:
-               - ModifyRecipients [in,out]
-               - SubmitMessage [in,out]
-               
-               jkerihuel.
-       [r42]
-               Add IDL support for the following mapi calls:
-               
-               [in] CreateMessage
-               [in] SetProps
-               
-               The SetProps IDL is still experimental and the
-               content blob should be decoded more than the current 
-               IDL does.
-               
-               jkerihuel.
-2007-01-30
-    jkerihuel
-       [r41]
-               Fix the align problem in QueryRows reply blob
-               Add some printing output and clean useless DEBUG.
-               
-               jkerihuel.
-2007-01-29
-    jkerihuel
-       [r40]
-               Fix the OpenMessage IDL and add ndr_print support
-               to the MAPI-FETCHMAIL torture test so we can
-               read information.
-               
-               jkerihuel.
-       [r39]
-               Commit of the first experimental but working implementation
-               of the MAPI-FETCHMAIL torture test able to retrieve mails
-               from an Exchange Server.
-               
-               jkerihuel.
-       [r38]
-               - Add a preview implementation of cached data system for multi MAPI calls requests
-               - Add SetColumns and QueryRows calls to mapi.c + mapi_fetchmail torture test
-               - Enhance some MAPI calls IDL
-               - Fix some pull/print functions according to error_code and row_count values
-               
-               jkerihuel.
-2007-01-28
-    jkerihuel
-       [r37]
-               Manual handling of EcDoRpc_MAPI_REPL pull and print function.
-               When a mapi call returns an error_code different from MAPI_E_SUCCESS,
-               we have to stop processing the function IDL since no parameters follow.
-               
-               jkerihuel.
-       [r36]
-               add MAPISTATUS to EcDoRpc_MAPI_REPL
-               add mapi library code for:
-               - OpenFolder
-               - Release
-               - GetContentsTable
-               - GetReceiveFolder
-               
-               add mapi calls described above to MAPI-FETCHMAIL torture test
-               
-               jkerihuel.
-       [r35]
-               add mapi_response to emsmdb_transaction so we can get the results
-               check the mapi call error core in OpenMsgStore
-               
-               jkerihuel.
-       [r34]
-               Add MAPISTATUS field in each mapi calls
-               Add new MAPICODE (MAPI_E_CALL_FAILED)
-               
-               jkerihuel.
-       [r33]
-               Fix the mapi_request push function
-               Add a first approach to the MAPI client side library
-               Add a first approach of the MAPI-FETCHMAIL torture test
-               Fix the smb.conf.example with new fields and remove Samba4 unused ones
-               
-               jkerihuel.
-2007-01-27
-    jkerihuel
-       [r32]
-               Initial mapidump commit
-               OpenMessage IDL fixed
-               
-               jkerihuel.
-2007-01-24
-    jkerihuel
-       [r31]
-               Unused and dummy code removed
-               
-               jkerihuel
-       [r30]
-               - Remove the MAPI decoding TDR layer and associated functions
-               - Add MAPI decoding in exchange.idl at NDR layer
-               - mapi_request / mapi_response pull/print ok
-               - implement subcontext for async response decoding in
-               some EcDoRpc IDLs.
-               - new MAPITAGS added related to Message envelope properties
-               - clean up the code and remove unused files
-               
-               - Add new MAPI opnums and associated IDL:
-                       * [in]     Release          (opnum=0x1)
-                       * [in,out] OpenFolder       (opnum=0x2)
-                       * [in,out] OpenMessage      (opnum=0x3)
-                       * [in,out] GetContentsTable (opnum=0x5)
-                       * [in,out] GetProps         (opnum=0x7)
-                       * [in,out] Secolumns        (opnum=0x12)
-                       * [in,out] QueryRows        (opnum=0x15)
-                       * [in,out] GetReceiveFolder (opnum=0x27)
-                       * [in,out] OpenMsgStore     (opnum=0xFE)
-               
-               ** WARNING  **
-               
-               1. Assumption
-               ==============
-               For IDL with unknown fields followed the IDL may 
-               change and the mapping of these unknown bytes incorrect. 
-               It's just based on assumptions and results of the different
-               wireshark captures.
-               
-               2. Broken Code
-               ==============
-               - The mapi_request / mapi_response pull function
-               - emsmdb torture tests and libmapi/emsmdb.c
-               
-               All this code is currently broken and will be fixed
-               when we start writing the new emsmdb torture suite
-               using the new API.
-               
-               
-               jkerihuel
-2007-01-22
-    jkerihuel
-       [r29]
-               Fix ndr_pull_MAPI_DATA function
-               
-               jkerihuel.
-       [r28]
-               - Add new mapi opnums
-               - Add a first IDL implementation for OpenMsgStore out
-               
-               jkerihuel.
-       [r27]
-               - Enhance the handles id support in MAPI_DATA
-               - Remove unused code
-               
-               EMSMDB encoding/decoding is currently broken.
-               It will be fixed when we start the client side
-               mapi library implementation.
-               
-               jkerihuel.
-2007-01-21
-    jkerihuel
-       [r26]
-               - Change IMAPISession.idl to mapi.idl
-               - enhance mapi content payload decoding (multiple calls supported)
-               - add sub EcDoRpc opnums and IDL for setcolumns (in)
-               
-               jkerihuel
-    pkhun
-       [r25]
-               
-               - memory leak fixed
-               - new function on emsabp provider for entry id generation
-               
-               pkhun
-2006-12-27
-    jkerihuel
-       [r24]
-               Old mapitables code deleted and merge of the samdb
-               code used in openchange (emsabp_result_guid function).
-               
-               The following revision compiles and work fine with
-               Samba4 revision 20341
-               
-               jkerihuel.
-2006-12-17
-    pkhun
-       [r23]
-               
-               Instance keys management changed (we now use struct instance_key and uint32_t instead of an array of 4 uint8_t)
-               
-               pkhun
-2006-12-15
-    jkerihuel
-       [r22]
-               - Fix compilation warnings based on patches provided 
-               by Stefan Huehner <stefan@huehner.org>
-               - Fix the DSO issue for x64 platforms
-               - Add the evolution plugin in the compilation process
-               - remove the mapidump code (obsolete and replaced with ndrdump usage)
-               
-               jkerihuel.
-2006-12-13
-    jkerihuel
-       [r21]
-               evolution plugin moved into client/evolution for
-               a correct and extensible naming convention.
-               
-               EcDoRpc IDL modified:
-               - opnum are now 8 bits
-               - action enum added 
-               - EcDoRpc ndrdump output enhanced
-               
-               IMAPISession IDL modified:
-               - Change OpenMsgStore function name to MAPI_RPC_LOGON
-               for the 0xFE opnum operation.
-               
-               Fix warnings in the code.
-               
-               jkerihuel.
-2006-12-09
-    loic
-       [r20]
-               Openchange-Evolution plugin commit
-               I reorganized openchange evolution plugin source tree.
-               Now we have one directory for the camel-openchange provider, and one for the openchange eplugin.
-               Everything can be found in the oc-evolution directory.
-               This is code a minimalist implementation of the camel provider for evolution.
-               It will make appears an openchange server type in the server list handled by evolution.
-               Still have to fix the ./configure to create a Makefile though.
-2006-12-05
-    jkerihuel
-       [r19]
-               Fix the memory allocation problems in the emsmdb torture test
-2006-12-03
-    jkerihuel
-       [r17]
-               Removed ascstr and directly add it to the IDL
-       [r16]
-               Fix the NspiQueryRows response where strings
-               containing the user email address have to be
-               NULL terminated.
-               
-               The EMSABP provider is working ;-)
-    pkhun
-       [r18]
-               
-               The emsabp provider is now able to return multiple users
-               when searching for part of a username.
-               
-               pkhun
-2006-11-30
-    jkerihuel
-       [r15]
-               Fix the networkAddress binding strings for the
-               Exchange object in the configuration db. The
-               SERVER variable based on exchange:server had
-               been added while we needed the NETBIOSNAME one
-               
-               Fix a segmentation fault in emsabp.c due to an
-               unchecked pointer res->msgs. This was causing
-               smbd to segfault when the supplied legacyExchangeDN
-               sent by the user wasn't present in the database.
-               
-               jkerihuel
-2006-11-27
-    jkerihuel
-       [r14]
-               Remove unused files and directory.
-               Update Makefile.in and remove storedb compilation
-               rules.
-    pkhun
-       [r13]
-               
-               Fixed :
-               - NspiQueryRows
-               - NspiDNToEph
-               - NspiGetProps
-               - provisioning (for the legacyExchangeDN of the server entry)
-2006-11-26
-    jkerihuel
-       [r11]
-               Fix the build and remove dynconfig samba lib
-               dependency.
-               
-               jkerihuel
-    pkhun
-       [r12]
-               Unused ldif files removed + Schemas definitions updated
-               
-               pkhun
-       [r10]
-               Provisionning fixed (old ldif files cleaned)
-               
-               pkhun
-2006-11-22
-    jkerihuel
-       [r9]
-               add tags rules to the Makefile
-               
-               jkerihuel.
-       [r8]
-               add the \\pipe\\protected_storage named pipe
-               to exchange_nsp bindings
-               
-               jkerihuel.
-2006-11-21
-    jkerihuel
-       [r7]
-               Add a dcerpc_server module in charge of the 
-               exchange interfaces registration. When this module
-               is loaded prior the remote endpoint, it let us proxify 
-               the exchange_nsp and exchange_emsmdb ones.
-               
-               Change the exchange_nsp ncacn_np binding string to
-               reflect how Exchange server is currently using it.
-               
-               Conform the IDL with latest pidl requirements and
-               move the MAPI_DATA structure from exchange_nsp to
-               exchange_emsmdb.
-               
-               jkerihuel
-2006-11-14
-    jkerihuel
-       [r6]
-               Create the $prefix/modules/{dcerpc_server,torture}
-               directories.
-               
-               This fix openchange make install rule.
-               
-               jkerihuel.
-       [r5]
-               This commit conforms openchange with the Samba4
-               trunk and fix the autotools checks.
-               
-               I've modified the openchange torture file to
-               match the current smbtorture API and the
-               OPENCHANGE-NSPI-PROFILE test was successful.
-               
-               The NSPI ndrdump suite has fully been tested and
-               works correctly.
-               
-               jkerihuel.
-2006-11-05
-    jkerihuel
-       [r3]
-               This commit fix the build system:
-               - add the -ldynconfig dependency to LDFLAGS
-               - add header checks in configure.ac. We need them
-               for the moment cause Samba4 doesn't install some headers
-               required by openchange core
-               - fix the make install
-               
-               - remove autotools generated files and definitively
-               ignore them with the .svnignore file
-               
-               - keepref keyword removed from exchange_nsp interface
-               
-               jkerihuel.
-    pkhun
-       [r4]
-               + aclocal.m4 removed from repository
-               + provisionning fixed
-               
-               pkhun.
diff --git a/branches/plugfest/Doxyfile.in b/branches/plugfest/Doxyfile.in
deleted file mode 100644 (file)
index 87039e7..0000000
+++ /dev/null
@@ -1,1267 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = OpenChange
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = .
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =  *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c *_private.h
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed \
-                        -e 's/.*\<libmapi\/proto_private.h\>//'        \
-                        -e 's/.*\<gen_ndr\/ndr_exchange.h\>//'         \
-                        -e 's/.*\<param.h\>//'                         \
-                        -e 's/.*\<core\/error.h\>//'                   \
-                        -e 's/.*\<credentials.h\>//'                   \
-                        -e 's/.*\<ldb.h\>//'                           \
-                        -e 's/.*\<ldb_errors.h\>//'                    \
-                        -e 's/.*\<libmapi\/dlinklist.h\>//'            \
-                        -e 's/.*\<libmapi\/mapi_nameid.h\>//'          \
-                        -e 's/.*\<libmapi\/mapi_nameid_private.h\>//'  \
-                        -e 's/.*\<libocpf\/proto_private.h\>//'        \
-                        -e 's/.*\<libocpf\/ocpf_api.h\>//'             \
-                        -e 's/.*\<libocpf\/ocpf.tab.h\>//'             \
-                        -e 's/.*\<libgen.h\>//'                        \
-                        -e 's/.*\<time.h\>//'                          \
-                        -e 's/.*\<sys\/*\>//'                          \
-                         -e 's/_PUBLIC_//'"
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/overview
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/IDL_LICENSE.txt b/branches/plugfest/IDL_LICENSE.txt
deleted file mode 100644 (file)
index 6a965ad..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-The IDL files in this directory are made available by the OpenChange Team
-under the following license:
-
-  Permission to use, copy, modify, and distribute these interface
-  definitions for any purpose is hereby granted without fee.
-
-  This work is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/branches/plugfest/Mainpage.doxy b/branches/plugfest/Mainpage.doxy
deleted file mode 100644 (file)
index 34b3dde..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/** @mainpage The OpenChange Library API Reference
-
-This is the online reference for developing with the OpenChange client
-libraries.
-
-Among other things, the OpenChange client libraries provide:
-- MAPI client library (<a href="../libmapi/index.html">libmapi</a>)
-- MAPI administration libraries (<a href="../libmapiadmin/index.html">libmapiadmin</a>)
-- OpenChange Property Files (<a href="../libocpf/index.html">libocpf</a>)
-- A regression test framework (<a href="../mapitest/index.html">mapitest</a>)
-- MAPIProxy project (<a href="../mapiproxy/index.html">mapiproxy</a>)
-- C++ bindings for libmapi (<a href="../libmapi++/index.html">libmapi++</a>)
-
-<h2>OpenChange Project Goals</h2>
-
-The OpenChange Project aims to provide a portable Open Source
-implementation of Microsoft Exchange Server and Exchange
-protocols. Exchange is a groupware server designed to work with
-Microsoft Outlook, and providing features such as a messaging server,
-shared calendars, contact databases, public folders, notes and tasks.
-
-The OpenChange project has three goals:
-
-- To provide a library for interoperability with Exchange
-protocols, and to assist implementors to use this to create
-groupware that interoperates with both Exchange and other
-OpenChange-based software.
-
-- To provide an alternative to Microsoft Exchange Server which uses
-native Exchange protocols and provides exactly equivalent
-functionality when viewed from Microsoft Outlook clients.
-
-- To develop a body of knowledge about the most popular groupware
-protocols in use commercially today in order to promote  development
-of a documented and unencumbered standard, with all the  benefits that
-standards bring.
-
-<h2>More information</h2>
-
-Visit the <a href="http://www.openchange.org">OpenChange web site</a> for
-other useful information.
-
-*/
diff --git a/branches/plugfest/Makefile b/branches/plugfest/Makefile
deleted file mode 100644 (file)
index f7c9a96..0000000
+++ /dev/null
@@ -1,1731 +0,0 @@
-# # Makefile for OpenChange
-# Written by Jelmer Vernooij <jelmer@openchange.org>, 2005.
-
-default: all
-
-# Until we add proper dependencies for all the C files:
-.NOTPARALLEL:
-
-config.mk: config.status config.mk.in
-       ./config.status
-
-config.status: configure
-       ./configure
-
-configure: configure.ac
-       ./autogen.sh
-
-samba:
-       ./script/installsamba4.sh all
-
-samba-git: 
-       ./script/installsamba4.sh git-all
-
-samba-git-update:
-       ./script/installsamba4.sh git-update
-
-ifneq ($(MAKECMDGOALS), samba)
-ifneq ($(MAKECMDGOALS), samba-git)
-include config.mk
-endif
-endif
-
-#################################################################
-# top level compilation rules
-#################################################################
-
-all:           $(OC_IDL)               \
-               $(OC_LIBS)              \
-               $(OC_TOOLS)             \
-               $(OC_SERVER)            \
-               $(PYMAPIALL)            \
-               $(COVERAGE_INIT)        \
-               $(OPENCHANGE_QT4)
-
-install:       all                     \
-               installlib              \
-               installpc               \
-               installheader           \
-               $(OC_TOOLS_INSTALL)     \
-               $(OC_SERVER_INSTALL)    \
-               $(PYMAPIINSTALL) \
-               installnagios
-
-installlib:    $(OC_LIBS_INSTALL)
-installpc:     $(OC_LIBS_INSTALLPC)
-installheader: $(OC_LIBS_INSTALLHEADERS)
-
-uninstall::    $(OC_LIBS_UNINSTALL)    \
-               $(OC_TOOLS_UNINSTALL)   \
-               $(OC_SERVER_UNINSTALL)  \
-               $(PYMAPIUNINSTALL)
-
-dist:: distclean
-       ./autogen.sh
-
-distclean:: clean
-       rm -rf autom4te.cache
-       rm -f Doxyfile
-       rm -f libmapi/Doxyfile
-       rm -f libmapiadmin/Doxyfile
-       rm -f libocpf/Doxyfile
-       rm -f libmapi++/Doxyfile
-       rm -f mapiproxy/Doxyfile
-       rm -f config.status config.log
-       rm -f config.h
-       rm -f stamp-h1
-       rm -f utils/mapitest/Doxyfile
-       rm -f intltool-extract intltool-merge intltool-update
-       rm -rf apidocs
-       rm -rf gen_ndr
-       rm -f tags
-
-clean::
-       rm -f *~
-       rm -f */*~
-       rm -f */*/*~
-       rm -f doc/examples/mapi_sample1
-       rm -f doc/examples/fetchappointment
-       rm -f doc/examples/fetchmail
-
-re:: clean install
-
-#################################################################
-# Suffixes compilation rules
-#################################################################
-
-.SUFFIXES: .c .o .h .po .idl .cpp
-
-.idl.h:
-       @echo "Generating $@"
-       @$(PIDL) --outputdir=gen_ndr --header -- $<
-
-.c.o:
-       @echo "Compiling $<"
-       @$(CC) $(CFLAGS) -c $< -o $@
-
-.c.po:
-       @echo "Compiling $< with -fPIC"
-       @$(CC) $(CFLAGS) -fPIC -c $< -o $@
-
-.cpp.o:
-       @echo "Compiling $< with -fPIC"
-       @$(CXX) $(CXXFLAGS) $(QT4_CXXFLAGS) -fPIC -c $< -o $@
-
-.cpp.po:
-       @echo "Compiling $< with -fPIC"
-       @$(CXX) $(CXXFLAGS) -fPIC -c $< -o $@
-
-#################################################################
-# IDL compilation rules
-#################################################################
-
-idl: gen_ndr gen_ndr/ndr_exchange.h gen_ndr/ndr_property.h
-
-exchange.idl: mapitags_enum.h mapicodes_enum.h
-
-gen_ndr:
-       @echo "Creating the gen_ndr directory"
-       mkdir -p gen_ndr
-
-gen_ndr/ndr_%.h gen_ndr/ndr_%.c: %.idl %.h
-       @echo "Generating $@"
-       @$(PIDL) --outputdir=gen_ndr --ndr-parser -- $<
-
-gen_ndr/ndr_%_c.h gen_ndr/ndr_%_c.c: %.idl %.h
-       @echo "Generating $@"
-       @$(PIDL) --outputdir=gen_ndr --client -- $<
-
-gen_ndr/ndr_%_s.c: %.idl
-       @echo "Generating $@"
-       @$(PIDL) --outputdir=gen_ndr --server -- $<
-
-
-
-#################################################################
-# libmapi compilation rules
-#################################################################
-
-LIBMAPI_SO_VERSION = 0
-
-libmapi:       idl                                     \
-               libmapi/version.h                       \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)  
-
-libmapi-install:       libmapi                 \
-                       libmapi-installpc       \
-                       libmapi-installlib      \
-                       libmapi-installheader   \
-                       libmapi-installscript
-
-libmapi-uninstall:     libmapi-uninstallpc     \
-                       libmapi-uninstalllib    \
-                       libmapi-uninstallheader \
-                       libmapi-uninstallscript
-
-libmapi-clean::
-       rm -f libmapi/*.o libmapi/*.po
-       rm -f libmapi/*.gcno libmapi/*.gcda libmapi/*.gcov
-       rm -f libmapi/socket/*.o libmapi/socket/*.po
-       rm -f libmapi/socket/*.gcno libmapi/socket/*.gcda
-       rm -f libmapi/version.h
-ifneq ($(SNAPSHOT), no)
-       rm -f libmapi/mapicode.c
-       rm -f libmapi/mapitags.c libmapi/mapitags.h
-       rm -f libmapi/codepage_lcid.c
-       rm -f libmapi/mapi_nameid.h libmapi/mapi_nameid_private.h
-       rm -f mapicodes_enum.h
-       rm -f mapitags_enum.h
-endif
-       rm -f gen_ndr/ndr_exchange*
-       rm -f gen_ndr/exchange.h
-       rm -f gen_ndr/ndr_property*
-       rm -f gen_ndr/property.h
-       rm -f ndr_mapi.o ndr_mapi.po
-       rm -f ndr_mapi.gcno ndr_mapi.gcda
-       rm -f *~
-       rm -f */*~
-       rm -f */*/*~
-       rm -f libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION) \
-                 libmapi.$(SHLIBEXT)
-
-clean:: libmapi-clean
-
-libmapi-distclean::
-       rm -f libmapi.pc
-
-distclean:: libmapi-distclean
-
-libmapi-installpc:
-       @echo "[*] install: libmapi pc files"
-       $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 0644 libmapi.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libmapi-installlib:
-       @echo "[*] install: libmapi library"
-       $(INSTALL) -d $(DESTDIR)$(libdir)
-       $(INSTALL) -m 0755 libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi.$(SHLIBEXT)
-ifeq ($(MANUALLY_CREATE_SYMLINKS), yes)
-       ln -sf libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
-endif
-
-libmapi-installheader:
-       @echo "[*] install: libmapi headers"
-       $(INSTALL) -d $(DESTDIR)$(includedir)/libmapi 
-       $(INSTALL) -d $(DESTDIR)$(includedir)/libmapi/socket 
-       $(INSTALL) -d $(DESTDIR)$(includedir)/gen_ndr
-       $(INSTALL) -m 0644 libmapi/libmapi.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/nspi.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/emsmdb.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_context.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_provider.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_id_array.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_notification.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_object.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_profile.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapi_nameid.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapidefs.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/version.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/mapicode.h $(DESTDIR)$(includedir)/libmapi/
-       $(INSTALL) -m 0644 libmapi/socket/netif.h $(DESTDIR)$(includedir)/libmapi/socket/
-       $(INSTALL) -m 0644 gen_ndr/exchange.h $(DESTDIR)$(includedir)/gen_ndr/
-       $(INSTALL) -m 0644 gen_ndr/property.h $(DESTDIR)$(includedir)/gen_ndr/
-       @$(SED) $(DESTDIR)$(includedir)/libmapi/*.h
-       @$(SED) $(DESTDIR)$(includedir)/libmapi/socket/*.h
-       @$(SED) $(DESTDIR)$(includedir)/gen_ndr/*.h
-
-libmapi-installscript:
-       $(INSTALL) -d $(DESTDIR)$(datadir)/setup/profiles
-       $(INSTALL) -m 0644 setup/profiles/oc_profiles* $(DESTDIR)$(datadir)/setup/profiles/
-
-libmapi-uninstallpc:
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapi.pc
-
-libmapi-uninstalllib:
-       rm -f $(DESTDIR)$(libdir)/libmapi.*
-
-libmapi-uninstallheader:
-       rm -rf $(DESTDIR)$(includedir)/libmapi
-       rm -f $(DESTDIR)$(includedir)/gen_ndr/exchange.h
-       rm -f $(DESTDIR)$(includedir)/gen_ndr/property.h
-
-libmapi-uninstallscript:
-       rm -f $(DESTDIR)$(datadir)/setup/profiles/oc_profiles*
-       rm -rf $(DESTDIR)$(datadir)/setup/profiles
-
-libmapi.$(SHLIBEXT).$(PACKAGE_VERSION):                \
-       libmapi/emsmdb.po                               \
-       libmapi/async_emsmdb.po                         \
-       libmapi/IABContainer.po                         \
-       libmapi/IProfAdmin.po                           \
-       libmapi/IMAPIContainer.po                       \
-       libmapi/IMAPIFolder.po                          \
-       libmapi/IMAPIProp.po                            \
-       libmapi/IMAPISession.po                         \
-       libmapi/IMAPISupport.po                         \
-       libmapi/IStream.po                              \
-       libmapi/IMAPITable.po                           \
-       libmapi/IMessage.po                             \
-       libmapi/IMsgStore.po                            \
-       libmapi/IStoreFolder.po                         \
-       libmapi/IUnknown.po                             \
-       libmapi/IMSProvider.po                          \
-       libmapi/IXPLogon.po                             \
-       libmapi/FXICS.po                                \
-       libmapi/utils.po                                \
-       libmapi/property.po                             \
-       libmapi/cdo_mapi.po                             \
-       libmapi/lzfu.po                                 \
-       libmapi/mapi_object.po                          \
-       libmapi/mapi_id_array.po                        \
-       libmapi/mapitags.po                             \
-       libmapi/mapidump.po                             \
-       libmapi/mapicode.po                             \
-       libmapi/codepage_lcid.po                        \
-       libmapi/mapi_nameid.po                          \
-       libmapi/nspi.po                                 \
-       libmapi/simple_mapi.po                          \
-       libmapi/freebusy.po                             \
-       libmapi/x500.po                                 \
-       libmapi/fxparser.po                             \
-       ndr_mapi.po                                     \
-       gen_ndr/ndr_exchange.po                         \
-       gen_ndr/ndr_exchange_c.po                       \
-       gen_ndr/ndr_property.po                         \
-       libmapi/socket/interface.po                     \
-       libmapi/socket/netif.po                         
-       @echo "Linking $@"
-       @$(CC) $(DSOOPT) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION) -o $@ $^ $(LIBS)
-
-
-libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION): libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       ln -fs $< $@
-
-libmapi/version.h: VERSION
-       @./script/mkversion.sh  VERSION libmapi/version.h $(PACKAGE_VERSION) $(top_builddir)/
-
-libmapi/emsmdb.c: libmapi/emsmdb.h gen_ndr/ndr_exchange_c.h
-
-libmapi/async_emsmdb.c: libmapi/emsmdb.h gen_ndr/ndr_exchange_c.h
-
-libmapi/mapitags.c libmapi/mapicode.c libmapi/codepage_lcid.c mapitags_enum.h mapicodes_enum.h: \
-       libmapi/conf/mapi-properties                                                            \
-       libmapi/conf/mapi-codes                                                                 \
-       libmapi/conf/mapi-named-properties                                                      \
-       libmapi/conf/codepage-lcid                                                              \
-       libmapi/conf/mparse.pl
-       @./libmapi/conf/build.sh
-
-#################################################################
-# libmapi++ compilation rules
-#################################################################
-
-LIBMAPIPP_SO_VERSION = 0
-
-libmapixx: libmapi \
-       libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-       libmapixx-tests \
-       libmapixx-examples
-
-libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION):      \
-       libmapi++/src/attachment.po             \
-       libmapi++/src/folder.po                 \
-       libmapi++/src/mapi_exception.po         \
-       libmapi++/src/message.po                \
-       libmapi++/src/object.po                 \
-       libmapi++/src/profile.po                \
-       libmapi++/src/session.po
-       @echo "Linking $@"
-       @$(CXX) $(DSOOPT) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libmapipp.$(SHLIBEXT).$(LIBMAPIPP_SO_VERSION) -o $@ $^ $(LIBS)
-
-libmapixx-installpc:
-       @echo "[*] install: libmapi++ pc files"
-       $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 0644 libmapi++.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libmapixx-distclean:
-       rm -f libmapi++.pc
-
-libmapixx-uninstallpc:
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapi++.pc
-
-distclean::libmapixx-distclean
-
-clean:: libmapixx-clean
-
-libmapixx-install: libmapixx-installheader libmapixx-installlib libmapixx-installpc
-
-libmapixx-uninstall: libmapixx-uninstallheader libmapixx-uninstalllib libmapixx-uninstallpc
-
-libmapixx-installheader:
-       @echo "[*] install: libmapi++ headers"
-       $(INSTALL) -d $(DESTDIR)$(includedir)/libmapi++
-       $(INSTALL) -m 0644 libmapi++/attachment.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/clibmapi.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/folder.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/libmapi++.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/mapi_exception.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/message.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/message_store.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/object.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/profile.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/property_container.h $(DESTDIR)$(includedir)/libmapi++/
-       $(INSTALL) -m 0644 libmapi++/session.h $(DESTDIR)$(includedir)/libmapi++/
-       @$(SED) $(DESTDIR)$(includedir)/libmapi++/*.h
-
-libmapixx-libs-clean:
-       rm -f libmapi++/src/*.po
-       rm -f libmapipp.$(SHLIBEXT)*
-       rm -f libmapi++/src/*.gcno libmapi++/src/*.gcda
-
-libmapixx-clean: libmapixx-tests-clean libmapixx-libs-clean
-
-libmapixx-installlib:
-       @echo "[*] install: libmapi++ library"
-       $(INSTALL) -d $(DESTDIR)$(libdir)
-       $(INSTALL) -m 0755 libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapipp.$(SHLIBEXT)
-ifeq ($(MANUALLY_CREATE_SYMLINKS), yes)
-       ln -sf libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapipp.$(SHLIBEXT).$(LIBMAPIPP_SO_VERSION)
-endif
-
-libmapixx-uninstallheader:
-       rm -rf $(DESTDIR)$(includedir)/libmapi++
-
-libmapixx-uninstalllib:
-       rm -f $(DESTDIR)$(libdir)/libmapipp.*
-
-libmapixx-tests:       libmapixx-test          \
-                       libmapixx-attach        \
-                       libmapixx-exception     \
-                       libmapixx-profiletest
-
-libmapixx-tests-clean: libmapixx-test-clean            \
-                       libmapixx-attach-clean          \
-                       libmapixx-exception-clean       \
-                       libmapixx-profiletest-clean
-
-libmapixx-test: bin/libmapixx-test
-
-libmapixx-test-clean:
-       rm -f bin/libmapixx-test
-       rm -f libmapi++/tests/*.o
-
-clean:: libmapixx-tests-clean
-
-bin/libmapixx-test:    libmapi++/tests/test.cpp        \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking sample application $@"
-       @$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 
-
-clean:: libmapixx-test-clean
-
-libmapixx-attach: bin/libmapixx-attach
-
-libmapixx-attach-clean:
-       rm -f bin/libmapixx-attach
-       rm -f libmapi++/tests/*.po
-       rm -f libmapi++/tests/*.gcno libmapi++/tests/*.gcda
-
-bin/libmapixx-attach: libmapi++/tests/attach_test.po   \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking sample application $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-clean:: libmapixx-attach-clean
-
-libmapixx-exception: bin/libmapixx-exception
-bin/libmapixx-exception: libmapi++/tests/exception_test.cpp \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking exception test application $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-libmapixx-exception-clean:
-       rm -f bin/libmapixx-exception
-       rm -f libmapi++/tests/*.o
-       rm -f libmapi++/tests/*.gcno libmapi++/tests/*.gcda
-
-clean:: libmapixx-exception-clean
-
-libmapixx-profiletest: bin/libmapixx-profiletest
-
-libmapixx-profiletest-clean:
-       rm -f bin/libmapixx-profiletest
-       rm -f libmapi++/tests/*.po
-       rm -f libmapi++/tests/*.gcno libmapi++/tests/*.gcda
-
-bin/libmapixx-profiletest: libmapi++/tests/profile_test.po     \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking profile test application $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-clean:: libmapixx-profiletest-clean
-
-libmapixx-examples: libmapi++/examples/foldertree \
-                 libmapi++/examples/messages
-
-libmapixx-foldertree-clean:
-       rm -f libmapi++/examples/foldertree
-       rm -f libmapi++/examples/*.o
-       rm -f libmapi++/examples/*.gcno libmapi++/examples/*.gcda
-
-libmapixx-messages-clean:
-       rm -f libmapi++/examples/messages
-       rm -f libmapi++/examples/*.o
-       rm -f libmapi++/examples/*.gcno libmapi++/examples/*.gcda
-
-libmapi++/examples/foldertree: libmapi++/examples/foldertree.cpp       \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking foldertree example application $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-clean:: libmapixx-foldertree-clean
-
-libmapi++/examples/messages: libmapi++/examples/messages.cpp   \
-               libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking messages example application $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-clean:: libmapixx-messages-clean
-
-#################################################################
-# libmapiadmin compilation rules
-#################################################################
-
-LIBMAPIADMIN_SO_VERSION = 0
-
-libmapiadmin:          libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-libmapiadmin-install:  libmapiadmin-installpc          \
-                       libmapiadmin-installlib         \
-                       libmapiadmin-installheader
-
-libmapiadmin-uninstall:        libmapiadmin-uninstallpc        \
-                       libmapiadmin-uninstalllib       \
-                       libmapiadmin-uninstallheader
-
-libmapiadmin-clean::
-       rm -f libmapiadmin/*.o libmapiadmin/*.po
-       rm -f libmapiadmin/*.gcno libmapiadmin/*.gcda
-       rm -f libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) \
-                 libmapiadmin.$(SHLIBEXT)
-
-clean:: libmapiadmin-clean
-
-libmapiadmin-distclean::
-       rm -f libmapiadmin.pc
-
-distclean:: libmapiadmin-distclean
-
-libmapiadmin-installpc:
-       @echo "[*] install: libmapiadmin pc files"
-       $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 0644 libmapiadmin.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libmapiadmin-installlib:
-       @echo "[*] install: libmapiadmin library"
-       $(INSTALL) -d $(DESTDIR)$(libdir)
-       $(INSTALL) -m 0755 libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapiadmin.$(SHLIBEXT)
-ifeq ($(MANUALLY_CREATE_SYMLINKS), yes)
-       ln -sf libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION)
-endif
-
-libmapiadmin-installheader:
-       @echo "[*] install: libmapiadmin headers"
-       $(INSTALL) -d $(DESTDIR)$(includedir)/libmapiadmin 
-       $(INSTALL) -m 0644 libmapiadmin/libmapiadmin.h $(DESTDIR)$(includedir)/libmapiadmin/
-       @$(SED) $(DESTDIR)$(includedir)/libmapiadmin/*.h
-
-libmapiadmin-uninstallpc:
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapiadmin.pc
-
-libmapiadmin-uninstalllib:
-       rm -f $(DESTDIR)$(libdir)/libmapiadmin.*
-
-libmapiadmin-uninstallheader:
-       rm -rf $(DESTDIR)$(includedir)/libmapiadmin
-
-libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION):   \
-       libmapiadmin/mapiadmin_user.po          \
-       libmapiadmin/mapiadmin.po               \
-       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) -o $@ $^ $(LIBS) $(LIBMAPIADMIN_LIBS) 
-
-
-
-#################################################################
-# libocpf compilation rules
-#################################################################
-
-LIBOCPF_SO_VERSION = 0
-
-libocpf:               libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-libocpf-install:       libocpf-installpc       \
-                       libocpf-installlib      \
-                       libocpf-installheader   
-
-libocpf-uninstall:     libocpf-uninstallpc     \
-                       libocpf-uninstalllib    \
-                       libocpf-uninstallheader 
-
-libocpf-clean::
-       rm -f libocpf/*.o libocpf/*.po
-       rm -f libocpf/*.gcno libocpf/*.gcda
-ifneq ($(SNAPSHOT), no)
-       rm -f libocpf/lex.yy.c
-       rm -f libocpf/ocpf.tab.c libocpf/ocpf.tab.h
-endif
-       rm -f libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) \
-                 libocpf.$(SHLIBEXT)
-
-clean:: libocpf-clean
-
-libocpf-distclean::
-       rm -f libocpf.pc
-
-distclean:: libocpf-distclean
-
-libocpf-installpc:
-       @echo "[*] install: libocpf pc files"
-       $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 0644 libocpf.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libocpf-installlib:
-       @echo "[*] install: libocpf library"
-       $(INSTALL) -d $(DESTDIR)$(libdir)
-       $(INSTALL) -m 0755 libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libocpf.$(SHLIBEXT)
-ifeq ($(MANUALLY_CREATE_SYMLINKS), yes)
-       ln -sf libocpf.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION)
-endif
-
-libocpf-installheader:
-       @echo "[*] install: libocpf headers"
-       $(INSTALL) -d $(DESTDIR)$(includedir)/libocpf
-       $(INSTALL) -m 0644 libocpf/ocpf.h $(DESTDIR)$(includedir)/libocpf/
-       @$(SED) $(DESTDIR)$(includedir)/libocpf/*.h
-
-libocpf-uninstallpc:
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libocpf.pc
-
-libocpf-uninstalllib:
-       rm -f $(DESTDIR)$(libdir)/libocpf.*
-
-libocpf-uninstallheader:
-       rm -rf $(DESTDIR)$(includedir)/libocpf
-
-libocpf.$(SHLIBEXT).$(PACKAGE_VERSION):                \
-       libocpf/ocpf.tab.po                     \
-       libocpf/lex.yy.po                       \
-       libocpf/ocpf_context.po                 \
-       libocpf/ocpf_public.po                  \
-       libocpf/ocpf_server.po                  \
-       libocpf/ocpf_dump.po                    \
-       libocpf/ocpf_api.po                     \
-       libocpf/ocpf_write.po                   \
-       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) -o $@ $^ $(LIBS)
-
-libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION): libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
-       ln -fs $< $@
-
-libocpf/lex.yy.c:              libocpf/lex.l
-       @echo "Generating $@"
-       @$(FLEX) -t $< > $@
-
-libocpf/ocpf.tab.c:    libocpf/ocpf.y
-       @echo "Generating $@"
-       @$(BISON) -d $< -o $@
-
-# Avoid warnings
-libocpf/lex.yy.o: CFLAGS=
-libocpf/ocpf.tab.o: CFLAGS=
-
-#################################################################
-# mapiproxy compilation rules
-#################################################################
-LIBMAPIPROXY_SO_VERSION = 0
-LIBMAPISERVER_SO_VERSION = 0
-
-.PHONY: mapiproxy
-
-mapiproxy:             idl                                     \
-                       libmapiproxy                            \
-                       libmapiserver                           \
-                       libmapistore                            \
-                       mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT)  \
-                       mapiproxy-modules                       \
-                       mapiproxy-servers
-
-mapiproxy-install:     mapiproxy                               \
-                       mapiproxy-modules-install               \
-                       mapiproxy-servers-install               \
-                       libmapiproxy-install                    \
-                       libmapiserver-install                   \
-                       libmapistore-installpc                  \
-                       libmapistore-install
-       $(INSTALL) -d $(DESTDIR)$(SERVER_MODULESDIR)
-       $(INSTALL) -m 0755 mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT) $(DESTDIR)$(SERVER_MODULESDIR)
-
-mapiproxy-uninstall:   mapiproxy-modules-uninstall             \
-                       mapiproxy-servers-uninstall             \
-                       libmapiproxy-uninstall                  \
-                       libmapiserver-uninstall                 \
-                       libmapistore-uninstall
-       rm -f $(DESTDIR)$(SERVER_MODULESDIR)/dcesrv_mapiproxy.*
-       rm -f $(DESTDIR)$(libdir)/libmapiproxy.*
-       rm -f $(DESTDIR)$(includedir)/libmapiproxy.h
-
-mapiproxy-clean::      mapiproxy-modules-clean                 \
-                       mapiproxy-servers-clean                 \
-                       libmapiproxy-clean                      \
-                       libmapiserver-clean                     \
-                       libmapistore-clean
-       rm -f mapiproxy/*.o mapiproxy/*.po
-       rm -f mapiproxy/*.gcno mapiproxy/*.gcda
-       rm -f mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT)
-
-clean:: mapiproxy-clean
-
-
-mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT):        mapiproxy/dcesrv_mapiproxy.po           \
-                                               mapiproxy/dcesrv_mapiproxy_nspi.po      \
-                                               mapiproxy/dcesrv_mapiproxy_rfr.po       \
-                                               mapiproxy/dcesrv_mapiproxy_unused.po    \
-                                               ndr_mapi.po                             \
-                                               gen_ndr/ndr_exchange.po                         
-
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/dcesrv_mapiproxy.c: gen_ndr/ndr_exchange_s.c gen_ndr/ndr_exchange.c
-
-
-###############
-# libmapiproxy
-###############
-
-libmapiproxy: mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-libmapiproxy-install:
-       $(INSTALL) -m 0755 mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapiproxy.$(SHLIBEXT)
-       $(INSTALL) -m 0644 mapiproxy/libmapiproxy/libmapiproxy.h $(DESTDIR)$(includedir)/
-       $(INSTALL) -m 0644 mapiproxy/libmapiproxy.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libmapiproxy-clean:
-       rm -f mapiproxy/libmapiproxy/*.po mapiproxy/libmapiproxy/*.o
-       rm -f mapiproxy/libmapiproxy/*.gcno mapiproxy/libmapiproxy/*.gcda
-ifneq ($(SNAPSHOT), no)
-       rm -f mapiproxy/libmapiproxy/openchangedb_property.c
-endif
-       rm -f mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION)
-
-libmapiproxy-uninstall:
-       rm -f $(DESTDIR)$(libdir)/libmapiproxy.*
-       rm -f $(DESTDIR)$(includedir)/libmapiproxy.h
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapiproxy.pc
-
-libmapiproxy-distclean:
-       rm -f mapiproxy/libmapiproxy.pc
-
-distclean::libmapiproxy-distclean
-
-mapiproxy/libmapiproxy/openchangedb_property.c: libmapi/conf/mapi-properties libmapi/conf/mparse.pl
-       @./libmapi/conf/mparse.pl --parser=openchangedb_property --outputdir=mapiproxy/libmapiproxy/ \
-                                 libmapi/conf/mapi-properties
-
-mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION): mapiproxy/libmapiproxy/dcesrv_mapiproxy_module.po       \
-                                                       mapiproxy/libmapiproxy/dcesrv_mapiproxy_server.po       \
-                                                       mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.po      \
-                                                       mapiproxy/libmapiproxy/openchangedb.po                  \
-                                                       mapiproxy/libmapiproxy/openchangedb_property.po         \
-                                                       mapiproxy/libmapiproxy/mapi_handles.po                  \
-                                                       mapiproxy/libmapiproxy/entryid.po                       \
-                                                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION) $^ -L. $(LIBS) $(TDB_LIBS)
-
-mapiproxy/libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION): libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-       ln -fs $< $@
-
-
-#################
-# libmapiserver
-#################
-
-libmapiserver: mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-libmapiserver-install:
-       $(INSTALL) -m 0755 mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapiserver.$(SHLIBEXT)
-       $(INSTALL) -m 0644 mapiproxy/libmapiserver/libmapiserver.h $(DESTDIR)$(includedir)/
-       $(INSTALL) -m 0644 mapiproxy/libmapiserver.pc $(DESTDIR)$(libdir)/pkgconfig
-       @$(SED) $(DESTDIR)$(includedir)/*.h
-
-libmapiserver-clean:
-       rm -f mapiproxy/libmapiserver/*.po mapiproxy/libmapiserver/*.o
-       rm -f mapiproxy/libmapiserver/*.gcno mapiproxy/libmapiserver/*.gcda
-       rm -f mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapiserver.$(SHLIBEXT).$(LIBMAPISERVER_SO_VERSION)
-
-libmapiserver-uninstall:
-       rm -f $(DESTDIR)$(libdir)/libmapiserver.*
-       rm -f $(DESTDIR)$(includedir)/libmapiserver.h
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapiserver.pc
-
-libmapiserver-distclean:
-       rm -f mapiproxy/libmapiserver.pc
-
-distclean:: libmapiserver-distclean
-
-mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION):        mapiproxy/libmapiserver/libmapiserver_oxcstor.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcprpt.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcfold.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxctabl.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcmsg.po         \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcnotif.po       \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxomsg.po         \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxorule.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcperm.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcdata.po        \
-                                                       mapiproxy/libmapiserver/libmapiserver_oxcfxics.po       \
-                                                       ndr_mapi.po                             \
-                                                       gen_ndr/ndr_exchange.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiserver.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION) $^ $(LIBS)
-
-mapiproxy/libmapiserver.$(SHLIBEXT).$(LIBMAPISERVER_SO_VERSION): libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)
-       ln -fs $< $@
-
-
-################
-# libmapistore
-################
-LIBMAPISTORE_SO_VERSION = 0
-
-libmapistore:  mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)   \
-               setup/mapistore/mapistore_namedprops.ldif               \
-               $(OC_MAPISTORE)                                         \
-               $(MAPISTORE_TEST)
-
-libmapistore-installpc:
-       @echo "[*] install: libmapistore pc files"
-       $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 0644 mapiproxy/libmapistore.pc $(DESTDIR)$(libdir)/pkgconfig
-
-libmapistore-install:  $(OC_MAPISTORE_INSTALL)
-       $(INSTALL) -m 0755 mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)
-       ln -sf libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libmapistore.$(SHLIBEXT)
-       $(INSTALL) -d $(DESTDIR)$(includedir)/mapistore
-       $(INSTALL) -m 0644 mapiproxy/libmapistore/mapistore.h $(DESTDIR)$(includedir)/mapistore/
-       $(INSTALL) -m 0644 mapiproxy/libmapistore/mapistore_errors.h $(DESTDIR)$(includedir)/mapistore/
-       $(INSTALL) -m 0644 mapiproxy/libmapiserver.pc $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -d $(DESTDIR)$(datadir)/setup/mapistore
-       $(INSTALL) -m 0644 setup/mapistore/*.ldif $(DESTDIR)$(datadir)/setup/mapistore/
-       @$(SED) $(DESTDIR)$(includedir)/mapistore/*.h
-
-libmapistore-clean:    $(OC_MAPISTORE_CLEAN)
-       rm -f mapiproxy/libmapistore/*.po mapiproxy/libmapistore/*.o
-       rm -f mapiproxy/libmapistore/*.gcno mapiproxy/libmapistore/*.gcda
-       rm -f mapiproxy/libmapistore/database/*.po mapiproxy/libmapistore/database/*.o
-       rm -f mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       rm -f mapiproxy/libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)
-       rm -f setup/mapistore/mapistore_namedprops.ldif
-
-libmapistore-uninstall:        $(OC_MAPISTORE_UNINSTALL)
-       rm -f $(DESTDIR)$(libdir)/libmapistore.*
-       rm -rf $(DESTDIR)$(includedir)/mapistore
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapistore.pc
-       rm -rf $(DESTDIR)$(datadir)/setup/mapistore
-
-libmapistore-distclean: libmapistore-clean
-       rm -f mapiproxy/libmapistore.pc
-
-distclean:: libmapistore-distclean
-
-mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION):         mapiproxy/libmapistore/mapistore_interface.po           \
-                                                       mapiproxy/libmapistore/mapistore_processing.po          \
-                                                       mapiproxy/libmapistore/mapistore_backend.po             \
-                                                       mapiproxy/libmapistore/mapistore_tdb_wrap.po            \
-                                                       mapiproxy/libmapistore/mapistore_ldb_wrap.po            \
-                                                       mapiproxy/libmapistore/mapistore_indexing.po            \
-                                                       mapiproxy/libmapistore/mapistore_namedprops.po          \
-                                                       mapiproxy/libmapistore/mapistore_backend_public.po      \
-                                                       mapiproxy/libmapistore/database/mapistoredb.po          \
-                                                       mapiproxy/libmapistore/database/mapistoredb_conf.po     \
-                                                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(TDB_LIBS) $(DL_LIBS) -Wl,-soname,libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)
-
-mapiproxy/libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION): libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       ln -fs $< $@
-
-setup/mapistore/mapistore_namedprops.ldif:     \
-       libmapi/conf/mapi-named-properties      \
-       libmapi/conf/mparse.pl                  
-       @./libmapi/conf/build.sh
-
-#####################
-# mapistore backends
-#####################
-
-mapistore_fsocpf: mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT)
-
-mapistore_fsocpf-install:
-       $(INSTALL) -d $(DESTDIR)$(libdir)/mapistore_backends
-       $(INSTALL) -m 0755 mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT) $(DESTDIR)$(libdir)/mapistore_backends/
-
-mapistore_fsocpf-uninstall:
-       rm -rf $(DESTDIR)$(libdir)/mapistore_backends
-
-mapistore_fsocpf-clean:
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.o
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.po
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcno
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.gcda
-       rm -f mapiproxy/libmapistore/backends/mapistore_fsocpf.so
-
-clean:: mapistore_fsocpf-clean
-
-mapistore_fsocpf-distclean: mapistore_fsocpf-clean
-
-distclean:: mapistore_fsocpf-distclean
-
-mapiproxy/libmapistore/backends/mapistore_fsocpf.$(SHLIBEXT): mapiproxy/libmapistore/backends/mapistore_fsocpf.po
-       @echo "Linking mapistore module $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS)                                        \
-       -Lmapiproxy mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)                       \
-       -L. libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapistore_mstoredb: mapiproxy/libmapistore/backends/mapistore_mstoredb.$(SHLIBEXT)
-
-mapistore_mstoredb-install:
-       $(INSTALL) -d $(DESTDIR)$(libdir)/mapistore_backends
-       $(INSTALL) -m 0755 mapiproxy/libmapistore/backends/mapistore_mstoredb.$(SHLIBEXT) $(DESTDIR)$(libdir)/mapistore_backends/
-
-mapistore_mstoredb-uninstall:
-       rm -rf $(DESTDIR)$(libdir)/mapistore_backends
-
-mapistore_mstoredb-clean:
-       rm -f mapiproxy/libmapistore/backends/mapistore_mstoredb.o
-       rm -f mapiproxy/libmapistore/backends/mapistore_mstoredb.po
-       rm -f mapiproxy/libmapistore/backends/mapistore_mstoredb.gcno
-       rm -f mapiproxy/libmapistore/backends/mapistore_mstoredb.gcda
-       rm -f mapiproxy/libmapistore/backends/mapistore_mstoredb.so
-
-clean:: mapistore_mstoredb-clean
-
-mapistore_mstoredb-distclean: mapistore_mstoredb-clean
-
-distclean:: mapistore_mstoredb-distclean
-
-mapiproxy/libmapistore/backends/mapistore_mstoredb.$(SHLIBEXT): mapiproxy/libmapistore/backends/mapistore_mstoredb.po
-       @echo "Linking mapistore module $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION) 
-
-#######################
-# mapistore test tools
-#######################
-
-mapistore_test: bin/mapistore_test
-
-bin/mapistore_test:    mapiproxy/libmapistore/tests/mapistore_test.o           \
-                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt -L. libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapistore_clean:
-       rm -f mapiproxy/libmapistore/tests/*.o
-       rm -f mapiproxy/libmapistore/tests/*.gcno
-       rm -f mapiproxy/libmapistore/tests/*.gcda
-       rm -f bin/mapistore_test
-
-clean:: mapistore_clean
-
-####################
-# mapiproxy modules
-####################
-
-mapiproxy-modules:     mapiproxy/modules/mpm_downgrade.$(SHLIBEXT)     \
-                       mapiproxy/modules/mpm_pack.$(SHLIBEXT)          \
-                       mapiproxy/modules/mpm_cache.$(SHLIBEXT)         \
-                       mapiproxy/modules/mpm_dummy.$(SHLIBEXT)         
-
-mapiproxy-modules-install: mapiproxy-modules
-       $(INSTALL) -d $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy/
-       $(INSTALL) -m 0755 mapiproxy/modules/mpm_downgrade.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy/
-       $(INSTALL) -m 0755 mapiproxy/modules/mpm_pack.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy/
-       $(INSTALL) -m 0755 mapiproxy/modules/mpm_cache.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy/
-       $(INSTALL) -m 0755 mapiproxy/modules/mpm_dummy.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy/
-
-mapiproxy-modules-uninstall:
-       rm -rf $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy
-
-mapiproxy-modules-clean::
-       rm -f mapiproxy/modules/*.o mapiproxy/modules/*.po
-       rm -f mapiproxy/modules/*.gcno mapiproxy/modules/*.gcda
-       rm -f mapiproxy/modules/*.so
-
-clean:: mapiproxy-modules-clean
-
-mapiproxy/modules/mpm_downgrade.$(SHLIBEXT): mapiproxy/modules/mpm_downgrade.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/modules/mpm_pack.$(SHLIBEXT):        mapiproxy/modules/mpm_pack.po   \
-                                       ndr_mapi.po                     \
-                                       gen_ndr/ndr_exchange.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/modules/mpm_cache.$(SHLIBEXT): mapiproxy/modules/mpm_cache.po                \
-                                        mapiproxy/modules/mpm_cache_ldb.po     \
-                                        mapiproxy/modules/mpm_cache_stream.po  \
-                                        ndr_mapi.po                            \
-                                        gen_ndr/ndr_exchange.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/modules/mpm_dummy.$(SHLIBEXT): mapiproxy/modules/mpm_dummy.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-
-####################
-# mapiproxy servers
-####################
-provision-install: python-install
-       $(INSTALL) -d $(DESTDIR)$(datadir)/setup/AD
-       $(INSTALL) -m 0644 setup/AD/oc_provision* $(DESTDIR)$(datadir)/setup/AD/
-       $(INSTALL) -m 0644 setup/AD/prefixMap.txt $(DESTDIR)$(datadir)/setup/AD/
-       $(INSTALL) -m 0644 setup/AD/provision_schema_basedn_modify.ldif $(DESTDIR)$(datadir)/setup/AD/
-       $(INSTALL) -d $(DESTDIR)$(datadir)/setup/openchangedb
-       $(INSTALL) -m 0644 setup/openchangedb/oc_provision* $(DESTDIR)$(datadir)/setup/openchangedb/
-
-provision-uninstall: python-uninstall
-       rm -f $(DESTDIR)$(datadir)/setup/AD/oc_provision_configuration.ldif
-       rm -f $(DESTDIR)$(datadir)/setup/AD/oc_provision_schema.ldif
-       rm -f $(DESTDIR)$(datadir)/setup/AD/oc_provision_schema_modify.ldif
-       rm -f $(DESTDIR)$(datadir)/setup/AD/oc_provision_schema_ADSC.ldif
-       rm -f $(DESTDIR)$(datadir)/setup/AD/prefixMap.txt
-       rm -rf $(DESTDIR)$(datadir)/setup/AD
-       rm -rf $(DESTDIR)$(datadir)/setup/openchangedb
-
-mapiproxy-servers:     mapiproxy/servers/exchange_nsp.$(SHLIBEXT)              \
-                       mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT)           \
-                       mapiproxy/servers/exchange_ds_rfr.$(SHLIBEXT)
-
-mapiproxy-servers-install: mapiproxy-servers provision-install
-       $(INSTALL) -d $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy_server/
-       $(INSTALL) -m 0755 mapiproxy/servers/exchange_nsp.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy_server/
-       $(INSTALL) -m 0755 mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy_server/
-       $(INSTALL) -m 0755 mapiproxy/servers/exchange_ds_rfr.$(SHLIBEXT) $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy_server/
-
-mapiproxy-servers-uninstall: provision-uninstall
-       rm -rf $(DESTDIR)$(modulesdir)/dcerpc_mapiproxy_server
-
-mapiproxy-servers-clean::
-       rm -f mapiproxy/servers/default/nspi/*.o mapiproxy/servers/default/nspi/*.po
-       rm -f mapiproxy/servers/default/nspi/*.gcno mapiproxy/servers/default/nspi/*.gcda
-       rm -f mapiproxy/servers/default/emsmdb/*.o mapiproxy/servers/default/emsmdb/*.po
-       rm -f mapiproxy/servers/default/emsmdb/*.gcno mapiproxy/servers/default/emsmdb/*.gcda
-       rm -f mapiproxy/servers/default/rfr/*.o mapiproxy/servers/default/rfr/*.po
-       rm -f mapiproxy/servers/default/rfr/*.gcno mapiproxy/servers/default/rfr/*.gcda
-       rm -f mapiproxy/servers/*.so
-
-clean:: mapiproxy-servers-clean
-
-mapiproxy/servers/exchange_nsp.$(SHLIBEXT):    mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.po   \
-                                               mapiproxy/servers/default/nspi/emsabp.po                \
-                                               mapiproxy/servers/default/nspi/emsabp_tdb.po            \
-                                               mapiproxy/servers/default/nspi/emsabp_property.po       
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/servers/exchange_emsmdb.$(SHLIBEXT): mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.po      \
-                                               mapiproxy/servers/default/emsmdb/emsmdbp.po                     \
-                                               mapiproxy/servers/default/emsmdb/emsmdbp_object.po              \
-                                               mapiproxy/servers/default/emsmdb/oxcstor.po                     \
-                                               mapiproxy/servers/default/emsmdb/oxcprpt.po                     \
-                                               mapiproxy/servers/default/emsmdb/oxcfold.po                     \
-                                               mapiproxy/servers/default/emsmdb/oxctabl.po                     \
-                                               mapiproxy/servers/default/emsmdb/oxcmsg.po                      \
-                                               mapiproxy/servers/default/emsmdb/oxcnotif.po                    \
-                                               mapiproxy/servers/default/emsmdb/oxomsg.po                      \
-                                               mapiproxy/servers/default/emsmdb/oxorule.po                     \
-                                               mapiproxy/servers/default/emsmdb/oxcperm.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) \
-                                               mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-                                               mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-mapiproxy/servers/exchange_ds_rfr.$(SHLIBEXT): mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.po
-       @echo "Linking $@"
-       @$(CC) -o $@ $(DSOOPT) $(LDFLAGS) $^ -L. $(LIBS) -ldcerpc-server -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-#################################################################
-# Tools compilation rules
-#################################################################
-
-###################
-# openchangeclient
-###################
-
-openchangeclient:      bin/openchangeclient
-
-openchangeclient-install:      openchangeclient
-       $(INSTALL) -d $(DESTDIR)$(bindir) 
-       $(INSTALL) -m 0755 bin/openchangeclient $(DESTDIR)$(bindir)
-
-openchangeclient-uninstall:
-       rm -f $(DESTDIR)$(bindir)/openchangeclient
-
-openchangeclient-clean::
-       rm -f bin/openchangeclient
-       rm -f utils/openchangeclient.o
-       rm -f utils/openchangeclient.gcno
-       rm -f utils/openchangeclient.gcda
-       rm -f utils/openchange-tools.o
-       rm -f utils/openchange-tools.gcno
-       rm -f utils/openchange-tools.gcda
-
-clean:: openchangeclient-clean
-
-bin/openchangeclient:  utils/openchangeclient.o                        \
-                       utils/openchange-tools.o                        \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-                       libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
-
-
-##############
-# mapiprofile
-##############
-
-mapiprofile:           bin/mapiprofile
-
-mapiprofile-install:   mapiprofile
-       $(INSTALL) -d $(DESTDIR)$(bindir) 
-       $(INSTALL) -m 0755 bin/mapiprofile $(DESTDIR)$(bindir)
-
-mapiprofile-uninstall:
-       rm -f $(DESTDIR)$(bindir)/mapiprofile
-
-mapiprofile-clean::
-       rm -f bin/mapiprofile
-       rm -f utils/mapiprofile.o
-       rm -f utils/mapiprofile.gcno
-       rm -f utils/mapiprofile.gcda
-
-clean:: mapiprofile-clean
-
-bin/mapiprofile:       utils/mapiprofile.o                     \
-                       utils/openchange-tools.o                \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
-
-
-###################
-#openchangepfadmin
-###################
-
-openchangepfadmin:     bin/openchangepfadmin
-
-openchangepfadmin-install:     openchangepfadmin
-       $(INSTALL) -d $(DESTDIR)$(bindir) 
-       $(INSTALL) -m 0755 bin/openchangepfadmin $(DESTDIR)$(bindir)
-
-openchangepfadmin-uninstall:
-       rm -f $(DESTDIR)$(bindir)/openchangepfadmin
-
-openchangepfadmin-clean::
-       rm -f bin/openchangepfadmin
-       rm -f utils/openchangepfadmin.o
-       rm -f utils/openchangepfadmin.gcno
-       rm -f utils/openchangepfadmin.gcda
-
-clean:: openchangepfadmin-clean
-
-bin/openchangepfadmin: utils/openchangepfadmin.o                       \
-                       utils/openchange-tools.o                        \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-                       libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBMAPIADMIN_LIBS) -lpopt                  
-
-
-###################
-# exchange2mbox
-###################
-
-exchange2mbox:         bin/exchange2mbox
-
-exchange2mbox-install: exchange2mbox
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/exchange2mbox $(DESTDIR)$(bindir)
-
-exchange2mbox-uninstall:
-       rm -f $(DESTDIR)$(bindir)/exchange2mbox
-
-exchange2mbox-clean::
-       rm -f bin/exchange2mbox
-       rm -f utils/exchange2mbox.o
-       rm -f utils/exchange2mbox.gcno
-       rm -f utils/exchange2mbox.gcda
-       rm -f utils/openchange-tools.o
-       rm -f utils/openchange-tools.gcno
-       rm -f utils/openchange-tools.gcda
-
-clean:: exchange2mbox-clean
-
-bin/exchange2mbox:     utils/exchange2mbox.o                           \
-                       utils/openchange-tools.o                        \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt  $(MAGIC_LIBS)
-
-
-###################
-# exchange2ical
-###################
-
-exchange2ical:         bin/exchange2ical
-
-exchange2ical-install: exchange2ical
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/exchange2ical $(DESTDIR)$(bindir)
-
-exchange2ical-uninstall:
-       rm -f $(DESTDIR)$(bindir)/exchange2ical
-
-exchange2ical-clean::
-       rm -f bin/exchange2ical
-       rm -f utils/exchange2ical_tool.o
-       rm -f utils/exchange2ical_tool.gcno
-       rm -f utils/exchange2ical_tool.gcda
-       rm -f libexchange2ical/libexchange2ical.o
-       rm -f libexchange2ical/libexchange2ical.gcno
-       rm -f libexchange2ical/libexchange2ical.gcda
-       rm -f libexchange2ical/exchange2ical.o
-       rm -f libexchange2ical/exchange2ical.gcno
-       rm -f libexchange2ical/exchange2ical.gcda
-       rm -f libexchange2ical/exchange2ical_utils.o
-       rm -f libexchange2ical/exchange2ical_utils.gcno
-       rm -f libexchange2ical/exchange2ical_utils.gcda
-       rm -f libexchange2ical/exchange2ical_component.o
-       rm -f libexchange2ical/exchange2ical_component.gcno
-       rm -f libexchange2ical/exchange2ical_component.gcda
-       rm -f libexchange2ical/exchange2ical_property.o
-       rm -f libexchange2ical/exchange2ical_property.gcno
-       rm -f libexchange2ical/exchange2ical_property.gcda
-       rm -f libexchange2ical/libical2exchange.o
-       rm -f libexchange2ical/libical2exchange.gcno
-       rm -f libexchange2ical/libical2exchange.gcda
-       rm -f libexchange2ical/ical2exchange.o
-       rm -f libexchange2ical/ical2exchange.gcno
-       rm -f libexchange2ical/ical2exchange.gcda
-       rm -f libexchange2ical/ical2exchange_property.o
-       rm -f libexchange2ical/ical2exchange_property.gcno
-       rm -f libexchange2ical/ical2exchange_property.gcda
-       rm -f libexchange2ical/openchange-tools.o
-       rm -f libexchange2ical/openchange-tools.gcno
-       rm -f libexchange2ical/openchange-tools.gcda
-
-
-clean:: exchange2ical-clean
-
-bin/exchange2ical:     utils/exchange2ical_tool.o      \
-                       libexchange2ical/libexchange2ical.o             \
-                       libexchange2ical/exchange2ical.o                \
-                       libexchange2ical/exchange2ical_component.o      \
-                       libexchange2ical/exchange2ical_property.o       \
-                       libexchange2ical/exchange2ical_utils.o          \
-                       libexchange2ical/libical2exchange.o     \
-                       libexchange2ical/ical2exchange.o        \
-                       libexchange2ical/ical2exchange_property.o       \
-                       utils/openchange-tools.o                        \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(ICAL_LIBS) -lpopt
-
-
-###################
-# mapitest
-###################
-
-mapitest:      libmapi                 \
-               utils/mapitest/proto.h  \
-               bin/mapitest
-
-mapitest-install:      mapitest
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/mapitest $(DESTDIR)$(bindir)
-       $(INSTALL) -d $(DESTDIR)$(datadir)/mapitest/lzxpress
-       $(INSTALL) -d $(DESTDIR)$(datadir)/mapitest/lzfu
-       $(INSTALL) -m 0644 utils/mapitest/data/lzxpress/* $(DESTDIR)$(datadir)/mapitest/lzxpress/
-       $(INSTALL) -m 0644 utils/mapitest/data/lzfu/* $(DESTDIR)$(datadir)/mapitest/lzfu/
-
-mapitest-uninstall:
-       rm -f $(DESTDIR)$(bindir)/mapitest
-       rm -rf $(DESTDIR)$(datadir)/mapitest
-
-mapitest-clean:
-       rm -f bin/mapitest
-       rm -f utils/mapitest/*.o
-       rm -f utils/mapitest/*.gcno
-       rm -f utils/mapitest/*.gcda
-       rm -f utils/mapitest/modules/*.o
-       rm -f utils/mapitest/modules/*.gcno
-       rm -f utils/mapitest/modules/*.gcda
-ifneq ($(SNAPSHOT), no)
-       rm -f utils/mapitest/proto.h
-       rm -f utils/mapitest/mapitest_proto.h
-endif
-
-clean:: mapitest-clean
-
-bin/mapitest:  utils/mapitest/mapitest.o                       \
-               utils/openchange-tools.o                        \
-               utils/mapitest/mapitest_suite.o                 \
-               utils/mapitest/mapitest_print.o                 \
-               utils/mapitest/mapitest_stat.o                  \
-               utils/mapitest/mapitest_common.o                \
-               utils/mapitest/module.o                         \
-               utils/mapitest/modules/module_oxcstor.o         \
-               utils/mapitest/modules/module_oxcfold.o         \
-               utils/mapitest/modules/module_oxomsg.o          \
-               utils/mapitest/modules/module_oxcmsg.o          \
-               utils/mapitest/modules/module_oxcprpt.o         \
-               utils/mapitest/modules/module_oxctable.o        \
-               utils/mapitest/modules/module_oxorule.o         \
-               utils/mapitest/modules/module_oxcnotif.o        \
-               utils/mapitest/modules/module_oxcfxics.o        \
-               utils/mapitest/modules/module_oxcperm.o         \
-               utils/mapitest/modules/module_nspi.o            \
-               utils/mapitest/modules/module_noserver.o        \
-               utils/mapitest/modules/module_errorchecks.o     \
-               utils/mapitest/modules/module_lcid.o            \
-               utils/mapitest/modules/module_mapidump.o        \
-               utils/mapitest/modules/module_lzxpress.o        \
-               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)          
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SUBUNIT_LIBS)
-
-utils/mapitest/proto.h:                                        \
-       utils/mapitest/mapitest_suite.c                 \
-       utils/mapitest/mapitest_print.c                 \
-       utils/mapitest/mapitest_stat.c                  \
-       utils/mapitest/mapitest_common.c                \
-       utils/mapitest/module.c                         \
-       utils/mapitest/modules/module_oxcstor.c         \
-       utils/mapitest/modules/module_oxcfold.c         \
-       utils/mapitest/modules/module_oxomsg.c          \
-       utils/mapitest/modules/module_oxcmsg.c          \
-       utils/mapitest/modules/module_oxcprpt.c         \
-       utils/mapitest/modules/module_oxctable.c        \
-       utils/mapitest/modules/module_oxorule.c         \
-       utils/mapitest/modules/module_oxcnotif.c        \
-       utils/mapitest/modules/module_oxcfxics.c        \
-       utils/mapitest/modules/module_oxcperm.c         \
-       utils/mapitest/modules/module_nspi.c            \
-       utils/mapitest/modules/module_noserver.c        \
-       utils/mapitest/modules/module_errorchecks.c     \
-       utils/mapitest/modules/module_lcid.c            \
-       utils/mapitest/modules/module_mapidump.c        \
-       utils/mapitest/modules/module_lzxpress.c
-       @echo "Generating $@"
-       @./script/mkproto.pl --private=utils/mapitest/mapitest_proto.h --public=utils/mapitest/proto.h $^
-
-#####################
-# openchangemapidump
-#####################
-
-openchangemapidump:            bin/openchangemapidump
-
-openchangemapidump-install:    openchangemapidump
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/openchangemapidump $(DESTDIR)$(bindir)
-
-openchangemapidump-uninstall:
-       rm -f bin/openchangemapidump
-       rm -f $(DESTDIR)$(bindir)/openchangemapidump
-
-openchangemapidump-clean::
-       rm -f bin/openchangemapidump
-       rm -f utils/backup/openchangemapidump.o
-       rm -f utils/backup/openchangemapidump.gcno
-       rm -f utils/backup/openchangemapidump.gcda
-       rm -f utils/backup/openchangebackup.o
-       rm -f utils/backup/openchangebackup.gcno
-       rm -f utils/backup/openchangebackup.gcda
-
-clean:: openchangemapidump-clean
-
-bin/openchangemapidump:        utils/backup/openchangemapidump.o               \
-                       utils/backup/openchangebackup.o                 \
-                       utils/openchange-tools.o                        \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
-
-
-###############
-# schemaIDGUID
-###############
-
-schemaIDGUID:          bin/schemaIDGUID
-
-schemaIDGUID-install:  schemaIDGUID
-       $(INSTALL) -m 0755 bin/schemaIDGUID $(DESTDIR)$(bindir)
-
-schemaIDGUID-uninstall:
-       rm -f $(DESTDIR)$(bindir)/schemaIDGUID
-
-schemaIDGUID-clean::
-       rm -f bin/schemaIDGUID
-       rm -f utils/schemaIDGUID.o
-       rm -f utils/schemaIDGUID.gcno
-       rm -f utils/schemaIDGUID.gcda
-
-clean:: schemaIDGUID-clean
-
-bin/schemaIDGUID: utils/schemaIDGUID.o
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
-
-###################
-# check_fasttransfer test app.
-###################
-
-check_fasttransfer:            bin/check_fasttransfer
-
-check_fasttransfer-install:    check_fasttransfer
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/check_fasttransfer $(DESTDIR)$(bindir)
-
-check_fasttransfer-uninstall:
-       rm -f $(DESTDIR)$(bindir)/check_fasttransfer
-
-check_fasttransfer-clean::
-       rm -f bin/check_fasttransfer
-       rm -f testprogs/check_fasttransfer.o
-       rm -f testprogs/check_fasttransfer.gcno
-       rm -f testprogs/check_fasttransfer.gcda
-
-clean:: check_fasttransfer-clean
-
-bin/check_fasttransfer:        testprogs/check_fasttransfer.o                  \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
-
-###################
-# test_asyncnotif test app.
-###################
-
-test_asyncnotif:               bin/test_asyncnotif
-
-test_asyncnotif-install:       test_asyncnotif
-       $(INSTALL) -d $(DESTDIR)$(bindir)
-       $(INSTALL) -m 0755 bin/test_asyncnotif $(DESTDIR)$(bindir)
-
-test_asyncnotif-uninstall:
-       rm -f $(DESTDIR)$(bindir)/test_asyncnotif
-
-test_asyncnotif-clean::
-       rm -f bin/test_asyncnotif
-       rm -f testprogs/test_asyncnotif.o
-       rm -f testprogs/test_asyncnotif.gcno
-       rm -f testprogs/test_asyncnotif.gcda
-
-clean:: test_asyncnotif-clean
-
-bin/test_asyncnotif:   testprogs/test_asyncnotif.o                     \
-                       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
-
-###################
-# python code
-###################
-
-pythonscriptdir = python
-
-#pymapi: $(pythonscriptdir)/mapi.$(SHLIBEXT)
-
-#pymapi/%: CFLAGS+=`$(PYTHON_CONFIG) --cflags` -fPIC
-
-#$(pythonscriptdir)/mapi.$(SHLIBEXT): $(patsubst %.c,%.o,$(wildcard pymapi/*.c)) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-#      $(CC) -o $@ $^ `$(PYTHON_CONFIG) --libs` $(DSOOPT)
-
-#pymapi-install::
-#      $(INSTALL) -d $(DESTDIR)$(PYCDIR)
-#      $(INSTALL) -m 0755 $(pythonscriptdir)/mapi.$(SHLIBEXT) $(DESTDIR)$(PYCDIR)
-
-#pymapi-uninstall::
-#      rm -f $(DESTDIR)$(PYCDIR)/mapi.$(SHLIBEXT)
-
-PYTHON_MODULES = $(patsubst $(pythonscriptdir)/%,%,$(shell find  $(pythonscriptdir) -name "*.py"))
-
-python-install::
-       @echo "Installing Python modules"
-       @$(foreach MODULE, $(PYTHON_MODULES), \
-               $(INSTALL) -d $(DESTDIR)$(pythondir)/$(dir $(MODULE)); \
-               $(INSTALL) -m 0644 $(pythonscriptdir)/$(MODULE) $(DESTDIR)$(pythondir)/$(dir $(MODULE)); \
-       )
-
-python-uninstall::
-       rm -rf $(DESTDIR)$(pythondir)/openchange
-
-EPYDOC_OPTIONS = --no-private --url http://www.openchange.org/ --no-sourcecode
-
-epydoc::
-       PYTHONPATH=$(pythonscriptdir):$(PYTHONPATH) epydoc $(EPYDOC_OPTIONS) openchange
-
-check-python:
-       PYTHONPATH=$(pythonscriptdir):$(PYTHONPATH) trial openchange
-
-check:: check-python
-
-clean-python:
-       rm -f pymapi/*.o
-       rm -f $(pythonscriptdir)/mapi.$(SHLIBEXT)
-       rm -f $(pythonscriptdir)/openchange/*.pyc
-
-clean:: clean-python
-
-pyopenchange:  $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)          \
-               $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)          \
-               $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT)     \
-               $(pythonscriptdir)/openchange/mapistoredb.$(SHLIBEXT)
-
-$(pythonscriptdir)/openchange/mapi.$(SHLIBEXT):        pyopenchange/pymapi.c                           \
-                                               pyopenchange/pymapi_properties.c                \
-                                               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS) 
-
-$(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT):        pyopenchange/pyocpf.c                           \
-                                               libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-                                               libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS) 
-
-$(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT):   pyopenchange/pymapistore.c                              \
-                                                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS)
-
-$(pythonscriptdir)/openchange/mapistoredb.$(SHLIBEXT): pyopenchange/pymapistoredb.c                            \
-                                                       mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CC) $(CFLAGS) $(DSOOPT) $(LDFLAGS) -o $@ $^ `$(PYTHON_CONFIG) --cflags --libs` $(LIBS)
-
-pyopenchange/pymapi_properties.c:              \
-       libmapi/conf/mapi-properties            \
-       libmapi/conf/mparse.pl          
-       @./libmapi/conf/build.sh
-
-pyopenchange-clean:
-       rm -f pyopenchange/*.o
-       rm -f pyopenchange/*.pyc
-       rm -f $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT)
-       rm -f $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT)
-       rm -f $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT)
-       rm -f $(pythonscriptdir)/openchange/mapistoredb.$(SHLIBEXT)
-       rm -f pyopenchange/pymapi_properties.c
-
-clean:: pyopenchange-clean
-
-pyopenchange-install:
-       $(INSTALL) -d $(DESTDIR)$(PYCDIR)/openchange
-       $(INSTALL) -m 0755 $(pythonscriptdir)/openchange/mapi.$(SHLIBEXT) $(DESTDIR)$(PYCDIR)/openchange
-       $(INSTALL) -m 0755 $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT) $(DESTDIR)$(PYCDIR)/openchange
-       $(INSTALL) -m 0755 $(pythonscriptdir)/openchange/mapistore.$(SHLIBEXT) $(DESTDIR)$(PYCDIR)/openchange
-       $(INSTALL) -m 0755 $(pythonscriptdir)/openchange/mapistoredb.$(SHLIBEXT) $(DESTDIR)$(PYCDIR)/openchange
-
-pyopenchange-uninstall:
-       rm -f $(DESTDIR)$(PYCDIR)/openchange/mapi.$(SHLIBEXT)
-       rm -f $(DESTDIR)$(PYCDIR)/openchange/ocpf.$(SHLIBEXT)
-       rm -f $(DESTDIR)$(PYCDIR)/openchange/mapistore.$(SHLIBEXT)
-       rm -f $(DESTDIR)$(PYCDIR)/openchange/mapistoredb.$(SHLIBEXT)
-
-
-###################
-# nagios plugin
-###################
-
-nagiosdir = $(libdir)/nagios
-
-installnagios:
-       $(INSTALL) -d $(DESTDIR)$(nagiosdir)
-       $(INSTALL) -m 0755 script/check_exchange $(DESTDIR)$(nagiosdir)
-
-###################
-# libmapi examples
-###################
-examples:
-       cd doc/examples && make && cd ${OLD_PWD}
-
-examples-clean::
-       rm -f doc/examples/mapi_sample1
-       rm -f doc/examples/fetchappointment
-       rm -f doc/examples/fetchmail
-
-clean:: examples-clean
-
-examples-install examples-uninstall:
-
-manpages = \
-               doc/man/man1/exchange2mbox.1                            \
-               doc/man/man1/mapiprofile.1                              \
-               doc/man/man1/openchangeclient.1                         \
-               doc/man/man1/openchangepfadmin.1                        \
-               $(wildcard apidocs/man/man3/*)
-
-installman: doxygen
-       @./script/installman.sh $(DESTDIR)$(mandir) $(manpages)
-
-
-uninstallman:
-       @./script/uninstallman.sh $(DESTDIR)$(mandir) $(manpages)
-
-doxygen:       
-       @if test ! -d apidocs ; then                                            \
-               echo "Doxify API documentation: HTML and man pages";            \
-               mkdir -p apidocs/html;                                          \
-               mkdir -p apidocs/man;                                           \
-               $(DOXYGEN) Doxyfile;                                            \
-               $(DOXYGEN) libmapi/Doxyfile;                                    \
-               $(DOXYGEN) libmapiadmin/Doxyfile;                               \
-               $(DOXYGEN) libocpf/Doxyfile;                                    \
-               $(DOXYGEN) libmapi++/Doxyfile;                                  \
-               $(DOXYGEN) mapiproxy/Doxyfile;                                  \
-               $(DOXYGEN) utils/mapitest/Doxyfile;                             \
-               cp -f doc/doxygen/index.html apidocs/html;                      \
-               cp -f doc/doxygen/pictures/* apidocs/html/overview;             \
-               cp -f doc/doxygen/pictures/* apidocs/html/libmapi;              \
-               cp -f doc/doxygen/pictures/* apidocs/html/libmapiadmin;         \
-               cp -f doc/doxygen/pictures/* apidocs/html/libmapi++;            \
-               cp -f doc/doxygen/pictures/* apidocs/html/libocpf;              \
-               cp -f doc/doxygen/pictures/* apidocs/html/mapitest;             \
-               cp -f doc/doxygen/pictures/* apidocs/html/mapiproxy;            \
-               cp -f mapiproxy/documentation/pictures/* apidocs/html/mapiproxy;\
-               rm -f apidocs/man/man3/todo.3;                                  \
-               rm -f apidocs/man/man3/bug.3;                                   \
-               rm -f apidocs/man/man3/*.c.3;                                   \
-       fi                                                              
-
-etags:
-       etags `find $(srcdir) -name "*.[ch]"`
-
-ctags:
-       ctags `find $(srcdir) -name "*.[ch]"`
-
-.PRECIOUS: exchange.h gen_ndr/ndr_exchange.h gen_ndr/ndr_exchange.c gen_ndr/ndr_exchange_c.c gen_ndr/ndr_exchange_c.h
-
-test:: check
-
-check:: libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
-       # FIXME: Set up server
-       ./bin/mapitest --mapi-calls 
-
-####################################
-# coverage tests
-#
-# this could be better integrated...
-####################################
-coverage-init:
-       lcov --base-directory . --directory . --capture --initial --output-file oc_cov.info
-
-coverage::
-       rm -f libmapi/\<stdout\>.gcov
-       rm -f ./libocpf/lex.yy.gcda
-       rm -f libocpf/\<stdout\>.gcov
-       rm -f ./\<stdout\>.gcov
-       lcov --base-directory .  --directory . --output-file oc_cov.info --capture
-       genhtml -o covresults oc_cov.info
-
-coverage-clean::
-       rm -rf oc_cov.info
-       rm -rf covresults
-       rm -f test.gcno
-
-clean:: coverage-clean
-
-####################################
-# Qt4 widgets
-####################################
-openchange_qt4:        qt-lib qt-demoapp
-
-qt-lib: libqtmapi
-
-qt-demoapp: qt/demo/demoapp.moc qt/demo/demoapp 
-
-# No install yet - we need to finish this first
-
-qt-clean::
-       rm -f qt/demo/demoapp
-       rm -f qt/demo/*.o
-       rm -f qt/lib/*.o
-       rm -f qt/demo/*.moc
-       rm -f qt/lib/*.moc
-       rm -f libqtmapi*
-
-clean:: qt-clean
-
-qt/demo/demoapp.moc:   qt/demo/demoapp.h
-       @$(MOC) -i qt/demo/demoapp.h -o qt/demo/demoapp.moc
-
-qt/lib/foldermodel.moc:        qt/lib/foldermodel.h
-       @$(MOC) -i qt/lib/foldermodel.h -o qt/lib/foldermodel.moc
-
-qt/lib/messagesmodel.moc:      qt/lib/messagesmodel.h
-       @$(MOC) -i qt/lib/messagesmodel.h -o qt/lib/messagesmodel.moc
-
-libqtmapi: libmapi                                     \
-       qt/lib/foldermodel.moc                          \
-       qt/lib/messagesmodel.moc                        \
-       libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-LIBQTMAPI_SO_VERSION = 0
-
-libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION):      \
-       qt/lib/foldermodel.o                    \
-       qt/lib/messagesmodel.o
-       @echo "Linking $@"
-       @$(CXX) $(DSOOPT) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libqtmapi.$(SHLIBEXT).$(LIBQTMAPI_SO_VERSION) -o $@ $^ $(LIBS)
-
-
-qt/demo/demoapp: qt/demo/demoapp.o                             \
-       qt/demo/main.o                                  \
-       libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)          \
-       libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION)        \
-       libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
-       @echo "Linking $@"
-       @$(CXX) $(CXXFLAGS) -o $@ $^ $(QT4_LIBS) $(LDFLAGS) $(LIBS)
-       # we don't yet install this...
-       ln -sf libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libqtmapi.$(SHLIBEXT)
-       ln -sf libqtmapi.$(SHLIBEXT).$(PACKAGE_VERSION) libqtmapi.$(SHLIBEXT).$(LIBQTMAPI_SO_VERSION)
-
-# This should be the last line in the makefile since other distclean rules may 
-# need config.mk
-distclean::
-       rm -f config.mk
diff --git a/branches/plugfest/README b/branches/plugfest/README
deleted file mode 100644 (file)
index 8218a40..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-This is the README file for OpenChange
-
-ABOUT OPENCHANGE
-
-The OpenChange Project aims to provide a portable Open Source
-implementation of Microsoft Exchange Server and Exchange
-protocols. Exchange is a groupware server designed to work with
-Microsoft Outlook, and providing features such as a messaging server,
-shared calendars, contact databases, public folders, notes and tasks. 
-
-The OpenChange project has three goals:
-* To provide a library for interoperability with Exchange protocols, and
-to assist implementers to use this to create groupware that
-interoperates with both Exchange and other OpenChange-based software. 
-
-* To provide an alternative to Microsoft Exchange Server which uses
-native Exchange protocols and provides exactly equivalent
-functionality when viewed from Microsoft Outlook clients. 
-
-* To develop a body of knowledge about the most popular groupware
-protocols in use commercially today in order to promote development of
-a documented and unencumbered standard, with all the benefits that
-standards bring. 
-
-
-DOCUMENTATION
-
-There are two sources of documentation - text files in the doc/
-directory, and API documentation generated from the source files using
-doxygen. You can create the API documentation yourself (using "make
-doxygen" at the top level) or you can refer to the copy on the
-OpenChange web site at
-http://apidocs.openchange.org/overview/index.html
-
-doc/howto.txt contains instructions on how to install and set up
-client libraries, client utilities and the server / proxy parts of
-OpenChange.
-doc/man/ contains man(1) pages for several OpenChange utilities. Note
-that man pages for programming (i.e. the parts that would appear in
-man3) are generated by doxygen, and will be found in apidocs/ if you
-generate the documentation yourself.
-doc/doxygen/ provides static content used as part of the doxygen API
-documentation generation process.
-doc/examples/ provides programming examples for libmapi.
-
-
-STRUCTURE
-- bin/ This directory is created during the build process. It
-contains the binaries (executable programs) that are compiled during
-the "make" step. The source for most of these is in the utils/
-directory, described below.
-
-- doc/  This directory contains documentation - see description above
-(in DOCUMENTATION) for the various contents of this directory.
-
-- gen_ndr/  This directory contains routines for handling the Network
-Data Representation (NDR) for various Exhange RPC calls. The contents
-of this directory are generated (using Samba's pidl IDL compiler) at
-build time. The main input file is exchange.idl (see top level
-directory).
-
-- libexchange2ical  This directory provides functionality for 
-converting between Exchange calendar appointments and ICalendar (RFC2445 /
-RFC5545) format. Exchange -> ICalendar is fairly mature, ICalendar to 
-Exchange is in work.
-
-- libmapi/  This directory contains the main client-side library,
-called libmapi. libmapi closely reflects the underlying protocol
-operations (Exchange RPC) being performed between the client and the
-server. For more information, consult the API documentation (either
-build yourself, or online at
-http://apidocs.openchange.org/libmapi/index.html)
-
-- libmapi++/  This directory contains C++ bindings for libmapi. It is
-not a replacement for libmapi, but is intended to provide easier
-access to many libmapi functions for C++ programmers. For more
-information, consult the API documentation (either build yourself, or
-online at http://apidocs.openchange.org/libmapi++/index.html)
-
-- libmapiadmin/  This directory contains client-side library functions
-for administering OpenChange or Exchange servers. For more
-information, consult the API documentation (either build yourself, or
-online at http://apidocs.openchange.org/libmapiadmin/index.html). If
-you are looking for a program you can run, instead of library
-functions to write your own program, "openchangepfadmin" might be of
-interest.
-
-- libocpf/  This directory contains library functions for the
-OpenChange Property Files (OCPF). This allows building of mail
-messages, address book entries, appointments and similar objects from
-text files. For more information, consult the API documentation
-(either build yourself, or online at
-http://apidocs.openchange.org/libocpf/index.html) 
-
-- mapiproxy/ This directory provides an Exchange RPC proxy. You can
-use this to provide transparent proxying, or to change / monitor 
-connections between the client and server. For more information,
-consult the API documentation (either build yourself, or online at
-http://apidocs.openchange.org/mapiproxy/index.html) 
-
-- pymapi/  This directory contains hand-written python bindings for
-libmapi functions. 
-
-- python/  This directory contains python scripts used to set up
-("provision") the server side. They are not required for the client
-side.
-
-- qt/   This directory contains Qt4 bindings (lib/ subdirectory) and
-a sample application (demo/ subdirectory). The sample application 
-is intended for research and development use, not as a complete
-end-user application.
-
-- samba4/  This directory will be created during the build process if
-you call "make samba" or execute the ./script/installsamba4.sh
-script. It is used to build samba4, if required.
-
-- script/  This directory contains a range of scripts useful for
-development or use of OpenChange. [TODO: document the scripts -
-perhaps write script/README?] 
-
-- setup/  This directory contains data for setting up ("provisioning")
-the server.
-
-- testprogs/  This directory contains developer test tools
-
-- utils/  This directory contains the source code for a range of
-applications / utilities that can be used to interact with an exchange
-server. They include:
- - utils/backup/       backup and restore tools
- - utils/exchange2ical  converts Exchange calendar into an ICal file
- - utils/exchange2mbox two way conversion between Exchange mail and mbox
- - utils/mapiprofile   set up client side profiles (login information)
- - utils/mapitest/     test tools for libmapi functionality
- - utils/mapitrace/    test tool for tracing MAPI calls
- - utils/openchangeclient      command line client for Exchange RPC
- - utils/openchangepfadmin     Public Folders admin tools and 
-                               administration of Exchange users (add/del) 
- - utils/schemaIDGUID
-For more information on these tools, refer to the man(1) pages in doc/man/man1
diff --git a/branches/plugfest/VERSION b/branches/plugfest/VERSION
deleted file mode 100644 (file)
index 90bdd43..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-########################################################
-# OPENCHANGE Version                                   #
-#                                                      #
-# script/mkversion.sh                                  #
-# will use this file to create                         #
-# libmapi/version.h                                    #
-#                                                      #
-########################################################
-
-########################################################
-# To mark SVN snapshots this should be set to 'yes'    #
-# in the development BRANCH, and set to 'no' only in   #
-# the release BRANCH                                   #
-#                                                      #
-# <MAJOR>.<MINOR>[...]-SVN-build-xxx                   #
-#                                                      #
-# e.g. OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=yes          #
-#  ->  "0.7-SVN-build-199"                             #
-########################################################
-OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=yes
-
-
-#############################################################
-# This is for specifying a release nickname                 #
-#                                                           #
-# e.g. OPENCHANGE_VERSION_RELEASE_NICKNAME=Nicky Nickname   #
-#  ->  "0.7 (Nicky Nickname)"                               #
-#############################################################
-OPENCHANGE_VERSION_RELEASE_NICKNAME=Transporter
-
-
-#############################################################
-# This is for specifying a release number                   #
-#                                                           #
-# e.g. OPENCHANGE_VERSION_RELEASE_VERSION=0.8.2             #
-#  ->  "0.8.2 (Nicky Nickname)"                             #
-#############################################################
-OPENCHANGE_VERSION_RELEASE_NUMBER=0.11
diff --git a/branches/plugfest/autogen.sh b/branches/plugfest/autogen.sh
deleted file mode 100755 (executable)
index 0c00aff..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-# Run this script to build openchange from SVN
-
-## insert all possible names (only works with
-## autoconf 2.x
-TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253"
-TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253"
-TESTACLOCAL="aclocal aclocal19"
-
-AUTOHEADERFOUND="0"
-AUTOCONFFOUND="0"
-ACLOCALFOUND="0"
-
-##
-## Look for autoheader
-##
-for i in $TESTAUTOHEADER; do
-        if which $i > /dev/null 2>&1; then
-                if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d [:alpha:]` -ge 53; then
-                        AUTOHEADER=$i
-                        AUTOHEADERFOUND="1"
-                        break
-                fi
-        fi
-done
-
-##
-## Look for autoconf
-##
-
-for i in $TESTAUTOCONF; do
-        if which $i > /dev/null 2>&1; then
-                if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d [:alpha:]` -ge 53; then
-                        AUTOCONF=$i
-                        AUTOCONFFOUND="1"
-                        break
-                fi
-        fi
-done
-
-##
-## Look for aclocal
-##
-for i in $TESTACLOCAL; do
-        if which $i > /dev/null 2>&1; then
-                ACLOCAL=$i              
-                ACLOCALFOUND="1"
-                break
-        fi
-done
-
-
-##
-## do we have it?
-##
-if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then
-        echo "$0: need autoconf 2.53 or later to build openchange from SVN" >&2
-        exit 1
-fi
-
-if test "$ACLOCALFOUND" = "0"; then
-        echo "$0: aclocal not found" >&2
-        exit 1
-fi
-
-
-rm -rf autom4te*.cache
-rm -f configure include/config.h*
-
-echo "$0: running $ACLOCAL"
-$ACLOCAL || exit 1
-
-echo "$0: running $AUTOHEADER"
-$AUTOHEADER || exit 1
-
-echo "$0: running $AUTOCONF"
-$AUTOCONF || exit 1
-
-
-rm -rf autom4te*.cache
-
-echo "Now run ./configure and gmake"
-exit 0
diff --git a/branches/plugfest/config.guess b/branches/plugfest/config.guess
deleted file mode 100755 (executable)
index da83314..0000000
+++ /dev/null
@@ -1,1561 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
-
-timestamp='2009-04-27'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           sh5el) machine=sh5le-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    s390x:SunOS:*:*)
-       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       eval $set_cc_for_build
-       SUN_ARCH="i386"
-       # If there is a compiler, see if it is configured for 64-bit objects.
-       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-       # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
-               SUN_ARCH="x86_64"
-           fi
-       fi
-       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[456])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    *:Interix*:[3456]*)
-       case ${UNAME_MACHINE} in
-           x86)
-               echo i586-pc-interix${UNAME_RELEASE}
-               exit ;;
-           EM64T | authenticamd | genuineintel)
-               echo x86_64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-           IA64)
-               echo ia64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-       esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    arm*:Linux:*:*)
-       eval $set_cc_for_build
-       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-           | grep -q __ARM_EABI__
-       then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
-       else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-       fi
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
-       # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
-       # this is a cross-build.
-       echo i586-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-       OS_REL='.3'
-       test -r /etc/.relid \
-           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
-       echo i586-pc-haiku
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-    i*86:AROS:*:*)
-       echo ${UNAME_MACHINE}-pc-aros
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/branches/plugfest/config.mk.in b/branches/plugfest/config.mk.in
deleted file mode 100644 (file)
index a0e86c3..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-# Mode (Release or snapshot?)
-SNAPSHOT=@OPENCHANGE_VERSION_IS_SVN_SNAPSHOT@
-
-# Binary
-CC=@CC@
-CXX=@CXX@
-BISON=@BISON@
-FLEX=@FLEX@
-PIDL=@PIDL@
-PERL=@PERL@
-DOXYGEN=@DOXYGEN@
-INSTALL=@INSTALL@
-SED=sed -i 's/"\(.*\)\/\(.*\)\.h"/<\1\/\2.h>/g'
-PYTHON=@PYTHON@
-PYTHON_CONFIG=@PYTHON_CONFIG@
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-modulesdir=@modulesdir@
-datarootdir=@datarootdir@
-datadir=@datadir@
-includedir=@includedir@
-mandir=@mandir@
-top_builddir=@builddir@
-pythondir=@pythondir@
-
-sambaprefix=@sambaprefix@
-
-DSOOPT=-shared -fPIC
-CFLAGS=@CFLAGS@ @COMPILER_OPTIONS_C@ @ASSERT_DEFINITION@ @SUBUNIT_CFLAGS@ \
-       -DDEFAULT_LDIF=\"$(datadir)/setup/profiles\"                                            \
-       -DMAPISTORE_LDIF=\"$(datadir)/setup/mapistore\"                                         \
-       -DMAPISTORE_BACKEND_INSTALLDIR=\"$(libdir)/mapistore_backends\"                         \
-       -DMAPISTORE_MAPPING_PATH=\"$(prefix)/private/mapistore\"                                        \
-       -DMAPISTORE_DBPATH=\"$(prefix)/private/mapistore/mapistore.ldb\"                                \
-       -DLZXPRESS_DATADIR=\"$(datadir)/mapitest/lzxpress\"                                     \
-       -DLZFU_DATADIR=\"$(datadir)/mapitest/lzfu\"
-
-# This value should be determined by configure at some point
-SHLIBEXT=so
-PACKAGE_VERSION=@PACKAGE_VERSION@
-
-SAMBA_CFLAGS=@SAMBA_CFLAGS@
-SAMBA_LIBS=@SAMBA_LIBS@
-
-LDB_CFLAGS=@LDB_CFLAGS@
-LDB_LIBS=@LDB_LIBS@
-
-TDB_CFLAGS=@TDB_CFLAGS@
-TDB_LIBS=@TDB_LIBS@
-
-TALLOC_CFLAGS=@TALLOC_CFLAGS@
-TALLOC_LIBS=@TALLOC_LIBS@
-
-CFLAGS+=$(SAMBA_CFLAGS) $(LDB_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) $(THREAD_CFLAGS)
-LIBS+=$(SAMBA_LIBS) $(LDB_LIBS) $(TALLOC_LIBS) $(THREAD_LIBS)
-LDFLAGS+=@LDFLAGS@
-
-THREAD_LIBS=@THREAD_LIBS@
-THREAD_CFLAGS=@THREAD_CFLAGS@
-
-SAMBASERVER_CFLAGS=@SAMBASERVER_CFLAGS@
-SAMBASERVER_LIBS=@SAMBASERVER_LIBS@
-
-DL_LIBS=@DL_LIBS@
-
-# Assign CFLAGS to CXXFLAGS
-CXXFLAGS=@CFLAGS@ @COMPILER_OPTIONS_CXX@ $(SAMBA_CFLAGS) $(LDB_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) $(THREAD_CFLAGS)
-
-# OPENCHANGE LIBRARIES
-OC_IDL=@OC_IDL@
-OC_LIBS=@OC_LIBS@
-OC_LIBS_INSTALL=@OC_LIBS_INSTALL@
-OC_LIBS_UNINSTALL=@OC_LIBS_UNINSTALL@
-OC_LIBS_INSTALLPC=@OC_LIBS_INSTALLPC@
-OC_LIBS_INSTALLHEADER=@OC_LIBS_INSTALLHEADER@
-OC_LIBS_INSTALLLIB=@OC_LIBS_INSTALLLIB@
-LIBMAPIADMIN_LIBS+=@SAMR_LIBS@
-LIBMAPIADMIN_CFLAGS=@SAMR_CFLAGS@
-
-
-# TORTURE
-SAMBA_MODULESDIR=${sambaprefix}/modules/
-SERVER_MODULESDIR=${SAMBA_MODULESDIR}dcerpc_server/
-
-# TOOLS
-OC_TOOLS=@OC_TOOLS@
-OC_TOOLS_INSTALL=@OC_TOOLS_INSTALL@
-OC_TOOLS_UNINSTALL=@OC_TOOLS_UNINSTALL@
-MAGIC_LIBS=@MAGIC_LIBS@
-ICAL_CFLAGS=@ICAL_CFLAGS@
-ICAL_LIBS=@ICAL_LIBS@
-
-# SERVER
-OC_SERVER=@OC_SERVER@
-OC_SERVER_INSTALL=@OC_SERVER_INSTALL@
-OC_SERVER_UNINSTALL=@OC_SERVER_UNINSTALL@
-
-# MAPISTORE BACKENDS
-OC_MAPISTORE=@OC_MAPISTORE@
-OC_MAPISTORE_CLEAN=@OC_MAPISTORE_CLEAN@
-OC_MAPISTORE_INSTALL=@OC_MAPISTORE_INSTALL@
-OC_MAPISTORE_UNINSTALL=@OC_MAPISTORE_UNINSTALL@
-
-MAPISTORE_TEST=@MAPISTORE_TEST@
-
-SUBUNIT_LIBS=@SUBUNIT_LIBS@
-
-# Python
-PYMAPIALL=@PYMAPIALL@
-PYMAPIINSTALL=@PYMAPIINSTALL@
-PYMAPIUNINSTALL=@PYMAPIUNINSTALL@
-
-PYCDIR=@PYCDIR@
-
-# Coverage
-COVERAGE_INIT=@COVERAGE_INIT@
-
-MANUALLY_CREATE_SYMLINKS=@MANUALLY_CREATE_SYMLINKS@
-
-# Qt support
-QT4_CXXFLAGS=@Qt4_CFLAGS@
-QT4_LIBS=@Qt4_LIBS@
-MOC=@MOC@
-OPENCHANGE_QT4=@OPENCHANGE_QT4@
diff --git a/branches/plugfest/config.sub b/branches/plugfest/config.sub
deleted file mode 100755 (executable)
index a39437d..0000000
+++ /dev/null
@@ -1,1686 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
-
-timestamp='2009-04-17'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fido | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | lm32 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep | metag \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64octeon | mips64octeonel \
-       | mips64orion | mips64orionel \
-       | mips64r5900 | mips64r5900el \
-       | mips64vr | mips64vrel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | moxie \
-       | mt \
-       | msp430 \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k | z80)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | lm32-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64octeon-* | mips64octeonel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64r5900-* | mips64r5900el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa*-* \
-       | ymp-* \
-       | z8k-* | z80-*)
-               ;;
-       # Recognize the basic CPU types without company name, with glob match.
-       xtensa*)
-               basic_machine=$basic_machine-unknown
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aros)
-               basic_machine=i386-pc
-               os=-aros
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       blackfin)
-               basic_machine=bfin-unknown
-               os=-linux
-               ;;
-       blackfin-*)
-               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-        cegcc)
-               basic_machine=arm-unknown
-               os=-cegcc
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16)
-               basic_machine=cr16-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       dicos)
-               basic_machine=i686-pc
-               os=-dicos
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m68knommu)
-               basic_machine=m68k-unknown
-               os=-linux
-               ;;
-       m68knommu-*)
-               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       mingw32ce)
-               basic_machine=arm-unknown
-               os=-mingw32ce
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       parisc)
-               basic_machine=hppa-unknown
-               os=-linux
-               ;;
-       parisc-*)
-               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sde)
-               basic_machine=mipsisa32-sde
-               os=-elf
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh5el)
-               basic_machine=sh5le-unknown
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tile*)
-               basic_machine=tile-unknown
-               os=-linux-gnu
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       z80-*-coff)
-               basic_machine=z80-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -dicos*)
-               os=-dicos
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-               os=-elf
-               ;;
-        spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-        mep-*)
-               os=-elf
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/branches/plugfest/configure.ac b/branches/plugfest/configure.ac
deleted file mode 100644 (file)
index 9d74063..0000000
+++ /dev/null
@@ -1,758 +0,0 @@
-# Simple configuration script for OpenChange
-# Written by Jelmer Vernooij <jelmer@openchange.org>
-
-AC_PREREQ(2.57)
-AC_INIT(openchange, 0.11, [openchange@openchange.org])
-AC_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE
-AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
-
-PKG_PROG_PKG_CONFIG([0.20])
-
-CFLAGS="-I. $CFLAGS"
-
-dnl #################################################################
-dnl Check for OS dependent options
-dnl #################################################################
-AC_CANONICAL_HOST
-
-case "${host}" in
-     *freebsd*) 
-               BUILD_FOR_FREEBSD=yes
-               AC_SUBST(BUILD_FOR_FREEBSD)
-               MANUALLY_CREATE_SYMLINKS=yes
-               ;;
-     *solaris*) 
-               BUILD_FOR_SOLARIS=yes
-               AC_SUBST(BUILD_FOR_SOLARIS)
-               MANUALLY_CREATE_SYMLINKS=yes
-               ;;
-esac
-AC_SUBST(MANUALLY_CREATE_SYMLINKS)
-
-#
-# OC_CHECK_SAMBA_PATH([PATH],[action-if-found],[action-if-not-found])
-# -------------------------------------------------------------------
-AC_DEFUN([OC_CHECK_SAMBA_PATH],
-[
-       old_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
-       PKG_CONFIG_PATH="$1/lib/pkgconfig"
-       export PKG_CONFIG_PATH
-       PKG_CHECK_EXISTS([samba-hostconfig], [found=1], [found=0])
-       PKG_CONFIG_PATH="$old_PKG_CONFIG_PATH"
-       if test $found = 1; then
-               ifelse([$2],[], [echo -n ], [$2])
-               ifelse([$3],[],[],[else
-       [$3]])
-       fi
-])
-
-AC_MSG_CHECKING([for samba 4])
-
-AC_ARG_WITH(samba, 
-[AC_HELP_STRING([--with-samba], [Override location Samba is installed])],
-[ 
- sambaprefix="$withval"
-],[
- for p in "$prefix" /usr/local/samba /usr/local /usr
- do
-        OC_CHECK_SAMBA_PATH($p, [sambaprefix="$p"])
- done
-])
-AC_SUBST(sambaprefix)
-OC_CHECK_SAMBA_PATH($sambaprefix,[], AC_MSG_ERROR(Samba 4 not found))
-AC_MSG_RESULT($sambaprefix)
-PKG_CONFIG_PATH="$sambaprefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-PATH="$sambaprefix/bin:$PATH"
-
-#
-# OC_SETVAL([NAME])
-# -----------------
-AC_DEFUN([OC_SETVAL],
-[
-AC_ARG_VAR([NAME], [var name])
-if test x"$enable_$1" = x""; then
-   enable_$1="no"
-fi[]
-])
-
-#
-# OC_CHECK_SAMBA_VERSION([RELEASE],[VERSION], [action-if-found],[action-if-not-found],
-#                                            [action-if-cross-compiling])
-# ------------------------------------------------------------------------------------
-AC_DEFUN([OC_CHECK_SAMBA_VERSION], [
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <samba/version.h>
-int main() { if (!strcmp(SAMBA_VERSION_STRING, "$1") || !strcmp(SAMBA_VERSION_STRING, "$2")) {return 0; } else { return -1;} }
-]])],[$3],[
-       ifelse([$4],[],[AC_MSG_WARN([The Samba4 version installed on your system doesn't meet OpenChange requirements ($1 or $2).])],[$4])],[$5])
-])
-
-#
-# OC_RULE_ADD([NAME], [TYPE])
-# ---------------------------
-AC_DEFUN([OC_RULE_ADD], 
-[ 
-AC_ARG_VAR([NAME], [rule name])
-AC_ARG_VAR([TYPE], [rule type])
-if test "x$1_set" != "xset"; then
-   case "$2" in
-       LIBS)
-               OC_$2="$OC_$2 $1"
-               OC_$2_INSTALL="$OC_$2_INSTALL $1-install"
-               OC_$2_UNINSTALL="$OC_$2_UNINSTALL $1-uninstall"
-               OC_$2_INSTALLPC="$OC_$2_INSTALLPC $1-installpc"
-               OC_$2_INSTALLHEADER="$OC_$2_INSTALLHEADER $1-installheader"
-               OC_$2_INSTALLLIB="$OC_$2_INSTALLLIB $1-installlib"
-
-               AC_SUBST(OC_$2_INSTALLPC)
-               AC_SUBST(OC_$2_INSTALLHEADER)
-               AC_SUBST(OC_$2_INSTALLLIB)
-       ;;
-       TOOLS)
-               OC_$2="$OC_$2 $1"
-               OC_$2_INSTALL="$OC_$2_INSTALL $1-install"
-               OC_$2_UNINSTALL="$OC_$2_UNINSTALL $1-uninstall"
-       ;;
-       SERVER|MAPISTORE)
-               OC_$2="$OC_$2 $1"
-               OC_$2_CLEAN="$OC_$2_CLEAN $1-clean"
-               OC_$2_INSTALL="$OC_$2_INSTALL $1-install"
-               OC_$2_UNINSTALL="$OC_$2_UNINSTALL $1-uninstall"
-       ;;
-   esac
-
-   AC_SUBST(OC_$2)
-   AC_SUBST(OC_$2_CLEAN)
-   AC_SUBST(OC_$2_INSTALL)
-   AC_SUBST(OC_$2_UNINSTALL)
-
-   enable_$1="yes"
-
-fi[]
-])
-
-dnl ##################################################################
-dnl Some general portability stuff
-dnl ##################################################################
-AC_CHECK_HEADERS( sys/cdefs.h string.h sys/sockio.h)
-AC_CHECK_FUNCS(strcasestr)
-
-
-
-dnl ###########################################################################
-dnl _AC_LANG_COMPILER_ICC
-dnl Check whether the compiler for the current language is really ICC.
-dnl ###########################################################################
-m4_define([AC_LANG_COMPILER_ICC],
-[AC_CACHE_CHECK([whether we are really using the Intel _AC_LANG compiler],
-               [ac_cv_[]_AC_LANG_ABBREV[]_compiler_icc],
-[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER
-       choke me
-#endif
-]])],
-                  [ac_compiler_icc=yes],
-                  [ac_compiler_icc=no])
-ac_cv_[]_AC_LANG_ABBREV[]_compiler_icc=$ac_compiler_icc
-])])
-
-dnl ###########################################################################
-dnl _AC_LANG_COMPILER_SUNCC
-dnl Check whether the compiler for the current language is really Sun compiler.
-dnl ###########################################################################
-m4_define([AC_LANG_COMPILER_SUNCC],
-[AC_CACHE_CHECK([whether we are really using the Sun _AC_LANG compiler],
-               [ac_cv_[]_AC_LANG_ABBREV[]_compiler_suncc],
-[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __SUNPRO_C
-       choke me
-#endif
-]])],
-                  [ac_compiler_suncc=yes],
-                  [ac_compiler_suncc=no])
-ac_cv_[]_AC_LANG_ABBREV[]_compiler_suncc=$ac_compiler_suncc
-])])
-
-dnl ###########################################################################
-dnl FreeBSD installs some libraries such as libpopt in the non default
-dnl search path /usr/local/{include,lib}. This nasty hack ensures
-dnl configure.ac will find the library if available and additional
-dnl flags be correctly added while compiling.
-dnl ###########################################################################
-if test x"$BUILD_FOR_FREEBSD" = x"yes"; then
-   CFLAGS="$CFLAGS -I/usr/local/include"
-   LDFLAGS="$LDFLAGS  -L/usr/local/lib"
-   CXXFLAGS="$CXXFLAGS -I/usr/local/include"
-fi
-
-dnl ----------------------------------------------------------------------------
-dnl Check for comparison_fn_t
-dnl ----------------------------------------------------------------------------
-AC_CHECK_TYPE(comparison_fn_t, 
-[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])],
-[], [[#include <stdlib.h>]])
-
-
-dnl ###########################################################################
-dnl libmapi and required dependencies
-dnl ###########################################################################
-
-dnl ---------------------------------------------------------------------------
-dnl Check for CC
-dnl ---------------------------------------------------------------------------
-AC_PROG_CC
-
-dnl ---------------------------------------------------------------------------
-dnl coverage testing
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
-                                        [Compile the library with code coverage support (default is NO)]),
-                                        [use_cov=$enableval], [use_cov=no])
-
-
-if test "x$use_cov" = x"yes"; then
-   COVERAGE_INIT="coverage-init"
-fi
-AC_SUBST(COVERAGE_INIT)
-
-dnl ---------------------------------------------------------------------------
-dnl Set up the right compiler options
-dnl ---------------------------------------------------------------------------
-AC_LANG_COMPILER_SUNCC 
-AC_LANG_COMPILER_ICC
-
-if test x"$ac_cv_c_compiler_suncc" = x"yes"; then
-dnl Sun Studio Compiler
-    COMPILER_OPTIONS_SHARED="-D__FUNCTION__=__func__"
-    COMPILER_OPTIONS_C="$COMPILER_OPTIONS_SHARED"
-    COMPILER_OPTIONS_CXX="$COMPILER_OPTIONS_SHARED"
-    LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN/../lib'"
-elif test x"$ac_cv_c_compiler_icc" = x"yes"; then
-dnl Intel Compiler
-    COMPILER_OPTIONS_SHARED="-O3 -Wall -g3 -fstrict-aliasing -Wmissing-prototypes -Wstrict-prototypes -wd2259,188,593,869,981,181,1419,2218"
-    COMPILER_OPTIONS_C="$COMPILER_OPTIONS_SHARED"
-    COMPILER_OPTIONS_CXX="$COMPILER_OPTIONS_SHARED"
-else
-dnl GNU Compiler
-    COMPILER_OPTIONS_SHARED="-Wall -g3 -fstrict-aliasing -Wp,-D_FORTIFY_SOURCE=2"
-    if test "x$use_cov" = "xyes"; then
-        COMPILER_OPTIONS_SHARED="-O0 $COMPILER_OPTIONS_SHARED"
-    else
-        COMPILER_OPTIONS_SHARED="-O3 $COMPILER_OPTIONS_SHARED"
-    fi
-    COMPILER_OPTIONS_C="$COMPILER_OPTIONS_SHARED -Wmissing-prototypes -Wstrict-prototypes"
-    if test "x$use_cov" = "xyes"; then
-        COMPILER_OPTIONS_C="$COMPILER_OPTIONS_C -fprofile-arcs -ftest-coverage"
-        LDFLAGS="$LDFLAGS -lgcov --coverage"
-    fi
-    COMPILER_OPTIONS_CXX="$COMPILER_OPTIONS_SHARED"
-    if test "x$use_cov" = "xyes"; then
-        COMPILER_OPTIONS_CXX="$COMPILER_OPTIONS_CXX -fprofile-arcs -ftest-coverage"
-        LDFLAGS="$LDFLAGS -lgcov --coverage"
-    fi
-fi
-AC_SUBST(COMPILER_OPTIONS_C)
-AC_SUBST(COMPILER_OPTIONS_CXX)
-
-dnl ---------------------------------------------------------------------------
-dnl Define an assert macro if this is a development release
-dnl ---------------------------------------------------------------------------
-. `dirname $0`/VERSION
-AC_SUBST(OPENCHANGE_VERSION_IS_SVN_SNAPSHOT)
-
-if test x"$OPENCHANGE_VERSION_IS_SVN_SNAPSHOT" = x"yes"; then
-   ASSERT_DEFINITION="-DENABLE_ASSERTS"
-fi
-AC_SUBST(ASSERT_DEFINITION)
-
-dnl ---------------------------------------------------------------------------
-dnl Check for install
-dnl ---------------------------------------------------------------------------
-AC_PROG_INSTALL
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Perl
-dnl ---------------------------------------------------------------------------
-AC_PATH_PROG(PERL, perl)
-
-if test x"$PERL" = x""; then
-   AC_MSG_WARN([No version of perl was found!])
-   AC_MSG_ERROR([Please install perl http://www.perl.com])
-fi
-AC_SUBST(PERL)
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Pidl
-dnl ---------------------------------------------------------------------------
-AC_PATH_PROG(PIDL, pidl)
-
-if test x"$PIDL" = x""; then
-       AC_MSG_WARN([No version of pidl was found!])
-       AC_MSG_ERROR([Please install pidl])
-fi
-AC_SUBST(PIDL)
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Python
-dnl ---------------------------------------------------------------------------
-
-AC_PATH_PROG(PYTHON,python)
-AC_PATH_PROG(PYTHON_CONFIG,python-config)
-
-AC_MSG_CHECKING(python library directory)
-pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
-AC_MSG_RESULT($pythondir)
-
-AC_SUBST(pythondir)
-
-dnl ----------------------------------------------------------------------------
-dnl Check for Flex
-dnl Flex version < 2.5.35 is fine but 2.5.4 beta is not. This is the
-dnl default version provided under FreeBSD or RHL5
-dnl ----------------------------------------------------------------------------
-if test x"$OPENCHANGE_VERSION_IS_SVN_SNAPSHOT" = x"yes"; then
-   AC_ARG_VAR([FLEX], [Location of the flex program.])
-   AC_CHECK_PROG([FLEX], [flex], [flex])
-
-   if test x"$FLEX" = x""; then
-       AC_MSG_WARN([No version of flex was found!])
-       AC_MSG_ERROR([Please install flex])
-   else
-       V=`$FLEX --version | awk '{print $NF}'`
-       W=`echo $V | awk -F. '{if (((($1*100 + $2)*100 + $3) > 20535) || $3 == 4) print "no"}'`
-       if test "x$W" != x ; then
-          AC_MSG_WARN([Adjust your FLEX environment variable])
-          AC_MSG_ERROR([Flex version 2.5.35 or below is needed. You have $V])
-       fi
-   fi
-
-   AC_SUBST(FLEX)
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Samba4 modules
-dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(TALLOC, talloc)
-PKG_CHECK_MODULES(SAMBA, dcerpc ndr samba-hostconfig samba-util tevent)
-PKG_CHECK_MODULES(SAMBASERVER, dcerpc_server)
-PKG_CHECK_MODULES(TDB, tdb)
-PKG_CHECK_MODULES(LDB, ldb)
-
-OC_RULE_ADD(mapistore_mstoredb, MAPISTORE)
-
-dnl ---------------------------------------------------------------------------
-dnl Check a particular Samba4 git revision
-dnl ---------------------------------------------------------------------------
-
-oc_save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I samba-hostconfig`"
-AC_CHECK_HEADER([samba/version.h],, AC_MSG_ERROR([Could not find Samba4 headers. Re-run ./configure with --with-samba=XXX where
- XXX is the prefix that Samba4 was installed to.]))
-
-. `dirname $0`/script/samba4_ver.sh
-
-OC_CHECK_SAMBA_VERSION([$SAMBA4_RELEASE],[$SAMBA4_GIT_VER-GIT-$SAMBA4_GIT_REV])
-CPPFLAGS="$oc_save_CPPFLAGS"
-
-dnl ---------------------------------------------------------------------------
-dnl Finally add libmapi to the library list
-dnl ---------------------------------------------------------------------------
-OC_RULE_ADD(libmapi, LIBS)
-
-dnl nasty hack: only compile IDL if we have a library
-dnl libraries require libmapi and libmapi require IDL
-OC_IDL="idl"
-AC_SUBST(OC_IDL)
-
-dnl ---------------------------------------------------------------------------
-dnl Check for dl libs
-dnl ---------------------------------------------------------------------------
-
-AC_CHECK_LIB([dl], [dlopen],
-           [
-                       DL_LIBS="-ldl"
-                       AC_SUBST(DL_LIBS)
-               ],
-               [
-                       AC_CHECK_FUNCS(dlopen, [
-                               DL_LIBS=""
-                               AC_SUBST(DL_LIBS)
-                       ], [
-                               AC_MSG_ERROR([unable to find dlopen])
-                       ])
-               ])
-
-dnl ---------------------------------------------------------------------------
-dnl Check for pthread libs
-dnl ---------------------------------------------------------------------------
-enable_pthread=no
-enable_thread_lib=""
-AC_CHECK_LIB([pthread], [pthread_mutex_init],
-            [
-               AC_DEFINE(HAVE_PTHREADS, 1, [Define if you want to use pthread for thread safety])
-               THREAD_LIBS=-lpthread
-               enable_pthread="yes"
-               enable_thread_lib="(pthread)"
-            ],
-            [
-            AC_MSG_WARN([pthread is missing - library is not thread safe])
-            enable_pthread="no"
-            ])
-
-if test x"$enable_pthread" = x"no"; then
-       dnl Check for gthread-2.0 / glib based implementation
-       PKG_CHECK_MODULES(GTHREAD, gthread-2.0, 
-               [
-                       AC_DEFINE(HAVE_GTHREAD, 1, [Define if you want to use gthread for thread safety])
-                       THREAD_LIBS=$GTHREAD_LIBS
-                       THREAD_CFLAGS=$GTHREAD_CFLAGS
-                       enable_pthread=yes
-                       enable_thread_lib="(gthread)"
-               ], 
-               [
-                       enable_pthread=no
-               ])
-fi
-
-AC_SUBST(THREAD_LIBS)
-AC_SUBST(THREAD_CFLAGS)
-
-dnl Additional thread library detection is required here:
-dnl FreeBSD (pthreads), glib etc.
-
-dnl ###########################################################################
-dnl libmapi++ dependencies
-dnl ###########################################################################
-
-dnl ---------------------------------------------------------------------------
-dnl Check for g++
-dnl ---------------------------------------------------------------------------
-AC_CACHE_CHECK([C++ compiler availability], [ac_cv_libmapixx_gxx_works],
-              [
-               AC_LANG_PUSH([C++])
-               AC_COMPILE_IFELSE([int main() { return 0; }], 
-                                 [ac_cv_libmapixx_gxx_works=yes],
-                                 [ac_cv_libmapixx_gxx_works=no])
-               AC_LANG_POP([C++])
-               ])
-
-dnl ---------------------------------------------------------------------------
-dnl Check for boost-thread
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_VAR([BOOST_LIB_SUFFIX], [Boost library name suffix])
-
-AC_CACHE_CHECK([for boost_thread$BOOST_LIB_SUFFIX library], [ov_cv_boost_thread],
-              [
-               ov_cv_boost_thread=no
-               ov_save_LIBS=$LIBS
-               LIBS="-lboost_thread$BOOST_LIB_SUFFIX $LIBS"
-               AC_LANG_PUSH([C++])
-               AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/thread.hpp>]],
-                                               [[boost::thread t]])],
-                               [ov_cv_boost_thread=yes])
-               AC_LANG_POP([C++])
-               LIBS=$ov_save_LIBS
-              ])
-
-
-if test x"$ac_cv_libmapixx_gxx_works" = "xyes"; then
-   if test x"$ov_cv_boost_thread" = "xyes"; then
-      AC_PROG_CXX 
-      OC_RULE_ADD(libmapixx, LIBS)
-   fi
-fi
-
-
-dnl ###########################################################################
-dnl libocpf dependencies
-dnl ###########################################################################
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Bison
-dnl ---------------------------------------------------------------------------
-if test x"$OPENCHANGE_VERSION_IS_SVN_SNAPSHOT" = x"yes"; then
-   AC_ARG_VAR([BISON], [Location of the bison program.])
-   AC_PATH_PROG([BISON], [bison], [bison])
-
-   if test x"$BISON" != x""; then
-      OC_RULE_ADD(libocpf, LIBS)
-      AC_SUBST(BISON)
-   fi
-else
-   OC_RULE_ADD(libocpf, LIBS)
-fi
-
-
-
-dnl ###########################################################################
-dnl libmapiadmin dependencies
-dnl ###########################################################################
-PKG_CHECK_EXISTS([ dcerpc_samr ],
-               [
-                       enable_libmapiadmin="yes"
-               ], [
-                       enable_libmapiadmin="no"
-               ])
-
-if test x"$enable_libmapiadmin" = x"yes"; then
-       PKG_CHECK_MODULES(SAMR, dcerpc_samr)
-       OC_RULE_ADD(libmapiadmin, LIBS)
-fi
-
-
-
-dnl ##########################################################################
-dnl tools dependencies
-dnl ##########################################################################
-
-dnl --------------------------------------------------------------------------
-dnl Check for libical                                                        
-dnl --------------------------------------------------------------------------
-PKG_CHECK_MODULES([ICAL], [libical], [have_libical="yes"], [have_libical="no"])
-AC_SUBST(ICAL_CFLAGS)
-AC_SUBST(ICAL_LIBS)
-
-dnl --------------------------------------------------------------------------
-dnl Check for popt
-dnl --------------------------------------------------------------------------
-
-AC_CHECK_LIB([popt], [poptFreeContext], 
-             [
-              AC_DEFINE(HAVE_LIBPOPT, 1, [Define if you want to use libpopt])
-              enable_libpopt="yes"
-             ], 
-             [ 
-               AC_MSG_WARN([libpopt is missing - can't build openchange tools]) 
-              enable_libpopt="no"
-             ])
-
-if test x"$enable_libpopt" = x"yes"; then
-       if test x"$enable_libmapiadmin" = x"yes"; then
-          OC_RULE_ADD(openchangepfadmin, TOOLS)
-          OC_RULE_ADD(mapitest, TOOLS)
-       fi
-
-       if test x"$enable_libocpf" = x"yes"; then
-          OC_RULE_ADD(openchangeclient, TOOLS)
-          OC_RULE_ADD(mapistore_fsocpf, MAPISTORE)
-       fi
-
-       if test x"$have_libical" = x"yes"; then
-           OC_RULE_ADD(exchange2ical, TOOLS)
-       fi
-
-       MAPISTORE_TEST=mapistore_test
-       OC_RULE_ADD(mapiprofile, TOOLS)
-       OC_RULE_ADD(openchangemapidump, TOOLS)
-       OC_RULE_ADD(schemaIDGUID, TOOLS)
-
-       OC_RULE_ADD(check_fasttransfer, TOOLS)
-       OC_RULE_ADD(test_asyncnotif, TOOLS)
-fi
-AC_SUBST(MAPISTORE_TEST)
-
-dnl --------------------------------------------------------------------------
-dnl Check for libmagic
-dnl --------------------------------------------------------------------------
-AC_CHECK_LIB([magic], [magic_open],
-            [
-               AC_DEFINE(HAVE_LIBMAGIC, 1, [Define if you want to use libmagic])
-              MAGIC_LIBS="-lmagic -lz"
-              enable_libmagic="yes"
-             ],
-              AC_SUBST(MAGIC_LIBS)
-            [
-               AC_MSG_WARN([libmagic is missing - can't build exchange2mbox])
-              enable_libmagic="no"
-            ])
-
-if test x"$enable_libmagic" = x"yes"; then
-       AC_CHECK_LIB([z], [gzopen], [], 
-                    [
-                      AC_MSG_ERROR([Z library not found, please install zlib-devel.], [1])
-                    ])
-       if test x"$enable_libpopt" = x"yes"; then
-               OC_RULE_ADD(exchange2mbox, TOOLS)
-       fi
-fi
-
-
-dnl ##########################################################################
-dnl libmapistore backends dependencies
-dnl ##########################################################################
-
-dnl --------------------------------------------------------------------------
-dnl Check for libs
-dnl --------------------------------------------------------------------------
-
-dnl ##########################################################################
-dnl mapiproxy server
-dnl ##########################################################################
-if test x$PYTHON != x; then
-       OC_RULE_ADD(mapiproxy, SERVER)
-fi
-
-AC_ARG_WITH(modulesdir, 
-[AS_HELP_STRING([--with-modulesdir], [Modules path to use])],
-[modulesdir="$withval"; ],
-[modulesdir="\${prefix}/modules"; ])
-
-AC_SUBST(modulesdir)
-
-dnl ##########################################################################
-dnl Python bindings dependencies
-dnl ##########################################################################
-AC_ARG_ENABLE(pymapi, AC_HELP_STRING([--enable-pymapi],
-                          [build Python bindings for libmapi]),
-                          enable_pymapi="$enableval",
-                          enable_pymapi=no)
-if test "x${enable_pymapi}" = xyes; then
-   PYMAPIALL="pymapi"
-   PYMAPIINSTALL="pymapi-install"
-   PYMAPIUNINSTALL="pymapi-uninstall"
-fi
-
-PYCDIR=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='\\$(prefix)')"`
-AC_SUBST(PYCDIR)
-
-dnl Enable pyopenchange by default
-PYMAPIALL="$PYMAPIALL pyopenchange"
-PYMAPIINSTALL="$PYMAPIALLINSTALL pyopenchange-install"
-PYMAPIUNINSTALL="$PYMAPIUNINSTALL pyopenchange-uninstall"
-
-AC_SUBST(PYMAPIALL)
-AC_SUBST(PYMAPIINSTALL)
-AC_SUBST(PYMAPIUNINSTALL)
-
-
-dnl ##########################################################################
-dnl Documentation dependencies
-dnl ##########################################################################
-AC_PATH_PROG(DOXYGEN, doxygen)
-if test x"$DOXYGEN" = x""; then
-       AC_MSG_WARN(doxygen)
-       enable_doxygen="no"
-else
-       enable_doxygen="yes"
-       AC_SUBST(DOXYGEN)
-fi
-
-dnl ##########################################################################
-dnl (Optional) subunit support in mapitest
-dnl ##########################################################################
-PKG_CHECK_MODULES(SUBUNIT, libsubunit, found_subunit=yes, found_subunit=no)
-AC_SUBST(SUBUNIT_CFLAGS)
-AC_SUBST(SUBUNIT_LIBS)
-
-if test x"$found_subunit" = x"yes"; then
-       AC_DEFINE(HAVE_SUBUNIT, 1, [Define if you want to use subunit])
-       have_subunit="yes"
-else
-       have_subunit="no"
-fi
-
-dnl ##########################################################################
-dnl Qt4 support
-dnl ##########################################################################
-AC_ARG_ENABLE(openchange-qt4,
-              AC_HELP_STRING([--enable-openchange-qt4],
-                             [Compile OpenChange Qt4 wrapper.]),
-              enable_openchange_qt4=$enableval,
-              enable_openchange_qt4="no")
-if test x$enable_openchange_qt4 = xyes; then
-  PKG_CHECK_MODULES(Qt4,
-                    QtCore >= 4.3.0 QtGui >= 4.3.0)
-  MOC=`$PKG_CONFIG --variable=moc_location QtCore`
-elif test x$enable_openchange_qt4 = xtry; then
-  PKG_CHECK_MODULES(Qt4,
-                    QtCore >= 4.3.0 QtGui >= 4.3.0,
-                    [enable_openchange_qt4="yes"
-                     MOC=`$PKG_CONFIG --variable=moc_location QtCore`],
-                    [enable_openchange_qt4="no"])
-fi
-
-AC_SUBST(Qt4_CFLAGS)
-AC_SUBST(Qt4_LIBS)
-AC_SUBST(MOC)
-
-if test "x$enable_openchange_qt4" = "xyes"; then
-   OPENCHANGE_QT4="openchange_qt4"
-fi
-AC_SUBST(OPENCHANGE_QT4)
-
-dnl ***********************
-dnl Makefiles 
-dnl ***********************
-AC_CONFIG_FILES([config.mk libmapi.pc libmapiadmin.pc libocpf.pc mapiproxy/libmapiproxy.pc
-                mapiproxy/libmapiserver.pc mapiproxy/libmapistore.pc libmapi++.pc
-                Doxyfile libmapi++/Doxyfile libocpf/Doxyfile libmapiadmin/Doxyfile
-                libmapi/Doxyfile mapiproxy/Doxyfile utils/mapitest/Doxyfile])
-AC_OUTPUT
-
-
-dnl ##########################################################################
-dnl Print configuration info
-dnl ##########################################################################
-
-OC_SETVAL(libmapi)
-OC_SETVAL(libmapiadmin)
-OC_SETVAL(libocpf)
-OC_SETVAL(libmapixx)
-
-OC_SETVAL(openchangeclient)
-OC_SETVAL(mapiprofile)
-OC_SETVAL(openchangepfadmin)
-OC_SETVAL(exchange2mbox)
-OC_SETVAL(exchange2ical)
-OC_SETVAL(mapitest)
-OC_SETVAL(openchangemapidump)
-OC_SETVAL(schemaIDGUID)
-OC_SETVAL(mapiproxy)
-
-OC_SETVAL(doxygen)
-
-AC_MSG_RESULT([
-
-===============================================================
-OpenChange Configuration (Please review)
-
-          * OpenChange Libraries:
-            - libmapi (C library):     $enable_libmapi
-                     Thread support:   $enable_pthread $enable_thread_lib
-            - libmapi++ (C++ library): $enable_libmapixx
-            - libmapiadmin:            $enable_libmapiadmin
-            - libocpf:                 $enable_libocpf
-
-          * OpenChange Server:
-            - mapiproxy:               $enable_mapiproxy
-
-          * OpenChange mapistore backends:
-            - mstoredb:                yes
-            - fsocpf:                  $enable_libocpf
-
-          * OpenChange Tools:
-            - openchangeclient:        $enable_openchangeclient
-            - mapiprofile:             $enable_mapiprofile
-            - openchangepfadmin:       $enable_openchangepfadmin
-            - exchange2mbox:           $enable_exchange2mbox
-            - exchange2ical:           $enable_exchange2ical
-            - mapitest:                $enable_mapitest
-            - openchangemapidump:      $enable_openchangemapidump
-            - schemaIDGUID:            $enable_schemaIDGUID
-
-          * subunit format (mapitest): $have_subunit
-
-          * OpenChange Documentation:  $enable_doxygen
-
-          * Coverage Tests:            $use_cov
-
-          * OpenChange Bindings:
-            - Python:                  $enable_pymapi
-            - Qt4:                     $enable_openchange_qt4
-
-          * Installation prefix:       $prefix
-
-===============================================================
-
-])
-
diff --git a/branches/plugfest/doc/doxygen/apidocs.css b/branches/plugfest/doc/doxygen/apidocs.css
deleted file mode 100644 (file)
index 65df98f..0000000
+++ /dev/null
@@ -1,758 +0,0 @@
-/*
-** WEBSITE
-**
-*/
-
-BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
-       font-family: Geneva, Arial, Helvetica, sans-serif;
-}
-BODY,TD {
-       font-size: 90%;
-}
-H1 {
-       text-align: center;
-       font-size: 160%;
-}
-H2 {
-       font-size: 19px;
-       font-weight: bold;
-       color: #3E93D5;
-}
-H3 {
-       font-size: 100%;
-}
-
-P {
-      text-align: justify;
-}
-
-LI {
-      li-style-type: square;
-      li-style-position: outside;
-      display: list-item;
-}
-
-CAPTION { font-weight: bold }
-DIV.qindex {
-       width: 100%;
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       padding: 2px;
-       line-height: 140%;
-}
-DIV.nav {
-       width: 100%;
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       padding: 2px;
-       line-height: 140%;
-}
-DIV.navtab {
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-TD.navtab {
-       font-size: 70%;
-}
-A.qindex {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D;
-}
-A.qindex:visited {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D
-}
-A.qindex:hover {
-       text-decoration: none;
-       background-color: #ddddff;
-}
-A.qindexHL {
-       text-decoration: none;
-       font-weight: bold;
-       background-color: #6666cc;
-       color: #ffffff;
-       border: 1px double #9295C2;
-}
-A.qindexHL:hover {
-       text-decoration: none;
-       background-color: #6666cc;
-       color: #ffffff;
-}
-A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
-A.el { text-decoration: none; font-weight: bold }
-A.elRef { font-weight: bold }
-A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
-A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
-A.codeRef:link { font-weight: normal; color: #0000FF}
-A.codeRef:visited { font-weight: normal; color: #0000FF}
-A:hover { text-decoration: none; background-color: #f2f2ff }
-DL.el { margin-left: -1cm }
-.fragment {
-       font-family: monospace, fixed;
-       font-size: 95%;
-}
-PRE.fragment {
-       border: 1px solid #CCCCCC;
-       background-color: #f5f5f5;
-       font-size: 11px;
-       margin-top: 4px;
-       margin-bottom: 4px;
-       margin-left: 2px;
-       margin-right: 8px;
-       padding-left: 6px;
-       padding-right: 6px;
-       padding-top: 4px;
-       padding-bottom: 4px;
-}
-DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
-
-DIV.groupHeader {
-       margin-left: 16px;
-       margin-top: 12px;
-       margin-bottom: 6px;
-       font-weight: bold;
-}
-DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
-BODY {
-       background: white;
-       color: black;
-       margin-right: 20px;
-       margin-left: 20px;
-}
-TD.indexkey {
-       background-color: #e8eef2;
-       font-weight: bold;
-       padding-right  : 10px;
-       padding-top    : 2px;
-       padding-left   : 10px;
-       padding-bottom : 2px;
-       margin-left    : 0px;
-       margin-right   : 0px;
-       margin-top     : 2px;
-       margin-bottom  : 2px;
-       border: 1px solid #CCCCCC;
-}
-TD.indexvalue {
-       background-color: #e8eef2;
-       font-style: italic;
-       padding-right  : 10px;
-       padding-top    : 2px;
-       padding-left   : 10px;
-       padding-bottom : 2px;
-       margin-left    : 0px;
-       margin-right   : 0px;
-       margin-top     : 2px;
-       margin-bottom  : 2px;
-       border: 1px solid #CCCCCC;
-}
-TR.memlist {
-   background-color: #f0f0f0; 
-}
-P.formulaDsp { text-align: center; }
-IMG.formulaDsp { }
-IMG.formulaInl { vertical-align: middle; }
-SPAN.keyword       { color: #008000 }
-SPAN.keywordtype   { color: #604020 }
-SPAN.keywordflow   { color: #e08000 }
-SPAN.comment       { color: #800000 }
-SPAN.preprocessor  { color: #806020 }
-SPAN.stringliteral { color: #002080 }
-SPAN.charliteral   { color: #008080 }
-.mdescLeft {
-       padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.mdescRight {
-       padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.memItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplParams {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       color: #606060;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.search     { color: #003399;
-              font-weight: bold;
-}
-FORM.search {
-              margin-bottom: 0px;
-              margin-top: 0px;
-}
-INPUT.search { font-size: 75%;
-               color: #000080;
-               font-weight: normal;
-               background-color: #e8eef2;
-}
-TD.tiny      { font-size: 75%;
-}
-a {
-       color: #1A41A8;
-}
-a:visited {
-       color: #2A3798;
-}
-.dirtab { padding: 4px;
-          border-collapse: collapse;
-          border: 1px solid #84b0c7;
-}
-TH.dirtab { background: #e8eef2;
-            font-weight: bold;
-}
-HR { height: 1px;
-     border: none;
-     border-top: 1px solid black;
-     margin-bottom: 50px;
-}
-
-/* Style for detailed member documentation */
-.memtemplate {
-  font-size: 80%;
-  color: #606060;
-  font-weight: normal;
-} 
-.memnav { 
-  background-color: #e8eef2;
-  border: 1px solid #84b0c7;
-  text-align: center;
-  margin: 2px;
-  margin-right: 15px;
-  padding: 2px;
-}
-.memitem {
-  padding: 4px;
-  background-color: white;
-  border-width: 1px;
-  border-style: solid;
-  border-color: #ccc;
-  -moz-border-radius: 8px 8px 8px 8px;
-  margin-bottom: 30px;
-}
-.memname {
-  white-space: nowrap;
-  font-weight: bold;
-  font-size: 12px;
-  margin: 10px 10px 10px 10px;
-}
-
-.memname EM {
-        color: #45417e;
-}
-
-.memdoc{
-  padding-left: 10px;
-  padding-right: 10px;
-}
-
-.memdoc EM, TD {
-       font-size: 12px;
-}
-
-.memproto {
-  background-color: #e9e9f4;
-  width: 100%;
-  border-width: 1px;
-  border-style: solid;
-  border-color: #ccc;
-  font-weight: bold;
-  -moz-border-radius: 8px 8px 8px 8px;
-}
-.paramkey {
-  text-align: right;
-}
-.paramtype {
-  white-space: nowrap;
-}
-.paramname {
-  color: #602020;
-  font-style: italic;
-  white-space: nowrap;
-}
-/* End Styling for detailed member documentation */
-
-/* for the tree view */
-.ftvtree {
-       font-family: sans-serif;
-       margin:0.5em;
-}
-.directory { font-size: 9pt; font-weight: bold; }
-.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
-.directory > h3 { margin-top: 0; }
-.directory p { margin: 0px; white-space: nowrap; }
-.directory div { display: none; margin: 0px; }
-.directory img { vertical-align: -30%; }
-
-
-#website {
-       width: 820px;
-       height: 100%;
-       margin-left: auto;
-       margin-right: auto;
-       text-align: left;
-
-
-       /* IE hack */
-       * position: absolute;
-       * left: 50%;
-       * margin-left: -410px;
-}
-
-/*
-** HEADER
-**
-*/
-
-.header {
-       height: 200px;
-       background: url(header.jpg) no-repeat top center;
-}
-
-body {
-       background: #fff url(body_top_bg2.jpg) top left repeat-x;
-       font-family: Arial, Trebuchet MS, Tahoma, Verdana, Helvetica, sans-serif;
-       font-size: 11px;
-       line-height: 17px;
-       color: #444;
-       color: #3a3a3a;
-       fdpadding-top: 15px;
-       text-align: center;
-       background-color: #fbfbfb;
-}
-
-h1 {
-       font: 24px bold Trebuchet MS, Arial;
-       color: #FFF;
-       padding: 0;
-       margin: 0;
-}
-
-/*
-** MIDDLE SIDE
-**
-*/
-
-#middle_side {
-       display: block;
-       height: 100%;
-       width: 800px;
-       margin-top: 7px;
-       backsground: url(middle_bg.jpg) top left repeat-x;
-       background-color: #fbfbfb;
-}
-
-/* left and right side */
-
-#left_side {
-       background-color: #fff;
-       clear: both;
-       margin-bottom: 10px;
-       border-bottom: 1px solid #eee;
-       border-left: 1px solid #eee;
-       border-right: 1px solid #eee;
-       -moz-border-radius: 0 0 8px 8px;
-       height: 29px;
-}
-
-
-/*
-** MENU HORIZONTAL
-**
-*/
-
-/************ Global Navigation *************/
-
-DIV.tabs {
-   float            : left;
-   width            : 100%;
-   background       : url("tab_b.gif") repeat-x bottom;
-   margin-top      : 10px;
-   margin-bottom    : 4px;
-}
-
-DIV.tabs  ul {
-   margin           : 0px;
-   padding-left     : 10px;
-   list-style       : none;
-}
-
-DIV.tabs  li {
-   display          : inline;
-   margin           : 0px;
-   padding          : 0px;
-}
-
-DIV.tabs A {
-   float            : left;
-   background       : url("tab_r.gif") no-repeat right top;
-   border-bottom    : 1px solid #84B0C7;
-   font-size        : x-small;
-   font-weight      : bold;
-   text-decoration  : none;
-}
-
-DIV.tabs A:link, .tabs A:visited,
-DIV.tabs A:active, .tabs A:hover
-{
-       color: #1A419D;
-}
-
-
-DIV.tabs SPAN
-{
-   float            : left;
-   display          : block;
-   background       : url("tab_l.gif") no-repeat left top;
-   padding          : 5px 10px;
-   white-space      : nowrap;
-}
-
-DIV.tabs TD
-{
-   font-size        : x-small;
-   font-weight      : bold;
-   text-decoration  : none;
-}
-
-
-
-/* Commented Backslash Hack hides rule from IE5-Mac \*/
-DIV.tabs SPAN {float : none;}
-/* End IE5-Mac hack */
-
-DIV.tabs A:hover SPAN
-{
-   background-position: 0% -150px;
-}
-
-DIV.tabs LI.current A
-{
-   background-position: 100% -150px;
-   border-width     : 0px;
-}
-
-DIV.tabs LI.current SPAN
-{
-   background-position: 0% -150px;
-   padding-bottom   : 6px;
-}
-
-
-DIV.nav
-{
-   background       : none;
-   border           : none;
-   border-bottom    : 1px solid #84B0C7;
-}
-
-
-#right_side_home {
-       font-family: "Lucida Grande", Arial, Verdana, sans-serif;
-       background-color: white;
-       padding: 0px 20px;
-       border: 1px solid #ebebeb;
-       border: 1px solid #ddd;
-       -moz-border-radius: 10px 10px;
-
-       width: 750px;
-
-
-       * width: 800px;
-       * margin-left: 0px;
-       padding-bottom: 10px;
-}
-
-#right_side_home td {
-                line-height: 17px;
-                margin: 0 0 5px 0;
-                padding: 10px 0 15px 7px
-                display: table-cell;
-                border-spacing: 2px 2px;
-                vertical-align: middle;
-                text-align: left;
-                border-bottom: 1px solid #EEEEEE;
-}
-
-#right_side_home td h2, a.anchor {
-                font-size: 19px;
-                font-weight: bold;
-                color: #3E93D5;
-}
-
-#right_side_home td.indexkey {
-                border-bottom: none;
-}
-
-#right_side_home li {
-                list-style-position: inside;
-                valign: middle;
-}
-
-
-TD.indexkey {
-       background-color: #e8eef2;
-       font-size       : 12px;
-       font-weight     : bold;
-       padding-right   : 10px;
-       padding-top     : 2px;
-       padding-left    : 10px;
-       padding-bottom  : 2px;
-       margin-left     : 0px;
-       margin-right    : 0px;
-       margin-top      : 2px;
-       margin-bottom   : 2px;
-       border          : 1px solid #CCCCCC;
-}
-TD.indexvalue {
-       background-color: #e8eef2;
-       font-style      : italic;
-       font-size       : 12px;
-       padding-right   : 10px;
-       padding-top     : 2px;
-       padding-left    : 10px;
-       padding-bottom  : 2px;
-       margin-left     : 0px;
-       margin-right    : 0px;
-       margin-top      : 2px;
-       margin-bottom   : 2px;
-       border          : 1px solid #CCCCCC;
-}
-TR.memlist {
-   background-color: #f0f0f0; 
-}
-
-.mdescLeft {
-       padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.mdescRight {
-       padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.memItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplParams {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       color: #606060;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-
-code {
-     display: block;
-     width: 100%;
-     border: 1px solid #ccc;
-     background-color: #e8edf3;
-     padding-top: 10px;
-     padding-bottom: 10px;
-     padding-left: 5px;
-     padding-right: 5px;
-     margin-bottom: 10px;
-     margin-top: 10px;
-}
-
diff --git a/branches/plugfest/doc/doxygen/footer.html b/branches/plugfest/doc/doxygen/footer.html
deleted file mode 100644 (file)
index d410577..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-</div>
-<br/>
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;">
-<tr>
-<td> 
-  <img alt="Creative Commons License" src="CC_SomeRightsReserved.png" width="90" height="30" border="0" /><br />
-  <img alt="Creative Commons Attribution icon" src="24px-Cc-by_white.svg.png" width="24" height="24" border="0" />
-  <img alt="Creative Commons Share Alike icon" src="24px-Cc-sa_white.svg.png" width="24" height="24" border="0" />
-</td>
-<td> <i><strong class="selflink">This content</strong> is licensed under the Creative Commons<br />
-Attribution ShareAlike License v. 3.0:<br />
-<a href="http://creativecommons.org/licenses/by-sa/3.0/" class="external free" title="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow">http://creativecommons.org/licenses/by-sa/3.0/</a></i>
-</td></tr></table>
-<br/>
-</div>
-</div>
-</body>
-</html>
diff --git a/branches/plugfest/doc/doxygen/header.html b/branches/plugfest/doc/doxygen/header.html
deleted file mode 100644 (file)
index 60ce167..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-  <head>
-    <title>$projectname $projectnumber API Documentation</title>
-    <link href="doxygen.css" rel="stylesheet" type="text/css"/>
-    <link href="apidocs.css" rel="stylesheet" type="text/css"/>
-  </head>
-  <body>
-    <div id="website">
-    <div class="header"></div>
-      <div id="middle_side">
-       <div id="right_side_home">
diff --git a/branches/plugfest/doc/doxygen/index.html b/branches/plugfest/doc/doxygen/index.html
deleted file mode 100644 (file)
index d9c46d1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">    
-  <head>      
-    <title>OpenChange API Documentation</title>      
-    <meta http-equiv="refresh" content="0;URL='overview/index.html'" />    
-  </head>    
-  <body> 
-    <p>Redirecting you to the OpenChange <a href="overview/index.html">API documentation 
-      overview</a>.</p> 
-  </body>  
-</html> 
diff --git a/branches/plugfest/doc/doxygen/libmapi-concepts.doxy b/branches/plugfest/doc/doxygen/libmapi-concepts.doxy
deleted file mode 100644 (file)
index 2975e39..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-\page mapiconcepts MAPI Concepts
-
-<h2>MAPI objects</h2>
-
-Almost any MAPI data you access, read or edit is associated with an
-object. No matter whether you intend to browse mailbox hierarchy, open
-folders, create tables or access items (messages, appointments,
-contacts, tasks, notes), you will have to initialize and use MAPI
-objects: <em>object understanding and manipulation is
-fundamental</em>.
-
-- When developing MAPI clients with Microsoft framework, instantiated
-objects inherit from parent classes. As a matter of fact, developers
-know which methods they can apply to objects and we  suppose it makes
-their life easier.
-- In OpenChange, objects are opaque. They are generic data structures
-which content is set and accessed through MAPI public
-functions. Therefore, Linux MAPI developers must know what they are
-doing. 
-
-An example of MAPI object manipulation is shown below:
-\code
-        mapi_object     obj_store;
-
-        [...]
-
-        mapi_object_init(&obj_store);
-        retval = OpenMsgStore(&obj_store);
-        if (retval != MAPI_E_SUCCESS) {
-                mapi_errstr("OpenMsgStore", GetLastError());
-                exit (1);
-        }
-        mapi_object_release(&obj_store);
-\endcode
-
-<h3>MAPI Handles</h3>
-
-Beyond memory management considerations, understanding MAPI handles
-role in object manipulation provides a better understanding why
-mapi_object_release() matters.
-
-Handles are temporary identifiers returned by Exchange when you access
-or create objects on the server. They are used to make reference to a
-particular object all along its session lifetime. They are stored in
-unsigned integers, are unique for each object but temporary along MAPI
-session. Handles are the only links between objects accessed on the
-client side and efficiently stored on the server side.
-
-Although OpenChange MAPI makes handles manipulation transparent for
-developers, mapi_object_release() frees both the allocated memory
-for the object on client side, but also releases the object on the
-server.
-
-*/
diff --git a/branches/plugfest/doc/doxygen/libmapi-examples.doxy b/branches/plugfest/doc/doxygen/libmapi-examples.doxy
deleted file mode 100644 (file)
index 112ffb3..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/** \example mapi_sample1.c
-
-This example shows a very basic MAPI program, including setup, login,
-and teardown.
-
-The first MAPI library function called is MAPIInitialize(). As its
-name suggests, this function initializes MAPI library: It creates the
-MAPI global context, opens the profile database store (database path
-passed as function parameter) and initialize Samba4 transport
-layer. This function must be called prior any other MAPI
-library operations.
-
-Once MAPI is initialized, we need to create a connection to Exchange and
-open MAPI sessions with the user credentials. This is the purpose of
-MapiLogonEx() which needs to be executed prior doing any effective
-code. This function takes a pointer on a mapi_session structure,
-the profile username and an optional password in case you decided to
-store it outside the profile. In the example above, we retrieve the
-default profile name from the database using GetDefaultProfile()
-Note that MapiLogonEx() opens connections to both the EMSMDB and
-EMSABP store providers. If you intend to interact with a single
-provider, use MapiLogonProvider() instead.
-
-Finally we call MAPIUninitialize() prior to leaving the
-function. This opaque function will clean up the memory allocated
-during the session and stored within the global MAPI context.
-
-*/
-
-/** \example fetchmail.c
-
-This example shows how to fetch mail from the server.
-
-We initialize MAPI library with the profiles database path, retrieve
-the default profile name and open connections to both the Exchange
-message store provider (EMSMDB) and Exchange Address Book provider
-(EMSABP).
-
-\section ex-fetchmail-openstore Open the message store
-
-Now we have
-opened a connection to the Exchange message store provider, we can
-open the user mailbox store with OpenMsgStore() This function
-will return a set of pre-defined folder unique IDs (stored on double
-values) and a \em pointer to the upper object we can access in MAPI
-hierarchy.
-
-\section ex-fetchmail-openinbox Opening the Inbox folder
-
-We now open the Inbox folder. Since OpenMsgStore() returns a set
-of \em common folders identifiers we store in the message store
-object (obj_store), we can retrieve them using the convenient
-GetDefaultFolder() function. This function doesn't generate any
-network traffic, but returns the folder identifier associated with the
-constant passed as argument (here olFolderInbox).
-
-We could have used MAPI tables and GetHierarchyTable() function to
-find Inbox folder identifier. We would have had to retrieve the
-Top Information Store hierarchy table, customize the view with 
-PR_FID (Folder ID MAPI property) and PR_DISPLAY_NAME, find the 
-IPM_SUBTREE folder identifier, open it, retrieve the Hierarchy Table,
-call SetColumns() with PR_FID and finally browse table rows until
-we found the Inbox folder.folders to store emails within 
-IPM_SUBTREE folder hierarchy.
-
-\section ex-fetchmail-retrievecontentstable Retrieve contents table
-
-Once the Inbox folder is opened, we can call GetContentsTable() to
-create the view needed to list all the children objects. In the
-current example we suppose we will only retrieve IPM.Post objects
-(emails).
-
-\section ex-fetchmail-customview Customizing the MAPI view
-
-We now customize the MAPI view and set the columns with the property
-tags we want to access: PR_FID (Folder Identifier) and
-PR_MID (Message identifier). MAPI uses unique and permanent
-identifiers to classify objects. These identifiers are double values
-(8 bytes) and never change until you move the object to another
-location.
-
-We now enter the last step of the fetching process:
-
-- Call QueryPosition() to retrieve the current cursor position in the
-  contents table. The function returns the approximate fractional
-  position with a Numerator and Denominator. Denominator is the total
-  number of rows in the table.
-- Recursively call QueryRows() with the TBL_ADVANCE flag to fetch table rows.
-- Iterate through QueryRows results
-- Retrieve columns values for each row with the convenient find_SPropValue_data()
-- Open the message given its folder and message ids.
-- Call GetPropsAll() rather than GetProps() to retrieve all properties associated with a given object
-- Call one of OpenChange mapidump API function to display nice messages dump on standard output.
-
-We finally release mapi objects and clean up the MAPI library before returning
-*/
-
-/** \example fetchappointment.c
-
-This example shows how to fetch an appointment from the server.
-
-This is very similar to the fetchmail.c example, except two minor changes:
-- We change the default folder constant from olFolderInbox to
-olFolderContact so any further operations are performed on a child of
-the calendar folder.
-- We use mapidump_appointment() rather than mapidump_message() to dump
-appointments on standard output. 
-
-*/
-
diff --git a/branches/plugfest/doc/doxygen/libmapi-mainpage.doxy b/branches/plugfest/doc/doxygen/libmapi-mainpage.doxy
deleted file mode 100644 (file)
index 7f8ec32..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
-\mainpage Opening Exchange to a wider world
-
-<h2>OpenChange Project Goals</h2>
-
-The OpenChange Project aims to provide a portable Open Source
-implementation of Microsoft Exchange Server and Exchange
-protocols. Exchange is a groupware server designed to work with
-Microsoft Outlook, and providing features such as a messaging server,
-shared calendars, contact databases, public folders, notes and tasks.
-
-The OpenChange project has three goals:
-
-- To provide a library for interoperability with Exchange
-protocols, and to assist implementors to use this to create
-groupware that interoperates with both Exchange and other
-OpenChange-based software.
-
-- To provide an alternative to Microsoft Exchange Server which uses
-native Exchange protocols and provides exactly equivalent
-functionality when viewed from Microsoft Outlook clients.
-
-- To develop a body of knowledge about the most popular groupware
-protocols in use commercially today in order to promote  development
-of a documented and unencumbered standard, with all the  benefits that
-standards bring.
-
-<h2>MAPI Overview</h2>
-
-MAPI is the glue between Exchange and Outlook, but a common
-misconception is to consider it as a network protocol. MAPI, an
-acronym for Messaging Application Programming Interface, refers to a
-proprietary set of function call interfaces developed by Microsoft
-before Microsoft Exchange existed. By purchasing licenses to
-Microsoft's proprietary and Windows-only MAPI libraries, anyone can
-create message services that communicate using these functions. A mail
-server implemented in this way is what Microsoft calls a MAPI Service
-Provider. Any protocol could be used as a transport for these MAPI
-communications. 
-
-When Microsoft Exchange 5.5 was developed in 1997, the decision was
-taken to create a proprietary transport protocol for MAPI which
-closely matches the MAPI calling interface. This protocol is called
-ExchangeRPC and used in Outlook-Exchange communications. ExchangeRPC
-is the only transport OpenChange supports, and in practice is the only
-transport of interest today. Most of the world is being forced to use
-Microsoft Exchange servers, so that defines the transport that
-matters.
-
-When OpenChange team members first looked at the network network
-traffic these generated by calling MAPI functions on Windows operating
-systems, we noticed blobs of data first either compressed or
-obfuscated, then encapsulated by an RPC transport protocol function
-(EMSMDB) and finally pushed on the wire. Transporting
-memory-image blobs on the wire is not good protocol design, however
-for a number of reasons the result now works quite reliably.
-
-<h2>Looking at a MAPI Conversation</h2>
-
-A high-level view of a MAPI conversation follows. We also introduce
-important terminology:
-- MAPI applications call MAPI providers, using the API to pass data
-(eg a mail message body) or MAPI conversation requests and responses
-(eg 'search for this address').
-- MAPI providers pack the client or server MAPI information in a
-blob. There are only two really important providers, one for data
-destined for what is somewhat strangely termed the Message Store
-(although it handles more than just messages), and the other for data
-to be sent to the Address Book.  These are called the EMSMDB and
-EMSABP providers, respectively.
-- ExchangeRPC protocol is used to transport the MAPI information over
-the wire, encapsulating inside it one of two MAPI-specific protocols:
-the EMSMDB Message Store Protocol, or the NSPI Addressbook Protocol.
-- The store provider on the server side associated with the protocol
-used (either EMSMDB or EMSABP) extracts the MAPI blob from RPC
-protocol functions, analyzes its content and performs operations
-embedded within it.
-
-*/
diff --git a/branches/plugfest/doc/doxygen/pictures/24px-Cc-by_white.svg.png b/branches/plugfest/doc/doxygen/pictures/24px-Cc-by_white.svg.png
deleted file mode 100644 (file)
index bd7ed04..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/24px-Cc-by_white.svg.png and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/24px-Cc-sa_white.svg.png b/branches/plugfest/doc/doxygen/pictures/24px-Cc-sa_white.svg.png
deleted file mode 100644 (file)
index b476476..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/24px-Cc-sa_white.svg.png and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/CC_SomeRightsReserved.png b/branches/plugfest/doc/doxygen/pictures/CC_SomeRightsReserved.png
deleted file mode 100644 (file)
index df961f1..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/CC_SomeRightsReserved.png and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/body_top_bg2.jpg b/branches/plugfest/doc/doxygen/pictures/body_top_bg2.jpg
deleted file mode 100644 (file)
index 9e6ede4..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/body_top_bg2.jpg and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/header.jpg b/branches/plugfest/doc/doxygen/pictures/header.jpg
deleted file mode 100644 (file)
index 33526f9..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/header.jpg and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/middle_bg.jpg b/branches/plugfest/doc/doxygen/pictures/middle_bg.jpg
deleted file mode 100644 (file)
index b0e9c60..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/middle_bg.jpg and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/nav_tab.gif b/branches/plugfest/doc/doxygen/pictures/nav_tab.gif
deleted file mode 100644 (file)
index 463c59d..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/nav_tab.gif and /dev/null differ
diff --git a/branches/plugfest/doc/doxygen/pictures/pixel_grey.gif b/branches/plugfest/doc/doxygen/pictures/pixel_grey.gif
deleted file mode 100644 (file)
index 215417d..0000000
Binary files a/branches/plugfest/doc/doxygen/pictures/pixel_grey.gif and /dev/null differ
diff --git a/branches/plugfest/doc/examples/Makefile b/branches/plugfest/doc/examples/Makefile
deleted file mode 100644 (file)
index 54c7bf2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-all:   fetchappointment        \
-       fetchmail               \
-       mapi_sample1            \
-       multiple_notif
-
-clean:
-       rm -f fetchappointment fetchmail mapi_sample1 multiple_notif
-
-fetchappointment:
-               gcc fetchappointment.c -o fetchappointment `pkg-config libmapi --cflags --libs` 
-
-fetchmail:
-               gcc fetchmail.c -o fetchmail `pkg-config libmapi --cflags --libs`
-
-mapi_sample1:
-               gcc mapi_sample1.c -o mapi_sample1 `pkg-config libmapi --cflags --libs`
-
-multiple_notif:
-               gcc multiple_notif.c -o multiple_notif `pkg-config libmapi --cflags --libs` -lpthread -lpopt
\ No newline at end of file
diff --git a/branches/plugfest/doc/examples/fetchappointment.c b/branches/plugfest/doc/examples/fetchappointment.c
deleted file mode 100644 (file)
index 38ba30f..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <libmapi/libmapi.h>
-
-#define DEFAULT_PROFDB "%s/.openchange/profiles.ldb"
-
-int main(int argc, char *argv[])
-{
-        enum MAPISTATUS                 retval;
-       struct mapi_context             *mapi_ctx;
-       TALLOC_CTX                      *mem_ctx;
-        struct mapi_session             *session = NULL;
-        mapi_object_t                   obj_store;
-        mapi_object_t                   obj_folder;
-        mapi_object_t                   obj_table;
-        mapi_object_t                   obj_message;
-        struct mapi_SPropValue_array   props_all;
-        struct SRowSet                  rowset;
-        struct SPropTagArray            *SPropTagArray;
-        mapi_id_t                       id_inbox;
-        mapi_id_t                       *fid, *mid;
-        char                           *profname;
-       char                            *profdb;
-       uint32_t                        Numerator;
-       uint32_t                        Denominator;
-        uint32_t                        i;
-
-       mem_ctx = talloc_named(NULL, 0, "fetchappointment");
-
-        /* Initialize MAPI */
-       profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-        retval = MAPIInitialize(&mapi_ctx, profdb);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Find Default Profile */
-        retval = GetDefaultProfile(mapi_ctx, &profname);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Log on EMSMDB and NSPI */
-        retval = MapiLogonEx(mapi_ctx, &session, profname, NULL);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Open Message Store */
-        mapi_object_init(&obj_store);
-        retval = OpenMsgStore(session, &obj_store);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Find Inbox default folder */
-        retval = GetDefaultFolder(&obj_store, &id_inbox, olFolderCalendar);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Open Inbox folder */
-        mapi_object_init(&obj_folder);
-        retval = OpenFolder(&obj_store, id_inbox, &obj_folder);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Retrieve Inbox content table */
-        mapi_object_init(&obj_table);
-        retval = GetContentsTable(&obj_folder, &obj_table, 0x0, NULL);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Create the MAPI table view */
-        SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_FID, PR_MID);
-        retval = SetColumns(&obj_table, SPropTagArray);
-        MAPIFreeBuffer(SPropTagArray);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Get current cursor position */
-        retval = QueryPosition(&obj_table, &Numerator, &Denominator);
-        MAPI_RETVAL_IF(retval, retval, NULL);
-
-        /* Iterate through rows */
-        while ((retval = QueryRows(&obj_table, Denominator, TBL_ADVANCE, &rowset)) != -1 && rowset.cRows) {
-                for (i = 0; i < rowset.cRows; i++) {
-                       fid = (mapi_id_t *)find_SPropValue_data(&(rowset.aRow[i]), PR_FID);
-                       mid = (mapi_id_t *)find_SPropValue_data(&(rowset.aRow[i]), PR_MID);
-                       mapi_object_init(&obj_message);
-                        retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
-                        if (retval != MAPI_E_NOT_FOUND) {
-                                retval = GetPropsAll(&obj_message, &props_all);
-                                mapidump_appointment(&props_all, NULL);
-                                mapi_object_release(&obj_message);
-                        }
-                }
-
-        }
-
-        /* Release MAPI objects */
-        mapi_object_release(&obj_table);
-        mapi_object_release(&obj_folder);
-
-       Logoff(&obj_store);
-
-        /* Uninitialize MAPI */
-        MAPIUninitialize(mapi_ctx);
-
-       talloc_free(mem_ctx);
-
-        return (0);
-}
diff --git a/branches/plugfest/doc/examples/fetchmail.c b/branches/plugfest/doc/examples/fetchmail.c
deleted file mode 100644 (file)
index 639b4b2..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#include <libmapi/libmapi.h>
-
-#define DEFAULT_PROFDB "%s/.openchange/profiles.ldb"
-
-int main(int argc, char *argv[])
-{
-        enum MAPISTATUS                 retval;
-       struct mapi_context             *mapi_ctx;
-       TALLOC_CTX                      *mem_ctx;
-        struct mapi_session             *session = NULL;
-        mapi_object_t                   obj_store;
-        mapi_object_t                   obj_folder;
-        mapi_object_t                   obj_table;
-        mapi_object_t                   obj_message;
-        struct mapi_SPropValue_array   props_all;
-        struct SRowSet                  rowset;
-        struct SPropTagArray            *SPropTagArray;
-        mapi_id_t                       id_inbox;
-        mapi_id_t                       *fid, *mid;
-        char                            *profname;
-       char                            *profdb;
-       uint32_t                        Numerator;
-       uint32_t                        Denominator;
-        uint32_t                        i;
-
-       mem_ctx = talloc_named(NULL, 0, "fetchmail");
-
-        /* Initialize MAPI */
-       profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-        retval = MAPIInitialize(&mapi_ctx, profdb);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Find Default Profile */
-        retval = GetDefaultProfile(mapi_ctx, &profname);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Log on EMSMDB and NSPI */
-        retval = MapiLogonEx(mapi_ctx, &session, profname, NULL);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Open Message Store */
-        mapi_object_init(&obj_store);
-        retval = OpenMsgStore(session, &obj_store);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Find Inbox default folder */
-        retval = GetDefaultFolder(&obj_store, &id_inbox, olFolderInbox);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Open Inbox folder */
-        mapi_object_init(&obj_folder);
-        retval = OpenFolder(&obj_store, id_inbox, &obj_folder);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Retrieve Inbox content table */
-        mapi_object_init(&obj_table);
-        retval = GetContentsTable(&obj_folder, &obj_table, 0x0, NULL);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Create the MAPI table view */
-        SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_FID, PR_MID);
-        retval = SetColumns(&obj_table, SPropTagArray);
-        MAPIFreeBuffer(SPropTagArray);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-        talloc_free(mem_ctx);
-
-        /* Get current cursor position */
-        retval = QueryPosition(&obj_table, &Numerator, &Denominator);
-        MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-        /* Iterate through rows */
-        while ((retval = QueryRows(&obj_table, Denominator, TBL_ADVANCE, &rowset)) 
-              != -1 && rowset.cRows) {
-                for (i = 0; i < rowset.cRows; i++) {
-                       fid = (mapi_id_t *)find_SPropValue_data(&(rowset.aRow[i]), PR_FID);
-                       mid = (mapi_id_t *)find_SPropValue_data(&(rowset.aRow[i]), PR_MID);
-                       mapi_object_init(&obj_message);
-                        retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
-                        if (retval != MAPI_E_NOT_FOUND) {
-                                retval = GetPropsAll(&obj_message, &props_all);
-                                mapidump_message(&props_all, NULL, &obj_message);
-                                mapi_object_release(&obj_message);
-                        }
-                }
-
-        }
-
-        /* Release MAPI objects */
-        mapi_object_release(&obj_table);
-        mapi_object_release(&obj_folder);
-
-       Logoff(&obj_store);
-
-        /* Uninitialize MAPI */
-        MAPIUninitialize(mapi_ctx);
-        return (0);
-}
diff --git a/branches/plugfest/doc/examples/mapi_sample1.c b/branches/plugfest/doc/examples/mapi_sample1.c
deleted file mode 100644 (file)
index 0ff1d1f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <libmapi/libmapi.h>
-
-#define   DEFAULT_PROFDB_PATH     "%s/.openchange/profiles.ldb"
-
-int main(int argc, char *argv[])
-{
-        TALLOC_CTX              *mem_ctx;
-       struct mapi_context     *mapi_ctx;
-        enum MAPISTATUS         retval;
-        struct mapi_session     *session = NULL;
-        char                    *profdb;
-        char                    *profname;
-
-        mem_ctx = talloc_named(NULL, 0, "mapi_sample1");
-
-        profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB_PATH, getenv("HOME"));
-
-        retval = MAPIInitialize(&mapi_ctx, profdb);
-        mapi_errstr("MAPIInitialize", GetLastError());
-        if (retval != MAPI_E_SUCCESS) return -1;
-
-       retval = GetDefaultProfile(mapi_ctx, &profname);
-        mapi_errstr("GetDefaultProfile", GetLastError());
-       if (retval != MAPI_E_SUCCESS) return -1;
-
-       retval = MapiLogonEx(mapi_ctx, &session, profname, NULL);
-       mapi_errstr("MapiLogonEx", GetLastError());
-       if (retval != MAPI_E_SUCCESS) return -1;
-
-        MAPIUninitialize(mapi_ctx);
-        talloc_free(mem_ctx);
-
-        return 0;
-}
diff --git a/branches/plugfest/doc/examples/multiple_notif.c b/branches/plugfest/doc/examples/multiple_notif.c
deleted file mode 100644 (file)
index ad7233d..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
-   Stand-alone MAPI application
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
-  This sample code shows how to use multiple sessions in OpenChange
-  and shows notification system works with multiple sessions.
-
-  To use this sample code, run in the console:
-  ./multiple_notification --profileA=XXX --profileB=YYY
-
-  Send an email using any MAPI compliant client (openchangeclient for
-  example) to recipients matching profileA and profileB.
-
-  If everything works properly, you should see the output above:
-  $ ./multiple_notification --profileA=XXX --profileB=YYY
-  profileA: New mail Received
-  profileB: New mail received
-
-  For further example on how to retrieve and analyse 
- */
-
-#include <libmapi/libmapi.h>
-#include <pthread.h> 
-#include <samba/popt.h>
-
-#define        DEFAULT_PROFDB  "%s/.openchange/profiles.ldb"
-
-static int callback(uint16_t NotificationType, void *NotificationData, void *private_data)
-{
-       switch (NotificationType) {
-       case fnevNewMail:
-       case fnevNewMail|fnevMbit:
-               DEBUG(0, ("%s: New mail Received\n", (const char *)private_data));
-               break;
-       default:
-               break;
-       }
-       
-       return (0);
-}
-
-void *monitor(void *val)
-{
-       enum MAPISTATUS retval;
-       mapi_object_t   *obj_store;
-
-       obj_store = (mapi_object_t *) val;
-       retval = MonitorNotification(mapi_object_get_session(obj_store), (void *)obj_store, NULL);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MonitorNotification", GetLastError());
-               pthread_exit(NULL);
-       }
-}
-
-
-int main(int ac, const char *av[])
-{
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *sessionA = NULL;
-       struct mapi_session     *sessionB = NULL;
-       mapi_object_t           obj_storeA;
-       mapi_object_t           obj_storeB;
-       uint32_t                ulConnectionA;
-       uint32_t                ulConnectionB;
-       poptContext             pc;
-       int                     opt;
-       const char              *opt_profdb = NULL;
-       const char              *profileA = NULL;
-       const char              *profileB = NULL;
-       pthread_t               pthreadA;
-       pthread_t               pthreadB;
-
-       enum { OPT_PROFILE_DB=1000, OPT_PROFILEA, OPT_PROFILEB };
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 0, POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", NULL},
-               {"profileA", 0, POPT_ARG_STRING, NULL, OPT_PROFILEA, "profile A", NULL},
-               {"profileB", 0, POPT_ARG_STRING, NULL, OPT_PROFILEB, "profile B", NULL},
-               {NULL, 0, 0, NULL, 0, NULL, NULL}
-       };
-
-       /* Step 1. Retrieve and parse command line options */
-       mem_ctx = talloc_named(NULL, 0, "multiple_notif");
-
-       pc = poptGetContext("multiple_notif", ac, av, long_options, 0);
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILEA:
-                       profileA = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILEB:
-                       profileB = poptGetOptArg(pc);
-                       break;
-               }
-       }
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       if (!profileA || !profileB) {
-               printf("You need to specify 2 profiles (--profileA and --profileB options\n");
-               exit (1);
-       }
-
-       /* Step 2. Initialize MAPI subsystem */
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &sessionA, profileA, NULL);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx for profileA", GetLastError());
-               exit (1);
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &sessionB, profileB, NULL);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx for profileB", GetLastError());
-               exit (1);
-       }
-
-       /* Step 3. Open the stores */
-       mapi_object_init(&obj_storeA);
-       retval = OpenMsgStore(sessionA, &obj_storeA);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore profileA", GetLastError());
-               exit (1);
-       }
-       
-       mapi_object_init(&obj_storeB);
-       retval = OpenMsgStore(sessionB, &obj_storeB);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore profileB", GetLastError());
-               exit (1);
-       }
-
-       /* Step 4. Register for notifications */
-       retval = RegisterNotification(sessionA, 0);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("RegisterNotification profileA", GetLastError());
-               exit (1);
-       }
-
-       retval = RegisterNotification(sessionB, 0);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("RegisterNotification profileB", GetLastError());
-               exit (1);
-       }
-
-       /* Step 5. Subscribe for newmail notifications */
-       retval = Subscribe(&obj_storeA, &ulConnectionA, fnevNewMail, true, 
-                          (mapi_notify_callback_t)callback, (void *) "profileA");
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("Subscribe profileA", GetLastError());
-               exit (1);
-       }
-
-       retval = Subscribe(&obj_storeB, &ulConnectionB, fnevNewMail, true, 
-                          (mapi_notify_callback_t)callback, (void *) "profileB");
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("Subscribe profileB", GetLastError());
-               exit (1);
-       }
-
-       /* Step 6. Create threads A and B and wait for notifications */
-       if (pthread_create(&pthreadA, NULL, monitor, (void *)&obj_storeA)) { 
-               mapi_errstr("Thread creation for profile A failed", GetLastError());
-               exit (1);
-       }
-
-       if (pthread_create(&pthreadB, NULL, monitor, (void *)&obj_storeB)) {
-               mapi_errstr("Thread creation for profile B failed", GetLastError());
-               exit (1);
-       }
-
-       sleep(200);
-       pthread_exit(NULL);
-       MAPIUninitialize(mapi_ctx);
-
-       return 0;
-}
diff --git a/branches/plugfest/doc/howto.txt b/branches/plugfest/doc/howto.txt
deleted file mode 100644 (file)
index 7c13cd1..0000000
+++ /dev/null
@@ -1,438 +0,0 @@
-Copyright 2005-2010 OpenChange Project
-under the terms at http://creativecommons.org/licenses/by-sa/3.0/
-
-
-OpenChange developer howto
---------------------------
-
-== Updated in May 2010 ==
-
-
-###############
-[0x0] CONTENTS
-###############
-
-+------------------------------------+
-[0x1] INTRODUCTION
-     [0x1a] What is OpenChange?
-     [0x1b] What is libmapi?
-[0x2] INSTALLATION
-     [0x2a] Samba4 installation
-     [0x2b] Requirements
-     [0x2c] OpenChange installation
-[0x3] POST INSTALLATION
-     [0x3a] Create a profile store
-     [0x3b] Create a profile
-     [0x3c] Test the profile
-[0x4] USING LIBMAPI
-     [0x4a] Doxygen
-     [0x4b] Sample applications
-     [0x4c] External resources
-[0x5] OPENCHANGE SERVER
-     [0x5a] Provision
-     [0x5b] Extending users Samba AD schema
-     [0x5c] Setting smb.conf
-     [0x5d] Running the Server (EMSABP / EMSMDB / RFR)
-     [0x5e] Solving problems     
-+------------------------------------+
-
-
-####################
-[0x1] INTRODUCTION
-####################
-
-
-[0x1a] What is OpenChange?
-==========================
-
-OpenChange both provides an Open Source implementation of Microsoft
-Exchange protocols under unix/linux platforms and a server able to
-replace transparently Exchange in a company environment.
-
-
-[0x1b] What is libmapi?
-=======================
-
-libmapi is the OpenChange MAPI implementation. It is a programming
-interface designed to offer Exchange support to third party
-applications.
-
-
-[0x1c] Why do I have to do all this compilation?
-================================================
-
-Several distributions (Debian, Ubuntu, SuSE and Fedora) contain
-packages for OpenChange. These packages are not maintained by the
-OpenChange team but by the distributions, and may be out of date.
-
-Furthermore the OpenChange project is moving along quickly and you may
-want to evaluate or benefit from latest features, changes and bug
-fixes we may supply in the future.
-
-
-####################
-[0x2] INSTALLATION 
-####################
-
-
-[0x2a] Samba4 Installation
-==========================
-
-[*] First of all, you need to install a Samba 4 version and pidl
-    version compliant with OpenChange. Furthermore talloc became an
-    external dependency and needs to be installed apart from
-    Samba4. This task can automatically be done using the
-    installsamba4.sh script located in the script directory.
-
-    Note that the script relies on sudo for "make install" operations
-    and requires your account to be in the sudoers file.
-
-    Run the following command:
-
-
-$ make samba
-
-
-This should give you the libraries, headers and tools you need to
-compile OpenChange. It is rare that you will need to update Samba,
-when you have successfully done this once you should not need to do it
-again.  As a hint, as well as your base compiler (apt-get install
-build-essential on Debian and Ubuntu) you will need pkg-config.
-
-If you want to control every detail of the Samba build, follow the
-instructions for checking out the git tree. You will require
-tools such as autoconf (apt-get install automake on Debian and
-Ubuntu), it will take more time and disk space, and there is more to
-go wrong.
-
-Since the libraries will be installed in /usr/local/samba/lib,
-ldconfig needs to know about it. On Linux, make sure this directory is
-listed in /etc/ld.so.conf and run 'ldconfig -v'. On FreeBSD, add this
-directory to the line 'ldconfig_paths' in /etc/rc.conf and then run
-'ldconfig -rv'.
-
-Similarly, you need to have /usr/local/samba/bin in your PATH for the
-pidl binary. This is also where OpenChange installs its binaries. Eg,
-if your shell is bash:
-
-$ export PATH=$PATH:/usr/local/samba/bin
-
-If you did a standard Samba install to the normal Samba4 location you
-should not need to change PKG_CONFIG_PATH, however it does need to be
-set. Use 
-
-$ echo $PKG_CONFIG_PATH
-
-to see if it has a current value. So if PKG_CONFIG_PATH points to a valid place
-and OpenChange configure still complains, you may have a problem with the Samba 
-installation.)
-
-If you have installed Samba4 somewhere else, you need to change Samba references
-in ld.so.conf, and in the PATH and PKG_CONFIG_PATH environment variables. 
-For example, if you installed to /opt/otherplace/samba
-run:
-
-$ export PATH=$PATH:/opt/otherplace/samba
-$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/otherplace/samba/lib/pkgconfig
-
-pkg-config >= 0.20 is required.
-
-
-[0x2b] Requirements
-===================
-
-OpenChange has only these dependencies in addition to Samba4's
-requirements:
-
-* automake (autogen will fail with 'autogen.sh: aclocal not found')
-* flex
-* libpopt
-
-Samba4 can *use* some of the above, and will tell you in the
-'configure' summary that some of them have not been found, however it
-does not *require* them.
-
-OpenChange also includes a new build system which will gathers
-dependencies on your system and only build what can be compiled with
-your current system. If your system doesn't meet the requirements for
-a particular tool or library, you will need to install missing
-dependencies check below for the list of dependencies you need to
-install:
-
-       * libmagic (with development headers): exchange2mbox. For
-          example:
-               # apt-get install libmagic-dev   (Debian, Ubuntu)
-               # pkg_add libmagic               (BSD)
-
-       * bison: libocpf, openchangeclient
-
-       * dcerpc_samr (samba4 installation): libmapiadmin and
-          openchangepfadmin
-
-       * doxygen: build the documentation
-
-       * boost-thread: thread support for libmapi++
-
-Similarly for the others:
-
-# apt-get install automake flex bison libpopt    or
-# pkg_add automake flex bison libpopt
-
-If you have boost development libraries installed, but they aren't being
-found by the configure script (see below), you may need to set the
-BOOST_LIB_SUFFIX environmental variable:
-$ export BOOST_LIB_SUFFIX=-mt
-
-
-[0x2c] OpenChange libmapi installation
-======================================
-
-If you retrieved the soure code from Subversion, run autogen.sh now:
-
-$ ./autogen.sh
-
-Now, run configure:
-
-$ ./configure --prefix=path_where_samba_is_installed
-
-The default is not /usr/local/samba as you might expect, but /usr/local . So you normally
-do need to specify --prefix.
-
-You should already have made sure that the output of 'ldconfig -v' mentions
-the samba library directory in the Samba installation step. If you didn't, OpenChange
-will not find the libraries it needs.
-
-You should now be able to build and install openchange MAPI library:
-
-$ make && make install
-
-You can test like this:
-
-$ openchangeclient --help
-
-
-
-#########################
-[0x3] POST-INSTALLATION
-#########################
-
-The MAPI library requires a profile database and a profile in that database
-before it can be used.
-
-
-[0x3a] Create a profile store
-=============================
-
-$ mapiprofile --database=/tmp/profiles.ldb     \
-             --ldif=/usr/local/samba/share/setup -n
-
-
-[0x3b] Create a profile
-=======================
-
-$ mapiprofile --database=/tmp/profiles.ldb     \
-             --profile=testuser-2000           \
-             --username=testuser               \
-             --password=openchange             \
-             --domain=OPENCHANGE               \
-             -I 192.168.194.22                 \
-             --create
-Profile testuser-2000 completed and added to database /tmp/profiles.ldb
-
-You need to specify:
-    - the full path to the profile store database
-    - the profile name you want to create
-    - the username/password couple mapiprofile will use to connect to
-      the Exchange server (you might want to use Administrator, on a test server)
-    - the Windows domain your Exchange server belongs to
-    - the IP address of the Exchange server (this must be real. Change the example!)
-    - the create operation
-
-
-[0x3c] Test the profile
-=======================
-
-You can next ensure your profile was correctly created by running the
-commands below:
-
-$ mapiprofile --database=/tmp/profiles.ldb --list
-We have 1 profiles in the database:
-        Profile = testuser-2000
-
-$ mapiprofile --database=/tmp/profiles.ldb --profile=testuser-2000 --dump
-Profile: testuser-2000
-        username       == testuser
-        password       == openchange
-        mailbox        == /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=testuser
-        workstation    == LOCALHOST
-       domain         == OPENCHANGE
-        server         == 192.168.194.22
-
-
-####################
-[0x4] USING LIBMAPI
-####################
-
-[0x4a] Doxygen
-==============
-
-HTML documentation and Man pages are supplied with the MAPI library so
-developers can have an overview on how to use each function properly.
-
-Run the following commands to generate and install man pages:
-$ make doxygen
-# make installman
-
-If you have troubles accessing man pages, be sure your MANPATH
-environment variable is set properly and point on openchange prefix
-installation path.
-
-$ export MANPATH=$MANPATH:/usr/local/samba/share/man
-
-The HTML documentation is available in the apidocs/html/ directory or
-can directly be browsed online at http://www.openchange.org/apidocs/.
-
-[0x4b] Sample applications
-==========================
-
-A sample openchangeclient application is supplied so you can test the
-library and have an overview on how to use it into your
-applications. Please refer to the openchangeclient man page for
-further information on its command line option.
-
-$ openchangeclient --database=/tmp/profiles.ldb --profile=testuser-2000 --fetchmail
-
-
-
-For further examples see:
-
-$ man openchangeclient
-
-openchangeclient is also useful in its own right as a scriptable client.
-
-[0x4c] Web resources
-====================
-
-For up to date material on how to use libmapi + discussions, you
-are strongly encouraged to visit the OpenChange wiki:
-    * http://apidocs.openchange.org
-    * http://wiki.openchange.org
-    * http://wiki.openchange.org/index.php/ClientSideProgramming
-
-
-
-########################
-[0x5] OPENCHANGE SERVER
-########################
-
-If you download one of the libmapi releases, please note that the
-server code is not supplied. Consider using subversion to retrieve the
-latest openchange revision:
-
-svn co https://svn.openchange.org/openchange/trunk
-
-
-[0x5a] Provision
-================
-
-In order to run the openchange server, you need to setup Samba4
-correctly. If you have not already installed Samba4, please refer to
-section 2 for further information.
-
-Under your root account, provision the server from the Samba4 source
-directory:
-
-# cd samba4/source4
-# ./setup/provision --domain=OPENCHANGE --realm=OPENCHANGE.LOCAL \
-                   --adminpass=0Chas7secret --server-role='domain controller'
-
-If you need to add a user, run the following command from Samba4 source
-directory (replacing <username> and <password> with appropriate entries):
-
-# ./bin/samba-tool newuser <username> <password>
-
-If you are using a Samba4 alpha13 or earlier release, use:
-# ./bin/net newuser <username> <password>
-
-
-[0x5b] Extending Samba AD schema
-================================
-
-In the OpenChange source directory, run the following command to extend
-Samba4 AD. This script will add necessary schema and attributes to run
-OpenChange Server
-
-# ./setup/openchange_provision
-
-[0x5c] Extending Samba AD users
-===============================
-
-Finally running OpenChange server for a given user implies it belongs
-to the "Exchange Organization". The openchange_newuser script will
-extend existing user records and add attributes needed by OpenChange
-
-# ./setup/openchange_newuser --create <username>
-
-Users created with this script are enabled by default. You can
-enable/disable these users at any time by running:
-
-# ./setup/openchange_newuser --enable <username>
-# ./setup/openchange_newuser --disable <username>
-
-
-You now need to add the dispatcher database for user mailboxes.
-
-# ./setup/openchange_provision --openchangedb
-
-You can now create the mailbox for the user in the dispatcher database
-
-# ./setup/openchange_newuser --mailbox <username>
-
-
-[0x5c] Setting smb.conf
-=======================
-
-In order to run OpenChange server, you need to set up additional
-parameters in the [global] section of smb.conf. OpenChange server
-being part of mapiproxy, detailed and up to date information can be
-found at the following address:
-
-http://mapiproxy.openchange.org
-
-Roughly, you need to add the following entries to the [globals] section:
-
-### Configuration required by OpenChange server ###
-dcerpc endpoint servers = epmapper, mapiproxy
-dcerpc_mapiproxy:server = true
-dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
-### Configuration required by OpenChange server ###
-
-
-[0x5d] Running the Server (EMSABP / EMSMDB / RFR)
-=================================================
-
-The simplest is to just run "samba", but as a developer you may find
-the following more useful:
-
-   # samba -d3 -i -M single
-
-that means "start samba server without messages in stdout, and running a
-single process". That mode of operation makes debugging samba with gdb
-particularly easy.
-
-
-[0x5e] Solving problems
-=================================================
-
-The most common problem is not having sufficient rights - make sure
-you are doing the configuration and process startup as root.
-
-Also, make sure that you don't have any older versions (e.g. partial or
-full provisioning). As a last resort, considering deleting the whole
-samba installation directory and reinstalling both samba4 and 
-OpenChange.
-
-If you still have problems, please post a detailed message to the
-development mailing list (devel@lists.openchange.org) showing what
-commands you followed and what the results of each command were.
-
diff --git a/branches/plugfest/doc/man/man1/exchange2ical.1 b/branches/plugfest/doc/man/man1/exchange2ical.1
deleted file mode 100644 (file)
index fb92006..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2008 Brad Hards
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii exchange2ical.1
-.\"
-.TH EXCHANGE2ICAL 1 2008-11-21 "OpenChange libmapi 0.8" "OpenChange Users' Manual"
-
-.SH NAME
-exchange2ical \- Convert Exchange calendar to ical file
-
-.SH SYNOPSIS
-.nf
-exchange2ical [-?V] [-?|--help] [--usage] [-f|--database=STRING] [-p|--profile=STRING] 
-       [-P|--password=STRING] [-i|--icalsync=STRING] [-o|--filename=STRING] [-R|--range=STRING]
-        [-d|--debuglevel=STRING] [--dump-data] [-V|--version]
-
-.fi
-
-.SH DESCRIPTION
-exchange2ical provides a way to extract appointments from an Exchange calendar
-into the ical format. The ical is provided on stdout by default if the filename is not specified.
-
-.SH OPTIONS
-
-.B --database
-.TP
-.B -f
-Set the path to the profile database to use
-
-.TP
-.B --profile
-.TP
-.B -p
-Set the profile to use. If no profile is specified, exchange2ical tries
-to retrieve the default profile in the database. If no default profile
-has been set, exchange2ical returns 
-.B MAPI_E_NOT_FOUND .
-
-.TP
-.B --password
-.TP
-.B -P
-Specify the password for the profile to use. This can be omitted if the
-password is stored in the profile.
-
-.TP
-.B --icalsync
-.TP
-.B -i
-Specify an icalendar file to be used to sync back to exchange.
-
-.TP
-.B --filename
-.TP
-.B -o
-Specify the filename for the icalendar output.  The specified file will be 
-overwritten with the new icalendar. If this is omitted, stdout will be used 
-by default.
-
-.TP
-.B --range
-.TP
-.B -r
-Specify the range of exchange appointments to be converted into an icalendar.  
-If there are no events, whos start date is within the specified range, 
-an icalendar with no vevents will be returned.
-.B Format: MM/DD/YYYY-MM/DD/YYYY
-
-.TP
-.B --dump-data
-Dump the hex data. This is only required for debugging or educational purposes.
-
-.TP
-.B --debuglevel
-.TP
-.B -d
-Set the debug level.
-
-.SH EXAMPLES
-
-.B Extract appointments from the Exchange calendar:
-.nf
-exchange2ical > appointments.ical
-.fi
-.B Extract appointments from the Exchange calendar to a specified path
-.nf
-exchange2ical --filename=/path/to/file.ics
-.fi
-.B Extract only appointments which begin from June 25 2008 to July 26 2009
-.nf
-exchange2ical --range=06/25/2008-07/26/2009
-.fi
-
-.SH REMARKS
-If you are using the default profile database path and have set a
-default profile (using
-.B mapiprofile --profile=profile_name -S
-) you do not need to specify these parameters on the command line.
-
-.SH AUTHOR
-exchange2ical was written by Julien Kerihuel <j.kerihuel at openchange dot org>
-
-This man page was written by Brad Hards <bradh at openchange dot org>
diff --git a/branches/plugfest/doc/man/man1/exchange2mbox.1 b/branches/plugfest/doc/man/man1/exchange2mbox.1
deleted file mode 100644 (file)
index 23c80f5..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2007 Julien Kerihuel;
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii exchange2mbox.1
-.\"
-.TH EXCHANGE2MBOX 1 2008-11-14 "OpenChange libmapi 0.8" "OpenChange Users' Manual"
-
-.SH NAME
-exchange2mbox \- Convert Exchange mailbox to mbox file
-
-.SH SYNOPSIS
-.nf
-exchange2mbox [-?|--help] [--usage] [-f|--database PATH] [-p|--profile PROFILE]
-    [-P|--password PASSWORD] [-m|--mbox FILENAME] [-u|--update]
-    [-d|--debuglevel LEVEL] [--dump-data]
-.fi
-
-.SH DESCRIPTION
-exchange2mbox provides a way to synchronize an Exchange mailbox with a
-mbox file. The tool is developed so it only retrieves mails not already
-stored in the message ID index database and reflects changes back to
-the Exchange server if the local message copy are deleted.
-
-.SH OPTIONS
-
-.TP
-.B --database
-.TP
-.B -f
-Set the path to the profile database to use
-
-.TP
-.B --profile
-.TP
-.B -p
-Set the profile to use. If no profile is specified, exchange2mbox try
-to retrieve the default profile in the database. If no default profile
-has been set, exchange2mbox returns 
-.B MAPI_E_NOT_FOUND .
-
-.TP
-.B --password
-.TP
-.B -P
-Set the password for the profile to use. This can be omitted if the
-password is stored in the profile.
-
-.TP
-.B --mbox
-.TP
-.B -m
-Set the mbox file full path
-
-.TP
-.B --update
-.TP
-.B -u
-Synchronize the local mbox file with the remote Exchange server mailbox.
-
-.TP
-.B --dump-data
-Dump the hex data. This is only required for debugging or educational purposes.
-
-.TP
-.B --debuglevel LEVEL
-.TP
-.B -d
-Set the debug level.
-
-.SH EXAMPLES
-
-.B Create/Update the mbox file and indexes within the profile database:
-.nf
-exchange2mbox
-.fi
-
-.B Update the Exchange mailbox and indexes according to the changes made to the mbox file.
-
-.nf
-exchange2mbox -u
-.fi
-
-.SH REMARKS
-If no mbox file is specified, one will be automatically created in
-.B $(HOME)/.openchange/mbox .
-If you are using the default profile database path and have set a
-default profile (using
-.B mapiprofile --profile=profile_name -S
-) you do not need to specify these parameters on the command line.
-
-.SH AUTHOR
-Julien Kerihuel <j.kerihuel at openchange dot org>
-
-Brad Hards <bradh at openchange dot org>
diff --git a/branches/plugfest/doc/man/man1/mapiprofile.1 b/branches/plugfest/doc/man/man1/mapiprofile.1
deleted file mode 100644 (file)
index 551289f..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2007-2010 Julien Kerihuel;
-.\" This manpage is Copyright (C) 2008-2010 Brad Hards;
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii mapiprofile.1
-.\"
-.TH MAPIPROFILE 1 2010-02-27 "OpenChange libmapi 0.10" "OpenChange Users' Manual"
-
-.SH NAME
-mapiprofile \- administer OpenChange MAPI Profiles databases
-
-.SH SYNOPSIS
-.nf
-mapiprofile [-?GSnEcrlV] [-?|--help] [--usage] [-L|--ldif PATH] [-G|--getdefault] [-S|--default]
-       [-n|--newdb] [-f|--database PATH] [-P|--profile PROFILE] [-I|--address xxx.xxx.xxx.xxx]
-       [-M|--workstation WORKSTATION_NAME] [-D|--domain DOMAIN] [-R|--realm REALM] [-E|--encrypt]
-       [-u|--username USERNAME] [-C|--language LANGUAGE] [-s|--pattern USERNAME]
-       [-p|--password PASSWORD] [--nopass] [-c|--create] [-r|--delete] [-R|--rename STRING]
-       [-l|--list] [--listlangs] [--dump] [-a|--attr VALUE] [--dump-data] [-d|--debuglevel LEVEL]
-       [--getfqdn] [-V|--version]
-.fi
-
-.SH DESCRIPTION
-mapiprofile is a command line tool designed to provide administrative
-support for OpenChange MAPI profiles. A profile in this context represents a
-single user's connection to a server. It can be thought of as a user's account
-information stored on the client side. Most OpenChange utilities make use of
-the profile information stored in the local profile database, often by referring
-to the name of the profile. In addition, because most users only have a single
-account, it is possible to designate one profile as the default profile. If a
-profile is not specified, other utilities will use the default profile (if any)
-to establish a connection.
-
-mapiprofile is designed so it also provides sample code for developers interested in
-adding OpenChange MAPI profile support to their applications.
-
-.SH COMMANDS
-
-.TP
-.B --newdb
-.TP
-.B -n
-Create a new database.
-
-.TP
-.B --create
-.TP
-.B -c
-Create a new profile in the database.
-
-.TP
-.B --delete
-.TP
-.B -r
-Delete a profile from the database.
-
-.TP
-.B --rename PROFILE
-.TP
-.B -R
-Rename a profile in the database
-
-.TP
-.B --default
-.TP
-.B -S
-Set the default profile in the database.
-
-.TP
-.B --getdefault
-.TP
-.B -G
-Get the default profile name from the database.
-
-.TP
-.B --dump
-Display information about a specific profile from information stored in the database.
-
-.TP
-.B --list
-.TP
-.B -l
-List existing profiles in the database.
-
-.TP
-.B --listlangs
-.TP
-.B -l
-List the available languages. These can be used to specify the
-language name (--language) when creating a profile.
-
-
-
-.SH OPTIONS
-
-.TP
-.B --database DATABASE
-.TP
-.B -f
-Path to the profile database. If no path database is specified then the default one will be used
-.B $HOME/.openchange/profiles.ldb
-
-.TP
-.B --ldif LDIF
-.TP
-.B -L
-Path to the ldif files. If no ldif directory is specified then the default one set at compilation time will be used. This option is only used when creating a new profile database.
-
-.TP
-.B --profile PROFILE
-.TP
-.B -p
-Set the profile name to use (e.g. the profile to create or delete, or to dump information about).
-
-.TP
-.B --address IP_ADDR|FQDN
-.TP
-.B -I
-Set the Exchange server IP address or fully qualified domain name.
-
-.TP
-.B --workstation WORKSTATION
-.TP
-.B -M
-Sets the local computer name.
-
-.TP
-.B --domain DOMAIN
-.TP
-.B -D
-Set the Windows domain name.
-
-.TP
-.B --encrypt
-.TP
-.B -E
-Require the connection to be encrypted. This is normally required only on Exchange 2010
-(and will presumably also be required on future versions), but may be used on Exchange 2003
-and Exchange 2007.
-
-.TP
-.B --realm REALM
-.TP
-.B -R
-Set the Windows realm
-
-.TP
-.B --username
-.TP
-.B -u
-Set the username to use to log on the Exchange server.
-
-.TP
-.B --password
-.TP
-.B -p
-Set the password corresponding to the username described above.
-
-.TP
-.B --language
-.TP
-.B -C
-
-Specify the language to use with the account. When specifying the
-name, you use the name of the language returned within the list
---listlangs option displays. See the --listlangs option for how to
-obtain the full list of languages. The default language code is the
-system one stored within the LC_CTYPE environment variable.
-
-.TP
-.B --pattern
-.TP
-.B -s
-Set a username string pattern mapiprofile should use rather than the
-default username. This option is used during mapi profile creation.
-
-.TP
-.B --nopass
-Do not save password in the profile.
-
-.TP
-.B --attr VALUE
-.TP
-.B -a
-Print an attribute value.
-
-.TP
-.B --dump-data
-Dump the hex data.
-
-.TP
-.B --debuglevel LEVEL
-.TP
-.B -d
-Set the debug level.
-
-.TP
-.B --getfqdn
-Returns the DNS fully qualified domain name of the NSPI server matching the legacyDN.
-
-.SH EXAMPLES
-
-.B Create a blank MAPI profile database:
-.nf
-mapiprofile --database=/tmp/profiles2.ldb --ldif=/usr/local/samba/share/setup --newdb
-.fi
-
-.B Create a new profile using NTLMSSP authentication:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel
-     --username=jkerihuel --password=secret --language=French\\ \\(France\\)
-     --address=192.168.194.22 --workstation=LOCALHOST --domain=OPENCHANGE 
-     --create
-Profile jkerihuel completed and added to database /tmp/profiles.ldb.
-Note that this account will use French.
-.fi
-
-.B Create a new profile using Kerberos authentication:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel
-     --username=jkerihuel --password=secret --language=French\\ \\(France\\)
-     --address=exchange.openchange.local --domain=OPENCHANGE
-     --realm=OPENCHANGE.LOCAL --create
-.fi
-
-
-.B Delete a profile:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --delete
-Profile jkerihuel deleted from database /tmp/profiles.ldb
-.fi
-
-.B List profiles:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --list
-We have 2 profiles in the database:
-        Profile = exchange-2000
-        Profile = jkerihuel
-.fi
-
-.B Dump a profile:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --dump
-Profile: jkerihuel
-       username       == jkerihuel
-       password       == secret
-       mailbox        == /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=jkerihuel
-       workstation    == LOCALHOST
-       domain         == OPENCHANGE
-       server         == exchange.openchange.local
-.fi
-
-.B Dump profile attribute:
-.nf
-mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --attr=HomeMDB
-Profile jkerihuel: HomeMDB = /o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=EXCHANGE2000
-.fi
-
-.SH AUTHOR
-Julien Kerihuel <j.kerihuel at openchange dot org>
-
-Brad Hards <bradh at openchange dot org>
-
-.SH "SEE ALSO"
-The codes for various languages can be found in many places, including
-the Windows Language Code Identifier (LCID) Reference.
-
diff --git a/branches/plugfest/doc/man/man1/mapitest.1 b/branches/plugfest/doc/man/man1/mapitest.1
deleted file mode 100644 (file)
index 120116b..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2008, 2010 Brad Hards
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii mapitest.1
-.\"
-.TH MAPITEST 1 2010-12-01 "OpenChange libmapi 0.10" "OpenChange Users' Manual"
-
-.SH NAME
-mapitest \- OpenChange torture test utility
-
-.SH SYNOPSIS
-.nf
-mapitest [-?|--help] [--usage] [-f|--database=STRING] [-p|--profile=STRING]
-  [-p|--password=STRING] [--confidential] [--color] [--subunit]
-  [-o|--outfile=STRING] [--mapi-calls=STRING] [--list-all] [--no-server]
-  [--dump-data] [-d|--debuglevel=STRING]
-.fi
-
-.SH DESCRIPTION
-mapitest is a test harness / utility used for verifying correct operation
-of various ExchangeRPC calls / MAPI functions provided by the OpenChange
-MAPI libraries.
-
-mapitest is not normally required by users, but you may be asked to provide
-the output of mapitest for some kinds of bug investigations.
-
-Note that mapitest performs a lot of transactions, including deleting folders
-and messages. Unless you're very familiar with mapitest, we recommend only
-using it with a test account.
-
-.SH OPTIONS
-
-.TP
-.B --database
-.TP
-.B -f
-Set the path to the profile database to use
-
-.TP
-.B --profile
-.TP
-.B -p
-Set the profile to use. If no profile is specified, mapitest tries
-to retrieve the default profile in the database. If no default profile
-has been set, mapitest returns 
-.B MAPI_E_NOT_FOUND .
-
-.TP
-.B --password
-.TP
-.B -P
-Specify the password for the profile to use. This can be omitted if the
-password is stored in the profile.
-
-.TP
-.B --confidential
-Remove any sensitive data from the report.
-
-.TP
-.B --color
-Use colors to indicate the results of each operation.
-
-.TP
-.B --subunit
-Produce output in subunit protocol format, instead of the normal text
-output. This disables colored output. Note that availability of this
-option depends on suitable libraries being available at build time, so
-check availability before relying on this.
-
-.TP
-.B --outfile
-.TP
-.B -o
-Redirect the output of the tests to a file. The filename must be specified
-as the argument to this option.
-
-.TP
-.B --mapi-calls
-Run a specific test. The name of the test must be specified as the argument
-to this option. See the --list-all option to obtain the name of the test.
-This can be specified more than once in order to run a subset of tests.
-This can also be used to run a "suite" of tests, by appending "-ALL" to
-the name of the suite.
-
-.TP
-.B --list-all
-Provide a list of all test suites and test names, along with a description
-of the test. No tests will be run.
-
-.TP
-.B --no-server
-Only run tests that do not require a server connection. This is the default
-if a connection to the server cannot be established.
-
-.TP
-.B --dump-data
-Dump the hex data. This is only required for debugging or educational purposes.
-
-.TP
-.B --debuglevel
-.TP
-.B -d
-Set the debug level.
-
-.SH EXAMPLES
-
-.B Run all tests
-.nf
-mapitest
-.fi
-
-.B Only run two specific tests
-.nf
-mapitest --mapi-calls=NOSERVER-SROWSET --mapi-calls=OXCPRPT-GET-PROPS
-.fi
-
-.B Run all the NSPI tests
-.nf
-mapitest --mapi-calls=NSPI-ALL
-.fi
-
-.SH REMARKS
-If you are using the default profile database path and have set a
-default profile (using
-.B mapiprofile --profile=profile_name -S
-) you do not need to specify these parameters on the command line.
-
-.SH AUTHOR
-mapitest was written by Julien Kerihuel <j.kerihuel at openchange dot org>
-with contributions from other OpenChange developers.
-
-This man page was written by Brad Hards <bradh at openchange dot org>
diff --git a/branches/plugfest/doc/man/man1/openchangeclient.1 b/branches/plugfest/doc/man/man1/openchangeclient.1
deleted file mode 100644 (file)
index 2c2fed1..0000000
+++ /dev/null
@@ -1,573 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2007 Julien Kerihuel;
-.\" This manpage is Copyright (C) 2008 Brad Hards
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii openchangeclient.1
-.\"
-.TH OPENCHANGECLIENT 1 2009-12-17 "OpenChange libmapi 0.9" "OpenChange Users' Manual"
-
-.SH NAME
-openchangeclient \- MAPI command line messaging tool
-
-.SH SYNOPSIS
-.nf
-openchangeclient [-?SFmDV] [-?|--help] [--usage] [-f|--database STRING] [--pf]
-  [-p|--profile STRING] [-P|--password STRING] [-S|--sendmail] [--sendappointment]
-  [--sendcontact] [--sendtask] [--sendnote] [-F|--fetchmail] [-G|--storemail STRING]
-  [-i|--fetch-items STRING] [--freebusy=STRING] [--force] [--delete=STRING]
-  [-u|--update STRING] [-m|--mailbox] [-D|--deletemail] [-A|--attachments STRING]
-  [-I|--html-inline STRING] [-W|--html-file STRING] [-t|--to STRING] [-c|--cc STRING]
-  [-b|--bcc STRING] [-s|--subject STRING] [-B|--body STRING] [--location=STRING]
-  [--label=STRING] [--dtstart=STRING] [--dtend=STRING] [--busystatus=STRING]
-  [--taskstatus=STRING] [--importance=STRING] [--email=STRING] [--fullname=STRING]
-  [--cardname=STRING] [--color=STRING] [--notifications] [--folder=STRING] [--mkdir]
-  [--rmdir] [--userlist] [--folder-name=STRING] [--folder-comment=STRING]
-  [-d|--debuglevel STRING] [--dump-data] [--private] [--ocpf-file=STRING]
-  [--ocpf-dump=STRING] [--ocpf-syntax] [--ocpf-sender] [-V|--version]
-.fi
-
-
-.SH DESCRIPTION
-openchangeclient is a MAPI command line tool designed to facilitate
-mail send, receive and delete operations using the MAPI protocol. It
-also provides operations on tasks, contacts (address book) and calendar
-operations.
-
-.SH COMMANDS
-
-.TP
-.B --fetchmail
-.TP
-.B -F
-Fetch Exchange user mails from the inbox and display general information from
-the mails on the standard output.
-
-.TP
-.B --storemail=DIRECTORY
-.TP
-.B -G
-Store mail attachments to the local filesystem in the specified directory. This
-is the normal way to retrieve attachments.
-
-.TP
-.B --fetch-items=STRING
-.TP
-.B -i
-Retrieve specific items from Exchange default folders. Possible value
-for STRING are Mail, Appointment, Contact, Task, Note.
-
-.TP
-.B --mkdir
-Create a folder within the mailbox or public folders store
-hierarchy. This command requires that the --folder-name option
-be used to specify the name of the folder to create.
-
-.TP
-.B --rmdir
-Deletes a folder within the mailbox or public folders store
-hierarchy. This option requires that the --folder-name option
-be used to specify the name of the folder to delete.
-
-.TP
-.B --mailbox
-.TP
-.B -m
-Display the user mailbox folder hierarchy with folder names, folder
-comments, the folder type, number of unread items in the folder 
-and total number of items in the folder.
-
-.TP
-.B --notifications
-Monitor NEWMAIL notifications in the Inbox folder and display summary
-on standard output.
-
-.TP
-.B --sendmail
-.TP
-.B -S
-Send a mail to a user belonging to the Exchange organization. This
-requires specifying one or more recipients (see the --to, --cc and
---bcc options), a subject (see the --subject option) and a body
-(see the --body, --html-file and --html-inline options).
-
-.TP
-.B --sendappointment
-Create an appointment in the default calendar folder.
-
-.TP
-.B --sendcontact
-Create a contact in the default contact folder.
-
-.TP
-.B --sendtask
-Create a task in the default task folder.
-
-.TP
-.B --sendnote
-Create a note in the default notes folder.
-
-.TP
-.B --deletemail
-.TP
-.B -D
-Delete a mail from the exchange user mailbox. This requires
-use of the --subject option to specify the mail to be deleted. 
-
-.TP
-.B --userlist
-Display the users listed in the address book.
-
-.TP
-.B --delete=STRING
-Delete a specified item from the store by ID number.
-
-.TP
-.B --ocpf-dump=STRING
-Download a message (specified by the argument, which must be
-the folder ID and unique message ID for the message) as OCPF format.
-The message will be saved to a file given by the message ID, followed
-by a suffix of .ocpf
-
-See the separate (HTML) documentation for libocpf for more information
-on the OCPF format.
-
-.TP
-.B --ocpf-sender
-Send a message given in OCPF format to the server. This requires
-use of the
-.B --ocpf-file
-option to specify the file to load from.
-
-See the separate (HTML) documentation for libocpf for more information
-on the OCPF format.
-
-.TP
-.B --ocpf-syntax
-Check the syntax of an OCPF file. This does not perform any network
-operations. This requires use of the 
-.B --ocpf-file
-option to specify
-the file to load from.
-
-See the separate (HTML) documentation for libocpf for more information
-on the OCPF format.
-
-.TP
-.B --freebusy=STRING
-Fetch the free / busy status for the user specified by the string. You will
-usually need to use the 
-.B --pf
-option (see below) since free / busy status is normally obtained from the 
-public folder store.
-
-.SH OPTIONS
-
-.TP
-.B --database=DATABASE
-.TP
-.B -f
-Set the MAPI profile database. If no database is specified, then openchangeclient tries to load the default one: 
-.B $HOME/.openchange/profiles.ldb
-
-.TP
-.B --profile=PROFILE
-.TP
-.B -p
-Set the profile to use. If a profile is not specified, and one of the 
-profiles has been set as the default in the profile database 
-(for example, using mapiprofile -S), then that default profile will be used.
-
-.TP
-.B --password
-.TP
-.B -P
-Specify the password for the profile to be used. This can be omitted if the
-password is stored in the profile.
-
-.TP
-.B --pf
-Perform operations against the Public Folders store, rather than the normal
-operations against a user's private folders.
-
-.TP
-.B --folder
-Specify the folder name we want to work with want to open. This option
-is mandatory for public folders, but can also be used to open specific
-folders in the mailbox store.
-
-.TP
-.B --attachments="ATTACHMENT1;ATTACHMENT2"
-.TP
-.B -A
-Set attachments to send when sending a mail. Attached filenames need
-to be separated with
-.B semi-colons
-as specified in the description above. This is only meaningful with
-.B --sendmail
-
-.TP
-.B --subject=STRING
-.TP
-.B -s
-Specify the mail subject. If no subject is specified, the mail subject will be empty.
-This is only meaningful with
-.B --sendmail
-
-.TP
-.B --body=STRING
-.TP
-.B -B
-Set the body of the mail to be the UTF8 text only content specified on the command
-line. This is only meaningful with
-.B --sendmail
-
-.TP
-.B --html-inline=STRING
-.TP
-.B -I
-Set the body of the mail to be the HTML content specified on command line. This is
-only meaningful with
-.B --sendmail
-
-.TP
-.B --html-file=FILENAME
-.TP
-.B -W
-Set the body of the mail to be the content of the specified file. This is only
-meaningful with
-.B --sendmail
-
-.TP
-.B --to="USERNAME1,USERNAME2"
-.TP
-.B -t
-Specify
-.B To
-recipients for the mail. Usernames need to be separated with commas
-as specified in the example above. This is only meaningful with
-.B --sendmail
-
-.TP
-.B --cc="USERNAME1,USERNAME2"
-.TP
-.B -c
-Specify
-.B Cc
-recipients for the mail. Usernames need to be separated with commas
-as specified in the example above. This is only meaningful with
-.B --sendmail
-
-.TP
-.B --bcc="USERNAME1,USERNAME2"
-.TP
-.B -b
-Specify
-.B Bcc
-recipients for the mail. Usernames need to be separated with commas
-as specified in the example above. This is only meaningful with
-.B --sendmail
-
-.TP
-.B --location=STRING
-Specify the appointment location. This is only meaningful with
-.B --sendappointment
-
-.TP
-.B --dtstart=STRING
-Specify the start date of an event. The following date format needs to be used:
-.B "%Y-%m-%d %H:%M:%S"
-e.g: 2007-06-01 14:59:00. This is only meaningful with
-.B --sendappointment
-and
-.B --sendtask
-
-.TP
-.B --dtend=STRING
-Specify either the end date or due date of an event. The following date
-format needs to be used:
-.B "%Y-%m-%d %H:%M:%S"
-e.g: 2007-06-01 14:59:00
-When no
-.B dtend
-parameter is specified, default value is set to
-.B dtstart
-This is only meaningful with
-.B --sendappointment
-and
-.B --sendtask
-
-.TP
-.B --force
-Add appointment to the calendar, even if it would overlap with
-an existing appointment. This is only meaningful with
-.B --sendappointment
-
-.TP
-.B --private
-Mark the appointment as private event. This is only meaningful with
-.B --sendappointment
-
-.TP
-.B --busystatus=STRING
-Set the busy status of an appointment. Possible values are FREE,
-TENTATIVE, BUSY or OUTOFOFFICE. This is only meaningful with
-.B --sendappointment
-
-.TP
-.B --label=STRING
-Set the type of appointment. Possible values are NONE, IMPORTANT,
-BUSINESS, PERSONAL, VACATION, MUST_ATTEND, TRAVEL_REQUIRED,
-NEEDS_PREPARATION, BIRTHDAY, ANNIVERSARY and PHONE_CALL.
-This is only meaningful with
-.B --sendappointment
-
-.TP
-.B --taskstatus=STRING
-Set the status of a task. Possible values are NOTSTARTED, PROGRESS,
-COMPLETED, WAITING, DEFERRED. This is only meaningful with
-.B --sendtask
-
-.TP
-.B --fullname=STRING
-Set the full name in a contact message. This is only meaningful with
-.B --sendcontact
-
-.TP
-.B --cardname=STRING
-Set the card name of a task or contact message. This is only meaningful with
-.B --sendcontact
-or
-.B --sendtask
-
-.TP
-.B --email=STRING
-Set the email address in a contact message. This is only meaningful with
-.B --sendcontact
-
-.TP
-.B --importance=STRING
-Set the relative importance of a task. Possible values are LOW, NORMAL
-and HIGH. This is only meaningful with
-.B --sendtask
-
-.TP
-.B --color=STRING
-Set the color of the note. The default color is Yellow. Other options
-are Blue, Green, Pink and White. This is only meaningful with
-.B --sendnote
-
-.TP
-.B --folder-name=STRING
-Set the folder name to create. This is only meaningful with 
-.B --mkdir 
-or 
-.B --rmdir
-
-.TP
-.B --folder-comment=STRING
-Set the folder comment. This is only meaningful with
-.B --mkdir
-
-.TP
-.B --update=STRING
-.TP
-.B -u
-Change (update) an existing item, rather than creating a new one. This
-is only meaningful with
-.B --sendtask
-, 
-.B --sendnote
-,
-.B --sendappointment
-and
-.B --sendcontact
-
-.TP
-.B --ocpf-file=STRING
-Specify the file to load OCPF data from. This is only meaningful with
-.B --ocpf-sender
-and
-.B --ocpf-syntax
-
-.TP
-.B --dump-data
-Display raw format data associated with the operation. You normally only
-need this when debugging.
-
-.TP
-.B --debug-level=LEVEL
-Display debugging information at the specified level (or higher). Level
-10 is a lot of debug information.
-
-
-.SH EXAMPLES
-
-.B Fetching emails:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000 --fetchmail
-.fi
-
-.B Fetch emails and store attachments:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000 --fetchmail --storemail=test
-.fi
-
-All attachments from any mails will be stored in the test
-directory. If the specified directory does not exist, it will
-automatically be created. Note that if the attachment name
-is not unique amongst all emails, some attachments may be 
-overwritten. 
-
-
-.B Send a basic email:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000 
-                 --to="Adm,jker" --cc=Paul --bcc=Bill 
-                 --subject="It is working"
-                 --body="This is a sample body" --sendmail
-.fi
-
-A mail with UTF8 (text only) content will be sent with the following recipients:
-
-to = Administrator and jkerihuel
-
-cc = Paul
-
-bcc = Bill
-
-
-.B Send an inline HTML email:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000
-                 --to=Adm --subject="Inline HTML sample email"
-                 --html-inline="<body bgcolor=yellow><h1>My first HTML email</h1></body>"
-                 --sendmail
-.fi
-
-Administrator will receive a mail with HTML body - yellow background and a title.
-
-
-.B Send a HTML mail using a file:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000
-                 --to=Adm --subject="HTML file email"
-                 --html-file=/tmp/myfile.html
-                 --sendmail
-.fi
-
-The content of /tmp/myfile.html will be used to fill the HTML body. If
-the HTML file exceed a fixed size (0x4000 bytes), then PR_HTML content
-will be sent using MAPI streams.
-
-
-.B Send email with attachments:
-.nf
-openchangeclient --database=/tmp/profiles.ldb --profile=2000
-                 --to=Adm --subject="Attachments"
-                 --attachments="/tmp/file1.jpg;/tmp/file2.jpg;tmp/file2.jpg"
-                 --body="These are sample attachments"
-                 --sendmail
-.fi
-
-The example above will send a UTF8 body mail to Administrator and
-attach file1,jpg, file2.jpg and file3.jpg to the email.
-
-.B Display the users in the address book
-.nf
-openchangeclient --userlist
-.fi
-
-.B Fetch calendar items:
-.nf
-openchangeclient --fetch-items=Appointment
-.fi
-
-
-.B Fetch contact items:
-.nf
-openchangeclient --fetch-items=Contact
-.fi
-
-
-.B Fetch task items:
-.nf
-openchangeclient --fetch-items=Task
-.fi
-
-
-.B Create appointment:
-.nf
-openchangeclient --sendappointment --dtstart="2007-06-01 22:00:00" \\
-                 --dtend="2007-06-01 22:35:00"                     \\
-                 --busystatus=FREE                                 \\
-                 --location="Home"                                 \\
-                 --subject="Check the Junk folder"
-.fi
-
-
-.B Create Task:
-.nf
-openchangeclient --sendtask --dtstart="2008-11-01 18:00:00"        \\
-                 --cardname="openchangeclient" --importance=HIGH   \\
-                 --taskstatus=COMPLETED --body="my new task"
-.fi
-
-
-.B Create contact:
-.nf
-openchangeclient --sendcontact --cardname="openchangeclient"       \\
-                 --fullname="OpenChange Client 3rd"                \\
-                 --email="openchangeclient@nonexistentdomain.com"  
-.fi
-
-.B Create folder:
-.nf
-openchangeclient --mkdir --folder-name="openchange"               \\
-                --folder-comment="comment"
-.fi
-
-This example will create a generic folder named openchange under the
-Inbox folder.
-
-.B Delete folder:
-.nf
-openchangeclient --rmdir --folder-name="openchange"
-.fi
-
-This example will delete the generic folder named openchange under
-Inbox folder.
-
-.B List Mailbox hierarchy:
-.nf
-openchangeclient --mailbox
-.fi
-
-.B Obtain free / busy status
-.nf
-openchangeclient --pf --freebusy="test user3"
-.fi
-
-.SH AUTHOR
-Julien Kerihuel <j.kerihuel at openchange dot org>
diff --git a/branches/plugfest/doc/man/man1/openchangepfadmin.1 b/branches/plugfest/doc/man/man1/openchangepfadmin.1
deleted file mode 100644 (file)
index 64b6b1e..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-.\" OpenChange Project Tools Man Pages
-.\"
-.\" This manpage is Copyright (C) 2007 Julien Kerihuel;
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii openchangepfadmin.1
-.\"
-.TH OPENCHANGEPFADMIN 1 2007-11-14 "OpenChange libmapi 0.8" "OpenChange Users' Manual"
-
-.SH NAME
-openchangepfadmin \- Exchange users and Public Folder administration tool
-
-.SH SYNOPSIS
-.nf
-openchangepfadmin [-?] [-?|--help] [--usage] [-f|--database PATH] [-p|--profile PROFILE]
-    [-P|--password PASSWORD] [--apassword=PASSWORD] [--adesc=DESCRIPTION] [--acomment=COMMENT]
-    [--afullname=NAME] [--list] [--mkdir] [--rmdir] [--comment=COMMENT] [--dirclass=CLASS]
-    [--adduser=USERNAME] [--rmuser=USERNAME] [--addright=RIGHT] [--rmright] [--modright=RIGHT]
-    [--debuglevel=LEVEL] [--dump-data] [--folder=FOLDER] [--username=USERNAME]
-.fi
-
-.SH DESCRIPTION
-openchangepfadmin is a administrative command line tool designed to
-facilitate user management related operations (create, delete, modify)
-on a remote Exchange server and manage public folder store and
-permissions.
-
-.SH COMMANDS
-
-.TP
-.B --adduser=USERNAME
-Create a Exchange user with the username specified by USERNAME
-
-.TP
-.B --rmuser=USERNAME
-Delete the Exchange user account specified by USERNAME
-
-.TP
-.B --list
-List Public Folder hierarchy (IPM_SUBTREE)
-
-.TP
-.B --mkdir
-Create a folder in the Public Folder store
-
-.TP
-.B --rmdir
-Delete a folder in the Public Folder store
-
-.TP
-.B --addright=RIGHT
-Add permission and roles for a user on a Public Folder directory. 
-
-.TP
-.B --modright=RIGHT
-Modify permissions and roles for a user on a Public Folder directory
-
-.TP
-.B --rmright
-Delete permissions and roles for a specific user
-
-
-.SH OPTIONS
-
-.TP
-.B --database=DATABASE
-.TP
-.B -f
-Set the MAPI profile database. If no database is specified, then
-openchangeclient tries to load the default one:
-.B $HOME/.openchange/profiles.ldb
-
-.TP
-.B --profile=PROFILE
-.TP
-.B -p
-Set the profile to use. If a profile is not specified, and one of the
-profiles has been set as the default in the profile database (for
-example, using mapiprofile -S), then that default profile will be
-used.
-
-.TP
-.B --password
-.TP
-.B -P
-Set the password for the profile to use. This can be omitted if the
-password is stored in the profile.
-
-.TP
-.B --apassword=PASSWORD
-Define the password to set for the user specified with --adduser. If
-no password is explicitely supplied, openchangepfadmin will arbitrary
-set a random one.
-
-.TP
-.B --adesc=DESCRIPTION
-This command can only be used with --adduser and specifies a
-description for this account
-
-.TP
-.B --acomment=COMMENT
-This command can only be used with --adduser and specifies a comment
-for this account.
-
-.TP
-.B --afullname=NAME
-This command can only be used with --adduser and specifies the user
-full name for this account.
-
-.TP
-.B --comment=COMMENT
-This command can only be used with --mkdir and specifies a comment for
-the folder.
-
-.TP
-.B --dirclass=CLASS
-This command can only be used with --mkdir and specifies the container
-class of the directory we want to create. Possible values are:
-IPF.Appointment, IPF.Contact, IPF.Journal, IPF.Note, IPF.StickyNote,
-IPF.Task, IPF.Post
-
-.TP
-.B --folder=FOLDER
-This command can only be used with --addright, --modright and
---rmright. Specify the folder where permissions and roles have to be
-changed.
-
-.TP
-.B --username=USERNAME
-This command can only be used with --addright, --modright and
---rmright. Specify the username we want to change permissions and
-roles for.
-
-.TP
-.B --dump-data
-Dump the hex data. This is only required for debugging or educational purposes.
-
-.TP
-.B --debuglevel LEVEL
-.TP
-.B -d
-Set the debug level.
-
-.SH EXAMPLES
-
-.B Creating user
-.nf
-openchangepfadmin --adduser=linuxowner --apassword=linuxowner   \\
-                    --adesc="Linux Owner Test account"          \\
-                   --afullname="Linux Owner"
-    mapiadmin_user_add       : MAPI_E_SUCCESS (0x0)
-username: linuxowner
-password: linuxowner
-.fi
-
-Creates a user account with username and password set to linuxowner.
-
-.B Deleting user:
-.nf
-openchangepfadmin --rmuser=linuxowner
-    mapiadmin_user_del       : MAPI_E_SUCCESS (0x0)
-.fi
-
-.B Create Public Folder:
-.nf
-openchangepfadmin --mkdir --folder=public_events --dirclass=IPF.Appointment
-.fi
-
-Creates a folder in the Public Folder store named public_events with a
-container class set to Appointment. This folder will display calendar
-items.
-
-.B Delete Public Folder:
-.nf
-openchangepfadmin --rmdir --folder=public_events
-.fi
-
-.B List Public Folder hierarchy:
-.nf
-openchangepfadmin --list
-.fi
-
-.B Add Permission:
-.nf
-openchangepfadmin --username=linuxowner --folder=public_events \\
-                    --addright=RoleOwner
-Permission RoleOwner added for linuxowner on folder public_events
-.fi
-
-.B Modify Permission
-.nf
-openchangepfadmin --username=Anonymous --folder=public_events \\
-                   --modright=RoleNone
-Permission changed to RoleNone for Anonymous on folder appointment
-.fi
-
-Note that you can only change permissions for a user already listed in
-the ACL table.
-
-.SH NOTE
-Permissions and Roles possible values are:
-.IP "\(bu" 2
-RightsNone                    
-.IP "\(bu" 2
-RightsReadItems               
-.IP "\(bu" 2
-RightsCreateItems             
-.IP "\(bu" 2
-RightsEditOwn                 
-.IP "\(bu" 2
-RightsDeleteOwn               
-.IP "\(bu" 2
-RightsEditAll
-.IP "\(bu" 2    
-RightsDeleteAll
-.IP "\(bu" 2
-RightsCreateSubfolders
-.IP "\(bu" 2
-RightsFolderOwner
-.IP "\(bu" 2
-RightsFolderContact
-.IP "\(bu" 2
-RoleNone
-.IP "\(bu" 2
-RoleReviewer
-.IP "\(bu" 2
-RoleContributor
-.IP "\(bu" 2
-RoleNoneditingAuthor
-.IP "\(bu" 2
-RoleAuthor
-.IP "\(bu" 2
-RoleEditor
-.IP "\(bu" 2
-RolePublishAuthor
-.IP "\(bu" 2
-RolePublishEditor
-.IP "\(bu" 2
-RightsAll
-.IP "\(bu" 2
-RoleOwner                      
-
-.SH SEE ALSO
-AddUserPermission, ModifyUserPermission, RemoveUserPermission
-
-.SH AUTHOR
-Julien Kerihuel <j.kerihuel at openchange dot org>
diff --git a/branches/plugfest/doc/man/man3/mapidump.3 b/branches/plugfest/doc/man/man3/mapidump.3
deleted file mode 100644 (file)
index 52bfe1c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-.\" OpenChange Project Libraries Man Pages
-.\"
-.\" This manpage is Copyright (C) 2007 Julien Kerihuel;
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" 
-.\" Since the OpenChange and Samba4 libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Process this file with
-.\" groff -man -Tascii mapidump.3
-.\"
-.TH MAPIDUMP 3 2007-04-23 "OpenChange libmapi 0.2" "OpenChange Programmer's Manual"
-.SH NAME
-mapidump API \- dump MAPI data and object on stdout
-.SH SYNOPSIS
-.nf
-.B #include <libmapi/libmapi.h>
-.sp
-.BI "void mapidump_SPropValue(struct SPropValue " lpProp ", const char *" sep ");"
-.BI "void mapidump_SPropTagArray(struct SPropTagArray *" proptags ");"
-.BI "void mapidump_SRow(struct SRow *" aRow ", const char *" sep ");"
-.BI "void mapidump_Recipients(const char **" usernames ", struct SRowSet *" rowset ", struct FlagList *" flaglist ");"
-.BI "void mapidump_message(struct mapi_SPropValue_array *" properties ");"
-.fi
-.SH DESCRIPTION
-These functions dumps MAPI data structures and high level objects on stdout. The
-.IR sep
-parameters describes a parameter used in output format.
-
-.SH AUTHOR
-Julien Kerihuel <j.kerihuel at openchange dot org>
diff --git a/branches/plugfest/exchange.idl b/branches/plugfest/exchange.idl
deleted file mode 100644 (file)
index 41b98a2..0000000
+++ /dev/null
@@ -1,4490 +0,0 @@
-#include "idl_types.h"
-
-cpp_quote("#include <gen_ndr/ndr_misc.h>")
-
-/*
-   http://support.microsoft.com/default.aspx?scid=KB;en-us;q159298
-   Any UUID starting with:
-   A4 - store
-   F5 - directory
- */
-
-[
-  uuid("99e64010-b032-11d0-97a4-00c04fd6551d"),
-  pointer_default(unique),
-  version(3.0)
-] interface exchange_store_admin3
-{
-       void ec_store_admin3_dummy();
-}
-
-
-[
-  uuid("89742ace-a9ed-11cf-9c0c-08002be7ae86"),
-  pointer_default(unique),
-  version(2.0)
-] interface exchange_store_admin2
-{
-       void ec_store_admin2_dummy();
-}
-
-[
-  uuid("a4f1db00-ca47-1067-b31e-00dd010662da"),
-  pointer_default(unique),
-  version(1.0)
-] interface exchange_store_admin1
-{
-       void ec_store_admin1_dummy();
-}
-
-
-[
-  uuid("1544f5e0-613c-11d1-93df-00c04fd7bd09"),
-  endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:[]"),
-  pointer_default(unique),
-  version(1.0),
-  helpstring("Exchange 2003 Directory Request For Response")
-] interface exchange_ds_rfr
-{
-
-#include "mapitags_enum.h"
-#include "mapicodes_enum.h"
-
-       /*****************/
-       /* Function 0x00 */
-       MAPISTATUS RfrGetNewDSA(
-               [in]                                    uint32  ulFlags,
-               [in,string,charset(DOS)]                uint8   *pUserDN,
-               [in,out,unique,string,charset(DOS)]     uint8   **ppszUnused,
-               [in,out,unique,string,charset(DOS)]     uint8   **ppszServer
-               );
-       
-       /*****************/
-       /* Function 0x01 */
-       MAPISTATUS RfrGetFQDNFromLegacyDN(
-               [in]                                                    uint32  ulFlags,
-               [in,range(10,1024)]                                     uint32  cbMailboxServerDN,
-               [in,string,charset(DOS),size_is(cbMailboxServerDN)]     uint8   *szMailboxServerDN,
-               [out,ref,string,charset(DOS)]                           uint8   **ppszServerFQDN
-               );
-}
-
-[
-  uuid("f930c514-1215-11d3-99a5-00a0c9b61b04"),
-  helpstring("System Attendant Cluster Interface"),
-  pointer_default(unique),
-  version(1.0)
-] interface exchange_sysatt_cluster
-{
-       void sysatt_cluster_dummy();
-}
-
-/*
-[83d72bf0-0d89-11ce-b13f-00aa003bac6c] MS Exchange
-System Attendant Private Interface
-*/
-
-[
-  uuid("469d6ec0-0d87-11ce-b13f-00aa003bac6c"),
-  pointer_default(unique),
-  helpstring("Exchange 5.5 System Attendant Request for Response")
-] interface exchange_system_attendant
-{
-       void sysatt_dummy();
-}
-
-[
-  uuid("9e8ee830-4559-11ce-979b-00aa005ffebe"),
-  pointer_default(unique),
-  version(2.0),
-  helpstring("Exchange 5.5 MTA")
-] interface exchange_mta
-{
-       /*****************/
-       /* Function 0x00 */
-       void MtaBind();
-
-       /*****************/
-       /* Function 0x01 */
-       void MtaBindAck();
-}
-
-[
-  uuid("f5cc59b4-4264-101a-8c59-08002b2f8426"),
-  pointer_default(unique),
-  version(21.0),
-  helpstring("Exchange 5.5 DRS")
-] interface exchange_drs
-{
-       /*****************/
-       /* Function 0x00 */
-       void ds_abandon();
-
-       /*****************/
-       /* Function 0x01 */
-       void ds_add_entry();
-
-       void ds_bind();
-       void ds_compare();
-       void ds_list();
-       void ds_modify_entry();
-       void ds_modify_rdn();
-       void ds_read();
-       void ds_receive_result();
-       void ds_remove_entry();
-       void ds_search();
-       void ds_unbind();
-       void ds_wait();
-       void dra_replica_add();
-       void dra_replica_delete();
-       void dra_replica_synchronize();
-       void dra_reference_update();
-       void dra_authorize_replica();
-       void dra_unauthorize_replica();
-       void dra_adopt();
-       void dra_set_status();
-       void dra_modify_entry();
-       void dra_delete_subref();
-}
-
-[
-  uuid("f5cc5a7c-4264-101a-8c59-08002b2f8426"),
-  version(21.0),
-  pointer_default(unique),
-  helpstring("Exchange 5.5 XDS")
-] interface exchange_xds
-{
-       void xds_dummy();
-}
-
-[
-  uuid("38a94e72-a9bc-11d2-8faf-00c04fa378ff"),
-  pointer_default(unique),
-  version(1.0)
-] interface exchange_mta_qadmin
-{
-       void exchange_mta_qadmin();
-}
-
-
-[
-  uuid("0e4a0156-dd5d-11d2-8c2f-00c04fb6bcde"),
-  pointer_default(unique),
-  version(1.0)
-] interface exchange_store_information
-{
-       void exchange_store_information_dummy();
-}
-
-[
-  uuid("f5cc5a18-4264-101a-8c59-08002b2f8426"),
-  endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:[]"),
-  pointer_default(unique),
-  version(56.0),
-  helpstring("Exchange 5.5 Name Service Provider")
-] interface exchange_nsp
-{
-
-#define        PT_UNSPECIFIED  0x0000
-#define        PT_NULL         0x0001
-#define        PT_I2           0x0002
-#define        PT_LONG         0x0003
-#define        PT_R4           0x0004
-#define        PT_DOUBLE       0x0005
-#define        PT_CURRENCY     0x0006
-#define        PT_APPTIME      0x0007
-#define        PT_ERROR        0x000a /* means the given attr contains no value */
-#define        PT_BOOLEAN      0x000b
-#define        PT_OBJECT       0x000d
-#define        PT_I8           0x0014
-#define        PT_STRING8      0x001e
-#define        PT_UNICODE      0x001f
-#define        PT_SYSTIME      0x0040
-#define        PT_CLSID        0x0048
-#define        PT_SVREID       0x00fb
-#define        PT_SRESTRICT    0x00fd
-#define        PT_ACTIONS      0x00fe
-#define        PT_BINARY       0x0102
-/* Multi-valued properties */
-#define        PT_MV_I2        0x1002
-#define        PT_MV_LONG      0x1003
-#define        PT_MV_R4        0x1004
-#define        PT_MV_DOUBLE    0x1005
-#define        PT_MV_CURRENCY  0x1006
-#define        PT_MV_APPTIME   0x1007
-#define        PT_MV_I8        0x1014
-#define        PT_MV_STRING8   0x101e
-#define        PT_MV_TSTRING   0x101e
-#define        PT_MV_UNICODE   0x101f
-#define        PT_MV_SYSTIME   0x1040
-#define        PT_MV_CLSID     0x1048
-#define        PT_MV_BINARY    0x1102
-
-       typedef [v1_enum] enum {
-               SortTypeDisplayName             = 0x00000000,
-               SortTypePhoneticDisplayName     = 0x00000003,
-               SortTypeDisplayName_RO          = 0x000003E8,
-               SortTypeDisplayName_W           = 0x000003E9
-       } TableSortOrders;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableSortOrders SortType;
-               uint32          ContainerID;
-               uint32          CurrentRec;
-               uint32          Delta;
-               uint32          NumPos;
-               uint32          TotalRecs;
-               uint32          CodePage;
-               uint32          TemplateLocale;
-               uint32          SortLocale;
-       } STAT;
-
-       typedef struct {
-               uint8 ab[16];
-       } FlatUID_r;
-
-       /* like a SPropTagArray, but without the "value is a an enum MAPITAGS" semantics */
-       typedef struct {
-               [range(0,100000)] uint32                        cValues;
-               [size_is(cValues+1), length_is(cValues)] uint32 aulPropTag[];
-       } PropertyTagArray_r;
-    
-       typedef struct {
-               FlatUID_r       *lpguid;
-               uint32          ulReserved;
-               uint32          lID;
-       } PropertyName_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                cNames;
-               [size_is(cNames)] PropertyName_r        aNames[];
-       } PropertyNameSet_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                        cValues;
-               [string,size_is(cValues),charset(DOS)] uint8    **lppszA;
-       } StringArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                        Count;
-               [string,size_is(Count),charset(DOS)] uint8      *Strings[];
-       } StringsArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                        cValues;
-               [string,size_is(cValues),charset(UTF16)] uint16 **lppszW;
-       } WStringArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                        Count;
-               [string,size_is(Count),charset(UTF16)] uint16   *Strings[];
-       } WStringsArray_r;
-
-       typedef struct {
-               [range(0,100001)] uint32                                cValues;
-               [size_is(cValues+1),length_is(cValues)] MAPITAGS        aulPropTag[];
-       } SPropTagArray;
-
-       typedef [public] struct {
-               [range(0,2097152)] uint32       cb;
-               [size_is(cb)] uint8             *lpb;
-       } Binary_r;
-
-       typedef [public] struct {
-               uint32 dwLowDateTime;
-               uint32 dwHighDateTime;
-       } FILETIME;
-
-       typedef struct {
-               [range(0,100000)] uint32        cValues;
-               [size_is(cValues)] uint16       *lpi;
-       } ShortArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32        cValues;
-               [size_is(cValues)] uint32       *lpl; 
-       } LongArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32        cValues;
-               [size_is(cValues)] Binary_r     *lpbin;
-       } BinaryArray_r;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               [range(0,100000)]uint32         cValues;
-               [size_is(cValues)] FlatUID_r    **lpguid; 
-       } FlatUIDArray_r;
-
-       typedef struct {
-               [range(0,100000)] uint32        cValues;
-               [size_is(cValues)] FILETIME     *lpft;
-       } DateTimeArray_r;
-
-       typedef [switch_type(uint32)] union {
-               [case(PT_I2)]                   uint16                  i;
-               [case(PT_LONG)]                 uint32                  l;
-               [case(PT_DOUBLE)]               dlong                   dbl;
-               [case(PT_BOOLEAN)]              uint8                   b;
-               [case(PT_I8)]                   dlong                   d;
-               [case(PT_STRING8)][unique][string,charset(DOS)] uint8   *lpszA;
-               [case(PT_BINARY)]               Binary_r                bin;
-               [case(PT_SVREID)]               Binary_r                bin;
-               [case(PT_UNICODE)][string,charset(UTF16)] uint16        *lpszW;
-               [case(PT_CLSID)]                FlatUID_r               *lpguid;
-               [case(PT_SYSTIME)]              FILETIME                ft;
-               [case(PT_ERROR)]                MAPISTATUS              err;
-               [case(PT_MV_I2)]                ShortArray_r            MVi;
-               [case(PT_MV_LONG)]              LongArray_r             MVl;
-               [case(PT_MV_STRING8)]           StringArray_r           MVszA;
-               [case(PT_MV_BINARY)]            BinaryArray_r           MVbin;
-               [case(PT_MV_CLSID)]             FlatUIDArray_r          MVguid;
-               [case(PT_MV_UNICODE)]           WStringArray_r          MVszW;
-               [case(PT_MV_SYSTIME)]           DateTimeArray_r         MVft;
-               [case(PT_NULL)]                 uint32                  null;
-               [case(PT_OBJECT)]               uint32                  object;
-       } SPropValue_CTR;
-
-       typedef [public]struct {
-               MAPITAGS ulPropTag;
-               uint32 dwAlignPad;
-               [switch_is(ulPropTag & 0xFFFF)] SPropValue_CTR value; 
-       } SPropValue;
-       
-       typedef struct {
-               uint32                          ulAdrEntryPad;
-               [range(0,100000)] uint32        cValues;
-               [size_is(cValues)]SPropValue    *lpProps;
-       } SRow;
-
-
-       typedef [public] struct {
-               [range(0,100000)] uint32        cRows;
-               [size_is(cRows)] SRow           aRow[];
-       } SRowSet;
-       
-       typedef struct {
-               [range(0,100000)] uint32                cRes;
-               [size_is(cRes)] Restriction_r           *lpRes;
-       } AndRestriction_r;
-
-       typedef struct {
-               [range(0,100000)] uint32                cRes;
-               [size_is(cRes)] Restriction_r           *lpRes;
-       } OrRestriction_r;
-
-       typedef struct {
-               Restriction_r                           *lpRes;
-       } NotRestriction_r;
-
-       typedef struct {
-               uint32                                  ulFuzzyLevel;
-               MAPITAGS                                ulPropTag;
-               SPropValue                              *lpProp;
-       } ContentRestriction_r;
-
-       typedef struct {
-               uint32                                  relop;
-               MAPITAGS                                ulPropTag;
-               SPropValue                              *lpProp;
-       } PropertyRestriction_r;
-
-       typedef struct {
-               uint32                                  relop;
-               MAPITAGS                                ulPropTag1;
-               MAPITAGS                                ulPropTag2;
-       } ComparePropsRestriction_r;
-
-       typedef struct {
-               uint32                                  relMBR;
-               MAPITAGS                                ulPropTag;
-               uint32                                  ulMask;
-       } BitMaskRestriction_r;
-
-       typedef struct {
-               uint32                                  relop;
-               MAPITAGS                                ulPropTag;
-               uint32                                  cb;
-       } SizeRestriction_r;
-
-       typedef struct {
-               uint32                                  ulReserved1;
-               MAPITAGS                                ulPropTag;
-               uint32                                  ulReserved2;
-       } ExistRestriction_r;
-
-       typedef struct {
-               uint32                                  ulSubObject;
-               Restriction_r                           *lpRes;
-       } SubRestriction_r;
-
-       typedef [v1_enum] enum {
-               RES_AND                 = 0x0,
-               RES_OR                  = 0x1,
-               RES_NOT                 = 0x2,
-               RES_CONTENT             = 0x3,
-               RES_PROPERTY            = 0x4,
-               RES_COMPAREPROPS        = 0x5,
-               RES_BITMASK             = 0x6,
-               RES_SIZE                = 0x7,
-               RES_EXIST               = 0x8,
-               RES_SUBRESTRICTION      = 0x9,
-               RES_COMMENT             = 0xA
-       } RestrictionType_r;
-
-       typedef [switch_type(uint32)] union {
-               [case(RES_AND)]                 AndRestriction_r                resAnd;
-               [case(RES_OR)]                  OrRestriction_r                 resOr;
-               [case(RES_NOT)]                 NotRestriction_r                resNot;
-               [case(RES_CONTENT)]             ContentRestriction_r            resContent;
-               [case(RES_PROPERTY)]            PropertyRestriction_r           resProperty;
-               [case(RES_COMPAREPROPS)]        ComparePropsRestriction_r       resCompareProps;
-               [case(RES_BITMASK)]             BitMaskRestriction_r            resBitMask;
-               [case(RES_SIZE)]                SizeRestriction_r               resSize;
-               [case(RES_EXIST)]               ExistRestriction_r              resExist;
-               [case(RES_SUBRESTRICTION)]      SubRestriction_r                resSub;
-       } RestrictionUnion_r;
-
-       typedef [public] struct _Restriction_r{
-               RestrictionType_r                       rt;
-               [switch_is(rt)] RestrictionUnion_r      res;
-       } Restriction_r;
-
-       /*****************/
-       /* Function 0x00 */
-       typedef [bitmap32bit] bitmap {
-               fAnonymousLogin = 0x00000020
-       } NspiBind_dwFlags;
-
-       MAPISTATUS NspiBind(
-               [in] NspiBind_dwFlags   dwFlags,
-               [in] STAT               *pStat,
-               [in,out,unique] GUID    *mapiuid,
-               [out] policy_handle     *handle
-               );
-
-       /*****************/
-       /* Function 0x01 */
-       MAPISTATUS NspiUnbind(
-               [in, out] policy_handle *handle,
-               [in] uint32             Reserved
-               );
-
-       /*****************/
-       /* Function 0x02 */
-       MAPISTATUS NspiUpdateStat(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in,out] STAT           *pStat,
-               [in,out,unique] uint32  *plDelta
-               );
-
-       /*****************/
-       /* Function 0x03 */
-       typedef [bitmap32bit] bitmap {
-               fSkipObjects    = 0x00000001,
-               fEphID          = 0x00000002
-       } NspiQueryRows_dwFlags;
-
-       MAPISTATUS NspiQueryRows(
-               [in]                                    policy_handle                   *handle,
-               [in]                                    NspiQueryRows_dwFlags           dwFlags,
-               [in,out]                                STAT                            *pStat,
-               [in,range(0,100000)]                    uint32                          dwETableCount,
-               [in,unique,size_is(dwETableCount)]      uint32                          *lpETable,
-               [in]                                    uint32                          Count,
-               [in,unique]                             SPropTagArray                   *pPropTags,
-               [out]                                   SRowSet                         **ppRows
-               );
-
-       /*****************/
-       /* Function 0x04 */
-       MAPISTATUS NspiSeekEntries(
-               [in]            policy_handle   *handle,
-               [in]            uint32          Reserved,
-               [in,out]        STAT            *pStat,
-               [in]            SPropValue      *pTarget,
-               [in,unique]     SPropTagArray   *lpETable,
-               [in,unique]     SPropTagArray   *pPropTags,
-               [out]           SRowSet         **pRows
-               );
-
-       /*****************/
-       /* Function 0x05 */
-       MAPISTATUS NspiGetMatches(
-               [in]            policy_handle   *handle,
-               [in]            uint32          Reserved,
-               [in,out]        STAT            *pStat,
-               [in][unique]    SPropTagArray   *pReserved,
-               [in]            uint32          Reserved2,
-               [in][unique]    Restriction_r   *Filter,
-               [in][unique]    PropertyName_r  *lpPropName,
-               [in]            uint32          ulRequested,
-               [out]           SPropTagArray   **ppOutMIds,
-               [in][unique]    SPropTagArray   *pPropTags,
-               [out]           SRowSet         **ppRows
-               );
-
-       /*****************/
-       /* Function 0x06 */
-       MAPISTATUS NspiResortRestriction(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in,out] STAT           *pStat,
-               [in] SPropTagArray      *pInMIds,
-               [in,out] SPropTagArray  **ppMIds
-               );
-
-       /*****************/
-       /* Function 0x07 */
-       MAPISTATUS NspiDNToMId(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in] StringsArray_r     *pNames,
-               [out] SPropTagArray     **ppMIds
-               );
-
-       /*****************/
-       /* Function 0x08 */
-       MAPISTATUS NspiGetPropList(
-               [in] policy_handle      *handle,
-               [in] uint32             dwFlags,
-               [in] uint32             dwMId,
-               [in] uint32             CodePage,
-               [out] SPropTagArray     **ppPropTags
-               );
-
-       /*****************/
-       /* Function 0x09 */
-       MAPISTATUS NspiGetProps(
-               [in]    policy_handle                   *handle,
-               [in]    uint32                          dwFlags,
-               [in]    STAT                            *pStat,
-               [in,unique] SPropTagArray               *pPropTags,
-               [out]   SRow                            **ppRows
-               );
-
-       /*****************/
-       /* Funcion 0xa   */
-       MAPISTATUS NspiCompareMIds(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in] STAT               *pStat,
-               [in] uint32             MId1,
-               [in] uint32             MId2,
-               [out] uint32            *plResult
-               );
-
-       /*****************/
-       /* Function 0xb  */
-       MAPISTATUS NspiModProps(
-               [in] policy_handle              *handle,
-               [in] uint32                     Reserved,
-               [in] STAT                       *pStat,
-               [in,unique] SPropTagArray       *pPropTags,
-               [in] SRow                       *pRow
-               );
-
-       /*****************/
-       /* Function 0x0c */
-       typedef [bitmap32bit] bitmap {
-               NspiAddressCreationTemplates    = 0x00000002,
-               NspiUnicodeStrings              = 0x00000004
-       } NspiGetSpecialTable_dwFlags;
-
-       MAPISTATUS NspiGetSpecialTable(
-               [in] policy_handle                      *handle,
-               [in] NspiGetSpecialTable_dwFlags        dwFlags,
-               [in] STAT                               *pStat,
-               [in,out] uint32                         *lpVersion,
-               [out] SRowSet                           **ppRows
-               );
-
-       /*******************/
-       /* Function 0x0d   */
-       typedef [bitmap32bit] bitmap {
-               TI_TEMPLATE             = 0x00000001,
-               TI_SCRIPT               = 0x00000004,
-               TI_EMT                  = 0x00000010,
-               TI_HELPFILE_NAME        = 0x00000020,
-               TI_HELPFILE_CONTENTS    = 0x00000040
-       } TI_dwFlags;
-
-       MAPISTATUS NspiGetTemplateInfo(
-               [in] policy_handle                      *handle,
-               [in] TI_dwFlags                         dwFlags,
-               [in] uint32                             ulType,
-               [in,unique,string,charset(DOS)] uint8   *pDN,
-               [in] uint32                             dwCodePage,
-               [in] uint32                             dwLocaleID,
-               [out] SRow                              **ppData
-               );
-
-       /*******************/
-       /* Function 0x0e   */
-       MAPISTATUS NspiModLinkAtt(
-               [in] policy_handle                      *handle,
-               [in] uint32                             dwFlags,
-               [in] uint32                             ulPropTag,
-               [in] uint32                             MId,
-               [in] BinaryArray_r                      *lpEntryIds
-               );
-
-       /*************************************/
-       /* Function 0x0f: Not used on wire   */
-       MAPISTATUS NspiDeleteEntries(
-               [in] policy_handle                      *Reserved1,
-               [in] uint32                             Reserved2,
-               [in] uint32                             Reserved3,
-               [in] BinaryArray_r                      *Reserved4
-               );
-
-       /*******************/
-       /* Function 0x10   */
-       typedef [bitmap32bit] bitmap {
-               NspiUnicodeProptypes    = 0x80000000
-       } NspiQueryColumns_dwFlags;
-
-       MAPISTATUS NspiQueryColumns(
-               [in] policy_handle                      *handle,
-               [in] uint32                             Reserved,
-               [in] NspiQueryColumns_dwFlags           dwFlags,
-               [out] SPropTagArray                     **ppColumns
-               );
-
-       /*******************/
-       /* Function 0x11   */
-       MAPISTATUS NspiGetNamesFromIDs(
-               [in] policy_handle                      *handle,
-               [in] uint32                             Reserved,
-               [in,unique] FlatUID_r                   *lpGuid,
-               [in,unique] SPropTagArray               *pPropTags,
-               [out] SPropTagArray                     **ppReturnedPropTags,
-               [out] PropertyNameSet_r                 **ppNames
-               );
-
-       /*******************/
-       /* Function 0x12   */
-       MAPISTATUS NspiGetIDsFromNames(
-               [in] policy_handle                      *handle,
-               [in] uint32                             Reserved,
-               [in] uint32                             dwFlags,
-               [in,range(0,100000)] uint32             cPropNames,
-               [in,size_is(cPropNames)] PropertyName_r **ppNames,
-               [out] SPropTagArray                     **ppPropTags
-               );
-
-       /*****************/
-       /* Function 0x13 */
-       MAPISTATUS NspiResolveNames(
-               [in] policy_handle              *handle,
-               [in] uint32                     Reserved,
-               [in] STAT                       *pStat,
-               [in,unique] SPropTagArray       *pPropTags,
-               [in] StringsArray_r             *paStr,
-               [out] PropertyTagArray_r        **ppMIds,
-               [out] SRowSet                   **ppRows
-       );
-
-       /*****************/
-       /* Function 0x14 */
-       MAPISTATUS NspiResolveNamesW(
-               [in] policy_handle              *handle,
-               [in] uint32                     Reserved,
-               [in] STAT                       *pStat,
-               [in,unique] SPropTagArray       *pPropTags,
-               [in] WStringsArray_r            *paWStr,
-               [out] PropertyTagArray_r        **ppMIds,
-               [out] SRowSet                   **ppRows
-               );
-}
-
-[
-  uuid("a4f1db00-ca47-1067-b31f-00dd010662da"),
-  pointer_default(unique),
-  endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:"),
-  //version(0.81),
-  version(5308416),
-  helpstring("Exchange 5.5 EMSMDB")
-] interface exchange_emsmdb
-{
-       /*****************/
-       /* Function 0x00 */
-
-       MAPISTATUS EcDoConnect(
-               [out]                           policy_handle   *handle,
-                [in,string,charset(DOS)]       uint8           szUserDN[],
-               [in]                            uint32          ulFlags,
-               [in]                            uint32          ulConMod,
-               [in]                            uint32          cbLimit,
-               [in]                            uint32          ulCpid,
-               [in]                            uint32          ulLcidString,
-               [in]                            uint32          ulLcidSort,
-               [in]                            uint32          ulIcxrLink,
-               [in]                            uint16          usFCanConvertCodePages,
-               [out]                           uint32          *pcmsPollsMax,
-               [out]                           uint32          *pcRetry,
-               [out]                           uint32          *pcmsRetryDelay,
-               [out]                           uint32          *picxr,
-                [out,ref,string,charset(DOS)]uint8             **szDNPrefix,
-                [out,ref,string,charset(DOS)]uint8             **szDisplayName,
-                [out]                          uint16          rgwServerVersion[3],
-               [in,out]                        uint16          rgwClientVersion[3],
-                [in,out]                       uint32          *pullTimeStamp
-               );
-
-       /*****************/
-       /* Function 0x01 */
-       MAPISTATUS EcDoDisconnect(
-               [in,out]   policy_handle   *handle
-               );
-
-       /*****************/
-       /* Function 0x02 */
-
-       /*
-         EcDoRpc opnums
-       */
-
-       typedef [public, enum8bit, flag(NDR_PAHEX)] enum 
-               {
-                       MAPI_STORE      = 0x1,
-                       MAPI_ADDRBOOK   = 0x2,
-                       MAPI_FOLDER     = 0x3,
-                       MAPI_ABCONT     = 0x4,
-                       MAPI_MESSAGE    = 0x5,
-                       MAPI_MAILUSER   = 0x6, /* Individual Recipient */
-                       MAPI_ATTACH     = 0x7,
-                       MAPI_DISTLIST   = 0x8,
-                       MAPI_PROFSECT   = 0x9,
-                       MAPI_STATUS     = 0xA,
-                       MAPI_SESSION    = 0xB,
-                       MAPI_FORMINFO   = 0xC
-               } MAPI_OBJTYPE;
-
-       typedef [public, v1_enum, flag(NDR_PAHEX)] enum 
-               {
-                       RightsNone              = 0x00000000,
-                       RightsReadItems         = 0x00000001,
-                       RightsCreateItems       = 0x00000002,
-                       RightsEditOwn           = 0x00000008,
-                       RightsDeleteOwn         = 0x00000010,
-                       RightsEditAll           = 0x00000020,
-                       RightsDeleteAll         = 0x00000040,
-                       RightsCreateSubfolders  = 0x00000080,
-                       RightsFolderOwner       = 0x00000100,
-                       RightsFolderContact     = 0x00000200,
-                       RoleNone                = 0x00000400,
-                       RoleReviewer            = 0x00000401,
-                       RoleContributor         = 0x00000402,
-                       RoleNoneditingAuthor    = 0x00000413,
-                       RoleAuthor              = 0x0000041B,
-                       RoleEditor              = 0x0000047B,
-                       RolePublishAuthor       = 0x0000049B,
-                       RolePublishEditor       = 0x000004FB,
-                       RightsAll               = 0x000005FB,
-                       RoleOwner               = 0x000007FB
-               } ACLRIGHTS;
-
-       typedef [public, enum8bit, flag(NDR_PAHEX)] enum
-               {
-                       op_MAPI_Release                         = 0x1,
-                       op_MAPI_OpenFolder                      = 0x2,
-                       op_MAPI_OpenMessage                     = 0x3,
-                       op_MAPI_GetHierarchyTable               = 0x4,
-                       op_MAPI_GetContentsTable                = 0x5,
-                       op_MAPI_CreateMessage                   = 0x6,
-                       op_MAPI_GetProps                        = 0x7,
-                       op_MAPI_GetPropsAll                     = 0x8,
-                       op_MAPI_GetPropList                     = 0x9,
-                       op_MAPI_SetProps                        = 0xa,
-                       op_MAPI_DeleteProps                     = 0xb,
-                       op_MAPI_SaveChangesMessage              = 0xc,
-                       op_MAPI_RemoveAllRecipients             = 0xd,
-                       op_MAPI_ModifyRecipients                = 0xe,
-                       op_MAPI_ReadRecipients                  = 0xf,
-                       op_MAPI_ReloadCachedInformation         = 0x10,
-                       op_MAPI_SetMessageReadFlag              = 0x11,
-                       op_MAPI_SetColumns                      = 0x12,
-                       op_MAPI_SortTable                       = 0x13,
-                       op_MAPI_Restrict                        = 0x14,
-                       op_MAPI_QueryRows                       = 0x15,
-                       op_MAPI_GetStatus                       = 0x16,
-                       op_MAPI_QueryPosition                   = 0x17,
-                       op_MAPI_SeekRow                         = 0x18,
-                       op_MAPI_SeekRowBookmark                 = 0x19,
-                       op_MAPI_SeekRowApprox                   = 0x1a,
-                       op_MAPI_CreateBookmark                  = 0x1b,
-                       op_MAPI_CreateFolder                    = 0x1c,
-                       op_MAPI_DeleteFolder                    = 0x1d,
-                       op_MAPI_DeleteMessages                  = 0x1e,
-                       op_MAPI_GetMessageStatus                = 0x1f,
-                       op_MAPI_SetMessageStatus                = 0x20,
-                       op_MAPI_GetAttachmentTable              = 0x21,
-                       op_MAPI_OpenAttach                      = 0x22,
-                       op_MAPI_CreateAttach                    = 0x23,
-                       op_MAPI_DeleteAttach                    = 0x24,
-                       op_MAPI_SaveChangesAttachment           = 0x25,
-                       op_MAPI_SetReceiveFolder                = 0x26,
-                       op_MAPI_GetReceiveFolder                = 0x27,
-                       op_MAPI_RegisterNotification            = 0x29,
-                       op_MAPI_Notify                          = 0x2a,
-                       op_MAPI_OpenStream                      = 0x2b,
-                       op_MAPI_ReadStream                      = 0x2c,
-                       op_MAPI_WriteStream                     = 0x2d,
-                       op_MAPI_SeekStream                      = 0x2e,
-                       op_MAPI_SetStreamSize                   = 0x2f,
-                       op_MAPI_SetSearchCriteria               = 0x30,
-                       op_MAPI_GetSearchCriteria               = 0x31,
-                       op_MAPI_SubmitMessage                   = 0x32,
-                       op_MAPI_MoveCopyMessages                = 0x33,
-                       op_MAPI_AbortSubmit                     = 0x34,
-                       op_MAPI_MoveFolder                      = 0x35,
-                       op_MAPI_CopyFolder                      = 0x36,
-                       op_MAPI_QueryColumnsAll                 = 0x37,
-                       op_MAPI_Abort                           = 0x38,
-                       op_MAPI_CopyTo                          = 0x39,
-                       op_MAPI_CopyToStream                    = 0x3a,
-                       op_MAPI_CloneStream                     = 0x3b,
-                       op_MAPI_GetPermissionsTable             = 0x3e,
-                       op_MAPI_GetRulesTable                   = 0x3f,
-                       op_MAPI_ModifyPermissions               = 0x40,
-                       op_MAPI_ModifyRules                     = 0x41,
-                       op_MAPI_GetOwningServers                = 0x42,
-                       op_MAPI_LongTermIdFromId                = 0x43,
-                       op_MAPI_IdFromLongTermId                = 0x44,
-                       op_MAPI_PublicFolderIsGhosted           = 0x45,
-                       op_MAPI_OpenEmbeddedMessage             = 0x46,
-                       op_MAPI_SetSpooler                      = 0x47,
-                       op_MAPI_SpoolerLockMessage              = 0x48,
-                       op_MAPI_AddressTypes                    = 0x49,
-                       op_MAPI_TransportSend                   = 0x4a,
-                       op_MAPI_FastTransferSourceCopyMessages  = 0x4b,
-                       op_MAPI_FastTransferSourceCopyFolder    = 0x4c,
-                       op_MAPI_FastTransferSourceCopyTo        = 0x4d,
-                       op_MAPI_FastTransferSourceGetBuffer     = 0x4e,
-                       op_MAPI_FindRow                         = 0x4f,
-                       op_MAPI_Progress                        = 0x50,
-                       op_MAPI_TransportNewMail                = 0x51,
-                       op_MAPI_GetValidAttachments             = 0x52,
-                       op_MAPI_FastTransferDestConfigure       = 0x53,
-                       op_MAPI_FastTransferDestPutBuffer       = 0x54,
-                       op_MAPI_GetNamesFromIDs                 = 0x55,
-                       op_MAPI_GetIDsFromNames                 = 0x56,
-                       op_MAPI_UpdateDeferredActionMessages    = 0x57,
-                       op_MAPI_EmptyFolder                     = 0x58,
-                       op_MAPI_ExpandRow                       = 0x59,
-                       op_MAPI_CollapseRow                     = 0x5a,
-                       op_MAPI_LockRegionStream                = 0x5b,
-                       op_MAPI_UnlockRegionStream              = 0x5c,
-                       op_MAPI_CommitStream                    = 0x5d,
-                       op_MAPI_GetStreamSize                   = 0x5e,
-                       op_MAPI_QueryNamedProperties            = 0x5f,
-                       op_MAPI_GetPerUserLongTermIds           = 0x60,
-                       op_MAPI_GetPerUserGuid                  = 0x61,
-                       op_MAPI_ReadPerUserInformation          = 0x63,
-                       op_MAPI_WritePerUserInformation         = 0x64,
-                       op_MAPI_SetReadFlags                    = 0x66,
-                       op_MAPI_CopyProperties                  = 0x67,
-                       op_MAPI_GetReceiveFolderTable           = 0x68,
-                       op_MAPI_FastTransferSourceCopyProps     = 0x69,
-                       op_MAPI_GetCollapseState                = 0x6b,
-                       op_MAPI_SetCollapseState                = 0x6c,
-                       op_MAPI_GetTransportFolder              = 0x6d,
-                       op_MAPI_Pending                         = 0x6e,
-                       op_MAPI_OptionsData                     = 0x6f,
-                       op_MAPI_SyncConfigure                   = 0x70,
-                       op_MAPI_SyncImportMessageChange         = 0x72,
-                       op_MAPI_SyncImportHierarchyChange       = 0x73,
-                       op_MAPI_SyncImportDeletes               = 0x74,
-                       op_MAPI_SyncUploadStateStreamBegin      = 0x75,
-                       op_MAPI_SyncUploadStateStreamContinue   = 0x76,
-                       op_MAPI_SyncUploadStateStreamEnd        = 0x77,
-                       op_MAPI_SyncImportMessageMove           = 0x78,
-                       op_MAPI_SetPropertiesNoReplicate        = 0x79,
-                       op_MAPI_DeletePropertiesNoReplicate     = 0x7a,
-                       op_MAPI_GetStoreState                   = 0x7b,
-                       op_MAPI_SyncOpenCollector               = 0x7e,
-                       op_MAPI_GetLocalReplicaIds              = 0x7f,
-                       op_MAPI_SyncImportReadStateChanges      = 0x80,
-                       op_MAPI_ResetTable                      = 0x81,
-                       op_MAPI_SyncGetTransferState            = 0x82,
-                       op_MAPI_TellVersion                     = 0x86,
-                       op_MAPI_OpenPublicFolderByName          = 0x87,
-                       op_MAPI_SetSyncNotificationGuid         = 0x88,
-                       op_MAPI_FreeBookmark                    = 0x89,
-                       op_MAPI_WriteAndCommitStream            = 0x90,
-                       op_MAPI_HardDeleteMessages              = 0x91,
-                       op_MAPI_HardDeleteMessagesAndSubfolders = 0x92,
-                       op_MAPI_Logon                           = 0xfe,
-                       /****** custom MAPI opnum for mapiproxy ******/
-                       op_MAPI_proxypack                       = 0xa5
-               } MAPI_OPNUM;
-
-
-       typedef [public,noprint,flag(NDR_NOALIGN)] struct {
-               uint16                          cb;
-               [flag(NDR_BUFFERS)]uint8        lpb[cb];
-       } SBinary_short;
-
-       typedef [public] struct {
-               uint32 cValues;
-               uint32 lpl[cValues]; 
-       } mapi_MV_LONG_STRUCT;
-
-       typedef [public] struct {
-               astring lppszA;
-       } mapi_LPSTR;
-
-       typedef [public] struct {
-               uint32 cValues;
-               mapi_LPSTR strings[cValues]; 
-       } mapi_SLPSTRArray;
-
-       typedef struct {
-               [flag(STR_NULLTERM)] string lppszW;
-       } mapi_LPWSTR;
-
-       typedef struct {
-               uint32 cValues;
-               mapi_LPWSTR strings[cValues];
-       } mapi_SPLSTRArrayW;
-       
-       typedef [public] struct {
-               uint32          cValues;
-               SBinary_short   bin[cValues];
-       } mapi_SBinaryArray;
-
-       typedef struct {
-               uint32          cValues;
-               GUID            lpguid[cValues];
-       } mapi_SGuidArray;
-
-       /******* part of the no-pointer deep recursion hack *******/
-       typedef [nopull,nopush,noprint,flag(NDR_NOALIGN)] struct {
-               uint8 wrap[0x8000];
-       } mapi_SRestriction_wrap;
-
-       typedef [nopush,nopull,noprint,flag(NDR_NOALIGN)] struct {
-               uint8   wrap[0x8000];
-       } mapi_SPropValue_wrap;
-
-       typedef [nopush,nopull,noprint,flag(NDR_NOALIGN)] struct {
-               uint8   wrap[0x8000];
-       } mapi_SPropValue_array_wrap;
-       /**********************************************************/    
-
-       typedef [enum8bit] enum {
-               ActionType_OP_MOVE              = 0x1,
-               ActionType_OP_COPY              = 0x2,
-               ActionType_OP_REPLY             = 0x3,
-               ActionType_OP_OOF_REPLY         = 0x4,
-               ActionType_OP_DEFER_ACTION      = 0x5,
-               ActionType_OP_BOUNCE            = 0x6,
-               ActionType_OP_FORWARD           = 0x7,
-               ActionType_OP_DELEGATE          = 0x8,
-               ActionType_OP_TAG               = 0x9,
-               ActionType_OP_DELETE            = 0xA,
-               ActionType_OP_MARK_AS_READ      = 0xB
-       } ActionType;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                FolderInThisStore;
-               SBinary_short           StoreEID;
-               SBinary_short           FolderEID;
-       } MoveCopy_Action;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   ReplyTemplateFID;
-               hyper                   ReplyTemplateMID;
-               GUID                    ReplyTemplateGUID;                      
-       } ReplyOOF_Action;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           Reserved;
-               mapi_SPropValue_array_wrap      PropertyValue;
-       } RecipientBlock;
-
-       typedef [flag(NDR_NOALIGN)] enum {
-               BOUNCE_MESSAGE_TOO_LARGE        = 0x0000000d,
-               BOUNCE_MESSAGE_NOT_DISPLAYED    = 0x0000001f,
-               BOUNCE_MESSAGE_DENIED           = 0x00000026
-       } BounceCode;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                  RecipientCount;
-               RecipientBlock          RecipientBlock[RecipientCount];
-       } ForwardDelegate_Action;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(ActionType_OP_MOVE)]              MoveCopy_Action                 MoveAction;
-               [case(ActionType_OP_COPY)]              MoveCopy_Action                 CopyAction;
-               [case(ActionType_OP_REPLY)]             ReplyOOF_Action                 ReplyAction;
-               [case(ActionType_OP_OOF_REPLY)]         ReplyOOF_Action                 ReplyOOFAction;
-               [case(ActionType_OP_DEFER_ACTION)][flag(NDR_REMAINING)] DATA_BLOB       DeferAction;
-               [case(ActionType_OP_BOUNCE)]            BounceCode                      BounceCode;
-               [case(ActionType_OP_TAG)]               mapi_SPropValue_wrap            PropValue;
-               [case(ActionType_OP_FORWARD)]           ForwardDelegate_Action          ForwardAction;
-               [case(ActionType_OP_DELEGATE)]          ForwardDelegate_Action          DelegateAction;
-               [case(ActionType_OP_DELETE)];
-               [case(ActionType_OP_MARK_AS_READ)];
-       } ActionData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ActionType                              ActionType;
-               uint32                                  ActionFlavor;
-               uint32                                  ActionFlags;
-               [switch_is(ActionType)] ActionData      ActionDataBuffer;
-       } ActionBlockData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                                  ActionLength;
-               [subcontext(0),subcontext_size(ActionLength),flag(NDR_REMAINING)] ActionBlockData ActionBlockData;
-       } ActionBlock;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          count;
-               ActionBlock     ActionBlock[count];
-       } RuleAction;
-
-       typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union {
-               [case(PT_I2)]           uint16                  i;
-               [case(PT_LONG)]         uint32                  l;
-               [case(PT_DOUBLE)]       double                  dbl;
-               [case(PT_ERROR)]        uint32                  err;
-               [case(PT_BOOLEAN)]      uint8                   b;
-               [case(PT_I8)]           dlong                   d;
-               [case(PT_STRING8)]      astring                 lpszA;
-               [case(PT_UNICODE)][flag(STR_NULLTERM)] string   lpszW;
-               [case(PT_SYSTIME)]      FILETIME                ft;
-               [case(PT_CLSID)]        GUID                    lpguid;
-               [case(PT_SRESTRICT)]    mapi_SRestriction_wrap  Restrictions;
-               [case(PT_ACTIONS)]      RuleAction              RuleAction;
-               [case(PT_BINARY)]       SBinary_short           bin;
-               [case(PT_SVREID)]       SBinary_short           bin;
-               [case(PT_MV_LONG)]      mapi_MV_LONG_STRUCT     MVl;    
-               [case(PT_MV_STRING8)]   mapi_SLPSTRArray        MVszA;
-               [case(PT_MV_UNICODE)]   mapi_SPLSTRArrayW       MVszW;
-               [case(PT_MV_CLSID)]     mapi_SGuidArray         MVguid;
-               [case(PT_MV_BINARY)]    mapi_SBinaryArray       MVbin;
-       } mapi_SPropValue_CTR;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               MAPITAGS ulPropTag;
-               [switch_is(ulPropTag & 0xFFFF)] mapi_SPropValue_CTR value; 
-       } mapi_SPropValue;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint16                                  cValues;
-               [flag(NDR_REMAINING)]mapi_SPropValue    lpProps[cValues];
-       } mapi_SPropValue_array;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                                  cValues;
-               MAPITAGS                                aulPropTag[cValues];
-       } mapi_SPropTagArray;
-
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               ROW_ADD         =       0x1,
-               ROW_MODIFY      =       0x2,
-               ROW_REMOVE      =       0x4
-       } ulRowFlags;
-
-       /**************************/
-       /* EcDoRpc Function 0x1   */
-       typedef [nopush,nopull,flag(NDR_NOALIGN)] struct {
-       } Release_req;
-
-       typedef [nopush,nopull,flag(NDR_NOALIGN)] struct {
-       } Release_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x2   */
-       typedef [enum8bit] enum {
-               OpenModeFlags_Folder            = 0x0,
-               OpenModeFlags_SoftDeleted       = 0x4
-       } OpenFolder_OpenModeFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               hyper                           folder_id;
-               OpenFolder_OpenModeFlags        OpenModeFlags;
-       } OpenFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ServerCount;
-               uint16          CheapServerCount;
-               astring         Servers[ServerCount];
-       } OpenFolder_Replicas;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)] OpenFolder_Replicas Replicas;
-       } IsGhosted;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                HasRules;
-               boolean8                                IsGhosted;
-               [switch_is(IsGhosted)] IsGhosted        Ghost;
-       } OpenFolder_repl;
-       
-       /**************************/
-       /* EcDoRpc Function 0x3   */
-       typedef [enum8bit] enum {
-               StringType_NONE                 = 0x0,
-               StringType_EMPTY                = 0x1,
-               StringType_STRING8              = 0x2,
-               StringType_UNICODE_REDUCED      = 0x3,
-               StringType_UNICODE              = 0x4
-       } StringType;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)];
-               [case(0x2)] astring                     lpszA;
-               [case(0x3)] astring                     lpszW_reduced;
-               [case(0x4)] [flag(STR_NULLTERM)] string lpszW;
-       } String;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               StringType                      StringType;
-               [switch_is(StringType)] String  String;
-       } TypedString;
-
-       typedef [enum8bit] enum {
-               ReadOnly        = 0x0,
-               ReadWrite       = 0x1,
-               Create          = 0x3,
-               OpenSoftDelete  = 0x4
-       } OpenMessage_OpenModeFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               uint16                          CodePageId;
-               hyper                           FolderId;
-               OpenMessage_OpenModeFlags       OpenModeFlags;
-               hyper                           MessageId;
-       } OpenMessage_req;
-
-       typedef [enum16bit, flag(NDR_PAHEX)] enum {
-               CP_USASCII      = 0x04E4,
-               CP_UNICODE      = 0x04B0,
-               CP_JAUTODETECT  = 0xC6F4,
-               CP_KAUTODETECT  = 0xC705,
-               CP_ISO2022JPESC = 0xC42D,
-               CP_ISO2022JPSIO = 0xC42E
-       } CODEPAGEID;
-
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               MAPI_ORIG               = 0x0,
-               MAPI_TO                 = 0x1,
-               MAPI_CC                 = 0x2,
-               MAPI_BCC                = 0x3
-       } ulRecipClass;
-
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               SINGLE_RECIPIENT        = 0x0,
-               DISTRIBUTION_LIST       = 0x1
-       } addr_type;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x1)] uint8       prefix_size;
-               [default];
-       } recipient_AddressPrefixUsed;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x1)] addr_type   display_type;
-               [default];
-       } recipient_DisplayType;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x1)] astring     recipient_x500name;
-               [default];
-       } recipient_X500DN;
-
-       /* We're covering the PersonalDistributionList1 (0x0006) and PersonalDistributionList2
-           (0x0007) variations here, since we mask off the low bit in the switch. */
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x6)] SBinary_short                       entryid;
-               [default];
-       } recipient_EntryId;
-
-       /* We're covering the PersonalDistributionList1 (0x0006) and PersonalDistributionList2
-           (0x0007) variations here, since we mask off the low bit in the switch. */
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x6)] SBinary_short                       searchkey;
-               [default];
-       } recipient_SearchKey;
-
-       /* Present if the Type field is set to NoType (0x0) and the O flag (0x8000) is set */
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x8000)] astring                          lpszA;
-               [default];
-       } recipient_AddressType;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x400)] astring                           lpszA;
-               [case(0x600)][flag(STR_NULLTERM)] string        lpszW;
-               [default];
-       } recipient_SimpleDisplayName;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x20)] astring                            lpszA;
-               [case(0x220)][flag(STR_NULLTERM)] string        lpszW;
-               [default];
-       } recipient_TransmittableDisplayName;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x10)] astring                            lpszA;
-               [case(0x210)][flag(STR_NULLTERM)] string        lpszW;
-               [default];
-       } recipient_DisplayName;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x8)] astring                             lpszA;
-               [case(0x208)][flag(STR_NULLTERM)] string        lpszW;
-               [default];
-       } recipient_EmailAddress;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                                                                  RecipientFlags;
-               [switch_is(RecipientFlags & 0x0007)] recipient_AddressPrefixUsed        AddressPrefixUsed;
-               [switch_is(RecipientFlags & 0x0007)] recipient_DisplayType              DisplayType;
-               [switch_is(RecipientFlags & 0x0007)] recipient_X500DN                   X500DN;
-               [switch_is(RecipientFlags & 0x0006)] recipient_EntryId                  EntryId;
-               [switch_is(RecipientFlags & 0x0006)] recipient_SearchKey                SearchKey;
-               [switch_is(RecipientFlags & 0x8007)] recipient_AddressType              AddressType;
-               [switch_is(RecipientFlags & 0x0208)] recipient_EmailAddress             EmailAddress;
-               [switch_is(RecipientFlags & 0x0210)] recipient_DisplayName              DisplayName;
-               [switch_is(RecipientFlags & 0x0600)] recipient_SimpleDisplayName        SimpleDisplayName;
-               [switch_is(RecipientFlags & 0x0220)] recipient_TransmittableDisplayName TransmittableDisplayName;
-               uint16                                                                  prop_count;
-// TODO: figure out if "layout" can go
-               uint8                                                                   layout;
-// TODO: convert this to a proper structure - see if we already have one.
-               [flag(NDR_REMAINING)] DATA_BLOB                                         prop_values;
-       } RecipientRow;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulRecipClass    RecipClass;
-               CODEPAGEID      codepage;
-               uint16          Reserved;
-               [subcontext(2)] RecipientRow    RecipientRow;
-       } OpenMessage_recipients;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                HasNamedProperties;
-               TypedString             SubjectPrefix;
-               TypedString             NormalizedSubject;
-               uint16                  RecipientCount;
-               mapi_SPropTagArray      RecipientColumns;
-               uint8                   RowCount;
-               OpenMessage_recipients  recipients[RowCount];
-       } OpenMessage_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4   */
-       typedef [bitmap8bit] bitmap {
-               TableFlags_Associated                   = 0x2, /* only for GetContentsTable */
-               TableFlags_Depth                        = 0x4, /* only for GetHierarchyTable */
-               TableFlags_DeferredErrors               = 0x8,
-               TableFlags_NoNotifications              = 0x10,
-               TableFlags_SoftDeletes                  = 0x20,
-               TableFlags_UseUnicode                   = 0x40,
-               TableFlags_SuppressNotifications        = 0x80
-       } TableFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               TableFlags      TableFlags;
-       } GetHierarchyTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          RowCount;
-       } GetHierarchyTable_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x5   */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               TableFlags      TableFlags;
-       } GetContentsTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          RowCount;
-       } GetContentsTable_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x6   */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               uint16          CodePageId;
-               hyper           FolderId;
-               boolean8        AssociatedFlag;
-       } CreateMessage_req;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)] hyper       MessageId;
-       } CreateMessage_MessageId;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                                HasMessageId;
-               [switch_is(HasMessageId)] CreateMessage_MessageId       MessageId;
-       } CreateMessage_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x7  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertySizeLimit;
-               uint16          WantUnicode;
-               uint16          prop_count;
-               MAPITAGS        properties[prop_count];
-       } GetProps_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           layout;
-               [flag(NDR_REMAINING)] DATA_BLOB prop_data;
-       } GetProps_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x8  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertySizeLimit;
-               uint16          WantUnicode;
-       } GetPropsAll_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               mapi_SPropValue_array   properties;
-       } GetPropsAll_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x9  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetPropList_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          count;
-               MAPITAGS        tags[count];
-       } GetPropList_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xa  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          index;          /* index into array of property tags */
-               MAPITAGS        property_tag;   /* property for which there was an error */
-               MAPISTATUS      error_code;     /* the error that occurred for this property */
-       } PropertyProblem;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               [subcontext(2)] mapi_SPropValue_array values;
-       } SetProps_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];          
-       } SetProps_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xb  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          count;
-               MAPITAGS        tags[count];
-       } DeleteProps_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];
-       } DeleteProps_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xc  */
-       typedef [enum8bit] enum {
-               KeepOpenReadOnly        = 0x9,
-               KeepOpenReadWrite       = 0xA,
-               ForceSave               = 0xC
-       } SaveFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               uint8           SaveFlags;
-       } SaveChangesMessage_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               hyper           MessageId;
-       } SaveChangesMessage_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xd  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          ulReserved;
-       } RemoveAllRecipients_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-
-       } RemoveAllRecipients_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xe  */
-
-       /* 
-        * MODRECIP_NULL and INVALID are not part of the msdn flags
-        * but are added for printing support 
-        */
-       typedef [enum8bit,flag(NDR_PAHEX)] enum {
-               MODRECIP_NULL           = 0x0,
-               MODRECIP_INVALID        = 0x1,
-               MODRECIP_ADD            = 0x2,
-               MODRECIP_MODIFY         = 0x4,
-               MODRECIP_REMOVE         = 0x8
-       } modrecip;
-
-       typedef [flag(NDR_NOALIGN)]struct {
-               uint32          idx;
-               ulRecipClass    RecipClass;             
-               [subcontext(2),flag(NDR_REMAINING)] RecipientRow RecipientRow;
-       } ModifyRecipientRow;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                          prop_count;
-               MAPITAGS                        properties[prop_count];
-               uint16                          cValues;
-               ModifyRecipientRow              RecipientRow[cValues];
-       } ModifyRecipients_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-
-       } ModifyRecipients_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xf  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          RowId;
-               uint16          ulReserved;
-       } ReadRecipients_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32                          RowId;
-               ulRecipClass                    RecipientType;
-               uint16                          CodePageId;
-               uint16                          ulReserved;
-               [subcontext(2)] RecipientRow    RecipientRow;
-       } ReadRecipientRow;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   RowCount;
-               ReadRecipientRow        RecipientRows[RowCount];
-       } ReadRecipients_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x10 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulRecipClass            RecipientType;
-               uint16                  CodePageId;
-               uint16                  Reserved;
-               uint16                  RecipientRowSize;
-               [subcontext(0),subcontext_size(RecipientRowSize),flag(NDR_REMAINING)]RecipientRow       RecipientRow;
-       } OpenRecipientRow;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          Reserved;
-       } ReloadCachedInformation_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                HasNamedProperties;
-               TypedString             SubjectPrefix;
-               TypedString             NormalizedSubject;
-               uint16                  RecipientCount;
-               mapi_SPropTagArray      RecipientColumns;
-               uint8                   RowCount;
-               OpenRecipientRow        RecipientRows[RowCount];
-       } ReloadCachedInformation_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x11 */
-
-       typedef [bitmap8bit] bitmap {
-               SUPPRESS_RECEIPT        = 0x01,
-               CLEAR_READ_FLAG         = 0x04,
-               GENERATE_RECEIPT_ONLY   = 0x10,
-               CLEAR_RN_PENDING        = 0x20,
-               CLEAR_NRN_PENDING       = 0x40
-       } MSGFLAG_READ;
-
-       /* TODO: there is a variation that can provide "client data"
-          here clientdata is a uint8 ClientData[24], but its
-          existence within the request depends on flags associated to
-          logon_id: it the private flag set or not
-        */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               MSGFLAG_READ                    flags;
-               [flag(NDR_REMAINING)] DATA_BLOB clientdata;
-       } SetMessageReadFlag_req;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)] uint8       LogonId;
-       } SetMessageReadFlag_LogonId;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)] uint8       ClientData[24];
-       } SetMessageReadFlag_ClientData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                                        ReadStatusChanged;
-               [switch_is(ReadStatusChanged)] SetMessageReadFlag_LogonId       LogonId;
-               [switch_is(ReadStatusChanged)] SetMessageReadFlag_ClientData    ClientData;
-       } SetMessageReadFlag_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x12 */
-       typedef [enum8bit] enum {
-               SetColumns_TBL_SYNC     = 0x0,
-               SetColumns_TBL_ASYNC    = 0x1
-       } SetColumnsFlags;
-       
-       typedef [enum8bit] enum {
-               TBLSTAT_COMPLETE        = 0x0,
-               TBLSTAT_SORTING         = 0x9,
-               TBLSTAT_SORT_ERROR      = 0xA,
-               TBLSTAT_SETTING_COLS    = 0xB,
-               TBLSTAT_SETCOL_ERROR    = 0xD,
-               TBLSTAT_RESTRICTING     = 0xE,
-               TBLSTAT_RESTRICT_ERROR  = 0xF
-       } TableStatus;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SetColumnsFlags SetColumnsFlags;
-               uint16          prop_count;
-               MAPITAGS        properties[prop_count];
-       } SetColumns_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableStatus     TableStatus;
-       } SetColumns_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x13  */
-        typedef [enum8bit, flag(NDR_PAHEX)] enum {
-                TBL_ASYNC = 0x1,
-                TBL_BATCH = 0x2
-        } TBL_FLAGS;
-       
-        typedef [enum8bit, flag(NDR_PAHEX)] enum {
-                TABLE_SORT_ASCEND = 0x0,
-                TABLE_SORT_COMBINE = 0x1,
-                TABLE_SORT_DESCEND = 0x2
-        } TABLE_SORT;
-
-        typedef [public, flag(NDR_NOALIGN)] struct _SSortOrder{
-                MAPITAGS ulPropTag;
-                TABLE_SORT ulOrder;
-        } SSortOrder;
-
-       typedef [public, flag(NDR_NOALIGN)] struct _SSortOrderSet {
-               uint16          cSorts;
-               uint16          cCategories;
-               uint16          cExpanded;
-               SSortOrder      aSort[cSorts];
-       } SSortOrderSet;
-
-        typedef [flag(NDR_NOALIGN)] struct {
-               uint8           SortTableFlags;
-               SSortOrderSet   lpSortCriteria;
-        } SortTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableStatus     TableStatus;
-       } SortTable_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x14  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                  cRes;
-               mapi_SRestriction_and   res[cRes];
-       } mapi_SAndRestriction;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16  cRes;
-               mapi_SRestriction_or    res[cRes];
-       } mapi_SOrRestriction;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               mapi_SRestriction_wrap  res;
-       } mapi_SNotRestriction;
-
-       typedef [noprint, bitmap32bit] bitmap {
-               FL_FULLSTRING           = 0x00000,
-               FL_SUBSTRING            = 0x00001,
-               FL_PREFIX               = 0x00002,
-               FL_IGNORECASE           = 0x10000,
-               FL_IGNORENONSPACE       = 0x20000,
-               FL_LOOSE                = 0x40000
-       } fuzzyLevel;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               fuzzyLevel      fuzzy;
-               MAPITAGS        ulPropTag;
-               mapi_SPropValue lpProp;
-       } mapi_SContentRestriction;
-
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               BMR_EQZ = 0x0,
-               BMR_NEZ = 0x1
-       } relMBR;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               relMBR          relMBR;
-               MAPITAGS        ulPropTag;
-               uint32          ulMask;
-       } mapi_SBitmaskRestriction;
-
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               RELOP_LT = 0x0,         /* <  */
-               RELOP_LE = 0x1,         /* <= */
-               RELOP_GT = 0x2,         /* >  */
-               RELOP_GE = 0x3,         /* >= */
-               RELOP_EQ = 0x4,         /* == */
-               RELOP_NE = 0x5,         /* != */
-               RELOP_RE = 0x6          /* LIKE (Regular expression) */
-       } CompareRelop;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               CompareRelop    relop;
-               MAPITAGS        ulPropTag;
-               uint32          size;
-       } mapi_SSizeRestriction;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           relop;
-               MAPITAGS        ulPropTag;
-               mapi_SPropValue lpProp;
-       } mapi_SPropertyRestriction;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               CompareRelop    relop;
-               MAPITAGS        ulPropTag1;
-               MAPITAGS        ulPropTag2;
-       } mapi_SCompareProps;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               MAPITAGS        ulPropTag;
-       } mapi_SExistRestriction;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               MAPITAGS                ulSubObject;
-               mapi_SRestriction_sub   res[ulSubObject - ulSubObject + 1]; /* nasty hack - generates fake pointer */
-       } mapi_SSubRestriction;
-
-       typedef [nopush,nopull,noprint,nodiscriminant] union {
-               [case(0x0)];
-               [case(0x1)] mapi_SRestriction_comment *res;
-       } RestrictionVariable;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           TaggedValuesCount;
-               mapi_SPropValue                 TaggedValues[TaggedValuesCount];
-               boolean8                        RestrictionPresent;
-               [switch_is(RestrictionPresent)] RestrictionVariable Restriction;
-       } mapi_SCommentRestriction;
-
-       typedef [public,nodiscriminant] union {
-               [case(RES_AND)]                 mapi_SAndRestriction            resAnd;
-               [case(RES_OR)]                  mapi_SOrRestriction             resOr;
-               [case(RES_NOT)]                 mapi_SNotRestriction            resNot;
-               [case(RES_CONTENT)]             mapi_SContentRestriction        resContent;
-               [case(RES_PROPERTY)]            mapi_SPropertyRestriction       resProperty;
-               [case(RES_COMPAREPROPS)]        mapi_SCompareProps              resCompareProps;
-               [case(RES_BITMASK)]             mapi_SBitmaskRestriction        resBitmask;
-               [case(RES_SIZE)]                mapi_SSizeRestriction           resSize;
-               [case(RES_EXIST)]               mapi_SExistRestriction          resExist;
-               [case(RES_SUBRESTRICTION)]      mapi_SSubRestriction            resSub;
-               [case(RES_COMMENT)]             mapi_SCommentRestriction        resComment;
-               [default];
-       } mapi_SRestriction_CTR;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint8 rt;
-               [switch_is(rt)] mapi_SRestriction_CTR res;
-       } mapi_SRestriction;
-
-       typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction {
-               uint8 rt;
-               [switch_is(rt)] mapi_SRestriction_CTR res;
-       } mapi_SRestriction_and;
-
-       typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction {
-               uint8 rt;
-               [switch_is(rt)] mapi_SRestriction_CTR res;
-       } mapi_SRestriction_or;
-
-       typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction {
-               uint8 rt;
-               [switch_is(rt)] mapi_SRestriction_CTR res;
-       } mapi_SRestriction_sub;
-
-       typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction {
-               uint8 rt;
-               [switch_is(rt)] mapi_SRestriction_CTR res;
-       } mapi_SRestriction_comment;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8 handle_idx;
-               [subcontext(2)] mapi_SRestriction  restrictions;
-       } Restrict_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableStatus     TableStatus;
-       } Restrict_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x15  */
-       typedef [enum8bit] enum {
-               TBL_ADVANCE             = 0x0,
-               TBL_NOADVANCE           = 0x1,
-               TBL_ENABLEPACKEDBUFFERS = 0x2
-       } QueryRowsFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               QueryRowsFlags  QueryRowsFlags;
-               uint8           ForwardRead;
-               uint16          RowCount;
-       } QueryRows_req;
-
-       typedef [nopush,nopull,flag(NDR_NOALIGN)] struct {
-               uint8           Origin;
-               uint16          RowCount;
-               [flag(NDR_REMAINING)]DATA_BLOB  RowData;
-       } QueryRows_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x16  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetStatus_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableStatus     TableStatus;
-       } GetStatus_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x17  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } QueryPosition_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32  Numerator;
-               uint32  Denominator;
-       } QueryPosition_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x18  */
-       typedef [enum8bit] enum {
-               BOOKMARK_BEGINNING      = 0x0,
-               BOOKMARK_CURRENT        = 0x1,
-               BOOKMARK_END            = 0x2,
-               BOOKMARK_USER           = 0x3
-       } BOOKMARK;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               BOOKMARK        origin;
-               int32           offset;
-               boolean8        WantRowMovedCount;
-       } SeekRow_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        HasSoughtLess;
-               uint32          RowsSought;
-       } SeekRow_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x19  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   Bookmark;
-               uint32          RowCount;
-               boolean8        WantRowMovedCount;
-       } SeekRowBookmark_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        RowNoLongerVisible;
-               boolean8        HasSoughtLess;
-               uint32          RowsSought;
-       } SeekRowBookmark_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x1a  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          ulNumerator;
-               uint32          ulDenominator;
-       } SeekRowApprox_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SeekRowApprox_repl;
-       
-       /**************************/
-       /* EcDoRpc Function 0x1b  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } CreateBookmark_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   bookmark;
-       } CreateBookmark_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x1c  */
-       typedef [enum8bit] enum {
-               FOLDER_GENERIC  = 0x1,
-               FOLDER_SEARCH   = 0x2
-       } FOLDER_TYPE;
-
-       typedef [enum8bit] enum {
-               MAPI_FOLDER_ANSI        = 0x0,
-               MAPI_FOLDER_UNICODE     = 0x1
-       } FOLDER_STRING;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(MAPI_FOLDER_ANSI)] astring                        lpszA;
-               [case(MAPI_FOLDER_UNICODE)][flag(STR_NULLTERM)] string  lpszW;
-       } LPTSTR;
-
-       typedef [enum16bit] enum {
-               NONE            = 0x0000,
-               OPEN_IF_EXISTS  = 0x0001
-       } FOLDER_FLAGS;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               FOLDER_TYPE                     ulFolderType;
-               FOLDER_STRING                   ulType;
-               FOLDER_FLAGS                    ulFlags;
-               [switch_is(ulType)] LPTSTR      FolderName;
-               [switch_is(ulType)] LPTSTR      FolderComment;
-       } CreateFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                HasRules;
-               boolean8                                IsGhosted;
-               [switch_is(IsGhosted)] IsGhosted        Ghost;
-       } CreateFolder_GhostInfo;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [case(0x1)] CreateFolder_GhostInfo      GhostInfo;
-       } CreateFolder_GhostUnion;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                                   folder_id;
-               boolean8                                                IsExistingFolder;
-               [switch_is(IsExistingFolder)]   CreateFolder_GhostUnion GhostUnion;
-       } CreateFolder_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x1d  */
-       typedef [bitmap8bit] bitmap {
-               DEL_MESSAGES            = 0x1,
-               DEL_FOLDERS             = 0x4,
-               DELETE_HARD_DELETE      = 0x10
-       } DeleteFolderFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               DeleteFolderFlags       DeleteFolderFlags;
-               hyper                   FolderId;
-       } DeleteFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                PartialCompletion;
-       } DeleteFolder_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x1e  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantAsynchronous;
-               boolean8        NotifyNonRead;
-               uint16          cn_ids;
-               hyper           message_ids[cn_ids];
-       } DeleteMessages_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } DeleteMessages_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x1f  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           msgid;
-       } GetMessageStatus_req;
-
-       /**************************/
-       /* EcDoRpc Function 0x20  */
-       typedef [bitmap32bit] bitmap {
-               MSGSTATUS_HIGHLIGHTED           = 0x1,
-               MSGSTATUS_TAGGED                = 0x2,
-               MSGSTATUS_HIDDEN                = 0x4,
-               MSGSTATUS_DELMARKED             = 0x8,
-               MSGSTATUS_REMOTE_DOWNLOAD       = 0x1000,
-               MSGSTATUS_REMOTE_DELETE         = 0x2000
-       } ulMessageStatus;
-
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           msgid;
-               uint32          ulNewStatus;
-               ulMessageStatus ulNewStatusMask;
-       } SetMessageStatus_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulMessageStatus ulOldStatus;
-       } SetMessageStatus_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x21  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               TableFlags      TableFlags;
-       } GetAttachmentTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetAttachmentTable_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x22 */
-       typedef [enum8bit] enum {
-               OpenAttachmentFlags_ReadOnly    = 0x0,
-               OpenAttachmentFlags_ReadWrite   = 0x1,
-               OpenAttachmentFlags_BestAccess  = 0x3
-       } OpenAttachmentFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               OpenAttachmentFlags     OpenAttachmentFlags;
-               uint32                  AttachmentID;
-       } OpenAttach_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } OpenAttach_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x23 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8   handle_idx;
-       } CreateAttach_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32  AttachmentID;
-       } CreateAttach_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x24 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          AttachmentID;
-       } DeleteAttach_req;
-
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } DeleteAttach_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x25 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               SaveFlags       SaveFlags;
-       } SaveChangesAttachment_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SaveChangesAttachment_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x26 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           fid;
-               astring         lpszMessageClass;
-       } SetReceiveFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetReceiveFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x27 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               astring         MessageClass;
-       } GetReceiveFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           folder_id;
-               astring         MessageClass;
-       } GetReceiveFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x29 */
-       typedef [bitmap16bit] bitmap {
-               fnevCriticalError               = 0x0001,
-               fnevNewMail                     = 0x0002,
-               fnevObjectCreated               = 0x0004,
-               fnevObjectDeleted               = 0x0008,
-               fnevObjectModified              = 0x0010,
-               fnevObjectMoved                 = 0x0020,
-               fnevObjectCopied                = 0x0040,
-               fnevSearchComplete              = 0x0080,
-               fnevTableModified               = 0x0100,
-               fnevStatusObjectModified        = 0x0200,
-               fnevReserved                    = 0x0400,
-               fnevTbit                        = 0x1000,
-               fnevUbit                        = 0x2000,
-               fnevSbit                        = 0x4000,
-               fnevMbit                        = 0x8000
-       } NotificationFlags;
-
-       typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
-               [case(0x0)] hyper       ID;
-               [case(0x1)];
-       } hyperbool;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               NotificationFlags                       NotificationFlags;
-               boolean8                                WantWholeStore;
-               [switch_is(WantWholeStore)] hyperbool   FolderId;
-               [switch_is(WantWholeStore)] hyperbool   MessageId;
-       } RegisterNotification_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } RegisterNotification_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2a */
-       typedef [bitmap32bit] bitmap {
-               MSGFLAG_READ            = 0x1,
-               MSGFLAG_UNMODIFIED      = 0x2,
-               MSGFLAG_SUBMIT          = 0x4,
-               MSGFLAG_UNSENT          = 0x8,
-               MSGFLAG_HASATTACH       = 0x10,
-               MSGFLAG_FROMME          = 0x20,
-               MSGFLAG_ASSOCIATED      = 0x40,
-               MSGFLAG_RESEND          = 0x80,
-               MSGFLAG_RN_PENDING      = 0x100,
-               MSGFLAG_NRN_PENDING     = 0x200
-       } MsgFlags;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)] astring                     lpszA;
-               [case(0x1)][flag(STR_NULLTERM)] string  lpszW;
-       } MessageClass;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID            DatabaseGUID;
-               uint8           GlobalCounter[6];
-       } GID;
-
-       typedef [enum16bit] enum {
-               TABLE_CHANGED           =       0x1,
-               TABLE_ROW_ADDED         =       0x3,
-               TABLE_ROW_DELETED       =       0x4,
-               TABLE_ROW_MODIFIED      =       0x5,
-               TABLE_RESTRICT_DONE     =       0x7
-       } RichTableNotificationType;
-
-       /* NewMailNotification: case 0x2 and 0x8002 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               MsgFlags                                MessageFlags;
-               boolean8                                UnicodeFlag;
-               [switch_is(UnicodeFlag)] MessageClass   MessageClass;
-       } NewMailNotification;
-
-       /* FolderCreatedNotification: case 0x4 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   ParentFID;
-               uint16                                  TagCount;
-               MAPITAGS                                Tags[TagCount];
-       } FolderCreatedNotification;
-
-       /* FolderDeletedNotification: case 0x8 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   ParentFID;
-       } FolderDeletedNotification;
-
-       /* FolderModifiedNotification: case 0x10 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               uint16                  TagCount;
-               MAPITAGS                Tags[TagCount];
-       } FolderModifiedNotification_10;
-
-       /* FolderMoveCopyNotification: case 0x20 and 0x40 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               hyper                   ParentFID;
-               hyper                   OldFID;
-               hyper                   OldParentFID;
-       } FolderMoveCopyNotification;
-
-       /* SearchCompleteNotification: case 0x80 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-       } SearchCompleteNotification;
-
-       /* HierarchyTable: case 0x100 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-               hyper                           InsertAfterFID;
-               [subcontext(2)] DATA_BLOB       Columns;
-       } HierarchyRowAddedNotification;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-       } HierarchyRowDeletedNotification;
-       
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-               hyper                           InsertAfterFID;
-               [subcontext(2)] DATA_BLOB       Columns;
-       } HierarchyRowModifiedNotification;
-
-       typedef [nodiscriminant] union {
-               [case(TABLE_ROW_ADDED)] HierarchyRowAddedNotification           HierarchyRowAddedNotification;
-               [case(TABLE_ROW_DELETED)] HierarchyRowDeletedNotification       HierarchyRowDeletedNotification;
-               [case(TABLE_ROW_MODIFIED)] HierarchyRowModifiedNotification     HierarchyRowModifiedNotification;
-               [default];
-       } HierarchyTableChangeUnion;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               RichTableNotificationType                               TableEvent;
-               [switch_is(TableEvent)] HierarchyTableChangeUnion       HierarchyTableChangeUnion;
-       } HierarchyTableChange;
-
-       /* IcsNotification: case 0x200 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                HierChanged;
-               uint32                  GIDCount;
-               GID                     GID[GIDCount];
-       } IcsNotification;
-
-       /* FolderModifiedNotification: case 0x1010 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               uint16                  TagCount;
-               MAPITAGS                Tags[TagCount];
-               uint32                  TotalMessageCount;
-       } FolderModifiedNotification_1010;
-
-       /* FolderModifiedNotification: case 0x2010 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               uint16                  TagCount;
-               MAPITAGS                Tags[TagCount];
-               uint32                  UnreadMessageCount;
-       } FolderModifiedNotification_2010;
-
-       /* FolderModifiedNotification: case 0x3010 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               uint16                  TagCount;
-               MAPITAGS                Tags[TagCount];
-               uint32                  TotalMessageCount;
-               uint32                  UnreadMessageCount;
-       } FolderModifiedNotification_3010;
-
-       /* MessageCreatedNotification: case 0x8004 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               uint16                                  TagCount;
-               MAPITAGS                                Tags[TagCount];
-       } MessageCreatedNotification;
-
-       /* MessageDeletedNotification: case 0x8008 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-       } MessageDeletedNotification;
-
-       /* MessageModifiedNotification: case 0x8010 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               uint16                                  TagCount;
-               MAPITAGS                                Tags[TagCount];
-       } MessageModifiedNotification;
-
-       /* MessageMoveCopyNotification: case 0x8020 and 0x8040 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FID;
-               hyper                   MID;
-               hyper                   OldFID;
-               hyper                   OldMID;
-       } MessageMoveCopyNotification;  
-
-       /* ContentsTableChange: case 0x8100 and 0xc100 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-               hyper                           MID;
-               uint32                          Instance;
-               hyper                           InsertAfterFID;
-               hyper                           InsertAfterMID;
-               uint32                          InsertAfterInstance;
-               [subcontext(2)] DATA_BLOB       Columns;
-       } ContentsRowAddedNotification;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-               hyper                           MID;
-               uint32                          Instance;
-       } ContentsRowDeletedNotification;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                           FID;
-               hyper                           MID;
-               uint32                          Instance;
-               hyper                           InsertAfterFID;
-               hyper                           InsertAfterMID;
-               uint32                          InsertAfterInstance;
-               [subcontext(2)] DATA_BLOB       Columns;
-       } ContentsRowModifiedNotification;
-
-       typedef [nodiscriminant] union {
-               [case(TABLE_ROW_ADDED)] ContentsRowAddedNotification            ContentsRowAddedNotification;
-               [case(TABLE_ROW_DELETED)] ContentsRowDeletedNotification        ContentsRowDeletedNotification;
-               [case(TABLE_ROW_MODIFIED)] ContentsRowModifiedNotification      ContentsRowModifiedNotification;
-               [default];
-       } ContentsTableChangeUnion;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               RichTableNotificationType                               TableEvent;
-               [switch_is(TableEvent)] ContentsTableChangeUnion        ContentsTableChangeUnion;
-       } ContentsTableChange;
-
-       /* SearchMessageCreatedNotification: case 0xc004 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               hyper                                   SearchFID;
-               uint16                                  TagCount;
-               MAPITAGS                                Tags[TagCount];
-       } SearchMessageCreatedNotification;
-
-       /* SearchMessageRemovedNotification: case 0xc008 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               hyper                                   SearchFID;
-       } SearchMessageRemovedNotification;
-
-       /* SearchMessageModifiedNotification: 0xc010 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                                   FID;
-               hyper                                   MID;
-               uint16                                  TagCount;
-               MAPITAGS                                Tags[TagCount];
-       } SearchMessageModifiedNotification;
-
-       typedef [nodiscriminant] union {
-               [case(0x0002)] NewMailNotification                      NewMailNotification;
-               [case(0x0004)] FolderCreatedNotification                FolderCreatedNotification;
-               [case(0x0008)] FolderDeletedNotification                FolderDeletedNotification;
-               [case(0x0010)] FolderModifiedNotification_10            FolderModifiedNotification_10;
-               [case(0x0020)] FolderMoveCopyNotification               FolderMoveNotification;
-               [case(0x0040)] FolderMoveCopyNotification               FolderCopyNotification;
-               [case(0x0080)] SearchCompleteNotification               SearchCompleteNotification;
-               [case(0x0100)] HierarchyTableChange                     HierarchyTableChange;
-               [case(0x0200)] IcsNotification                          IcsNotification;
-               [case(0x1010)] FolderModifiedNotification_1010          FolderModifiedNotification_1010;
-               [case(0x2010)] FolderModifiedNotification_2010          FolderModifiedNotification_2010;
-               [case(0x3010)] FolderModifiedNotification_3010          FolderModifiedNotification_3010;
-               [case(0x8002)] NewMailNotification                      NewMessageNotification;
-               [case(0x8004)] MessageCreatedNotification               MessageCreatedNotification;
-               [case(0x8008)] MessageDeletedNotification               MessageDeletedNotification;
-               [case(0x8010)] MessageModifiedNotification              MessageModifiedNotification;
-               [case(0x8020)] MessageMoveCopyNotification              MessageMoveNotification;
-               [case(0x8040)] MessageMoveCopyNotification              MessageCopyNotification;
-               [case(0x8100)] ContentsTableChange                      ContentsTableChange;
-               [case(0xc004)] SearchMessageCreatedNotification         SearchMessageCreatedNotification;
-               [case(0xc008)] SearchMessageRemovedNotification         SearchMessageRemovedNotification;
-               [case(0xc010)] SearchMessageModifiedNotification        SearchMessageModifiedNotification;
-               [case(0xc100)] ContentsTableChange                      SearchTableChange;
-       } NotificationData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32                                          NotificationHandle;
-               uint8                                           LogonId;
-               NotificationFlags                               NotificationType;
-               [switch_is(NotificationType)] NotificationData  NotificationData;
-       } Notify_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2b */
-       typedef [enum8bit] enum {
-               OpenStream_ReadOnly     = 0x0,
-               OpenStream_ReadWrite    = 0x1,
-               OpenStream_Create       = 0x2,
-               OpenStream_BestAccess   = 0x3
-       } OpenStream_OpenModeFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               MAPITAGS                        PropertyTag;
-               OpenStream_OpenModeFlags        OpenModeFlags;
-       } OpenStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          StreamSize;
-       } OpenStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2c */
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0xBABE)] uint32   value;
-               [default];
-       } MaximumByteCount;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                                          ByteCount;
-               [switch_is(ByteCount)]  MaximumByteCount        MaximumByteCount;
-       } ReadStream_req;
-
-       typedef [flag(NDR_ALIGN2)] struct {
-               [subcontext(2), flag(NDR_REMAINING)] DATA_BLOB data;
-       } ReadStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2d */
-       typedef [flag(NDR_NOALIGN)] struct {
-               [subcontext(2), flag(NDR_REMAINING)] DATA_BLOB  data;
-       } WriteStream_req;
-
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          WrittenSize;
-       } WriteStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2e */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           Origin;
-               hyper           Offset;
-       } SeekStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           NewPosition;
-       } SeekStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x2f */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           SizeStream;
-       } SetStreamSize_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetStreamSize_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x30 */
-       typedef [public, bitmap32bit, flag(NDR_PAHEX)] bitmap {
-               STOP_SEARCH                     = 0x00000001,
-               RESTART_SEARCH                  = 0x00000002,
-               RECURSIVE_SEARCH                = 0x00000004,
-               SHALLOW_SEARCH                  = 0x00000008,
-               FOREGROUND_SEARCH               = 0x00000010,
-               BACKGROUND_SEARCH               = 0x00000020,
-               CONTENT_INDEXED_SEARCH          = 0x00010000,
-               NON_CONTENT_INDEXED_SEARCH      = 0x00020000,
-               STATIC_SEARCH                   = 0x00040000
-       } SearchFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               [subcontext(2)] mapi_SRestriction       res;
-               uint16                                  FolderIdCount;
-               hyper                                   FolderIds[FolderIdCount];
-               SearchFlags                             SearchFlags;
-       } SetSearchCriteria_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetSearchCriteria_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x31 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        UseUnicode;
-               boolean8        IncludeRestriction;
-               boolean8        IncludeFolders;
-       } GetSearchCriteria_req;
-
-       typedef [nopush,nopull,noprint,flag(NDR_NOALIGN)] struct {
-               uint16                                  RestrictionDataSize;
-               [subcontext(0),subcontext_size(RestrictionDataSize)] mapi_SRestriction  RestrictionData;
-               uint8                                   LogonId;
-               uint16                                  FolderIdCount;
-               hyper                                   FolderIds[FolderIdCount];
-               SearchFlags                             SearchFlags;
-       } GetSearchCriteria_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x32 */
-       typedef [enum8bit] enum {
-               None            = 0x0,  /* None */
-               PreProcess      = 0x1,  /* Needs to be preprocessed by the server */
-               NeedsSpooler    = 0x2   /* Is to be processed by a client spooler */
-       } SubmitFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SubmitFlags     SubmitFlags;
-       } SubmitMessage_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SubmitMessage_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x33 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               uint16          count;
-               hyper           message_id[count];
-               boolean8        WantAsynchronous;
-               boolean8        WantCopy;
-       } MoveCopyMessages_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } MoveCopyMessages_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x34 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           FolderId;
-               hyper           MessageId;
-       } AbortSubmit_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } AbortSubmit_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x35 */
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)] astring                     lpszA;
-               [case(0x1)][flag(STR_NULLTERM)] string  lpszW;
-       } Folder_name;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               boolean8                                WantAsynchronous;
-               boolean8                                UseUnicode;
-               hyper                                   FolderId;
-               [switch_is(UseUnicode)] Folder_name     NewFolderName;
-       } MoveFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                PartialCompletion;
-       } MoveFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x36 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               boolean8                                WantAsynchronous;
-               boolean8                                WantRecursive;
-               boolean8                                UseUnicode;
-               hyper                                   FolderId;
-               [switch_is(UseUnicode)] Folder_name     NewFolderName;
-       } CopyFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                PartialCompletion;
-       } CopyFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x37 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } QueryColumnsAll_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyTagCount;
-               MAPITAGS        PropertyTags[PropertyTagCount];
-       } QueryColumnsAll_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x38 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } Abort_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TableStatus     TableStatus;
-       } Abort_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x39 */
-       typedef [bitmap8bit] bitmap {
-               CopyFlagsMove           = 0x1,  /* Move properties */
-               CopyFlagsNoOverwrite    = 0x2   /* Do not overwrite existing properties */
-       } CopyFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               boolean8                WantAsynchronous;
-               boolean8                WantSubObjects;
-               CopyFlags               CopyFlags;
-               mapi_SPropTagArray      ExcludedTags;
-       } CopyTo_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];
-       } CopyTo_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x3a */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               hyper           ByteCount;
-       } CopyToStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           ReadByteCount;
-               hyper           WrittenByteCount;
-       } CopyToStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x3b */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-       } CloneStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } CloneStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x3e */
-       typedef [bitmap8bit] bitmap {
-               IncludeFreeBusy = 0x02
-       } PermissionsTableFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               PermissionsTableFlags   TableFlags;
-       } GetPermissionsTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetPermissionsTable_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x3f */
-       typedef [bitmap8bit] bitmap {
-               RulesTableFlags_Unicode = 0x40
-       } RulesTableFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               RulesTableFlags TableFlags;
-       } GetRulesTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetRulesTable_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x40 */
-       typedef [bitmap8bit] bitmap {
-               ModifyPerms_IncludeFreeBusy     = 0x02,
-               ModifyPerms_ReplaceRows         = 0x01
-       } ModifyPermissionsFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulRowFlags              PermissionDataFlags;
-               mapi_SPropValue_array   lpProps;
-       } PermissionData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ModifyPermissionsFlags  ModifyFlags;
-               uint16                  ModifyCount;
-               PermissionData          PermissionsData[ModifyCount];
-       } mapi_PermissionsData;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               mapi_PermissionsData    rowList;
-       } ModifyPermissions_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } ModifyPermissions_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x41 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulRowFlags              RuleDataFlags;
-               mapi_SPropValue_array   PropertyValues;
-       } RuleData;
-
-       typedef [bitmap8bit] bitmap {
-               ModifyRulesFlag_Replace = 0x01
-       } ModifyRulesFlag;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               ModifyRulesFlag ModifyRulesFlags;
-               uint16          RulesCount;
-               RuleData        RulesData[RulesCount];
-       } ModifyRules_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } ModifyRules_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x42 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           FolderId;
-       } GetOwningServers_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          OwningServersCount;
-               uint16          CheapServersCount;
-               astring         OwningServers[OwningServersCount];
-       } GetOwningServers_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x43 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper   Id;
-       } LongTermIdFromId_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID    DatabaseGuid;
-               uint8   GlobalCounter[6];
-               uint16  padding;
-       } LongTermId;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               LongTermId      LongTermId;
-       } LongTermIdFromId_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x44 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               LongTermId      LongTermId;
-       } IdFromLongTermId_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           Id;
-       } IdFromLongTermId_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x45 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           FolderId;
-       } PublicFolderIsGhosted_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                IsGhosted;
-               [switch_is(IsGhosted)] IsGhosted        Ghost;
-       } PublicFolderIsGhosted_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x46 */
-       typedef [enum8bit, flag(NDR_PAHEX)] enum {
-               MAPI_READONLY   = 0x0,
-               MAPI_READWRITE  = 0x1,
-               MAPI_CREATE     = 0x2
-       } OpenEmbeddedMessage_OpenModeFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               uint16                                  CodePageId;
-               OpenEmbeddedMessage_OpenModeFlags       OpenModeFlags;
-       } OpenEmbeddedMessage_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   Reserved;
-               hyper                   MessageId;
-               boolean8                HasNamedProperties;
-               TypedString             SubjectPrefix;
-               TypedString             NormalizedSubject;
-               uint16                  RecipientCount;
-               uint16                  ColumnCount;
-               MAPITAGS                RecipientColumns[ColumnCount];
-               uint8                   RowCount;
-               OpenRecipientRow        RecipientRows[RowCount];
-       } OpenEmbeddedMessage_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x47 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetSpooler_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetSpooler_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x48 */
-       typedef [enum8bit] enum {
-               LockState_1stLock       = 0x0,
-               LockState_1stUnlock     = 0x1,
-               LockState_1stFinished   = 0x2
-       } LockState;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           MessageId;
-               LockState       LockState;
-       } SpoolerLockMessage_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SpoolerLockMessage_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x49 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } AddressTypes_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          cValues;
-               uint16          size;
-               mapi_LPSTR      transport[cValues];
-       } AddressTypes_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4a  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } TransportSend_req;
-
-       typedef [nodiscriminant] union {
-               [case(0x0)] mapi_SPropValue_array       lpProps;
-               [case(0x1)];
-       } TransportSend_lpProps;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                                NoPropertiesReturned;
-               [switch_is(NoPropertiesReturned)] TransportSend_lpProps properties;
-       } TransportSend_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4b  */
-       typedef [bitmap8bit] bitmap {
-               FastTransferCopyMessage_Move            = 0x01,
-               FastTransferCopyMessage_Unknown1        = 0x02,
-               FastTransferCopyMessage_Unknown2        = 0x04,
-               FastTransferCopyMessage_Unknown3        = 0x08,
-               FastTransferCopyMessage_BestBody        = 0x10,
-               FastTransferCopyMessage_SendEntryId     = 0x20
-       } FastCopyMessagesCopyFlags;
-
-       /* this one is used in a few ROPs */
-       typedef [bitmap8bit] bitmap {
-               FastTransfer_Unicode            = 0x01,
-               FastTransfer_UseCpid            = 0x02,
-               FastTransfer_ForUpload          = FastTransfer_Unicode | FastTransfer_UseCpid,
-               FastTransfer_RecoverMode        = 0x04,
-               FastTransfer_ForceUnicode       = 0x08,
-               FastTransfer_PartialItem        = 0x10
-       } FastCopySendOptions;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               uint16                          MessageIdCount;
-               hyper                           MessageIds[MessageIdCount];
-               FastCopyMessagesCopyFlags       CopyFlags;
-               FastCopySendOptions             SendOptions;
-       } FastTransferSourceCopyMessages_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FastTransferSourceCopyMessages_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4c  */
-       typedef [bitmap8bit] bitmap {
-               FastTransferCopyFolder_Move             = 0x01,
-               FastTransferCopyFolder_Unused1          = 0x02,
-               FastTransferCopyFolder_Unused2          = 0x04,
-               FastTransferCopyFolder_Unused3          = 0x08,
-               FastTransferCopyFolder_CopySubfolders   = 0x10,
-               FastTransferCopyFolder_NoGhostedContent = 0x20
-       } FastCopyFolderCopyFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               FastCopyFolderCopyFlags         CopyFlags;
-               FastCopySendOptions             SendOptions;
-       } FastTransferSourceCopyFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FastTransferSourceCopyFolder_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4d  */
-       typedef [bitmap32bit] bitmap {
-               FastTransferCopyTo_Move         = 0x00000001,
-               FastTransferCopyToUnused1       = 0x00000002,
-               FastTransferCopyToUnused2       = 0x00000004,
-               FastTransferCopyToUnused3       = 0x00000008,
-               FastTransferCopyToUnused4       = 0x00000200,
-               FastTransferCopyToUnused5       = 0x00000400,
-               FastTransferCopyTo_BestBody     = 0x00002000
-       } FastCopyToCopyFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               uint8                   Level;
-               FastCopyToCopyFlags     CopyFlags;
-               FastCopySendOptions     SendOptions;
-               mapi_SPropTagArray      PropertyTags;
-       } FastTransferSourceCopyTo_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FastTransferSourceCopyTo_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4e  */
-       typedef [nodiscriminant] union {
-               [case(0xBABE)] uint16   MaximumBufferSize;
-               [default];
-       } FastTransferSourceGetBuffer_MaxBufferSize;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                                                            BufferSize;
-               [switch_is(BufferSize)] FastTransferSourceGetBuffer_MaxBufferSize MaximumBufferSize;
-       } FastTransferSourceGetBuffer_req;
-
-       typedef [enum16bit] enum {
-               TransferStatus_Error    = 0x0000,
-               TransferStatus_Partial  = 0x0001,
-               TransferStatus_NoRoom   = 0x0002,
-               TransferStatus_Done     = 0x0003
-       } TransferStatus;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TransferStatus  TransferStatus;
-               uint16          InProgressCount;
-               uint16          TotalStepCount;
-               uint8           Reserved;
-               uint16          TransferBufferSize;
-               [subcontext(0),subcontext_size(TransferBufferSize),flag(NDR_REMAINING)] DATA_BLOB TransferBuffer;
-       } FastTransferSourceGetBuffer_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x4f  */
-       typedef [enum8bit] enum {
-               DIR_FORWARD  = 0x0,
-               DIR_BACKWARD = 0x1
-       } FindRow_ulFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               FindRow_ulFlags ulFlags;
-               [subcontext(2)] mapi_SRestriction res;
-               BOOKMARK        origin;
-               SBinary_short   bookmark;
-       } FindRow_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           RowNoLongerVisible;
-               uint8           HasRowData;
-               [flag(NDR_NOALIGN)] DATA_BLOB row;
-       } FindRow_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x50  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantCancel;
-       } Progress_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          CompletedTaskCount;
-               uint32          TotalTaskCount;
-       } Progress_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x51  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           MessageId;
-               hyper           FolderId;
-               astring         MessageClass;
-               uint32          MessageFlags;
-       } TransportNewMail_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } TransportNewMail_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x52  */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetValidAttachments_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          AttachmentIdCount;
-               uint32          AttachmentIdArray[AttachmentIdCount];
-       } GetValidAttachments_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x53  */
-       typedef [enum8bit] enum {
-               FastTransferDest_CopyTo         = 0x1,
-               FastTransferDest_CopyProperties = 0x2,
-               FastTransferDest_CopyMessages   = 0x3,
-               FastTransferDest_CopyFolder     = 0x4
-       } FastTransferDestConfig_SourceOperation;
-
-       typedef [bitmap8bit] bitmap {
-               FastTransferDest_Move           = 0x01
-       } FastTransferDestConfig_CopyFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               FastTransferDestConfig_SourceOperation  SourceOperation;
-               FastTransferDestConfig_CopyFlags        CopyFlags;
-       } FastTransferDestinationConfigure_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FastTransferDestinationConfigure_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x54  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          TransferBufferSize;
-               [subcontext(0),subcontext_size(TransferBufferSize),flag(NDR_REMAINING)] DATA_BLOB TransferBuffer;
-       } FastTransferDestinationPutBuffer_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               TransferStatus  TransferStatus;
-               uint16          InProgressCount;
-               uint16          TotalStepCount;
-               uint8           Reserved;
-               uint16          BufferUsedCount;
-       } FastTransferDestinationPutBuffer_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x55 */
-       typedef [enum8bit] enum {
-               MNID_ID = 0,
-               MNID_STRING = 1
-       } ulKind;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           NameSize;
-               [flag(STR_NULLTERM)] string     Name;
-       } mapi_name;
-
-       typedef [nodiscriminant] union {
-               [case(MNID_ID)] uint32          lid;
-               [case(MNID_STRING)] mapi_name   lpwstr;
-       } Kind;
-       
-       typedef [flag(NDR_NOALIGN)] struct {
-               ulKind                          ulKind;
-               GUID                            lpguid;
-               [switch_is(ulKind)] Kind        kind;
-       } MAPINAMEID;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyIdCount;
-               uint16          PropertyIds[PropertyIdCount];
-       } GetNamesFromIDs_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          count;
-               MAPINAMEID      nameid[count];
-       } GetNamesFromIDs_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x56 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           ulFlags;
-               uint16          count;
-               MAPINAMEID      nameid[count];
-       } GetIDsFromNames_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          count;
-               uint16          propID[count];
-       } GetIDsFromNames_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x57 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   ServerEntryId;
-               SBinary_short   ClientEntryId;
-       } UpdateDeferredActionMessages_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } UpdateDeferredActionMessages_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x58 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantAsynchronous;
-               boolean8        WantDeleteAssociated;
-       } EmptyFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } EmptyFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x59 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          MaxRowCount;
-               hyper           CategoryId;
-       } ExpandRow_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          ExpandedRowCount;
-               uint16          RowCount;
-               [flag(NDR_REMAINING)]DATA_BLOB  RowData;
-       } ExpandRow_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5a */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           CategoryId;
-       } CollapseRow_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          CollapsedRowCount;
-       } CollapseRow_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5b */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           RegionOffset;
-               hyper           RegionSize;
-               uint32          LockFlags;
-       } LockRegionStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } LockRegionStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5c */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           RegionOffset;
-               hyper           RegionSize;
-               uint32          LockFlags;
-       } UnlockRegionStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } UnlockRegionStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5d */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } CommitStream_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } CommitStream_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5e */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetStreamSize_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          StreamSize;
-       } GetStreamSize_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x5f */
-       typedef [bitmap8bit] bitmap {
-               NoStrings       = 0x01,
-               NoIds           = 0x02
-       } QueryFlags;
-
-       typedef [nodiscriminant] union {
-               [case(0x0)];
-               [case(0x1)] GUID guid;
-       } QueryNamedProperties_guid;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               QueryFlags              QueryFlags;
-               boolean8                HasGuid;
-               [switch_is(HasGuid)]    QueryNamedProperties_guid PropertyGuid;
-       } QueryNamedProperties_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          IdCount;
-               uint16          PropertyIds[IdCount];
-               MAPINAMEID      PropertyNames[IdCount];
-       } QueryNamedProperties_repl;
-  
-       /*************************/
-       /* EcDoRpc Function 0x60 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID    DatabaseGuid;
-       } GetPerUserLongTermIds_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          LongTermIdCount;
-               LongTermId      LongTermIds[LongTermIdCount];
-       } GetPerUserLongTermIds_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x61 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               LongTermId      LongTermId;
-       } GetPerUserGuid_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID            DatabaseGuid;
-       } GetPerUserGuid_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x63 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           FolderId[24];
-               boolean8        WhatIfChanged;
-               uint32          DataOffset;
-               uint16          MaxDataSize;
-       } ReadPerUserInformation_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        HasFinished;
-               uint16          DataSize;
-               [subcontext(0), subcontext_size(DataSize), flag(NDR_REMAINING)] DATA_BLOB Data;
-       } ReadPerUserInformation_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x64 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               LongTermId      FolderId;
-               boolean8        HasFinished;
-               uint32          DataOffset;
-               uint16          DataSize;
-               [subcontext(0), subcontext_size(DataSize), flag(NDR_REMAINING)] DATA_BLOB Data;
-               GUID            ReplGuid;       /* Note: ReplGuid gets only included under specific circumstances */
-       } WritePerUserInformation_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } WritePerUserInformation_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x66 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantAsynchronous;
-               MSGFLAG_READ    ReadFlags;
-               uint16          MessageIdCount;
-               hyper           MessageIds[MessageIdCount];
-       } SetReadFlags_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } SetReadFlags_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x67 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               boolean8                WantAsynchronous;
-               CopyFlags               CopyFlags;
-               mapi_SPropTagArray      PropertyTags;
-       } CopyProperties_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];
-       } CopyProperties_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x68 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           unknown;
-               hyper           fid;
-               astring         lpszMessageClass;
-               FILETIME        modiftime;
-       } ReceiveFolder;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetReceiveFolderTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          cValues;
-               ReceiveFolder   entries[cValues];
-       } GetReceiveFolderTable_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x69  */
-       typedef [bitmap8bit] bitmap {
-               FastTransferCopyProperties_Move         = 0x01,
-               FastTransferCopyProperties_Unused1      = 0x02,
-               FastTransferCopyProperties_Unused2      = 0x04,
-               FastTransferCopyProperties_Unused3      = 0x08
-       } FastCopyPropertiesCopyFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                           handle_idx;
-               uint8                           Level;
-               FastCopyPropertiesCopyFlags     CopyFlags;
-               FastCopySendOptions             SendOptions;
-               mapi_SPropTagArray              PropertyTags;
-       } FastTransferSourceCopyProperties_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FastTransferSourceCopyProperties_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x6b */
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           RowId;
-               uint32          RowInstanceNumber;
-       } GetCollapseState_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   CollapseState;
-       } GetCollapseState_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x6c */
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   CollapseState;
-       } SetCollapseState_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   bookmark;
-       } SetCollapseState_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x6d */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetTransportFolder_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           FolderId;
-       } GetTransportFolder_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x6e */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16  SessionIndex;
-       } Pending_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x6f */
-       typedef [flag(NDR_NOALIGN)] struct {
-               astring         AddressType;
-               boolean8        WantWin32;
-       } OptionsData_req;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0)];
-               [default]  astring      HelpFileName;
-       } OptionsData_HelpFileName;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                                   Reserved;
-               SBinary_short                                           OptionsInfo;
-               uint16                                                  HelpFileSize;
-               uint8                                                   HelpFile[HelpFileSize];
-               [switch_is(HelpFileSize)] OptionsData_HelpFileName      HelpFileName;
-       } OptionsData_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x70 */
-       typedef [enum8bit] enum {
-               SynchronizationType_Contents    = 0x1,
-               SynchronizationType_Hierarchy   = 0x2
-       } SynchronizationType;
-
-       typedef [bitmap16bit] bitmap {
-               SynchronizationFlag_Unicode                     = 0x0001,
-               SynchronizationFlag_NoDeletions                 = 0x0002,
-               SynchronizationFlag_IgnoreNoLongerInScope       = 0x0004,
-               SynchronizationFlag_ReadState                   = 0x0008,
-               SynchronizationFlag_FAI                         = 0x0010,
-               SynchronizationFlag_Normal                      = 0x0020,
-               SynchronizationFlag_OnlySpecifiedProperties     = 0x0080,
-               SynchronizationFlag_NoForeignIdentifiers        = 0x0100,
-               SynchronizationFlag_Reserved                    = 0x1000,
-               SynchronizationFlag_BestBody                    = 0x2000,
-               SynchronizationFlag_IgnoreSpecifiedOnFAI        = 0x4000,
-               SynchronizationFlag_Progress                    = 0x8000
-       } SynchronizationFlag;
-
-       typedef [bitmap32bit] bitmap {
-               SynchronizationExtraFlag_Eid                    = 0x00000001,
-               SynchronizationExtraFlag_MessageSize            = 0x00000002,
-               SynchronizationExtraFlag_Cn                     = 0x00000004,
-               SynchronizationExtraFlag_OrderByDeliveryTime    = 0x00000008
-       } SynchronizationExtraFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                                   handle_idx;
-               SynchronizationType                     SynchronizationType;
-               FastCopySendOptions                     SendOptions;
-               SynchronizationFlag                     SynchronizationFlags;
-               uint16                                  RestrictionSize;
-               [subcontext(0),subcontext_size(RestrictionSize),flag(NDR_REMAINING)] DATA_BLOB  RestrictionData;
-               SynchronizationExtraFlags               SynchronizationExtraFlags;
-               mapi_SPropTagArray                      PropertyTags;
-       } SyncConfigure_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncConfigure_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x72 */
-       typedef [bitmap8bit] bitmap {
-               ImportFlag_Associated           = 0x10,
-               ImportFlag_FailOnConflict       = 0x40
-       } ImportFlag;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8                   handle_idx;
-               ImportFlag              ImportFlag;
-               mapi_SPropValue_array   PropertyValues;
-       } SyncImportMessageChange_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           MessageId;
-       } SyncImportMessageChange_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x73 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               mapi_SPropValue_array   HierarchyValues;
-               mapi_SPropValue_array   PropertyValues;
-       } SyncImportHierarchyChange_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FolderId;
-       } SyncImportHierarchyChange_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x74 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                IsHierarchy;
-               mapi_SPropValue_array   PropertyValues;
-       } SyncImportDeletes_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncImportDeletes_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x75 */
-       typedef [v1_enum,flag(NDR_PAHEX)] enum {
-               PidTagIdsetGiven        = 0x40170003,
-               PidTagCnsetSeen         = 0x67960102,
-               PidTagCnsetSeenFAI      = 0x67da0102,
-               PidTagCnsetRead         = 0x67d20102
-       } StateProperty;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               StateProperty           StateProperty;
-               uint32                  TransferBufferSize;
-       } SyncUploadStateStreamBegin_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncUploadStateStreamBegin_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x76 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32                  StreamDataSize;
-               uint8                   StreamData[StreamDataSize];
-       } SyncUploadStateStreamContinue_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncUploadStateStreamContinue_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x77 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncUploadStateStreamEnd_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncUploadStateStreamEnd_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x78 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          SourceFolderIdSize;
-               uint8           SourceFolderId[SourceFolderIdSize];
-               uint32          SourceMessageIdSize;
-               uint8           SourceMessageId[SourceMessageIdSize];
-               uint32          PredecessorChangeListSize;
-               uint8           PredecessorChangeList[PredecessorChangeListSize];
-               uint32          DestinationMessageIdSize;
-               uint8           DestinationMessageId[DestinationMessageIdSize];
-               uint32          ChangeNumberSize;
-               uint8           ChangeNumber[ChangeNumberSize];
-       } SyncImportMessageMove_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper           MessageId;
-       } SyncImportMessageMove_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x79 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               [subcontext(2)] mapi_SPropValue_array   values;
-       } SetPropertiesNoReplicate_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];
-       } SetPropertiesNoReplicate_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x7a */
-       typedef [flag(NDR_NOALIGN)] struct {
-               mapi_SPropTagArray      PropertyTags;
-       } DeletePropertiesNoReplicate_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          PropertyProblemCount;
-               PropertyProblem PropertyProblem[PropertyProblemCount];
-       } DeletePropertiesNoReplicate_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x7b */
-       typedef [public,bitmap32bit] bitmap {
-               STORE_HAS_SEARCHES              = 0x010000000
-       } StoreState;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } GetStoreState_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               StoreState      StoreState;
-       } GetStoreState_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x7e */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               boolean8        IsContentsCollector;
-       } SyncOpenCollector_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncOpenCollector_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x7f */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          IdCount;
-       } GetLocalReplicaIds_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID            ReplGuid;
-               uint8           GlobalCount[6];
-       } GetLocalReplicaIds_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x80 */
-//     typedef [flag(NDR_NOALIGN)] struct {
-//             uint16          MessageSize;
-//             uint8           MessageId[MessageSize];
-//             boolean8        MarkAsRead;
-//     } MessageReadStates;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          MessageReadStateSize;
-               [subcontext(0),subcontext_size(MessageReadStateSize),flag(NDR_REMAINING)] DATA_BLOB MessageStates;
-       } SyncImportReadStateChanges_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncImportReadStateChanges_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x81 */
-       typedef [flag(NDR_NOALIGN)] struct {
-       } ResetTable_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } ResetTable_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x82 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-       } SyncGetTransferState_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SyncGetTransferState_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x86 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          version[3];
-       } TellVersion_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } TellVersion_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x87 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           handle_idx;
-               asclstr         name;
-       } OpenPublicFolderByName_req; 
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8                                HasRules;
-               boolean8                                IsGhosted;
-               [switch_is(IsGhosted)] IsGhosted        Ghost;
-       } OpenPublicFolderByName_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x88 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               GUID    NotificationGuid;
-       } SetSyncNotificationGuid_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } SetSyncNotificationGuid_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x89 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   bookmark;
-       } FreeBookmark_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-       } FreeBookmark_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x90 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               [subcontext(2), flag(NDR_REMAINING)] DATA_BLOB  data;
-       } WriteAndCommitStream_req;
-
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          WrittenSize;
-       } WriteAndCommitStream_repl;
-
-       /**************************/
-       /* EcDoRpc Function 0x91  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantAsynchronous;
-               boolean8        NotifyNonRead;
-               uint16          MessageIdCount;
-               hyper           MessageIds[MessageIdCount];
-       } HardDeleteMessages_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } HardDeleteMessages_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0x92 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        WantAsynchronous;
-               boolean8        WantDeleteAssociated;
-       } HardDeleteMessagesAndSubfolders_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               boolean8        PartialCompletion;
-       } HardDeleteMessagesAndSubfolders_repl;
-
-       /*************************/
-       /* EcDoRpc Function 0xFE */
-       typedef [public,bitmap8bit] bitmap {
-               LogonPrivate    = 0x1,
-               UnderCover      = 0x2,
-               Ghosted         = 0x4,
-               SpIProcess      = 0x8
-       } LogonFlags;
-
-       typedef [public,bitmap32bit] bitmap {
-               PUBLIC                          = 0x2,
-               HOME_LOGON                      = 0x4,
-               TAKE_OWNERSHIP                  = 0x8,
-               ALTERNATE_SERVER                = 0x100,
-               IGNORE_HOME_MDB                 = 0x200,
-               NO_MAIL                         = 0x400,
-               USE_PER_MDB_REPLID_MAPPING      = 0x010000000
-       } OpenFlags;
-
-       typedef [enum8bit] enum {
-               DayOfWeek_Sunday        = 0x0,
-               DayOfWeek_Monday        = 0x1,
-               DayOfWeek_Tuesday       = 0x2,
-               DayOfWeek_Wednesday     = 0x3,
-               DayOfWeek_Thursday      = 0x4,
-               DayOfWeek_Friday        = 0x5,
-               DayOfWeek_Saturday      = 0x6
-       } DayOfWeek;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint8           Seconds;
-               uint8           Minutes;
-               uint8           Hour;
-               DayOfWeek       DayOfWeek;
-               uint8           Day;
-               uint8           Month;
-               uint16          Year;
-       } LogonTime;
-
-       typedef [bitmap8bit] bitmap {
-               ResponseFlags_Reserved          = 0x1,
-               ResponseFlags_OwnerRight        = 0x2,
-               ResponseFlags_SendAsRight       = 0x4,
-               ResponseFlags_OOF               = 0x10
-       } ResponseFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FolderIds[13];
-               uint16                  ReplId;
-               GUID                    Guid;
-               GUID                    PerUserGuid;
-       } store_pf;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               hyper                   FolderIds[13];
-               ResponseFlags           ResponseFlags;
-               GUID                    MailboxGuid;
-               uint16                  ReplId;
-               GUID                    ReplGUID;
-               LogonTime               LogonTime;
-               hyper                   GwartTime;
-               StoreState              StoreState;
-       } store_mailbox;
-
-       typedef [nodiscriminant] union {
-               [case(0x0)]             store_pf        store_pf;
-               [case(0x3)]             store_mailbox   store_mailbox;
-               [case(0x9)]             store_mailbox   store_mailbox;
-               [case(0x19)]            store_mailbox   store_mailbox;
-               [case(LogonPrivate)]    store_mailbox   store_mailbox;
-       } LogonType;
-
-       typedef [nopush,flag(NDR_NOALIGN)] struct {
-               LogonFlags      LogonFlags;
-               OpenFlags       OpenFlags;
-               StoreState      StoreState;
-               ascstr3         EssDN;
-       } Logon_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               LogonFlags                              LogonFlags;
-               [switch_is(LogonFlags)] LogonType       LogonType;
-       } Logon_repl;
-
-       /* Logon redirect response buffer (error_code == ecWrongServer) */
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               LogonFlags      LogonFlags;
-               uint8           ServerNameSize;
-               astring         ServerName;
-       } Logon_redirect;
-
-       /*************************/
-       /* EcDoRpc Function 0xA5 */
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   bin;
-       } proxypack_req;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               SBinary_short   bin;
-       } proxypack_repl;
-
-       typedef [public, nodiscriminant] union {
-               [case(op_MAPI_Release)] Release_req mapi_Release;
-               [case(op_MAPI_OpenFolder)] OpenFolder_req mapi_OpenFolder;
-               [case(op_MAPI_OpenMessage)] OpenMessage_req mapi_OpenMessage;
-               [case(op_MAPI_GetHierarchyTable)] GetHierarchyTable_req mapi_GetHierarchyTable;
-               [case(op_MAPI_GetContentsTable)] GetContentsTable_req mapi_GetContentsTable;
-               [case(op_MAPI_CreateMessage)] CreateMessage_req mapi_CreateMessage;
-               [case(op_MAPI_GetProps)] GetProps_req mapi_GetProps;
-               [case(op_MAPI_GetPropsAll)] GetPropsAll_req mapi_GetPropsAll;
-               [case(op_MAPI_GetPropList)] GetPropList_req mapi_GetPropList;
-               [case(op_MAPI_SetProps)] SetProps_req mapi_SetProps;
-               [case(op_MAPI_DeleteProps)] DeleteProps_req mapi_DeleteProps;
-               [case(op_MAPI_SaveChangesMessage)] SaveChangesMessage_req mapi_SaveChangesMessage;
-               [case(op_MAPI_SetMessageReadFlag)] SetMessageReadFlag_req mapi_SetMessageReadFlag;
-               [case(op_MAPI_ReloadCachedInformation)] ReloadCachedInformation_req mapi_ReloadCachedInformation;
-               [case(op_MAPI_SetColumns)] SetColumns_req mapi_SetColumns;
-               [case(op_MAPI_SortTable)] SortTable_req mapi_SortTable;
-               [case(op_MAPI_Restrict)] Restrict_req mapi_Restrict;
-               [case(op_MAPI_RemoveAllRecipients)] RemoveAllRecipients_req mapi_RemoveAllRecipients;
-               [case(op_MAPI_ModifyRecipients)] ModifyRecipients_req mapi_ModifyRecipients;
-               [case(op_MAPI_ReadRecipients)] ReadRecipients_req mapi_ReadRecipients;
-               [case(op_MAPI_QueryRows)] QueryRows_req mapi_QueryRows;
-               [case(op_MAPI_GetStatus)] GetStatus_req mapi_GetStatus;
-               [case(op_MAPI_QueryPosition)] QueryPosition_req mapi_QueryPosition;
-               [case(op_MAPI_SeekRow)] SeekRow_req mapi_SeekRow;
-               [case(op_MAPI_SeekRowBookmark)] SeekRowBookmark_req mapi_SeekRowBookmark;
-               [case(op_MAPI_SeekRowApprox)] SeekRowApprox_req mapi_SeekRowApprox;
-               [case(op_MAPI_CreateBookmark)] CreateBookmark_req mapi_CreateBookmark;
-               [case(op_MAPI_CreateFolder)] CreateFolder_req mapi_CreateFolder;
-               [case(op_MAPI_DeleteFolder)] DeleteFolder_req mapi_DeleteFolder;
-               [case(op_MAPI_DeleteMessages)] DeleteMessages_req mapi_DeleteMessages;
-               [case(op_MAPI_GetMessageStatus)] GetMessageStatus_req mapi_GetMessageStatus;
-               [case(op_MAPI_SetMessageStatus)] SetMessageStatus_req mapi_SetMessageStatus;
-               [case(op_MAPI_GetAttachmentTable)] GetAttachmentTable_req mapi_GetAttachmentTable;
-               [case(op_MAPI_OpenAttach)] OpenAttach_req mapi_OpenAttach;
-               [case(op_MAPI_CreateAttach)] CreateAttach_req mapi_CreateAttach;
-               [case(op_MAPI_DeleteAttach)] DeleteAttach_req mapi_DeleteAttach;
-               [case(op_MAPI_SaveChangesAttachment)] SaveChangesAttachment_req mapi_SaveChangesAttachment;
-               [case(op_MAPI_SetReceiveFolder)] SetReceiveFolder_req mapi_SetReceiveFolder;
-               [case(op_MAPI_GetReceiveFolder)] GetReceiveFolder_req mapi_GetReceiveFolder;
-               [case(op_MAPI_RegisterNotification)] RegisterNotification_req mapi_RegisterNotification;
-               [case(op_MAPI_OpenStream)] OpenStream_req mapi_OpenStream;
-               [case(op_MAPI_ReadStream)] ReadStream_req mapi_ReadStream;
-               [case(op_MAPI_WriteStream)] WriteStream_req mapi_WriteStream;
-               [case(op_MAPI_SeekStream)] SeekStream_req mapi_SeekStream;
-               [case(op_MAPI_SetStreamSize)] SetStreamSize_req mapi_SetStreamSize;
-               [case(op_MAPI_SetSearchCriteria)] SetSearchCriteria_req mapi_SetSearchCriteria;
-               [case(op_MAPI_GetSearchCriteria)] GetSearchCriteria_req mapi_GetSearchCriteria;
-               [case(op_MAPI_SubmitMessage)] SubmitMessage_req mapi_SubmitMessage;
-               [case(op_MAPI_MoveCopyMessages)] MoveCopyMessages_req mapi_MoveCopyMessages;
-               [case(op_MAPI_AbortSubmit)] AbortSubmit_req mapi_AbortSubmit;
-               [case(op_MAPI_MoveFolder)] MoveFolder_req mapi_MoveFolder;
-               [case(op_MAPI_CopyFolder)] CopyFolder_req mapi_CopyFolder;
-               [case(op_MAPI_QueryColumnsAll)] QueryColumnsAll_req mapi_QueryColumnsAll;
-               [case(op_MAPI_Abort)] Abort_req mapi_Abort;
-               [case(op_MAPI_CopyTo)] CopyTo_req mapi_CopyTo;
-               [case(op_MAPI_CopyToStream)] CopyToStream_req mapi_CopyToStream;
-               [case(op_MAPI_CloneStream)] CloneStream_req mapi_CloneStream;
-               [case(op_MAPI_GetPermissionsTable)] GetPermissionsTable_req mapi_GetPermissionsTable;
-               [case(op_MAPI_GetRulesTable)] GetRulesTable_req mapi_GetRulesTable;
-               [case(op_MAPI_ModifyPermissions)] ModifyPermissions_req mapi_ModifyPermissions;
-               [case(op_MAPI_ModifyRules)] ModifyRules_req mapi_ModifyRules;
-               [case(op_MAPI_GetOwningServers)] GetOwningServers_req mapi_GetOwningServers;
-               [case(op_MAPI_LongTermIdFromId)] LongTermIdFromId_req mapi_LongTermIdFromId;
-               [case(op_MAPI_IdFromLongTermId)] IdFromLongTermId_req mapi_IdFromLongTermId;
-               [case(op_MAPI_PublicFolderIsGhosted)] PublicFolderIsGhosted_req mapi_PublicFolderIsGhosted;
-               [case(op_MAPI_OpenEmbeddedMessage)] OpenEmbeddedMessage_req mapi_OpenEmbeddedMessage;
-               [case(op_MAPI_SetSpooler)] SetSpooler_req mapi_SetSpooler;
-               [case(op_MAPI_SpoolerLockMessage)] SpoolerLockMessage_req mapi_SpoolerLockMessage;
-               [case(op_MAPI_AddressTypes)] AddressTypes_req mapi_AddressTypes;
-               [case(op_MAPI_TransportSend)] TransportSend_req mapi_TransportSend;
-               [case(op_MAPI_FastTransferSourceCopyMessages)] FastTransferSourceCopyMessages_req mapi_FastTransferSourceCopyMessages;
-               [case(op_MAPI_FastTransferSourceCopyFolder)] FastTransferSourceCopyFolder_req mapi_FastTransferSourceCopyFolder;
-               [case(op_MAPI_FastTransferSourceCopyTo)] FastTransferSourceCopyTo_req mapi_FastTransferSourceCopyTo;
-               [case(op_MAPI_FastTransferSourceGetBuffer)] FastTransferSourceGetBuffer_req mapi_FastTransferSourceGetBuffer;
-               [case(op_MAPI_FindRow)] FindRow_req mapi_FindRow;
-               [case(op_MAPI_Progress)] Progress_req mapi_Progress;
-               [case(op_MAPI_TransportNewMail)] TransportNewMail_req mapi_TransportNewMail;
-               [case(op_MAPI_GetValidAttachments)] GetValidAttachments_req mapi_GetValidAttachments;
-               [case(op_MAPI_FastTransferDestConfigure)] FastTransferDestinationConfigure_req mapi_FastTransferDestinationConfigure;
-               [case(op_MAPI_FastTransferDestPutBuffer)] FastTransferDestinationPutBuffer_req mapi_FastTransferDestinationPutBuffer;
-               [case(op_MAPI_GetNamesFromIDs)] GetNamesFromIDs_req mapi_GetNamesFromIDs;
-               [case(op_MAPI_GetIDsFromNames)] GetIDsFromNames_req mapi_GetIDsFromNames;
-               [case(op_MAPI_UpdateDeferredActionMessages)] UpdateDeferredActionMessages_req mapi_UpdateDeferredActionMessages;
-               [case(op_MAPI_EmptyFolder)] EmptyFolder_req mapi_EmptyFolder;
-               [case(op_MAPI_ExpandRow)] ExpandRow_req mapi_ExpandRow;
-               [case(op_MAPI_CollapseRow)] CollapseRow_req mapi_CollapseRow;
-               [case(op_MAPI_LockRegionStream)] LockRegionStream_req mapi_LockRegionStream;
-               [case(op_MAPI_UnlockRegionStream)] UnlockRegionStream_req mapi_UnlockRegionStream;
-               [case(op_MAPI_CommitStream)] CommitStream_req mapi_CommitStream;
-               [case(op_MAPI_GetStreamSize)] GetStreamSize_req mapi_GetStreamSize;
-               [case(op_MAPI_QueryNamedProperties)] QueryNamedProperties_req mapi_QueryNamedProperties;
-               [case(op_MAPI_GetPerUserLongTermIds)] GetPerUserLongTermIds_req mapi_GetPerUserLongTermIds;
-               [case(op_MAPI_GetPerUserGuid)] GetPerUserGuid_req mapi_GetPerUserGuid;
-               [case(op_MAPI_ReadPerUserInformation)] ReadPerUserInformation_req mapi_ReadPerUserInformation;
-               [case(op_MAPI_WritePerUserInformation)] WritePerUserInformation_req mapi_WritePerUserInformation;
-               [case(op_MAPI_SetReadFlags)] SetReadFlags_req mapi_SetReadFlags;
-               [case(op_MAPI_CopyProperties)] CopyProperties_req mapi_CopyProperties;
-               [case(op_MAPI_GetReceiveFolderTable)] GetReceiveFolderTable_req mapi_GetReceiveFolderTable;
-               [case(op_MAPI_FastTransferSourceCopyProps)] FastTransferSourceCopyProperties_req mapi_FastTransferSourceCopyProperties;
-               [case(op_MAPI_GetCollapseState)] GetCollapseState_req mapi_GetCollapseState;
-               [case(op_MAPI_SetCollapseState)] SetCollapseState_req mapi_SetCollapseState;
-               [case(op_MAPI_GetTransportFolder)] GetTransportFolder_req mapi_GetTransportFolder;
-               [case(op_MAPI_OptionsData)] OptionsData_req mapi_OptionsData;
-               [case(op_MAPI_SyncConfigure)] SyncConfigure_req mapi_SyncConfigure;
-               [case(op_MAPI_SyncImportMessageChange)] SyncImportMessageChange_req mapi_SyncImportMessageChange;
-               [case(op_MAPI_SyncImportHierarchyChange)] SyncImportHierarchyChange_req mapi_SyncImportHierarchyChange;
-               [case(op_MAPI_SyncImportDeletes)] SyncImportDeletes_req mapi_SyncImportDeletes;
-               [case(op_MAPI_SyncUploadStateStreamBegin)] SyncUploadStateStreamBegin_req mapi_SyncUploadStateStreamBegin;
-               [case(op_MAPI_SyncUploadStateStreamContinue)] SyncUploadStateStreamContinue_req mapi_SyncUploadStateStreamContinue;
-               [case(op_MAPI_SyncUploadStateStreamEnd)] SyncUploadStateStreamEnd_req mapi_SyncUploadStateStreamEnd;
-               [case(op_MAPI_SyncImportMessageMove)] SyncImportMessageMove_req mapi_SyncImportMessageMove;
-               [case(op_MAPI_SetPropertiesNoReplicate)] SetPropertiesNoReplicate_req mapi_SetPropertiesNoReplicate;
-               [case(op_MAPI_DeletePropertiesNoReplicate)] DeletePropertiesNoReplicate_req mapi_DeletePropertiesNoReplicate;
-               [case(op_MAPI_GetStoreState)] GetStoreState_req mapi_GetStoreState;
-               [case(op_MAPI_SyncOpenCollector)] SyncOpenCollector_req mapi_SyncOpenCollector;
-               [case(op_MAPI_GetLocalReplicaIds)] GetLocalReplicaIds_req mapi_GetLocalReplicaIds;
-               [case(op_MAPI_SyncImportReadStateChanges)] SyncImportReadStateChanges_req mapi_SyncImportReadStateChanges;
-               [case(op_MAPI_ResetTable)] ResetTable_req mapi_ResetTable;
-               [case(op_MAPI_SyncGetTransferState)] SyncGetTransferState_req mapi_SyncGetTransferState;
-               [case(op_MAPI_TellVersion)] TellVersion_req mapi_TellVersion;
-               [case(op_MAPI_OpenPublicFolderByName)] OpenPublicFolderByName_req mapi_OpenPublicFolderByName;
-               [case(op_MAPI_SetSyncNotificationGuid)] SetSyncNotificationGuid_req mapi_SetSyncNotificationGuid;
-               [case(op_MAPI_FreeBookmark)] FreeBookmark_req mapi_FreeBookmark;
-               [case(op_MAPI_WriteAndCommitStream)] WriteAndCommitStream_req mapi_WriteAndCommitStream;
-               [case(op_MAPI_HardDeleteMessages)] HardDeleteMessages_req mapi_HardDeleteMessages;
-               [case(op_MAPI_HardDeleteMessagesAndSubfolders)] HardDeleteMessagesAndSubfolders_req mapi_HardDeleteMessagesAndSubfolders;
-               [case(op_MAPI_Logon)] Logon_req mapi_Logon;
-               [case(op_MAPI_proxypack)] proxypack_req mapi_proxypack;
-       } EcDoRpc_MAPI_REQ_UNION;
-
-       typedef [public, nodiscriminant] union {
-               [case(op_MAPI_Release)] Release_repl mapi_Release;
-               [case(op_MAPI_OpenFolder)] OpenFolder_repl mapi_OpenFolder;
-               [case(op_MAPI_OpenMessage)] OpenMessage_repl mapi_OpenMessage;
-               [case(op_MAPI_GetHierarchyTable)] GetHierarchyTable_repl mapi_GetHierarchyTable;
-               [case(op_MAPI_GetContentsTable)] GetContentsTable_repl mapi_GetContentsTable;
-               [case(op_MAPI_CreateMessage)] CreateMessage_repl mapi_CreateMessage;
-               [case(op_MAPI_GetProps)] GetProps_repl mapi_GetProps;
-               [case(op_MAPI_GetPropsAll)] GetPropsAll_repl mapi_GetPropsAll;
-               [case(op_MAPI_GetPropList)] GetPropList_repl mapi_GetPropList;
-               [case(op_MAPI_SetProps)] SetProps_repl mapi_SetProps;
-               [case(op_MAPI_DeleteProps)] DeleteProps_repl mapi_DeleteProps;
-               [case(op_MAPI_SaveChangesMessage)] SaveChangesMessage_repl mapi_SaveChangesMessage;
-               [case(op_MAPI_RemoveAllRecipients)] RemoveAllRecipients_repl mapi_RemoveAllRecipients;
-               [case(op_MAPI_ModifyRecipients)] ModifyRecipients_repl mapi_ModifyRecipients;
-               [case(op_MAPI_ReadRecipients)] ReadRecipients_repl mapi_ReadRecipients;
-               [case(op_MAPI_SetMessageReadFlag)] SetMessageReadFlag_repl mapi_SetMessageReadFlag;
-               [case(op_MAPI_ReloadCachedInformation)] ReloadCachedInformation_repl mapi_ReloadCachedInformation;
-               [case(op_MAPI_SetColumns)] SetColumns_repl mapi_SetColumns;
-               [case(op_MAPI_SortTable)] SortTable_repl mapi_SortTable;
-               [case(op_MAPI_Restrict)] Restrict_repl mapi_Restrict;
-               [case(op_MAPI_QueryRows)] QueryRows_repl mapi_QueryRows;
-               [case(op_MAPI_GetStatus)] GetStatus_repl mapi_GetStatus;
-               [case(op_MAPI_QueryPosition)] QueryPosition_repl mapi_QueryPosition;
-               [case(op_MAPI_SeekRow)] SeekRow_repl mapi_SeekRow;
-               [case(op_MAPI_SeekRowBookmark)] SeekRowBookmark_repl mapi_SeekRowBookmark;
-               [case(op_MAPI_SeekRowApprox)] SeekRowApprox_repl mapi_SeekRowApprox;
-               [case(op_MAPI_CreateBookmark)] CreateBookmark_repl mapi_CreateBookmark;
-               [case(op_MAPI_CreateFolder)] CreateFolder_repl mapi_CreateFolder;
-               [case(op_MAPI_DeleteFolder)] DeleteFolder_repl mapi_DeleteFolder;
-               [case(op_MAPI_DeleteMessages)] DeleteMessages_repl mapi_DeleteMessages;
-               [case(op_MAPI_SetMessageStatus)] SetMessageStatus_repl mapi_SetMessageStatus;
-               [case(op_MAPI_GetAttachmentTable)] GetAttachmentTable_repl mapi_GetAttachmentTable;
-               [case(op_MAPI_OpenAttach)] OpenAttach_repl mapi_OpenAttach;
-               [case(op_MAPI_CreateAttach)] CreateAttach_repl mapi_CreateAttach;
-               [case(op_MAPI_DeleteAttach)] DeleteAttach_repl mapi_DeleteAttach;
-               [case(op_MAPI_SaveChangesAttachment)] SaveChangesAttachment_repl mapi_SaveChangesAttachment;
-               [case(op_MAPI_SetReceiveFolder)] SetReceiveFolder_repl mapi_SetReceiveFolder;
-               [case(op_MAPI_GetReceiveFolder)] GetReceiveFolder_repl mapi_GetReceiveFolder;
-               [case(op_MAPI_RegisterNotification)] RegisterNotification_repl mapi_RegisterNotification;
-               [case(op_MAPI_Notify)] Notify_repl mapi_Notify;
-               [case(op_MAPI_OpenStream)] OpenStream_repl mapi_OpenStream;
-               [case(op_MAPI_ReadStream)] ReadStream_repl mapi_ReadStream;
-               [case(op_MAPI_WriteStream)] WriteStream_repl mapi_WriteStream;
-               [case(op_MAPI_SeekStream)] SeekStream_repl mapi_SeekStream;
-               [case(op_MAPI_SetStreamSize)] SetStreamSize_repl mapi_SetStreamSize;
-               [case(op_MAPI_SetSearchCriteria)] SetSearchCriteria_repl mapi_SetSearchCriteria;
-               [case(op_MAPI_GetSearchCriteria)] GetSearchCriteria_repl mapi_GetSearchCriteria;
-               [case(op_MAPI_SubmitMessage)] SubmitMessage_repl mapi_SubmitMessage;
-               [case(op_MAPI_MoveCopyMessages)] MoveCopyMessages_repl mapi_MoveCopyMessages;
-               [case(op_MAPI_AbortSubmit)] AbortSubmit_repl mapi_AbortSubmit;
-               [case(op_MAPI_MoveFolder)] MoveFolder_repl mapi_MoveFolder;
-               [case(op_MAPI_CopyFolder)] CopyFolder_repl mapi_CopyFolder;
-               [case(op_MAPI_QueryColumnsAll)] QueryColumnsAll_repl mapi_QueryColumnsAll;
-               [case(op_MAPI_Abort)] Abort_repl mapi_Abort;
-               [case(op_MAPI_CopyTo)] CopyTo_repl mapi_CopyTo;
-               [case(op_MAPI_CopyToStream)] CopyToStream_repl mapi_CopyToStream;
-               [case(op_MAPI_CloneStream)] CloneStream_repl mapi_CloneStream;
-               [case(op_MAPI_GetPermissionsTable)] GetPermissionsTable_repl mapi_GetPermissionsTable;
-               [case(op_MAPI_GetRulesTable)] GetRulesTable_repl mapi_GetRulesTable;
-               [case(op_MAPI_ModifyPermissions)] ModifyPermissions_repl mapi_ModifyPermissions;
-               [case(op_MAPI_ModifyRules)] ModifyRules_repl mapi_ModifyRules;
-               [case(op_MAPI_GetOwningServers)] GetOwningServers_repl mapi_GetOwningServers;
-               [case(op_MAPI_LongTermIdFromId)] LongTermIdFromId_repl mapi_LongTermIdFromId;
-               [case(op_MAPI_IdFromLongTermId)] IdFromLongTermId_repl mapi_IdFromLongTermId;
-               [case(op_MAPI_PublicFolderIsGhosted)] PublicFolderIsGhosted_repl mapi_PublicFolderIsGhosted;
-               [case(op_MAPI_OpenEmbeddedMessage)] OpenEmbeddedMessage_repl mapi_OpenEmbeddedMessage;
-               [case(op_MAPI_SetSpooler)] SetSpooler_repl mapi_SetSpooler;
-               [case(op_MAPI_SpoolerLockMessage)] SpoolerLockMessage_repl mapi_SpoolerLockMessage;
-               [case(op_MAPI_AddressTypes)] AddressTypes_repl mapi_AddressTypes;
-               [case(op_MAPI_TransportSend)] TransportSend_repl mapi_TransportSend;
-               [case(op_MAPI_FastTransferSourceCopyMessages)] FastTransferSourceCopyMessages_repl mapi_FastTransferSourceCopyMessages;
-               [case(op_MAPI_FastTransferSourceCopyFolder)] FastTransferSourceCopyFolder_repl mapi_FastTransferSourceCopyFolder;
-               [case(op_MAPI_FastTransferSourceCopyTo)] FastTransferSourceCopyTo_repl mapi_FastTransferSourceCopyTo;
-               [case(op_MAPI_FastTransferSourceGetBuffer)] FastTransferSourceGetBuffer_repl mapi_FastTransferSourceGetBuffer;
-               [case(op_MAPI_FindRow)] FindRow_repl mapi_FindRow;
-               [case(op_MAPI_Progress)] Progress_repl mapi_Progress;
-               [case(op_MAPI_TransportNewMail)] TransportNewMail_repl mapi_TransportNewMail;
-               [case(op_MAPI_GetValidAttachments)] GetValidAttachments_repl mapi_GetValidAttachments;
-               [case(op_MAPI_FastTransferDestConfigure)] FastTransferDestinationConfigure_repl mapi_FastTransferDestinationConfigure;
-               [case(op_MAPI_FastTransferDestPutBuffer)] FastTransferDestinationPutBuffer_repl mapi_FastTransferDestinationPutBuffer;
-               [case(op_MAPI_GetNamesFromIDs)] GetNamesFromIDs_repl mapi_GetNamesFromIDs;
-               [case(op_MAPI_GetIDsFromNames)] GetIDsFromNames_repl mapi_GetIDsFromNames;
-               [case(op_MAPI_UpdateDeferredActionMessages)] UpdateDeferredActionMessages_repl mapi_UpdateDeferredActionMessages;
-               [case(op_MAPI_EmptyFolder)] EmptyFolder_repl mapi_EmptyFolder;
-               [case(op_MAPI_ExpandRow)] ExpandRow_repl mapi_ExpandRow;
-               [case(op_MAPI_CollapseRow)] CollapseRow_repl mapi_CollapseRow;
-               [case(op_MAPI_LockRegionStream)] LockRegionStream_repl mapi_LockRegionStream;
-               [case(op_MAPI_UnlockRegionStream)] UnlockRegionStream_repl mapi_UnlockRegionStream;
-               [case(op_MAPI_CommitStream)] CommitStream_repl mapi_CommitStream;
-               [case(op_MAPI_GetStreamSize)] GetStreamSize_repl mapi_GetStreamSize;
-               [case(op_MAPI_QueryNamedProperties)] QueryNamedProperties_repl mapi_QueryNamedProperties;
-               [case(op_MAPI_GetPerUserLongTermIds)] GetPerUserLongTermIds_repl mapi_GetPerUserLongTermIds;
-               [case(op_MAPI_GetPerUserGuid)] GetPerUserGuid_repl mapi_GetPerUserGuid;
-               [case(op_MAPI_ReadPerUserInformation)] ReadPerUserInformation_repl mapi_ReadPerUserInformation;
-               [case(op_MAPI_WritePerUserInformation)] WritePerUserInformation_repl mapi_WritePerUserInformation;
-               [case(op_MAPI_SetReadFlags)] SetReadFlags_repl mapi_SetReadFlags;
-               [case(op_MAPI_CopyProperties)] CopyProperties_repl mapi_CopyProperties;
-               [case(op_MAPI_GetReceiveFolderTable)] GetReceiveFolderTable_repl mapi_GetReceiveFolderTable;
-               [case(op_MAPI_Pending)] Pending_repl mapi_Pending;
-               [case(op_MAPI_FastTransferSourceCopyProps)] FastTransferSourceCopyProperties_repl mapi_FastTransferSourceCopyProperties;
-               [case(op_MAPI_GetCollapseState)] GetCollapseState_repl mapi_GetCollapseState;
-               [case(op_MAPI_SetCollapseState)] SetCollapseState_repl mapi_SetCollapseState;
-               [case(op_MAPI_GetTransportFolder)] GetTransportFolder_repl mapi_GetTransportFolder;
-               [case(op_MAPI_OptionsData)] OptionsData_repl mapi_OptionsData;
-               [case(op_MAPI_SyncConfigure)] SyncConfigure_repl mapi_SyncConfigure;
-               [case(op_MAPI_SyncImportMessageChange)] SyncImportMessageChange_repl mapi_SyncImportMessageChange;
-               [case(op_MAPI_SyncImportHierarchyChange)] SyncImportHierarchyChange_repl mapi_SyncImportHierarchyChange;
-               [case(op_MAPI_SyncImportDeletes)] SyncImportDeletes_repl mapi_SyncImportDeletes;
-               [case(op_MAPI_SyncUploadStateStreamBegin)] SyncUploadStateStreamBegin_repl mapi_SyncUploadStateStreamBegin;
-               [case(op_MAPI_SyncUploadStateStreamContinue)] SyncUploadStateStreamContinue_repl mapi_SyncUploadStateStreamContinue;
-               [case(op_MAPI_SyncUploadStateStreamEnd)] SyncUploadStateStreamEnd_repl mapi_SyncUploadStateStreamEnd;
-               [case(op_MAPI_SyncImportMessageMove)] SyncImportMessageMove_repl mapi_SyncImportMessageMove;
-               [case(op_MAPI_SetPropertiesNoReplicate)] SetPropertiesNoReplicate_repl mapi_SetPropertiesNoReplicate;
-               [case(op_MAPI_DeletePropertiesNoReplicate)] DeletePropertiesNoReplicate_repl mapi_DeletePropertiesNoReplicate;
-               [case(op_MAPI_GetStoreState)] GetStoreState_repl mapi_GetStoreState;
-               [case(op_MAPI_SyncOpenCollector)] SyncOpenCollector_repl mapi_SyncOpenCollector;
-               [case(op_MAPI_GetLocalReplicaIds)] GetLocalReplicaIds_repl mapi_GetLocalReplicaIds;
-               [case(op_MAPI_SyncImportReadStateChanges)] SyncImportReadStateChanges_repl mapi_SyncImportReadStateChanges;
-               [case(op_MAPI_ResetTable)] ResetTable_repl mapi_ResetTable;
-               [case(op_MAPI_SyncGetTransferState)] SyncGetTransferState_repl mapi_SyncGetTransferState;
-               [case(op_MAPI_TellVersion)] TellVersion_repl mapi_TellVersion;
-               [case(op_MAPI_OpenPublicFolderByName)] OpenPublicFolderByName_repl mapi_OpenPublicFolderByName;
-               [case(op_MAPI_SetSyncNotificationGuid)] SetSyncNotificationGuid_repl mapi_SetSyncNotificationGuid;
-               [case(op_MAPI_FreeBookmark)] FreeBookmark_repl mapi_FreeBookmark;
-               [case(op_MAPI_WriteAndCommitStream)] WriteAndCommitStream_repl mapi_WriteAndCommitStream;
-               [case(op_MAPI_HardDeleteMessages)] HardDeleteMessages_repl mapi_HardDeleteMessages;
-               [case(op_MAPI_HardDeleteMessagesAndSubfolders)] HardDeleteMessagesAndSubfolders_repl mapi_HardDeleteMessagesAndSubfolders;
-               [case(op_MAPI_Logon)] Logon_repl mapi_Logon;
-               [case(op_MAPI_proxypack)] proxypack_repl mapi_proxypack;
-
-       } EcDoRpc_MAPI_REPL_UNION;
-
-       typedef [public, nodiscriminant] union {
-               [case(op_MAPI_Logon)] Logon_redirect mapi_Logon;
-               [default];
-       } EcDoRpc_MAPI_REPL_UNION_SPECIAL;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint8           opnum;
-               uint8           logon_id;
-               uint8           handle_idx;
-               [switch_is(opnum)] EcDoRpc_MAPI_REQ_UNION u;
-       } EcDoRpc_MAPI_REQ;
-
-       typedef [public,nopush,nopull,noprint,flag(NDR_NOALIGN)] struct {
-               uint8           opnum;
-               uint8           handle_idx;
-               MAPISTATUS      error_code;
-               [switch_is(opnum)] EcDoRpc_MAPI_REPL_UNION u;
-               [switch_is(opnum)] EcDoRpc_MAPI_REPL_UNION_SPECIAL us;
-       } EcDoRpc_MAPI_REPL;
-
-
-       /*
-         Abstract way to represent MAPI content
-       */
-
-       typedef [public,nopull,nopush,noprint] struct {
-               uint32                  mapi_len;       /* whole mapi_data length */
-               uint16                  length;         /* content length */
-               EcDoRpc_MAPI_REQ        *mapi_req;
-               uint32                  *handles;       /* handles id array */
-       } mapi_request;
-
-       typedef [public,nopull,nopush,noprint] struct {
-               uint32                  mapi_len;
-               uint16                  length;
-               EcDoRpc_MAPI_REPL       *mapi_repl;
-               uint32                  *handles;
-       } mapi_response;
-       
-
-       [public,nopull,nopush] MAPISTATUS EcDoRpc(
-               [in,out]                                                policy_handle   *handle,
-               [in,out]                                                uint32          size,
-               [in,out]                                                uint32          offset,
-               [in] [subcontext(4),flag(NDR_REMAINING|NDR_NOALIGN)]    mapi_request    *mapi_request,
-               [out][subcontext(4),flag(NDR_REMAINING|NDR_NOALIGN)]    mapi_response   *mapi_response,
-               [in,out]                                                uint16          *length,
-               [in]                                                    uint16          max_data
-               );
-
-       /*****************/
-       /* Function 0x03 */
-       void EcGetMoreRpc();
-
-       /*****************/
-       /* Function 0x04 */
-
-       /*
-         we could directly use a NOTIFKEY structure rather than
-         a uint8 array, but this makes the IDL more robust
-       
-         sockaddr array is made of: 
-          - family (unsigned short in) sa_family_t
-          - address data sa_data[14];
-        */
-
-       typedef struct {
-               uint16          cb;
-               uint8           ab[cb];
-       } NOTIFKEY;
-
-       MAPISTATUS EcRRegisterPushNotification(
-               [in,out] policy_handle                  *handle,
-               [in] NotificationFlags                  ulEventMask,
-              [in,size_is(cbContext)] uint8            rgbContext[*],
-               [in] uint16                             cbContext,
-              [in] uint32                              grbitAdviseBits,
-              [in,size_is(cbCallbackAddress)] uint8    rgCallbackAddress[*],
-              [in] uint16                              cbCallbackAddress,
-              [out,ref] uint32                         *hNotification
-               );
-
-       /*****************/
-       /* Function 0x05 */
-       MAPISTATUS EcRUnregisterPushNotification(
-               [in,out]        policy_handle           *handle,
-               [in]            uint32                  unknown[2]
-               );
-
-       /*****************/
-       /* Function 0x06 */
-       void EcDummyRpc();
-
-       /*****************/
-       /* Function 0x07 */
-       void EcRGetDCName();
-
-       /*****************/
-       /* Function 0x08 */
-       void EcRNetGetDCName();
-
-       /*****************/
-       /* Function 0x09 */
-       void EcDoRpcExt();
-
-       /*****************/
-       /* Function 0xa  */
-       typedef [public,bitmap16bit] bitmap {
-               RHEF_Compressed         = 0x0001,
-               RHEF_XorMagic           = 0x0002,
-               RHEF_Last               = 0x0004
-       } RPC_HEADER_EXT_Flags;
-
-       typedef [public] struct {
-               uint16                  Version;
-               RPC_HEADER_EXT_Flags    Flags;
-               uint16                  Size;
-               uint16                  SizeActual;
-       } RPC_HEADER_EXT;
-
-       typedef [enum8bit,flag(NDR_PAHEX)] enum {
-               AUX_TYPE_PERF_REQUESTID         = 0x01,
-               AUX_TYPE_PERF_CLIENTDINFO       = 0x02,
-               AUX_TYPE_PERF_SERVERINFO        = 0x03,
-               AUX_TYPE_PERF_SESSIONINFO       = 0x04,
-               AUX_TYPE_PERF_DEFMDB_SUCCESS    = 0x05,
-               AUX_TYPE_PERF_DEFGC_SUCCESS     = 0x06,
-               AUX_TYPE_PERF_MDB_SUCCESS       = 0x07,
-               AUX_TYPE_PERF_GC_SUCCESS        = 0x08,
-               AUX_TYPE_PERF_FAILURE           = 0x09,
-               AUX_TYPE_CLIENT_CONTROL         = 0x0A,
-               AUX_TYPE_PERF_PROCESSINFO       = 0x0B,
-               AUX_TYPE_PERF_BG_DEFMDB_SUCCESS = 0x0C,
-               AUX_TYPE_PERF_BG_DEFGC_SUCCESS  = 0x0D,
-               AUX_TYPE_PERF_BG_MDB_SUCCESS    = 0x0E,
-               AUX_TYPE_PERF_BG_GC_SUCCESS     = 0x0F,
-               AUX_TYPE_PERF_BG_FAILURE        = 0x10,
-               AUX_TYPE_PERF_FG_DEFMDB_SUCCESS = 0x11,
-               AUX_TYPE_PERF_FG_DEFGC_SUCCESS  = 0x12,
-               AUX_TYPE_PERF_FG_MDB_SUCCESS    = 0x13,
-               AUX_TYPE_PERF_FG_GC_SUCCESS     = 0x14,
-               AUX_TYPE_PERF_FG_FAILURE        = 0x15,
-               AUX_TYPE_OSVERSIONINFO          = 0x16,
-               AUX_TYPE_EXORGINFO              = 0x17
-       } AUX_HEADER_TYPE_1;
-       
-       typedef [enum8bit,flag(NDR_PAHEX)] enum {
-               AUX_TYPE_PERF_SESSIONINFO_2     = 0x04,
-               AUX_TYPE_PERF_MDB_SUCCESS_2     = 0x07,
-               AUX_TYPE_PERF_GC_SUCCESS_2      = 0x08,
-               AUX_TYPE_PERF_FAILURE_2         = 0x09
-       } AUX_HEADER_TYPE_2;
-
-       typedef [public,enum8bit,flag(NDR_PAHEX)] enum {
-               AUX_VERSION_1   = 0x1,
-               AUX_VERSION_2   = 0x2
-       } AUX_VERSION;
-
-       typedef [public,switch_type(uint8)] union {
-               [case(AUX_VERSION_1)] AUX_HEADER_TYPE_1 Type;
-               [case(AUX_VERSION_2)] AUX_HEADER_TYPE_2 Type_2;
-               [default];
-       } AUX_HEADER_TYPE_ENUM;
-
-       /*************************/
-       /* AUX_HEADER case (0x1) */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          SessionID;
-               uint16          RequestID;
-       } AUX_PERF_REQUESTID;
-       
-       /*************************/
-       /* AUX_HEADER case (0x2) */
-       typedef [public,enum16bit, flag(NDR_PAHEX)] enum {
-               CLIENTMODE_UNKNOWN      =       0x0,
-               CLIENTMODE_CLASSIC      =       0x1,
-               CLIENTMODE_CACHED       =       0x2
-       } ClientMode;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint32          AdapterSpeed;
-               uint16          ClientID;
-               uint16          MachineNameOffset;
-               uint16          UserNameOffset;
-               uint16          ClientIPSize;
-               uint16          ClientIPOffset;
-               uint16          ClientIPMaskSize;
-               uint16          ClientIPMaskOffset;
-               uint16          AdapterNameOffset;
-               uint16          MacAddressSize;
-               uint16          MacAddressOffset;
-               ClientMode      ClientMode;
-               uint16          Reserved;
-               uint8           MacAddress[MacAddressSize];
-               uint8           ClientIP[ClientIPSize];
-               uint8           ClientIPMask[ClientIPMaskSize];
-               nstring         MachineName;
-               nstring         UserName;
-               nstring         AdapterName;
-       } AUX_PERF_CLIENTINFO;
-
-       /*************************/
-       /* AUX_HEADER case (0x3) */
-       typedef [enum16bit,flag(NDR_PAHEX)] enum {
-               SERVERTYPE_UNKNOWN              = 0x0,
-               SERVERTYPE_PRIVATE              = 0x1,
-               SERVERTYPE_PUBLIC               = 0x2,
-               SERVERTYPE_DIRECTORY            = 0x3,
-               SERVERTYPE_REFERRAL             = 0x4
-       } SERVERINFO_ServerType;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16                  ServerID;
-               SERVERINFO_ServerType   ServerType;
-               uint16                  ServerDNOffset;
-               uint16                  ServerNameOffset;
-               nstring                 ServerDN;
-               nstring                 ServerName;
-       } AUX_PERF_SERVERINFO;
-
-       /*************************/
-       /* AUX_HEADER case (0x4) */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          SessionID;
-               uint16          Reserved;
-               GUID            SessionGuid;
-       } AUX_PERF_SESSIONINFO;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          SessionID;
-               uint16          Reserved;
-               GUID            SessionGuid;
-               uint32          ConnectionID;
-       } AUX_PERF_SESSIONINFO_V2;
-
-       /**************************/
-       /* AUX_HEADER case (0x5)  */
-       /* AUX_HEADER case (0xC)  */
-       /* AUX_HEADER case (0x11) */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-               uint16          RequestID;
-               uint16          Reserved;
-       } AUX_PERF_DEFMDB_SUCCESS;
-
-       /**************************/
-       /* AUX_HEADER case (0x6)  */
-       /* AUX_HEADER case (0xD)  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ServerID;
-               uint16          SessionID;
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-               uint8           RequestOperation;
-               uint8           Reserved[3];
-       } AUX_PERF_DEFGC_SUCCESS;
-       
-       /**************************/
-       /* AUX_HEADER case (0x7)  */
-       /* AUX_HEADER case (0xE)  */
-       /* AUX_HEADER case (0x13) */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint16          RequestID;
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-       } AUX_PERF_MDB_SUCCESS;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ProcessID;
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint16          RequestID;
-               uint16          Reserved;
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-       } AUX_PERF_MDB_SUCCESS_V2;
-
-       /**************************/
-       /* AUX_HEADER case (0x8)  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint16          Reserved_1;
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-               uint8           RequestOperation;
-               uint8           Reserved_2[3];
-       } AUX_PERF_GC_SUCCESS;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ProcessID;
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint32          TimeSinceRequest;
-               uint32          TimeToCompleteRequest;
-               uint8           RequestOperation;
-               uint8           Reserved[3];
-       } AUX_PERF_GC_SUCCESS_V2;
-
-       /**************************/
-       /* AUX_HEADER case (0x9)  */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint16          RequestID;
-               uint32          TimeSinceRequest;
-               uint32          TimeToFailRequest;
-               MAPISTATUS      ResultCode;
-               uint8           RequestOperation;
-               uint8           Reserved[3];
-       } AUX_PERF_FAILURE;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ProcessID;
-               uint16          ClientID;
-               uint16          ServerID;
-               uint16          SessionID;
-               uint16          RequestID;
-               uint16          Reserved_1;
-               uint32          TimeSinceRequest;
-               uint32          TimeToFailRequest;
-               MAPISTATUS      ResultCode;
-               uint8           RequestOperation;
-               uint8           Reserved_2[3];
-       } AUX_PERF_FAILURE_V2;
-
-       /**************************/
-       /* AUX_HEADER case (0xA)  */
-       typedef [bitmap32bit] bitmap {
-               ENABLE_PERF_SENDTOSERVER        = 0x00000001,
-               ENABLE_PERF_SENDTOMAILBOX       = 0x00000002,
-               ENABLE_COMPRESSION              = 0x00000004,
-               ENABLE_HTTP_TUNNELING           = 0x00000008,
-               ENABLE_PERF_SENDGCDATA          = 0x00000010
-       } CLIENT_CONTROL_EnableFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               CLIENT_CONTROL_EnableFlags      EnableFlags;
-               uint32                          ExpiryTime;
-       } AUX_CLIENT_CONTROL;
-
-       /*************************/
-       /* AUX_HEADER case (0xB) */
-       typedef [nodiscriminant] union {
-               [case(0x0)];
-               [default] nstring       ProcessName;
-       } ProcessNameString;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint16          ProcessID;
-               uint16          Reserved1;
-               GUID            ProcessGuid;
-               uint16          ProcessNameOffset;
-               uint16          Reserved2;
-               [switch_is(ProcessNameOffset)] ProcessNameString ProcessName;
-       } AUX_PERF_PROCESSINFO;
-
-       /**************************/
-       /* AUX_HEADER case (0x16) */
-       typedef [flag(NDR_NOALIGN)] struct {
-               uint32          OSVersionInfoSize;
-               uint32          MajorVersion;
-               uint32          MinorVersion;
-               uint32          BuildNumber;
-               [subcontext(0), subcontext_size(132), flag(NDR_NOALIGN|NDR_REMAINING)] DATA_BLOB Reserved_1;
-               uint16          ServicePackMajor;
-               uint16          ServicePackMinor;
-               uint32          Reserved_2;
-       } AUX_OSVERSIONINFO;
-
-       /**************************/
-       /* AUX_HEADER case (0x17) */
-       typedef [bitmap32bit] bitmap {
-               PUBLIC_FOLDERS_ENABLED  = 0x00000001
-       } EXORGINFO_OrgFlags;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               EXORGINFO_OrgFlags      OrgFlags;
-       } AUX_EXORGINFO;
-
-       typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union {
-               [case(AUX_TYPE_PERF_REQUESTID)]         AUX_PERF_REQUESTID              AUX_PERF_REQUESTID;
-         //            [case(AUX_TYPE_PERF_CLIENTDINFO)]       AUX_PERF_CLIENTINFO             AUX_PERF_CLIENTINFO;
-               [case(AUX_TYPE_PERF_SERVERINFO)]        AUX_PERF_SERVERINFO             AUX_PERF_SERVERINFO;
-               [case(AUX_TYPE_PERF_SESSIONINFO)]       AUX_PERF_SESSIONINFO            AUX_PERF_SESSIONINFO;
-               [case(AUX_TYPE_PERF_DEFMDB_SUCCESS)]    AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_DEFGC_SUCCESS)]     AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_MDB_SUCCESS)]       AUX_PERF_MDB_SUCCESS            AUX_PERF_MDB_SUCCESS;
-               [case(AUX_TYPE_PERF_GC_SUCCESS)]        AUX_PERF_GC_SUCCESS             AUX_PERF_GC_SUCCESS;
-               [case(AUX_TYPE_PERF_FAILURE)]           AUX_PERF_FAILURE                AUX_PERF_FAILURE;
-               [case(AUX_TYPE_CLIENT_CONTROL)]         AUX_CLIENT_CONTROL              AUX_CLIENT_CONTROL;
-               [case(AUX_TYPE_PERF_PROCESSINFO)]       AUX_PERF_PROCESSINFO            AUX_PERF_PROCESSINFO;
-               [case(AUX_TYPE_PERF_BG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_DEFGC_SUCCESS)]  AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_MDB_SUCCESS)]    AUX_PERF_MDB_SUCCESS            AUX_PERF_MDB_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_GC_SUCCESS)]     AUX_PERF_GC_SUCCESS             AUX_PERF_GC_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_FAILURE)]        AUX_PERF_FAILURE                AUX_PERF_FAILURE;
-               [case(AUX_TYPE_PERF_FG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_DEFGC_SUCCESS)]  AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_MDB_SUCCESS)]    AUX_PERF_MDB_SUCCESS            AUX_PERF_MDB_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_GC_SUCCESS)]     AUX_PERF_GC_SUCCESS             AUX_PERG_GC_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_FAILURE)]        AUX_PERF_FAILURE                AUX_PERF_FAILURE;
-               [case(AUX_TYPE_OSVERSIONINFO)]          AUX_OSVERSIONINFO               AUX_OSVERSIONINFO;
-               [case(AUX_TYPE_EXORGINFO)]              AUX_EXORGINFO                   AUX_EXORGINFO;
-               [default][flag(NDR_REMAINING|NDR_NOALIGN)] DATA_BLOB    Payload;
-       } AUX_HEADER_TYPE_UNION_1;
-
-       typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union {
-               [case(AUX_TYPE_PERF_REQUESTID)]         AUX_PERF_REQUESTID              AUX_PERF_REQUESTID;
-         //    [case(AUX_TYPE_PERF_CLIENTDINFO)]       AUX_PERF_CLIENTINFO             AUX_PERF_CLIENTINFO;
-               [case(AUX_TYPE_PERF_SERVERINFO)]        AUX_PERF_SERVERINFO             AUX_PERF_SERVERINFO;
-               [case(AUX_TYPE_PERF_SESSIONINFO_2)]     AUX_PERF_SESSIONINFO_V2         AUX_PERF_SESSIONINFO_V2;        /* V2 specific */
-               [case(AUX_TYPE_PERF_DEFMDB_SUCCESS)]    AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_DEFGC_SUCCESS)]     AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_MDB_SUCCESS_2)]     AUX_PERF_MDB_SUCCESS_V2         AUX_PERF_MDB_SUCCESS_V2;        /* V2 specific */
-               [case(AUX_TYPE_PERF_GC_SUCCESS_2)]      AUX_PERF_GC_SUCCESS_V2          AUX_PERF_GC_SUCCESS_V2;         /* V2 specific */
-               [case(AUX_TYPE_PERF_FAILURE_2)]         AUX_PERF_FAILURE_V2             AUX_PERF_FAILURE_V2;            /* V2 specific*/
-               [case(AUX_TYPE_CLIENT_CONTROL)]         AUX_CLIENT_CONTROL              AUX_CLIENT_CONTROL;
-               [case(AUX_TYPE_PERF_PROCESSINFO)]       AUX_PERF_PROCESSINFO            AUX_PERF_PROCESSINFO;
-               [case(AUX_TYPE_PERF_BG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_DEFGC_SUCCESS)]  AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_MDB_SUCCESS)]    AUX_PERF_MDB_SUCCESS            AUX_PERF_MDB_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_GC_SUCCESS)]     AUX_PERF_GC_SUCCESS             AUX_PERF_GC_SUCCESS;
-               [case(AUX_TYPE_PERF_BG_FAILURE)]        AUX_PERF_FAILURE                AUX_PERF_FAILURE;
-               [case(AUX_TYPE_PERF_FG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS         AUX_PERF_DEFMDB_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_DEFGC_SUCCESS)]  AUX_PERF_DEFGC_SUCCESS          AUX_PERF_DEFGC_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_MDB_SUCCESS)]    AUX_PERF_MDB_SUCCESS            AUX_PERF_MDB_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_GC_SUCCESS)]     AUX_PERF_GC_SUCCESS             AUX_PERG_GC_SUCCESS;
-               [case(AUX_TYPE_PERF_FG_FAILURE)]        AUX_PERF_FAILURE                AUX_PERF_FAILURE;
-               [case(AUX_TYPE_OSVERSIONINFO)]          AUX_OSVERSIONINFO               AUX_OSVERSIONINFO;
-               [case(AUX_TYPE_EXORGINFO)]              AUX_EXORGINFO                   AUX_EXORGINFO;
-               [default][flag(NDR_REMAINING|NDR_NOALIGN)] DATA_BLOB    Payload;
-       } AUX_HEADER_TYPE_UNION_2;
-
-       typedef [public,nopull,noprint,flag(NDR_NOALIGN)] struct {
-               uint16                                                  Size;
-               AUX_VERSION                                             Version;
-               uint8                                                   Type;
-               [switch_is(Type)] AUX_HEADER_TYPE_UNION_1               Payload_1;
-               [switch_is(Type)] AUX_HEADER_TYPE_UNION_2               Payload_2;
-       } AUX_HEADER;
-
-       typedef [public,nopull,noprint] struct {
-               RPC_HEADER_EXT                                                          RPC_HEADER_EXT;
-               [subcontext(0), subcontext_size(RPC_HEADER_EXT.Size)] AUX_HEADER        *AUX_HEADER;
-       } mapi2k7_AuxInfo;
-
-
-       [public,nopull,nopush,noprint] MAPISTATUS EcDoConnectEx(
-               [out]                           policy_handle                           *handle,
-               [in,string,charset(DOS)]        uint8                                   szUserDN[],
-               [in]                            uint32                                  ulFlags,
-               [in]                            uint32                                  ulConMod,
-               [in]                            uint32                                  cbLimit,
-               [in]                            uint32                                  ulCpid,
-               [in]                            uint32                                  ulLcidString,
-               [in]                            uint32                                  ulLcidSort,
-               [in]                            uint32                                  ulIcxrLink,
-               [in]                            uint16                                  usFCanConvertCodePages,
-               [out]                           uint32                                  *pcmsPollsMax,
-               [out]                           uint32                                  *pcRetry,
-               [out]                           uint32                                  *pcmsRetryDelay,
-               [out]                           uint32                                  *picxr,
-               [out,ref,string,charset(DOS)]uint8                                      **szDNPrefix,
-               [out,ref,string,charset(DOS)]uint8                                      **szDisplayName,
-               [in]                            uint16                                  rgwClientVersion[3],
-               [out]                           uint16                                  rgwServerVersion[3],
-               [out]                           uint16                                  rgwBestVersion[3],
-               [in,out]                        uint32                                  *pulTimeStamp,
-               [in,subcontext(4),flag(NDR_NOALIGN|NDR_REMAINING)] mapi2k7_AuxInfo      *rgbAuxIn,
-               [in]                            uint32                                  cbAuxIn,
-               [out, length_is(*pcbAuxOut), size_is(*pcbAuxOut)] mapi2k7_AuxInfo       *rgbAuxOut,
-               [in,out][range(0,0x1008)]       uint32                                  *pcbAuxOut
-               );
-
-       /*****************/
-       /* Function 0xb  */
-       typedef [public,bitmap32bit] bitmap {
-               pulFlags_NoCompression  = 0x00000001,
-               pulFlags_NoXorMagic     = 0x00000002,
-               pulFlags_Chain          = 0x00000004
-       } pulFlags;
-
-       typedef [public,nopull] struct {
-               RPC_HEADER_EXT                                                  header;
-               [subcontext(0),flag(NDR_REMAINING|NDR_NOALIGN)] mapi_request    *mapi_request;
-       } mapi2k7_request;
-
-       typedef [public,nopull] struct {
-               RPC_HEADER_EXT                                                  header;
-               [subcontext(0),flag(NDR_NOALIGN|NDR_REMAINING)] mapi_response   *mapi_response;
-       } mapi2k7_response;
-
-       [public,noprint] MAPISTATUS EcDoRpcExt2(
-               [in,out]                                        policy_handle   *handle,
-               [in,out]                                        uint32          *pulFlags,
-               [in, size_is(cbIn)]                             uint8           rgbIn[],
-               [in]                                            uint32          cbIn,
-               [out, length_is(*pcbOut), size_is(*pcbOut)]     uint8           rgbOut[],
-               [in,out][range(0x0,0x40000)]                    uint32          *pcbOut,
-               [in, size_is(cbAuxIn)]                          uint8           rgbAuxIn[],
-               [in]                                            uint32          cbAuxIn,
-               [out, length_is(*pcbAuxOut), size_is(*pcbAuxOut)] uint32        rgbAuxOut[],
-               [in,out][range(0x0,0x1008)]                     uint32          *pcbAuxOut,
-               [out]                                           uint32          *pulTransTime
-               );
-
-       /*****************/
-       /* Function 0xc  */
-       void EcUnknown0xC();
-
-       /*****************/
-       /* Function 0xd  */
-       void EcUnknown0xD();
-
-       /*****************/
-       /* Function 0xe  */
-       [public] MAPISTATUS EcDoAsyncConnectEx(
-               [in] policy_handle      *handle,
-               [out] policy_handle     *async_handle
-               );
-
-}
-
-[
-  uuid("5261574a-4572-206e-b268-6b199213b4e4"),
-  pointer_default(unique),
-  endpoint("ncacn_ip_tcp:"),
-  version(0.01)
-] interface exchange_async_emsmdb
-{
-       [public] MAPISTATUS EcDoAsyncWaitEx(
-               [in] policy_handle      *async_handle,
-               [in] uint32             ulFlagsIn,
-               [out] uint32            *pulFlagsOut
-               );
-}
-
-[
-  uuid("c840a7dc-42c0-1a10-b4b9-08002b2fe182"),
-  pointer_default(unique),
-  helpstring("Unknown")
-] interface exchange_unknown
-{
-       void unknown_dummy();
-}
-
diff --git a/branches/plugfest/idl_types.h b/branches/plugfest/idl_types.h
deleted file mode 100644 (file)
index 98a8d1c..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#define STR_ASCII      LIBNDR_FLAG_STR_ASCII
-#define STR_LEN4       LIBNDR_FLAG_STR_LEN4
-#define STR_SIZE4      LIBNDR_FLAG_STR_SIZE4
-#define STR_SIZE2      LIBNDR_FLAG_STR_SIZE2
-#define STR_NOTERM     LIBNDR_FLAG_STR_NOTERM
-#define STR_NULLTERM   LIBNDR_FLAG_STR_NULLTERM
-#define STR_BYTESIZE   LIBNDR_FLAG_STR_BYTESIZE
-#define STR_FIXLEN32   LIBNDR_FLAG_STR_FIXLEN32
-#define STR_FIXLEN15   LIBNDR_FLAG_STR_FIXLEN15
-#define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
-#define STR_CHARLEN    LIBNDR_FLAG_STR_CHARLEN
-#define STR_UTF8       LIBNDR_FLAG_STR_UTF8
-#define STR_LARGE_SIZE LIBNDR_FLAG_STR_LARGE_SIZE
-
-/*
-  a UCS2 string prefixed with [size], 32 bits
-*/
-#define lstring                [flag(STR_SIZE4)] string
-
-/*
-  a null terminated UCS2 string
-*/
-#define nstring                [flag(STR_NULLTERM)] string
-
-/*
-  fixed length 32 character UCS-2 string
-*/
-#define string32       [flag(STR_FIXLEN32)] string
-
-/*
-  fixed length 16 character ascii string
-*/
-#define astring15       [flag(STR_ASCII|STR_FIXLEN15)] string
-
-/*
-  an ascii string prefixed with [offset] [length], both 32 bits
-  null terminated
-*/
-#define ascstr2                [flag(STR_ASCII|STR_LEN4)] string
-
-/*
-  an ascii string prefixed with [size], 32 bits
-*/
-#define asclstr                [flag(STR_ASCII|STR_SIZE4)] string
-
-/*
-  an ascii string prefixed with [size], 16 bits
-  null terminated
-*/
-#define ascstr3                [flag(STR_ASCII|STR_SIZE2)] string
-
-/*
-  an ascii string prefixed with [size] [offset] [length], all 32 bits
-  not null terminated
-*/
-#define ascstr_noterm  [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string
-
-/*
-  a null terminated ascii string
-*/
-#define astring                [flag(STR_ASCII|STR_NULLTERM)] string
-
-/*
-  a null terminated UTF8 string
-*/
-#define utf8string     [flag(STR_UTF8|STR_NULLTERM)] string
-
-/*
-  a null terminated UCS2 string
-*/
-#define nstring_array  [flag(STR_NULLTERM)] string_array
-
-#define NDR_NOALIGN       LIBNDR_FLAG_NOALIGN
-#define NDR_REMAINING     LIBNDR_FLAG_REMAINING
-#define NDR_ALIGN2        LIBNDR_FLAG_ALIGN2
-#define NDR_ALIGN4        LIBNDR_FLAG_ALIGN4
-#define NDR_ALIGN8        LIBNDR_FLAG_ALIGN8
-
-/* this flag is used to force a section of IDL as little endian. It is
-   needed for the epmapper IDL, which is defined as always being LE */
-#define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN
-#define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN
-
-
-/*
-  these are used by the epmapper and mgmt interfaces
-*/
-#define error_status_t uint32
-#define boolean32 uint32
-#define unsigned32 uint32
-
-/*
-  this is used to control formatting of uint8 arrays
-*/
-#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
-
-#define bool8 uint8
diff --git a/branches/plugfest/install-sh b/branches/plugfest/install-sh
deleted file mode 100644 (file)
index e9de238..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       true
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=mkdir
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
-
-       pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/branches/plugfest/libexchange2ical/exchange2ical.c b/branches/plugfest/libexchange2ical/exchange2ical.c
deleted file mode 100644 (file)
index 5358038..0000000
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
-   Common conversion routines for exchange2ical
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-
-static void exchange2ical_init(TALLOC_CTX *mem_ctx, struct exchange2ical *exchange2ical)
-{
-       exchange2ical->TimeZoneStruct = NULL;
-       exchange2ical->TimeZoneDesc = NULL;
-       exchange2ical->method = ICAL_METHOD_NONE;
-       exchange2ical->vtimezone = NULL;
-       exchange2ical->vcalendar = NULL;
-       exchange2ical->mem_ctx = mem_ctx;
-       exchange2ical->partstat = ICAL_PARTSTAT_NONE;
-       exchange2ical->ResponseStatus = NULL;
-       exchange2ical->Recurring = NULL;
-       exchange2ical->RecurrencePattern = NULL;
-       exchange2ical->AppointmentRecurrencePattern = NULL;
-       exchange2ical->Keywords = NULL;
-       exchange2ical->Contacts = NULL;
-       exchange2ical->apptStateFlags = NULL;
-       exchange2ical->sensitivity = NULL;
-       exchange2ical->apptStartWhole = NULL;
-       exchange2ical->apptEndWhole = NULL;
-       exchange2ical->apptSubType = NULL;
-       exchange2ical->OwnerCriticalChange = NULL;
-       exchange2ical->body = NULL;
-       exchange2ical->LastModified = NULL;
-       exchange2ical->Location = NULL;
-       exchange2ical->Importance = NULL;
-       exchange2ical->ExceptionReplaceTime = NULL;
-       exchange2ical->ResponseRequested = NULL;
-       exchange2ical->NonSendableBcc = NULL;
-       exchange2ical->Sequence = NULL;
-       exchange2ical->Subject = NULL;
-       exchange2ical->MessageLocaleId = NULL;
-       exchange2ical->BusyStatus = NULL;
-       exchange2ical->IntendedBusyStatus = NULL;
-       exchange2ical->GlobalObjectId = NULL;
-       exchange2ical->AttendeeCriticalChange = NULL;
-       exchange2ical->OwnerApptId = NULL;
-       exchange2ical->apptReplyTime = NULL;
-       exchange2ical->NotAllowPropose = NULL;
-       exchange2ical->AllowExternCheck = NULL;
-       exchange2ical->apptLastSequence = NULL;
-       exchange2ical->apptSeqTime = NULL;
-       exchange2ical->AutoFillLocation = NULL;
-       exchange2ical->AutoStartCheck = NULL;
-       exchange2ical->CollaborateDoc = NULL;
-       exchange2ical->ConfCheck = NULL;
-       exchange2ical->ConfType = NULL;
-       exchange2ical->Directory = NULL;
-       exchange2ical->MWSURL = NULL;
-       exchange2ical->NetShowURL = NULL;
-       exchange2ical->OnlinePassword = NULL;
-       exchange2ical->OrgAlias = NULL;
-       exchange2ical->SenderName = NULL;
-       exchange2ical->SenderEmailAddress = NULL;
-       exchange2ical->ReminderSet = NULL;
-       exchange2ical->ReminderDelta = NULL;
-       exchange2ical->vevent = NULL;
-       exchange2ical->valarm = NULL;
-       exchange2ical->bodyHTML = NULL;
-       exchange2ical->idx=0;
-}
-
-static void exchange2ical_clear(struct exchange2ical *exchange2ical)
-{
-       if (exchange2ical->AppointmentRecurrencePattern){
-               talloc_free(exchange2ical->AppointmentRecurrencePattern);
-       }
-       
-       if (exchange2ical->TimeZoneStruct) {
-               talloc_free(exchange2ical->TimeZoneStruct);
-       }
-
-       exchange2ical_init(exchange2ical->mem_ctx, exchange2ical);
-}
-
-
-static void exchange2ical_reset(struct exchange2ical *exchange2ical)
-{
-       if (exchange2ical->AppointmentRecurrencePattern){
-               talloc_free(exchange2ical->AppointmentRecurrencePattern);
-       }
-
-       if (exchange2ical->TimeZoneStruct) {
-               talloc_free(exchange2ical->TimeZoneStruct);
-       }
-       
-       exchange2ical->partstat = ICAL_PARTSTAT_NONE;
-       exchange2ical->ResponseStatus = NULL;
-       exchange2ical->Recurring = NULL;
-       exchange2ical->RecurrencePattern = NULL;
-       exchange2ical->AppointmentRecurrencePattern = NULL;
-       exchange2ical->Keywords = NULL;
-       exchange2ical->Contacts = NULL;
-       exchange2ical->apptStateFlags = NULL;
-       exchange2ical->sensitivity = NULL;
-       exchange2ical->apptStartWhole = NULL;
-       exchange2ical->apptEndWhole = NULL;
-       exchange2ical->apptSubType = NULL;
-       exchange2ical->OwnerCriticalChange = NULL;
-       exchange2ical->body = NULL;
-       exchange2ical->LastModified = NULL;
-       exchange2ical->Location = NULL;
-       exchange2ical->Importance = NULL;
-       exchange2ical->ExceptionReplaceTime = NULL;
-       exchange2ical->ResponseRequested = NULL;
-       exchange2ical->NonSendableBcc = NULL;
-       exchange2ical->Sequence = NULL;
-       exchange2ical->Subject = NULL;
-       exchange2ical->MessageLocaleId = NULL;
-       exchange2ical->BusyStatus = NULL;
-       exchange2ical->IntendedBusyStatus = NULL;
-       exchange2ical->GlobalObjectId = NULL;
-       exchange2ical->AttendeeCriticalChange = NULL;
-       exchange2ical->OwnerApptId = NULL;
-       exchange2ical->apptReplyTime = NULL;
-       exchange2ical->NotAllowPropose = NULL;
-       exchange2ical->AllowExternCheck = NULL;
-       exchange2ical->apptLastSequence = NULL;
-       exchange2ical->apptSeqTime = NULL;
-       exchange2ical->AutoFillLocation = NULL;
-       exchange2ical->AutoStartCheck = NULL;
-       exchange2ical->CollaborateDoc = NULL;
-       exchange2ical->ConfCheck = NULL;
-       exchange2ical->ConfType = NULL;
-       exchange2ical->Directory = NULL;
-       exchange2ical->MWSURL = NULL;
-       exchange2ical->NetShowURL = NULL;
-       exchange2ical->OnlinePassword = NULL;
-       exchange2ical->OrgAlias = NULL;
-       exchange2ical->SenderName = NULL;
-       exchange2ical->SenderEmailAddress = NULL;
-       exchange2ical->ReminderSet = NULL;
-       exchange2ical->ReminderDelta = NULL;
-       exchange2ical->vevent = NULL;
-       exchange2ical->valarm = NULL;
-       exchange2ical->bodyHTML = NULL;
-       exchange2ical->TimeZoneDesc = NULL;
-       exchange2ical->TimeZoneStruct = NULL;
-}
-
-
-static int exchange2ical_get_properties(TALLOC_CTX *mem_ctx, struct SRow *aRow, struct exchange2ical *exchange2ical, enum exchange2ical_flags eFlags)
-{
-       struct Binary_r *apptrecur;
-       const char *messageClass;
-       struct Binary_r *TimeZoneStruct;
-
-       if(eFlags & VcalFlag){
-               messageClass = octool_get_propval(aRow, PR_MESSAGE_CLASS_UNICODE);
-               exchange2ical->method = get_ical_method(messageClass);
-               if (!exchange2ical->method) return -1;
-       }
-       
-       if(((eFlags & RangeFlag) && !(eFlags & EntireFlag))||
-               (!(eFlags & RangeFlag) && (eFlags & EntireFlag))){
-               exchange2ical->apptStartWhole = (const struct FILETIME *)octool_get_propval(aRow, PidLidAppointmentStartWhole);
-
-       }
-       
-       if(((eFlags & EventFlag) && !(eFlags & EntireFlag))||
-               (!(eFlags & EventFlag) && (eFlags & EntireFlag))){
-               exchange2ical->GlobalObjectId = (struct Binary_r *) octool_get_propval(aRow, PidLidGlobalObjectId);
-               exchange2ical->Sequence = (uint32_t *) octool_get_propval(aRow, PidLidAppointmentSequence);     
-
-       }
-       
-       if(((eFlags & EventsFlag) && !(eFlags & EntireFlag))||
-               (!(eFlags & EventsFlag) && (eFlags & EntireFlag))){
-               exchange2ical->GlobalObjectId = (struct Binary_r *) octool_get_propval(aRow, PidLidGlobalObjectId);
-
-       }
-       
-       if(eFlags & EntireFlag) {
-         
-               apptrecur = (struct Binary_r *) octool_get_propval(aRow, PidLidAppointmentRecur);
-               exchange2ical->AppointmentRecurrencePattern = get_AppointmentRecurrencePattern(mem_ctx,apptrecur);
-               exchange2ical->RecurrencePattern = &exchange2ical->AppointmentRecurrencePattern->RecurrencePattern;
-               
-               TimeZoneStruct = (struct Binary_r *) octool_get_propval(aRow, PidLidTimeZoneStruct);
-               exchange2ical->TimeZoneStruct = get_TimeZoneStruct(mem_ctx, TimeZoneStruct);
-
-               exchange2ical->TimeZoneDesc = (const char *) octool_get_propval(aRow, PidLidTimeZoneDescription);
-               exchange2ical->Keywords = (const struct StringArray_r *) octool_get_propval(aRow, PidNameKeywords);
-               exchange2ical->Recurring = (uint8_t *) octool_get_propval(aRow, PidLidRecurring);
-               exchange2ical->TimeZoneDesc = (const char *) octool_get_propval(aRow, PidLidTimeZoneDescription);
-               exchange2ical->ExceptionReplaceTime = (const struct FILETIME *)octool_get_propval(aRow, PidLidExceptionReplaceTime);
-               exchange2ical->ResponseStatus = (uint32_t *) octool_get_propval(aRow, PidLidResponseStatus);
-               exchange2ical->apptStateFlags = (uint32_t *) octool_get_propval(aRow, PidLidAppointmentStateFlags);
-               exchange2ical->Contacts = (const struct StringArray_r *)octool_get_propval(aRow, PidLidContacts);
-               exchange2ical->apptEndWhole = (const struct FILETIME *)octool_get_propval(aRow, PidLidAppointmentEndWhole);     
-               exchange2ical->apptSubType = (uint8_t *) octool_get_propval(aRow, PidLidAppointmentSubType);
-               exchange2ical->OwnerCriticalChange = (const struct FILETIME *)octool_get_propval(aRow, PidLidOwnerCriticalChange);
-               exchange2ical->Location = (const char *) octool_get_propval(aRow, PidLidLocation);      
-               exchange2ical->NonSendableBcc = (const char *) octool_get_propval(aRow, PidLidNonSendableBcc);
-               exchange2ical->BusyStatus = (uint32_t *) octool_get_propval(aRow, PidLidBusyStatus);    
-               exchange2ical->IntendedBusyStatus = (uint32_t *) octool_get_propval(aRow, PidLidIntendedBusyStatus);    
-               exchange2ical->AttendeeCriticalChange = (const struct FILETIME *) octool_get_propval(aRow, PidLidAttendeeCriticalChange);       
-               exchange2ical->apptReplyTime = (const struct FILETIME *)octool_get_propval(aRow, PidLidAppointmentReplyTime);
-               exchange2ical->NotAllowPropose = (uint8_t *) octool_get_propval(aRow, PidLidAppointmentNotAllowPropose);        
-               exchange2ical->AllowExternCheck = (uint8_t *) octool_get_propval(aRow, PidLidAllowExternalCheck);
-               exchange2ical->apptLastSequence = (uint32_t *) octool_get_propval(aRow, PidLidAppointmentLastSequence);
-               exchange2ical->apptSeqTime = (const struct FILETIME *)octool_get_propval(aRow, PidLidAppointmentSequenceTime);  
-               exchange2ical->AutoFillLocation = (uint8_t *) octool_get_propval(aRow, PidLidAutoFillLocation);
-               exchange2ical->AutoStartCheck = (uint8_t *) octool_get_propval(aRow, PidLidAutoStartCheck);
-               exchange2ical->CollaborateDoc = (const char *) octool_get_propval(aRow, PidLidCollaborateDoc);
-               exchange2ical->ConfCheck = (uint8_t *) octool_get_propval(aRow, PidLidConferencingCheck);
-               exchange2ical->ConfType = (uint32_t *) octool_get_propval(aRow, PidLidConferencingType);
-               exchange2ical->Directory = (const char *) octool_get_propval(aRow, PidLidDirectory);
-               exchange2ical->MWSURL = (const char *) octool_get_propval(aRow, PidLidMeetingWorkspaceUrl);
-               exchange2ical->NetShowURL = (const char *) octool_get_propval(aRow, PidLidNetShowUrl);
-               exchange2ical->OnlinePassword = (const char *) octool_get_propval(aRow, PidLidOnlinePassword);
-               exchange2ical->OrgAlias = (const char *) octool_get_propval(aRow, PidLidOrganizerAlias);
-               exchange2ical->ReminderSet = (uint8_t *) octool_get_propval(aRow, PidLidReminderSet);
-               exchange2ical->ReminderDelta = (uint32_t *) octool_get_propval(aRow, PidLidReminderDelta);
-               exchange2ical->sensitivity = (uint32_t *) octool_get_propval(aRow, PR_SENSITIVITY);
-               exchange2ical->created = (const struct FILETIME *)octool_get_propval(aRow, PR_CREATION_TIME);
-               exchange2ical->body = (const char *)octool_get_propval(aRow, PR_BODY_UNICODE);
-               exchange2ical->LastModified = (const struct FILETIME *)octool_get_propval(aRow, PR_LAST_MODIFICATION_TIME);
-               exchange2ical->Importance = (uint32_t *) octool_get_propval(aRow, PR_IMPORTANCE);
-               exchange2ical->ResponseRequested = (uint8_t *) octool_get_propval(aRow, PR_RESPONSE_REQUESTED);
-               exchange2ical->Subject = (const char *) octool_get_propval(aRow, PR_SUBJECT_UNICODE);
-               exchange2ical->MessageLocaleId = (uint32_t *) octool_get_propval(aRow, PR_MESSAGE_LOCALE_ID);
-               exchange2ical->OwnerApptId = (uint32_t *) octool_get_propval(aRow, PR_OWNER_APPT_ID);
-               exchange2ical->SenderName = (const char *) octool_get_propval(aRow, PR_SENDER_NAME);
-               exchange2ical->SenderEmailAddress = (const char *) octool_get_propval(aRow, PR_SENDER_EMAIL_ADDRESS);
-       }
-       
-       return 0;
-       
-}
-
-
-static uint8_t exchange2ical_exception_from_ExceptionInfo(struct exchange2ical *exchange2ical, struct exchange2ical_check *exchange2ical_check)
-{
-       uint32_t        i;
-       icalproperty *prop;
-       icalparameter *param;
-       icaltimetype icaltime;
-       /*sanity checks*/
-       if(!exchange2ical->AppointmentRecurrencePattern) return 1;
-       if(!exchange2ical->AppointmentRecurrencePattern->ExceptionInfo) return 1;
-       if(!exchange2ical->AppointmentRecurrencePattern->ExceptionCount) return 1;
-
-       for(i=0; i<exchange2ical->AppointmentRecurrencePattern->ExceptionCount; i++) {
-               
-               /*Check to see if event is acceptable*/
-               struct tm apptStart=get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->StartDateTime);
-               if (!checkEvent(exchange2ical, exchange2ical_check, &apptStart)){
-                       return 0;
-               }
-               
-               /*Create a new vevent*/
-               exchange2ical->vevent = icalcomponent_new_vevent();
-               if ( ! (exchange2ical->vevent) ) {
-                       return 1;
-               }
-               icalcomponent_add_component(exchange2ical->vcalendar, exchange2ical->vevent);
-
-               /*dtstart from StartDateTime*/
-               if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-                       struct tm       tm;
-                       tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->StartDateTime);
-                       icaltime= get_icaldate_from_tm(&tm);
-                       prop = icalproperty_new_dtstart(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               }else {
-                       if(exchange2ical->TimeZoneDesc){
-                               struct tm       tm;
-                               tm = get_tm_from_minutes(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->StartDateTime);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_dtstart(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               param = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                               icalproperty_add_parameter(prop, param);
-                       } else {
-                               struct tm       tm;
-                               tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->StartDateTime);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_dtstart(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-               }
-               /*dtend from EndDateTime*/
-               if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-                       struct tm       tm;
-                       tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->EndDateTime);
-                       icaltime= get_icaldate_from_tm(&tm);
-                       prop = icalproperty_new_dtend(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               }else {
-                       if(exchange2ical->TimeZoneDesc){
-                               struct tm       tm;
-                               tm = get_tm_from_minutes(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->EndDateTime);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_dtend(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               param = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                               icalproperty_add_parameter(prop, param);
-                       } else {
-                               struct tm       tm;
-                               tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->EndDateTime);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_dtend(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-               }
-               /*recurrence-id from OriginalStartDate*/
-               if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-                       struct tm       tm;
-                       tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OriginalStartDate);
-                       icaltime= get_icaldate_from_tm(&tm);
-                       prop = icalproperty_new_recurrenceid(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               }else {
-                       if(exchange2ical->TimeZoneDesc){
-                               struct tm       tm;
-                               tm = get_tm_from_minutes(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OriginalStartDate);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_recurrenceid(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               param = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                               icalproperty_add_parameter(prop, param);
-                       } else {
-                               struct tm       tm;
-                               tm = get_tm_from_minutes_UTC(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OriginalStartDate);
-                               icaltime= get_icaldate_from_tm(&tm);
-                               prop = icalproperty_new_recurrenceid(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-               }
-               
-               /*summary from Subject if subject is set*/
-               if (exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OverrideFlags & 0x0001) {
-                       exchange2ical->Subject=(const char *) &exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->Subject.subject;
-                       ical_property_SUMMARY(exchange2ical);
-               }
-               
-
-               /*Valarm*/
-               /*ReminderSet*/
-               if(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OverrideFlags & 0x0008){
-                       exchange2ical->ReminderSet=(uint8_t *) &exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->ReminderDelta.rSet;
-                       /*Reminder Delta*/
-                       if(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OverrideFlags & 0x0004){
-                               exchange2ical->ReminderDelta=&exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->ReminderDelta.rDelta;
-                       } else {
-                               exchange2ical->ReminderDelta=NULL;
-                       }
-                       ical_component_VALARM(exchange2ical);
-               }
-
-               /*Location*/
-               if(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OverrideFlags & 0x0010){
-                       exchange2ical->Location=(const char *) &exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->Location.location;
-                       ical_property_LOCATION(exchange2ical);
-               }
-               
-               /*Busy Status*/
-               if(exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->OverrideFlags & 0x0020){
-                       exchange2ical->BusyStatus=&exchange2ical->AppointmentRecurrencePattern->ExceptionInfo->BusyStatus.bStatus;
-                       ical_property_X_MICROSOFT_CDO_BUSYSTATUS(exchange2ical);
-               }
-       }
-       return 0;
-}
-
-static uint8_t exchange2ical_exception_from_EmbeddedObj(struct exchange2ical *exchange2ical, struct exchange2ical_check *exchange2ical_check)
-{
-       mapi_object_t                   obj_tb_attach;
-       mapi_object_t                   obj_attach;
-       struct SRowSet                  rowset_attach;
-       struct SPropTagArray            *SPropTagArray;
-       const uint32_t                  *attach_num;
-       struct SPropValue               *lpProps;
-       enum MAPISTATUS                 retval;
-       unsigned int                    i;
-       uint32_t                        count;
-       struct SRow                     aRow2;
-       struct SRow                     aRowT;
-       
-       mapi_object_init(&obj_tb_attach);
-       retval = GetAttachmentTable(&exchange2ical->obj_message, &obj_tb_attach);
-       if (retval != MAPI_E_SUCCESS) {
-               return 1;
-       }else {
-               SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x1, PR_ATTACH_NUM);
-               retval = SetColumns(&obj_tb_attach, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-               retval = QueryRows(&obj_tb_attach, 0xa, TBL_ADVANCE, &rowset_attach);
-
-               for (i = 0; i < rowset_attach.cRows; i++) {
-                       
-                       attach_num = (const uint32_t *)find_SPropValue_data(&(rowset_attach.aRow[i]), PR_ATTACH_NUM);
-                       retval = OpenAttach(&exchange2ical->obj_message, *attach_num, &obj_attach);
-
-                       if (retval != MAPI_E_SUCCESS) {
-                               return 1;
-                       }else {
-                               SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x3,
-                                                                         PR_ATTACH_METHOD,
-                                                                         PR_ATTACHMENT_FLAGS,
-                                                                         PR_ATTACHMENT_HIDDEN
-                                                                         );
-                                                                         
-                               lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-                               retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
-                               MAPIFreeBuffer(SPropTagArray);
-                               if (retval != MAPI_E_SUCCESS) {
-                                       return 1;
-                               }else {
-                                       aRow2.ulAdrEntryPad = 0;
-                                       aRow2.cValues = count;
-                                       aRow2.lpProps = lpProps;
-                                       
-                                       uint32_t        *attachmentFlags;
-                                       uint32_t        *attachMethod;
-                                       uint8_t         *attachmentHidden;
-                                       
-                                       attachmentFlags  = (uint32_t *) octool_get_propval(&aRow2, PR_ATTACHMENT_FLAGS);
-                                       attachMethod     = (uint32_t *) octool_get_propval(&aRow2, PR_ATTACH_METHOD);
-                                       attachmentHidden = (uint8_t *) octool_get_propval(&aRow2, PR_ATTACHMENT_HIDDEN);
-
-                                       if((*attachmentFlags & 0x00000002) 
-                                               && (*attachMethod == 0x00000005) 
-                                               && (attachmentHidden && (*attachmentHidden))) {
-                                       
-                                               struct exchange2ical exception;
-                                               exchange2ical_init(exchange2ical->mem_ctx,&exception);
-                                       
-                                               mapi_object_init(&exception.obj_message);
-                                               
-                                               retval = OpenEmbeddedMessage(&obj_attach, &exception.obj_message, MAPI_READONLY);
-                                               if (retval != MAPI_E_SUCCESS) {
-                                                       return 1;
-                                               }else {                                                 
-                                                       SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x2d,
-                                                                                               PidLidFExceptionalBody,
-                                                                                               PidLidRecurring,
-                                                                                               PidLidAppointmentRecur,
-                                                                                               PidLidAppointmentStateFlags,
-                                                                                               PidLidTimeZoneDescription,
-                                                                                               PidLidTimeZoneStruct,
-                                                                                               PidLidAppointmentStartWhole,
-                                                                                               PidLidAppointmentEndWhole,
-                                                                                               PidLidAppointmentSubType,
-                                                                                               PidLidOwnerCriticalChange,
-                                                                                               PidLidLocation,
-                                                                                               PidLidExceptionReplaceTime,
-                                                                                               PidLidNonSendableBcc,
-                                                                                               PidLidAppointmentSequence,
-                                                                                               PidLidBusyStatus,
-                                                                                               PidLidIntendedBusyStatus,
-                                                                                               PidLidCleanGlobalObjectId,
-                                                                                               PidLidAttendeeCriticalChange,
-                                                                                               PidLidAppointmentReplyTime,
-                                                                                               PidLidAppointmentNotAllowPropose,
-                                                                                               PidLidAllowExternalCheck,
-                                                                                               PidLidAppointmentLastSequence,
-                                                                                               PidLidAppointmentSequenceTime,
-                                                                                               PidLidAutoFillLocation,
-                                                                                               PidLidAutoStartCheck,
-                                                                                               PidLidCollaborateDoc,
-                                                                                               PidLidConferencingCheck,
-                                                                                               PidLidConferencingType,
-                                                                                               PidLidDirectory,
-                                                                                               PidLidNetShowUrl,
-                                                                                               PidLidOnlinePassword,
-                                                                                               PidLidOrganizerAlias,
-                                                                                               PidLidReminderSet,
-                                                                                               PidLidReminderDelta,
-                                                                                               PR_MESSAGE_CLASS_UNICODE,
-                                                                                               PR_BODY_UNICODE,
-                                                                                               PR_CREATION_TIME,
-                                                                                               PR_LAST_MODIFICATION_TIME,
-                                                                                               PR_IMPORTANCE,
-                                                                                               PR_RESPONSE_REQUESTED,
-                                                                                               PR_SUBJECT_UNICODE,
-                                                                                               PR_OWNER_APPT_ID,
-                                                                                               PR_SENDER_NAME,
-                                                                                               PR_SENDER_EMAIL_ADDRESS,
-                                                                                               PR_MESSAGE_LOCALE_ID
-                                                                 );
-                                                                 
-                                                                 
-               
-                                                       retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
-                                                       
-                                                       if (retval == MAPI_E_SUCCESS) { 
-                                                               aRow2.ulAdrEntryPad = 0;
-                                                               aRow2.cValues = count;
-                                                               aRow2.lpProps = lpProps;
-                                                               
-                                                               
-                                                               /*Get required properties to check if right event*/
-                                                               exchange2ical_get_properties(exchange2ical->mem_ctx, &aRow2, &exception, exchange2ical_check->eFlags);
-                                       
-                                                               /*Check to see if event is acceptable*/
-                                                               if (!checkEvent(&exception, exchange2ical_check, get_tm_from_FILETIME(exception.apptStartWhole))){
-                                                                       break;
-                                                               }
-
-                                                               /*Grab Rest of Properties*/
-                                                               exchange2ical_get_properties(exchange2ical->mem_ctx, &aRow2, &exception, exchange2ical_check->eFlags | EntireFlag);
-                                                               uint8_t *dBody = (uint8_t *) octool_get_propval(&aRow2, PidLidFExceptionalBody);
-                                                               retval = GetRecipientTable(&exception.obj_message, 
-                                                                       &exception.Recipients.SRowSet,
-                                                                       &exception.Recipients.SPropTagArray);
-                                                                       
-                                                               /*Check for set subject*/
-                                                               if (!exception.Subject){
-                                                                       exception.Subject=exchange2ical->Subject;
-                                                               }
-                                                               /*Check for a set apptSubType*/
-                                                               if (!exception.apptSubType){
-                                                                       exception.apptSubType=exchange2ical->apptSubType;
-                                                               }
-                                                               /*check for a set Location*/
-                                                               if (!exception.Location){
-                                                                       exception.Location=exchange2ical->Location;
-                                                               }
-                                                               /*check for set valarm info*/
-                                                               if(!exception.ReminderSet){
-                                                                       exception.ReminderSet=exchange2ical->ReminderSet;
-                                                               }
-                                                               if(!exception.ReminderDelta){
-                                                                       exception.ReminderDelta=exchange2ical->ReminderDelta;
-                                                               }
-                                                               
-                                                               /*Set to same vcalendar as parent*/
-                                                               exception.vcalendar=exchange2ical->vcalendar;
-                                                               
-                                                               /*Set to same uid fallback in case GlobalObjId is missing*/
-                                                               exception.idx=exchange2ical->idx;
-                                                               
-                                                               
-                                                               /*has a modified summary*/
-                                                               if(dBody && *dBody){
-                                                                       SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-                                                                       retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
-                                                                       MAPIFreeBuffer(SPropTagArray);
-                                                                       if (retval == MAPI_E_SUCCESS) {
-                                                                               aRowT.ulAdrEntryPad = 0;
-                                                                               aRowT.cValues = count;
-                                                                               aRowT.lpProps = lpProps;
-                                                                               exception.bodyHTML = (const char *)octool_get_propval(&aRowT, PR_BODY_HTML_UNICODE);
-                                                                       }
-                                                               /* has the same summary as parent*/
-                                                               } else{
-                                                                       exception.body=exchange2ical->body;
-                                                                       exception.bodyHTML=exchange2ical->bodyHTML;
-                                                               }
-                                                               
-                                                               ical_component_VEVENT(&exception);
-                                                               exception.vcalendar=NULL;
-                                                               exchange2ical_clear(&exception);
-                                                       }
-                                               }                                                       
-                                               mapi_object_release(&exception.obj_message);
-                                       }
-                                       MAPIFreeBuffer(lpProps);
-                               }
-                       }
-                       
-               }
-
-       }
-       mapi_object_release(&obj_tb_attach);
-       return 0;       
-}
-
-icalcomponent * _Exchange2Ical(mapi_object_t *obj_folder, struct exchange2ical_check *exchange2ical_check)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       int                             ret;
-       struct SRowSet                  SRowSet;
-       struct SRow                     aRow;
-       struct SRow                     aRowT;
-       struct SPropValue               *lpProps;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct exchange2ical            exchange2ical;
-       mapi_object_t                   obj_table;
-       uint32_t                        count;
-       int                             i;
-
-       mem_ctx = talloc_named(NULL, 0, "exchange2ical");
-       exchange2ical_init(mem_ctx, &exchange2ical);
-       
-       /* Open the contents table */
-       mapi_object_init(&obj_table);
-       retval = GetContentsTable(obj_folder, &obj_table, 0, &count);
-       if (retval != MAPI_E_SUCCESS){
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-       
-       DEBUG(0, ("MAILBOX (%d appointments)\n", count));
-       if (count == 0) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
-                                         PR_FID,
-                                         PR_MID);
-                                         
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("SetColumns", retval);
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-       
-       while ((retval = QueryRows(&obj_table, count, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND && SRowSet.cRows) {
-               count -= SRowSet.cRows;
-               for (i = (SRowSet.cRows-1); i >= 0; i--) {
-                       mapi_object_init(&exchange2ical.obj_message);
-                       retval = OpenMessage(obj_folder,
-                                            SRowSet.aRow[i].lpProps[0].value.d,
-                                            SRowSet.aRow[i].lpProps[1].value.d,
-                                            &exchange2ical.obj_message, 0);
-                       if (retval != MAPI_E_NOT_FOUND) {
-                               SPropTagArray = set_SPropTagArray(mem_ctx, 0x30,
-                                                                 PidLidGlobalObjectId,
-                                                                 PidNameKeywords,
-                                                                 PidLidRecurring,
-                                                                 PidLidAppointmentRecur,
-                                                                 PidLidAppointmentStateFlags,
-                                                                 PidLidTimeZoneDescription,
-                                                                 PidLidTimeZoneStruct,
-                                                                 PidLidContacts,
-                                                                 PidLidAppointmentStartWhole,
-                                                                 PidLidAppointmentEndWhole,
-                                                                 PidLidAppointmentSubType,
-                                                                 PidLidOwnerCriticalChange,
-                                                                 PidLidLocation,
-                                                                 PidLidNonSendableBcc,
-                                                                 PidLidAppointmentSequence,
-                                                                 PidLidBusyStatus,
-                                                                 PidLidIntendedBusyStatus,
-                                                                 PidLidAttendeeCriticalChange,
-                                                                 PidLidAppointmentReplyTime,
-                                                                 PidLidAppointmentNotAllowPropose,
-                                                                 PidLidAllowExternalCheck,
-                                                                 PidLidAppointmentLastSequence,
-                                                                 PidLidAppointmentSequenceTime,
-                                                                 PidLidAutoFillLocation,
-                                                                 PidLidAutoStartCheck,
-                                                                 PidLidCollaborateDoc,
-                                                                 PidLidConferencingCheck,
-                                                                 PidLidConferencingType,
-                                                                 PidLidDirectory,
-                                                                 PidLidMeetingWorkspaceUrl,
-                                                                 PidLidNetShowUrl,
-                                                                 PidLidOnlinePassword,
-                                                                 PidLidOrganizerAlias,
-                                                                 PidLidReminderSet,
-                                                                 PidLidReminderDelta,
-                                                                 PidLidResponseStatus,
-                                                                 PR_MESSAGE_CLASS_UNICODE,
-                                                                 PR_SENSITIVITY,
-                                                                 PR_BODY_UNICODE,
-                                                                 PR_CREATION_TIME,
-                                                                 PR_LAST_MODIFICATION_TIME,
-                                                                 PR_IMPORTANCE,
-                                                                 PR_RESPONSE_REQUESTED,
-                                                                 PR_SUBJECT_UNICODE,
-                                                                 PR_OWNER_APPT_ID,
-                                                                 PR_SENDER_NAME,
-                                                                 PR_SENDER_EMAIL_ADDRESS,
-                                                                 PR_MESSAGE_LOCALE_ID
-                                                                 );
-                                                                 
-                                                                 
-                               retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
-
-                               MAPIFreeBuffer(SPropTagArray);
-       
-                               if (retval == MAPI_E_SUCCESS) {
-                                       aRow.ulAdrEntryPad = 0;
-                                       aRow.cValues = count;
-                                       aRow.lpProps = lpProps;
-                                       
-                                       /*Get Vcal info if first event*/
-                                       if(i==(SRowSet.cRows-1)){
-                                               ret = exchange2ical_get_properties(mem_ctx, &aRow, &exchange2ical, VcalFlag);
-                                               /*TODO: exit nicely*/
-                                               ical_component_VCALENDAR(&exchange2ical);
-                                       }
-                                       
-                                       
-                                       /*Get required properties to check if right event*/
-                                       ret = exchange2ical_get_properties(mem_ctx, &aRow, &exchange2ical, exchange2ical_check->eFlags);
-                                       
-                                       /*Check to see if event is acceptable*/
-                                       if (!checkEvent(&exchange2ical, exchange2ical_check, get_tm_from_FILETIME(exchange2ical.apptStartWhole))){
-                                               continue;
-                                       }
-                                       
-                                       /*Set RecipientTable*/
-                                       retval = GetRecipientTable(&exchange2ical.obj_message, 
-                                                          &exchange2ical.Recipients.SRowSet,
-                                                          &exchange2ical.Recipients.SPropTagArray);
-                                       
-                                       /*Set PR_BODY_HTML for x_alt_desc property*/
-                                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-                                       retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
-                                       MAPIFreeBuffer(SPropTagArray);
-                                       if (retval == MAPI_E_SUCCESS) {
-                                               aRowT.ulAdrEntryPad = 0;
-                                               aRowT.cValues = count;
-                                               aRowT.lpProps = lpProps;
-                                               exchange2ical.bodyHTML = (const char *)octool_get_propval(&aRowT, PR_BODY_HTML_UNICODE);
-                                       }
-                                       
-                                       /*Get rest of properties*/
-                                       ret = exchange2ical_get_properties(mem_ctx, &aRow, &exchange2ical, (exchange2ical_check->eFlags | EntireFlag));
-                                       
-                                       /*add new vevent*/
-                                       ical_component_VEVENT(&exchange2ical);
-                                       
-                                       /*Exceptions to event*/
-                                       if(exchange2ical_check->eFlags != EventFlag){
-                                               ret = exchange2ical_exception_from_EmbeddedObj(&exchange2ical, exchange2ical_check);
-                                               if (ret){
-                                                       ret=exchange2ical_exception_from_ExceptionInfo(&exchange2ical, exchange2ical_check);
-                                               }
-                                       }
-                                       
-                                       /*REMOVE once globalobjid is fixed*/
-                                       exchange2ical.idx++;
-                                       
-                                       MAPIFreeBuffer(lpProps);
-                                       exchange2ical_reset(&exchange2ical);
-                               }
-                               
-                       }
-                       mapi_object_release(&exchange2ical.obj_message);
-               }
-       }
-
-       icalcomponent *icalendar = exchange2ical.vcalendar;
-       exchange2ical_clear(&exchange2ical);
-       
-       /* Uninitialize MAPI subsystem */
-       mapi_object_release(&obj_table);
-       talloc_free(mem_ctx);   
-       return icalendar;
-}
diff --git a/branches/plugfest/libexchange2ical/exchange2ical.h b/branches/plugfest/libexchange2ical/exchange2ical.h
deleted file mode 100644 (file)
index c884a90..0000000
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
-   Convert Exchange appointments to ICAL
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __EXCHANGE2ICAL_H_
-#define        __EXCHANGE2ICAL_H_
-
-#include "libmapi/libmapi.h"
-#include <gen_ndr/ndr_property.h>
-#include "utils/openchange-tools.h"
-
-#include <libical/ical.h>
-
-#include <time.h>
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-
-struct message_recipients {
-       struct SRowSet                  SRowSet;
-       struct SPropTagArray            SPropTagArray;
-};
-
-enum exchange2ical_flags{
-       EntireFlag =    0x00001,
-       RangeFlag =     0x00010,
-       VcalFlag =      0x00100,
-       EventFlag =     0x01000,
-       EventsFlag =    0x10000
-};
-
-struct exchange2ical_check {
-       enum exchange2ical_flags eFlags;
-       struct tm *begin;
-       struct tm *end;
-       struct GlobalObjectId *GlobalObjectId;
-       uint32_t Sequence;
-};
-
-struct exchange2ical {
-       TALLOC_CTX                              *mem_ctx;
-       struct message_recipients               Recipients;
-       enum icalproperty_method                method;
-       enum icalparameter_partstat             partstat;
-       uint32_t                                *ResponseStatus;
-       uint8_t                                 *Recurring;
-       struct RecurrencePattern                *RecurrencePattern;
-       struct TimeZoneStruct                   *TimeZoneStruct;
-       const char                              *TimeZoneDesc;
-       const struct StringArray_r              *Keywords;
-       const struct StringArray_r              *Contacts;
-       uint32_t                                *apptStateFlags;
-       uint32_t                                *sensitivity;
-       uint32_t                                *Importance;
-       const struct FILETIME                   *created;
-       const char                              *body;
-       const struct FILETIME                   *apptStartWhole;
-       const struct FILETIME                   *apptEndWhole;
-       const struct FILETIME                   *OwnerCriticalChange;
-       const struct FILETIME                   *LastModified;
-       const struct FILETIME                   *ExceptionReplaceTime;
-       uint8_t                                 *apptSubType;
-       const char                              *Location;       
-       uint8_t                                 *ResponseRequested;
-       const char                              *NonSendableBcc;
-       uint32_t                                *Sequence;
-       const char                              *Subject;
-       uint32_t                                *MessageLocaleId;
-       uint32_t                                *BusyStatus;
-       uint32_t                                *IntendedBusyStatus;
-       struct Binary_r                         *GlobalObjectId;
-       const struct FILETIME                   *AttendeeCriticalChange;
-       uint32_t                                *OwnerApptId;
-       const struct FILETIME                   *apptReplyTime;
-       uint8_t                                 *NotAllowPropose;
-       uint8_t                                 *AllowExternCheck;
-       uint32_t                                *apptLastSequence;
-       const struct FILETIME                   *apptSeqTime;
-       uint8_t                                 *AutoFillLocation;
-       uint8_t                                 *AutoStartCheck;
-       const char                              *CollaborateDoc;
-       uint8_t                                 *ConfCheck;
-       uint32_t                                *ConfType;
-       const char                              *Directory;
-       const char                              *MWSURL;
-       const char                              *NetShowURL;
-       const char                              *OnlinePassword;
-       const char                              *OrgAlias;
-       const char                              *SenderName;
-       const char                              *SenderEmailAddress;
-       uint8_t                                 *ReminderSet;
-       uint32_t                                *ReminderDelta; 
-       icalcomponent                           *vcalendar;
-       icalcomponent                           *vevent;
-       icalcomponent                           *vtimezone;
-       icalcomponent                           *valarm;
-       mapi_object_t                           obj_message;
-       const char                              *bodyHTML;
-       uint32_t                                idx;
-       struct  AppointmentRecurrencePattern    *AppointmentRecurrencePattern;
-};
-
-
-struct ical_method {
-       enum icalproperty_method        method;
-       enum icalparameter_partstat     partstat;
-       const char                      *PidTagMessageClass;
-};
-
-struct ical_calendartype {
-       uint16_t        type;
-       const char      *calendar;
-};
-
-struct ical_day {
-       enum icalrecurrencetype_weekday ical;
-       enum FirstDOW exchange;
-       uint32_t rdfDays;
-
-};
-
-struct ical_class {
-       uint32_t                sensivity;
-       enum icalproperty_class classtype;
-};
-
-
-#define        OPENCHANGE_ICAL_PRODID  "-//OpenChange Project/exchange2ical MIMEDIR//EN"
-#define        OPENCHANGE_ICAL_VERSION "2.0"
-
-__BEGIN_DECLS
-
-/* definitions from exchang2ical.c */
-icalcomponent * _Exchange2Ical(mapi_object_t *, struct exchange2ical_check *);
-
-
-/* definitions from exchange2ical_utils.c */
-struct icaltimetype get_icaltime_from_FILETIME(const struct FILETIME *);
-struct icaltimetype get_icaltime_from_FILETIME_UTC(const struct FILETIME *);
-struct icaltimetype get_icaldate_from_FILETIME(const struct FILETIME *);
-struct tm *get_tm_from_FILETIME(const struct FILETIME *);
-struct icaltimetype get_icaldate_from_tm(struct tm *);
-struct icaltimetype get_icaltimetype_from_tm_UTC(struct tm *);
-struct icaltimetype get_icaltimetype_from_tm(struct tm *);
-struct FILETIME get_FILETIME_from_string(const char *);
-struct FILETIME get_FILETIME_from_icaltimetype(icaltimetype *);
-struct tm get_tm_from_minutes(uint32_t);
-struct tm get_tm_from_minutes_UTC(uint32_t);
-struct icaltimetype get_icaldate_from_GlobalObjectId(struct GlobalObjectId *);
-NTTIME FILETIME_to_NTTIME(struct FILETIME);
-enum icalproperty_method get_ical_method(const char *);
-enum icalparameter_partstat get_ical_partstat(const char *);
-enum icalproperty_class get_ical_class(uint32_t);
-enum icalparameter_partstat get_ical_partstat_from_status(uint32_t);
-enum FirstDOW get_exchange_day_from_ical(enum icalrecurrencetype_weekday);
-uint8_t set_exception_from_ExceptionInfo(struct exchange2ical *, struct exchange2ical_check *);
-uint8_t set_exception_from_EmbeddedObj(struct exchange2ical *, struct exchange2ical_check *);
-bool checkEvent(struct exchange2ical *, struct exchange2ical_check *, struct tm *);
-bool compareGlobalObjectIds(struct GlobalObjectId *, struct GlobalObjectId *);
-bool has_component_DAYLIGHT(struct exchange2ical *);
-uint16_t get_exchange_calendartype(const char *);
-uint32_t get_minutes_from_icaltimetype(icaltimetype);
-uint32_t get_exchange_rdfDays_from_ical(enum icalrecurrencetype_weekday);
-const char *get_ical_calendartype(uint16_t);
-char *get_ical_date(TALLOC_CTX *, struct SYSTEMTIME *);
-int compare_minutes(const void *, const void *);
-
-/* definitions from exchange2ical_component.c */
-void ical_component_VCALENDAR(struct exchange2ical *);
-void ical_component_VEVENT(struct exchange2ical *);
-void ical_component_VTIMEZONE(struct exchange2ical *);
-void ical_component_STANDARD(struct exchange2ical *);
-void ical_component_DAYLIGHT(struct exchange2ical *);
-void ical_component_VALARM(struct exchange2ical *);
-
-
-/* definitions from exchange2ical_property.c */
-void ical_property_ATTACH(struct exchange2ical *);
-void ical_property_ATTENDEE(struct exchange2ical *);
-void ical_property_CATEGORIES(struct exchange2ical *);
-void ical_property_CLASS(struct exchange2ical *);
-void ical_property_CONTACT(struct exchange2ical *);
-void ical_property_CREATED(struct exchange2ical *);
-void ical_property_DTEND(struct exchange2ical *);
-void ical_property_DTSTAMP(struct exchange2ical *);
-void ical_property_DTSTART(struct exchange2ical *);
-void ical_property_DESCRIPTION(struct exchange2ical *);
-void ical_property_EXDATE(struct exchange2ical *);
-void ical_property_LAST_MODIFIED(struct exchange2ical *);
-void ical_property_LOCATION(struct exchange2ical *);
-void ical_property_ORGANIZER(struct exchange2ical *);
-void ical_property_PRIORITY(struct exchange2ical *);
-void ical_property_RDATE(struct exchange2ical *);
-void ical_property_RRULE_Daily(struct exchange2ical *);
-void ical_property_RRULE_Weekly(struct exchange2ical *);
-void ical_property_RRULE_Monthly(struct exchange2ical *);
-void ical_property_RRULE_NthMonthly(struct exchange2ical *);
-void ical_property_RRULE_Yearly(struct exchange2ical *);
-void ical_property_RRULE_NthYearly(struct exchange2ical *);
-void ical_property_RRULE(struct exchange2ical *);
-void ical_property_RRULE_daylight_standard(icalcomponent*, struct SYSTEMTIME);
-void ical_property_RECURRENCE_ID(struct exchange2ical *);
-void ical_property_RESOURCES(struct exchange2ical *);
-void ical_property_SEQUENCE(struct exchange2ical *);
-void ical_property_SUMMARY(struct exchange2ical *);
-void ical_property_TRANSP(struct exchange2ical *);
-void ical_property_TRIGGER(struct exchange2ical *);
-void ical_property_UID(struct exchange2ical *);
-void ical_property_X_ALT_DESC(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_ATTENDEE_CRITICAL_CHANGE(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_BUSYSTATUS(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_INTENDEDSTATUS(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_OWNERAPPTID(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_OWNER_CRITICAL_CHANGE(struct exchange2ical *);
-void ical_property_X_MICROSOFT_CDO_REPLYTIME(struct exchange2ical *);
-void ical_property_X_MICROSOFT_DISALLOW_COUNTER(struct exchange2ical *);
-void ical_property_X_MS_OLK_ALLOWEXTERNCHECK(struct exchange2ical *);
-void ical_property_X_MS_OLK_APPTLASTSEQUENCE(struct exchange2ical *);
-void ical_property_X_MS_OLK_APPTSEQTIME(struct exchange2ical *);
-void ical_property_X_MS_OLK_AUTOFILLLOCATION(struct exchange2ical *);
-void ical_property_X_MS_OLK_AUTOSTARTCHECK(struct exchange2ical *);
-void ical_property_X_MS_OLK_COLLABORATEDOC(struct exchange2ical *);
-void ical_property_X_MS_OLK_CONFCHECK(struct exchange2ical *);
-void ical_property_X_MS_OLK_CONFTYPE(struct exchange2ical *);
-void ical_property_X_MS_OLK_DIRECTORY(struct exchange2ical *);
-void ical_property_X_MS_OLK_MWSURL(struct exchange2ical *);
-void ical_property_X_MS_OLK_NETSHOWURL(struct exchange2ical *);
-void ical_property_X_MS_OLK_ONLINEPASSWORD(struct exchange2ical *);
-void ical_property_X_MS_OLK_ORGALIAS(struct exchange2ical *);
-void ical_property_X_MS_OLK_SENDER(struct exchange2ical *);
-void ical_property_X_MICROSOFT_MSNCALENDAR_IMPORTANCE(struct exchange2ical *);
-
-
-struct ical2exchange{
-       TALLOC_CTX                              *mem_ctx;
-       enum icalproperty_method        method;
-       icalproperty                    *classProp;
-       icalproperty                    *commentProp;
-       icalproperty                    *descriptionProp;
-       icalproperty                    *dtendProp;
-       icalproperty                    *dtstampProp;
-       icalproperty                    *dtstartProp;
-       icalproperty                    *durationProp;
-       icalproperty                    *locationProp;
-       icalproperty                    *organizerProp;
-       icalproperty                    *priorityProp;
-       icalproperty                    *recurrenceidProp;
-       icalproperty                    *rruleProp;
-       icalproperty                    *sequenceProp;
-       icalproperty                    *statusProp;
-       icalproperty                    *summaryProp;
-       icalproperty                    *transpProp;
-       icalproperty                    *uidProp;
-       
-       uint32_t                        rdateCount;
-       uint32_t                        exdateCount;
-       
-       /*              x properties                            */
-       icalproperty                    *x_busystatusProp;
-       icalproperty                    *x_sequenceProp;
-       icalproperty                    *x_importanceProp;
-       icalproperty                    *x_intendedProp;
-       icalproperty                    *x_ownerapptidProp;
-       icalproperty                    *x_attendeecriticalchangeProp;
-       icalproperty                    *x_replytimeProp;
-       icalproperty                    *x_disallowcounterProp;
-       icalproperty                    *x_isdraftProp;
-       icalproperty                    *x_allowexterncheckProp;
-       icalproperty                    *x_apptlastsequenceProp;
-       icalproperty                    *x_apptseqtimeProp;
-       icalproperty                    *x_autofilllocationProp;
-       icalproperty                    *x_autostartcheckProp;
-       icalproperty                    *x_confcheckProp;
-       icalproperty                    *x_collaborateddocProp;
-       icalproperty                    *x_conftypeProp;
-       icalproperty                    *x_mwsurlProp;
-       icalproperty                    *x_netshowurlProp;
-       icalproperty                    *x_onlinepasswordProp;
-       icalproperty                    *x_originalstartProp;
-       icalproperty                    *x_originalendProp;
-       icalproperty                    *x_orgaliasProp;
-       icalproperty                    *x_ownercriticalchangeProp;
-                               
-       
-       /*              Events                                  */
-       icalcomponent                   *attachEvent;
-       icalcomponent                   *attendeeEvent;
-       icalcomponent                   *categoriesEvent;
-       icalcomponent                   *contactEvent;
-       icalcomponent                   *exdateEvent;
-       icalcomponent                   *rdateEvent;
-       icalcomponent                   *resourcesEvent;
-       icalcomponent                   *valarmEvent;
-       
-       mapi_object_t                   *obj_message;
-       struct SPropValue               *lpProps;
-       uint32_t                        cValues;
-
-};
-
-
-/*ical2exchange file*/
-void _IcalEvent2Exchange(mapi_object_t *, icalcomponent *);
-
-
-/*ical2exchange_property*/
-void ical2exchange_property_ATTACH(struct ical2exchange *);
-//TODO ATTENDEE, ORGANIZER, x_ms_ok_sender
-void ical2exchange_property_CATEGORIES(struct ical2exchange *);
-void ical2exchange_property_CLASS(struct ical2exchange *);
-void ical2exchange_property_COMMENT(struct ical2exchange *);
-void ical2exchange_property_CONTACT(struct ical2exchange *);
-void ical2exchange_property_DESCRIPTION(struct ical2exchange *);
-void ical2exchange_property_DTSTAMP(struct ical2exchange *);
-void ical2exchange_property_DTSTART_DTEND(struct ical2exchange *);
-void ical2exchange_property_LOCATION(struct ical2exchange *);
-void ical2exchange_property_PRIORITY(struct ical2exchange *);
-void ical2exchange_property_RRULE_EXDATE_RDATE(struct ical2exchange *);
-void ical2exchange_property_SEQUENCE(struct ical2exchange *);
-void ical2exchange_property_STATUS(struct ical2exchange *);
-void ical2exchange_property_SUMMARY(struct ical2exchange *);
-void ical2exchange_property_VALARM(struct ical2exchange *);
-void ical2exchange_property_X_ALLOWEXTERNCHECK(struct ical2exchange *);
-void ical2exchange_property_X_APPTSEQTIME(struct ical2exchange *);
-void ical2exchange_property_X_APPTLASTSEQUENCE(struct ical2exchange *);
-void ical2exchange_property_X_ATTENDEE_CRITICAL_CHANGE(struct ical2exchange *);
-void ical2exchange_property_X_AUTOFILLLOCATION(struct ical2exchange *);
-void ical2exchange_property_X_AUTOSTARTCHECK(struct ical2exchange *);
-void ical2exchange_property_X_COLLABORATEDDOC(struct ical2exchange *);
-void ical2exchange_property_X_CONFCHECK(struct ical2exchange *);
-void ical2exchange_property_X_CONFTYPE(struct ical2exchange *);
-void ical2exchange_property_X_DISALLOW_COUNTER(struct ical2exchange *);
-void ical2exchange_property_X_INTENDEDSTATUS(struct ical2exchange *);
-void ical2exchange_property_X_ISDRAFT(struct ical2exchange *);
-void ical2exchange_property_X_MWSURL(struct ical2exchange *);
-void ical2exchange_property_X_NETSHOWURL(struct ical2exchange *);
-void ical2exchange_property_X_ONLINEPASSWORD(struct ical2exchange *);
-void ical2exchange_property_X_ORGALIAS(struct ical2exchange *);
-void ical2exchange_property_X_ORIGINALEND_ORIGINALSTART(struct ical2exchange *);
-void ical2exchange_property_X_OWNER_CRITICAL_CHANGE(struct ical2exchange *);
-void ical2exchange_property_X_OWNERAPPTID(struct ical2exchange *);
-void ical2exchange_property_X_REPLYTIME(struct ical2exchange *);
-
-
-__END_DECLS
-
-#endif /* __EXCHANGE2ICAL_H_ */
diff --git a/branches/plugfest/libexchange2ical/exchange2ical_component.c b/branches/plugfest/libexchange2ical/exchange2ical_component.c
deleted file mode 100644 (file)
index f169c2a..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
-   Convert Exchange appointments and meetings to ICAL files
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "libexchange2ical/libexchange2ical.h"
-#include <libical/icalderivedproperty.h>
-
-/*
-   VCALENDAR component
- */
-void ical_component_VCALENDAR(struct exchange2ical *exchange2ical)
-{
-       icalproperty* prop;
-       
-       exchange2ical->vcalendar = icalcomponent_new_vcalendar();
-       if (!(exchange2ical->vcalendar)) {
-               return;
-       }
-
-       prop = icalproperty_new_version(OPENCHANGE_ICAL_VERSION);
-       icalcomponent_add_property(exchange2ical->vcalendar, prop);
-
-       prop = icalproperty_new_prodid(OPENCHANGE_ICAL_PRODID);
-       icalcomponent_add_property(exchange2ical->vcalendar, prop);
-
-       prop = icalproperty_new_method(exchange2ical->method);
-       icalcomponent_add_property(exchange2ical->vcalendar, prop);
-
-
-       if (exchange2ical->RecurrencePattern && exchange2ical->RecurrencePattern->CalendarType) {
-               prop = icalproperty_new_x(get_ical_calendartype(exchange2ical->RecurrencePattern->CalendarType));
-               icalproperty_set_x_name(prop, "X-MICROSOFT-CALSCALE");
-               icalcomponent_add_property(exchange2ical->vcalendar, prop);
-       }
-
-       ical_component_VTIMEZONE(exchange2ical);
-}
-
-/*
-   VEVENT component
- */
-void ical_component_VEVENT(struct exchange2ical *exchange2ical)
-{
-       exchange2ical->vevent = icalcomponent_new_vevent();
-       if ( ! (exchange2ical->vevent) ) {
-               return;
-       }
-       
-       icalcomponent_add_component(exchange2ical->vcalendar, exchange2ical->vevent);
-       ical_property_ATTACH(exchange2ical);
-       ical_property_ATTENDEE(exchange2ical);
-       ical_property_CATEGORIES(exchange2ical);
-       ical_property_CLASS(exchange2ical);
-       ical_property_CONTACT(exchange2ical);
-       ical_property_CREATED(exchange2ical);
-       ical_property_DESCRIPTION(exchange2ical);
-       ical_property_DTEND(exchange2ical);
-       ical_property_DTSTAMP(exchange2ical);
-       ical_property_DTSTART(exchange2ical);
-       ical_property_RECURRENCE_ID(exchange2ical);
-       ical_property_EXDATE(exchange2ical);
-       ical_property_LAST_MODIFIED(exchange2ical);
-       ical_property_LOCATION(exchange2ical);
-       ical_property_ORGANIZER(exchange2ical);
-       ical_property_PRIORITY(exchange2ical);
-       /*All possible RDATE properties are now exported as separate vevents.
-       No longer a need for it*/
-       //ical_property_RDATE(exchange2ical);
-       ical_property_RRULE(exchange2ical);
-       ical_property_RESOURCES(exchange2ical);
-       ical_property_SEQUENCE(exchange2ical);
-       ical_property_SUMMARY(exchange2ical);
-       ical_property_TRANSP(exchange2ical);
-       ical_property_UID(exchange2ical);
-       ical_property_X_ALT_DESC(exchange2ical);
-       ical_property_X_MICROSOFT_CDO_ATTENDEE_CRITICAL_CHANGE(exchange2ical);
-       ical_property_X_MICROSOFT_CDO_BUSYSTATUS(exchange2ical);
-       /* Looks like this is no longer supposed to be used, and is ignored by most Outlook versions */
-       /* ical_property_X_MICROSOFT_MSNCALENDAR_IMPORTANCE(exchange2ical); */
-       ical_property_X_MICROSOFT_CDO_INTENDEDSTATUS(exchange2ical);
-       ical_property_X_MICROSOFT_CDO_OWNERAPPTID(exchange2ical);
-       ical_property_X_MICROSOFT_CDO_OWNER_CRITICAL_CHANGE(exchange2ical);
-       ical_property_X_MICROSOFT_CDO_REPLYTIME(exchange2ical);
-       ical_property_X_MICROSOFT_DISALLOW_COUNTER(exchange2ical);
-       ical_property_X_MS_OLK_ALLOWEXTERNCHECK(exchange2ical);
-       ical_property_X_MS_OLK_APPTLASTSEQUENCE(exchange2ical);
-       ical_property_X_MS_OLK_APPTSEQTIME(exchange2ical);
-       ical_property_X_MS_OLK_AUTOFILLLOCATION(exchange2ical);
-       ical_property_X_MS_OLK_AUTOSTARTCHECK(exchange2ical);
-       ical_property_X_MS_OLK_COLLABORATEDOC(exchange2ical);
-       ical_property_X_MS_OLK_CONFCHECK(exchange2ical);
-       ical_property_X_MS_OLK_CONFTYPE(exchange2ical);
-       ical_property_X_MS_OLK_DIRECTORY(exchange2ical);
-       ical_property_X_MS_OLK_MWSURL(exchange2ical);
-       ical_property_X_MS_OLK_NETSHOWURL(exchange2ical);
-       ical_property_X_MS_OLK_ONLINEPASSWORD(exchange2ical);
-       ical_property_X_MS_OLK_ORGALIAS(exchange2ical);
-       ical_property_X_MS_OLK_SENDER(exchange2ical);
-       ical_component_VALARM(exchange2ical);
-}
-
-/*
-   VTIMEZONE component
- */
-void ical_component_VTIMEZONE(struct exchange2ical *exchange2ical)
-{
-       exchange2ical->vtimezone = icalcomponent_new_vtimezone();
-
-       /* TZID property */
-       if (exchange2ical->TimeZoneDesc) {
-               icalproperty *tzid = icalproperty_new_tzid(exchange2ical->TimeZoneDesc);
-               icalcomponent_add_property(exchange2ical->vtimezone, tzid);
-       }
-       /* STANDARD sub-component */
-       if (exchange2ical->TimeZoneStruct) {
-               icalcomponent_add_component(exchange2ical->vcalendar, exchange2ical->vtimezone);
-               ical_component_STANDARD(exchange2ical);
-
-               if (has_component_DAYLIGHT(exchange2ical)) {
-                       ical_component_DAYLIGHT(exchange2ical);
-               }
-       } else {
-               icalcomponent_free(exchange2ical->vtimezone);
-       }
-}
-
-/*
-   STANDARD sub-component
- */
-void ical_component_STANDARD(struct exchange2ical *exchange2ical)
-{
-       char            *dtstart = NULL;
-       int32_t         tzoffsetfrom;
-       int32_t         tzoffsetto;
-       icalcomponent   *standard;
-       icalproperty    *prop;
-
-       standard = icalcomponent_new_xstandard();
-       icalcomponent_add_component(exchange2ical->vtimezone, standard);
-
-       /* DTSTART property */
-       dtstart = get_ical_date(exchange2ical->mem_ctx, &(exchange2ical->TimeZoneStruct->stStandardDate));
-       if (dtstart) {
-               prop = icalproperty_new_dtstart(icaltime_from_string(dtstart));
-               icalcomponent_add_property(standard, prop);
-               talloc_free(dtstart);
-       }
-
-       /* RRULE Property */
-       if (has_component_DAYLIGHT(exchange2ical)){
-               ical_property_RRULE_daylight_standard(standard,exchange2ical->TimeZoneStruct->stStandardDate);
-       }
-       
-       /* TZOFFSETFROM property */
-       tzoffsetfrom = (-60 * (exchange2ical->TimeZoneStruct->lBias + exchange2ical->TimeZoneStruct->lDaylightBias));
-       prop = icalproperty_new_tzoffsetfrom(tzoffsetfrom);
-       icalcomponent_add_property(standard, prop);
-
-       /* TZOFFSETTO property */
-       tzoffsetto = (-60 * (exchange2ical->TimeZoneStruct->lBias + exchange2ical->TimeZoneStruct->lStandardBias));
-       prop = icalproperty_new_tzoffsetto(tzoffsetto);
-       icalcomponent_add_property(standard, prop);
-}
-
-
-/*
-   DAYLIGHT sub-component
- */
-void ical_component_DAYLIGHT(struct exchange2ical *exchange2ical)
-{
-       char            *dtstart = NULL;
-       int32_t         tzoffsetfrom;
-       int32_t         tzoffsetto;
-       icalcomponent   *daylight;
-       icalproperty    *prop;
-
-       daylight = icalcomponent_new_xdaylight();
-       icalcomponent_add_component(exchange2ical->vtimezone, daylight);
-
-       /* DTSTART property */
-       dtstart = get_ical_date(exchange2ical->mem_ctx, &exchange2ical->TimeZoneStruct->stDaylightDate);
-       if (dtstart) {
-               prop = icalproperty_new_dtstart(icaltime_from_string(dtstart));
-               icalcomponent_add_property(daylight, prop);
-               talloc_free(dtstart);
-       }
-       
-       /* RRULE property */
-       ical_property_RRULE_daylight_standard(daylight,exchange2ical->TimeZoneStruct->stDaylightDate);
-       
-       /* TZOFFSETFROM property */
-       tzoffsetfrom = (-60 * (exchange2ical->TimeZoneStruct->lBias + exchange2ical->TimeZoneStruct->lStandardBias));
-       prop = icalproperty_new_tzoffsetfrom(tzoffsetfrom);
-       icalcomponent_add_property(daylight, prop);
-
-       /* TZOFFSETTO property */
-       tzoffsetto = (-60 * (exchange2ical->TimeZoneStruct->lBias + exchange2ical->TimeZoneStruct->lDaylightBias));
-       prop = icalproperty_new_tzoffsetto(tzoffsetto);
-       icalcomponent_add_property(daylight, prop);
-}
-
-
-/*
-   VALARM component
-
-   [MS-OXCICAL], Section 2.2.1.20.61 
- */
-void ical_component_VALARM(struct exchange2ical *exchange2ical)
-{
-       icalproperty *action;
-       icalproperty *description;
-
-       /* Sanity check */
-       if (!exchange2ical->vevent) return;
-       if (!exchange2ical->ReminderSet) return;
-       if (*exchange2ical->ReminderSet == false) return;
-
-       exchange2ical->valarm = icalcomponent_new_valarm();
-       if (!(exchange2ical->valarm)) {
-               printf("could not create new valarm\n");
-               return;
-       }
-       icalcomponent_add_component(exchange2ical->vevent, exchange2ical->valarm);
-       ical_property_TRIGGER(exchange2ical);
-       action = icalproperty_new_action(ICAL_ACTION_DISPLAY);
-       icalcomponent_add_property(exchange2ical->valarm, action);
-       description = icalproperty_new_description("Reminder");
-       icalcomponent_add_property(exchange2ical->valarm, description);
-}
diff --git a/branches/plugfest/libexchange2ical/exchange2ical_property.c b/branches/plugfest/libexchange2ical/exchange2ical_property.c
deleted file mode 100644 (file)
index 8f00111..0000000
+++ /dev/null
@@ -1,1475 +0,0 @@
-/*
-   Convert Exchange appointments and meetings to ICAL files
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-#include <ldb.h>
-
-struct RRULE_byday {
-       uint16_t        DayOfWeek;
-       const char      *DayName;
-};
-
-static const struct RRULE_byday RRULE_byday[] = {
-       { 0x0000,       "SU" },
-       { 0x0001,       "MO" },
-       { 0x0002,       "TU" },
-       { 0x0003,       "WE" },
-       { 0x0004,       "TH" },
-       { 0x0005,       "FR" },
-       { 0x0006,       "SA" },
-       { 0x0007,       NULL }
-};
-
-static const char *get_filename(const char *filename)
-{
-       const char *substr;
-
-       if (!filename) return NULL;
-
-       substr = rindex(filename, '/');
-       if (substr) return substr;
-
-       return filename;
-}
-
-
-void ical_property_ATTACH(struct exchange2ical *exchange2ical)
-{
-       mapi_object_t                   obj_tb_attach;
-       mapi_object_t                   obj_attach;
-       mapi_object_t                   obj_stream;
-       struct SRowSet                  rowset_attach;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       const uint32_t                  *attach_num = NULL;
-       struct SPropValue               *lpProps;
-       enum MAPISTATUS                 retval;
-       unsigned int                    i;
-       uint32_t                        count;
-       struct SRow                     aRow2;
-
-       
-       mapi_object_init(&obj_tb_attach);
-       retval = GetAttachmentTable(&exchange2ical->obj_message, &obj_tb_attach);
-       if (retval == MAPI_E_SUCCESS) {
-               SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x1, PR_ATTACH_NUM);
-               retval = SetColumns(&obj_tb_attach, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-               retval = QueryRows(&obj_tb_attach, 0xa, TBL_ADVANCE, &rowset_attach);
-               
-               for (i = 0; i < rowset_attach.cRows; i++) {
-                       attach_num = (const uint32_t *)find_SPropValue_data(&(rowset_attach.aRow[i]), PR_ATTACH_NUM);
-                       retval = OpenAttach(&exchange2ical->obj_message, *attach_num, &obj_attach);
-
-                       if (retval == MAPI_E_SUCCESS) {
-
-                               SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x7,
-                                                                         PR_ATTACH_FILENAME,
-                                                                         PR_ATTACH_LONG_FILENAME,
-                                                                         PR_ATTACH_METHOD,
-                                                                         PR_ATTACHMENT_FLAGS,
-                                                                         PR_ATTACHMENT_HIDDEN,
-                                                                         PR_ATTACH_MIME_TAG,
-                                                                         PR_ATTACH_DATA_BIN
-                                                                         );
-                                                                         
-                               lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-                               retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
-                               MAPIFreeBuffer(SPropTagArray);
-                               if (retval == MAPI_E_SUCCESS) {
-
-                                       uint32_t                *attachmentFlags = NULL;
-                                       uint32_t                *attachMethod = NULL;
-                                       uint8_t                 *attachmentHidden = NULL;
-                                       const char              *data = NULL;
-                                       const char              *fmttype = NULL;
-                                       const char              *attach_filename = NULL;
-                                       DATA_BLOB               body;
-                                       icalattach              *icalattach = NULL;
-                                       icalproperty            *prop = NULL;
-                                       icalparameter           *param = NULL;
-                                               
-                                       
-                                       aRow2.ulAdrEntryPad = 0;
-                                       aRow2.cValues = count;
-                                       aRow2.lpProps = lpProps;
-                                       
-                                       attachmentFlags  = octool_get_propval(&aRow2, PR_ATTACHMENT_FLAGS);
-                                       attachMethod     = octool_get_propval(&aRow2, PR_ATTACH_METHOD);
-                                       attachmentHidden = octool_get_propval(&aRow2, PR_ATTACHMENT_HIDDEN);
-
-                                       if(!(*attachmentFlags & 0x00000007) 
-                                               && (*attachMethod == 0x00000001) 
-                                               && (!attachmentHidden || !(*attachmentHidden))) {
-
-                                               /* Get data of attachment */
-                                               retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 0, &obj_stream);
-                                               retval = octool_get_stream(exchange2ical->mem_ctx, &obj_stream, &body);
-                                               data=ldb_base64_encode(exchange2ical->mem_ctx, (const char *)body.data, body.length);
-                                               
-                                               /*Create a new icalattach from above data*/
-                                               icalattach = icalattach_new_from_data((unsigned char *)data,0,0);
-                                               
-                                               /*Add attach property to vevent component*/
-                                               prop = icalproperty_new_attach(icalattach);
-                                               icalcomponent_add_property(exchange2ical->vevent, prop);
-
-                                               /* Attachment filename for X-FILENAME parameter*/
-                                               attach_filename = get_filename(octool_get_propval(&aRow2, PR_ATTACH_LONG_FILENAME));
-                                               if (!attach_filename || (attach_filename && !strcmp(attach_filename, ""))) {
-                                                       attach_filename = get_filename(octool_get_propval(&aRow2, PR_ATTACH_FILENAME));
-                                               }
-                                               
-                                               /* fmttype parameter */
-                                               fmttype = (const char *) octool_get_propval(&aRow2, PR_ATTACH_MIME_TAG);
-                                               if(fmttype) {
-                                                       param = icalparameter_new_fmttype(fmttype);
-                                                       icalproperty_add_parameter(prop, param);
-                                               }
-                                               
-                                               /* ENCODING parameter */
-                                               param =icalparameter_new_encoding(ICAL_ENCODING_BASE64);
-                                               icalproperty_add_parameter(prop,param);
-                                               
-                                               /* VALUE parameter */
-                                               param=icalparameter_new_value(ICAL_VALUE_BINARY);
-                                               icalproperty_add_parameter(prop,param);
-                                               
-                                               /* X-FILENAME parameter */
-                                               param = icalparameter_new_x(attach_filename);
-                                               icalparameter_set_xname(param,"X-FILENAME");
-                                               icalproperty_add_parameter(prop,param);
-                                       }
-                                       MAPIFreeBuffer(lpProps);
-                               }
-                       }
-               }
-       }
-       mapi_object_release(&obj_tb_attach);
-}
-
-
-// TODO: check this - need an example
-void ical_property_ATTENDEE(struct exchange2ical *exchange2ical)
-{
-       uint32_t        i;
-       const char      *smtp;
-       const char      *display_name;
-       uint32_t        *RecipientFlags;
-       uint32_t        *RecipientType;
-       uint32_t        *TrackStatus;
-       struct SRowSet  *SRowSet;
-
-       /* Sanity check */
-       if (!exchange2ical->apptStateFlags) return;
-       if (!(*exchange2ical->apptStateFlags & 0x1)) return;
-       SRowSet = &(exchange2ical->Recipients.SRowSet);
-
-       /* Loop over the recipient table */
-       for (i = 0; i < SRowSet->cRows; i++) {
-               smtp = (const char *) octool_get_propval(&(SRowSet->aRow[i]), PR_SMTP_ADDRESS);
-               display_name = (const char *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_DISPLAY_NAME);
-               RecipientFlags = (uint32_t *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_FLAGS);
-               RecipientType = (uint32_t *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_TYPE);
-               TrackStatus  = (uint32_t *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_TRACKSTATUS);
-
-
-               if (RecipientFlags && !(*RecipientFlags & 0x20) && !(*RecipientFlags & 0x2) &&
-                   (RecipientType && *RecipientType)) {
-                       icalproperty *prop;
-                       icalparameter *cn;
-                       icalparameter *participantType;
-                       enum icalparameter_partstat     partstat = ICAL_PARTSTAT_NONE;
-
-                       if (smtp) {
-                               char *mailtoURL;
-                               mailtoURL = talloc_strdup(exchange2ical->mem_ctx, "mailto:");
-                               mailtoURL = talloc_strdup_append(mailtoURL, smtp);
-                               prop = icalproperty_new_attendee(mailtoURL);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       } else {
-                               prop = icalproperty_new_attendee("invalid:nomail");
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-
-                       if (display_name) {
-                               cn = icalparameter_new_cn(display_name);
-                               icalproperty_add_parameter(prop, cn);
-                       }
-
-                       if (*RecipientType == 0x3) {
-                               icalparameter *cutype = icalparameter_new_cutype(ICAL_CUTYPE_RESOURCE);
-                               icalproperty_add_parameter(prop, cutype);
-                       }
-
-                       switch (*RecipientType) {
-                       case 0x00000002:
-                               participantType = icalparameter_new_role(ICAL_ROLE_OPTPARTICIPANT);
-                               icalproperty_add_parameter(prop, participantType);
-                               break;
-                       case 0x00000003:
-                               participantType = icalparameter_new_role(ICAL_ROLE_NONPARTICIPANT);
-                               icalproperty_add_parameter(prop, participantType);
-                               break;
-                       }
-
-               
-                       
-                       if((exchange2ical->method==ICAL_METHOD_REPLY) || (exchange2ical->method==ICAL_METHOD_COUNTER)){
-                               partstat = exchange2ical->partstat;     
-                       }else if(exchange2ical->method==ICAL_METHOD_PUBLISH){
-                               if(TrackStatus){
-                                       partstat = get_ical_partstat_from_status(*TrackStatus);
-                               }else if(exchange2ical->ResponseStatus){
-                                       partstat = get_ical_partstat_from_status(*exchange2ical->ResponseStatus);
-                               }
-                       }
-                       
-                       if (partstat != ICAL_PARTSTAT_NONE) {
-                               icalparameter *param;
-                               param = icalparameter_new_partstat(partstat);
-                               icalproperty_add_parameter(prop, param);
-                       }
-
-                       if (exchange2ical->ResponseRequested) {
-                               icalparameter *rsvp;
-                               if (*(exchange2ical->ResponseRequested)) {
-                                       rsvp = icalparameter_new_rsvp(ICAL_RSVP_TRUE);
-                               } else {
-                                       rsvp = icalparameter_new_rsvp(ICAL_RSVP_FALSE);
-                               }
-                               icalproperty_add_parameter(prop, rsvp);
-                       }
-               }
-       }
-}
-
-
-void ical_property_CATEGORIES(struct exchange2ical *exchange2ical)
-{
-       uint32_t        i;
-       icalproperty    *prop;
-
-       /* Sanity check */
-       if (!exchange2ical->Keywords) return;
-       if (!exchange2ical->Keywords->cValues) return;
-
-       for (i = 0; i < exchange2ical->Keywords->cValues; i++) {
-               prop = icalproperty_new_categories(exchange2ical->Keywords->lppszA[i]); 
-               icalcomponent_add_property(exchange2ical->vevent, prop);
-       }
-
-}
-
-
-void ical_property_CLASS(struct exchange2ical *exchange2ical)
-{
-       icalproperty    *prop;
-
-       /* Sanity check */
-       if (!exchange2ical->sensitivity) return;
-
-       prop = icalproperty_new_class(get_ical_class(*exchange2ical->sensitivity));
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_CONTACT(struct exchange2ical *exchange2ical)
-{
-       icalproperty    *prop;
-       uint32_t        i;
-
-       /* Sanity check */
-       if (!exchange2ical->Contacts) return;
-       if (!exchange2ical->Contacts->cValues) return;
-
-       for (i = 0; i < exchange2ical->Contacts->cValues; i++) {
-               prop = icalproperty_new_contact(exchange2ical->Contacts->lppszA[i]);
-               icalcomponent_add_property(exchange2ical->vevent, prop);
-       }
-}
-
-
-void ical_property_CREATED(struct exchange2ical *exchange2ical)
-{
-       icalproperty            *prop;
-       struct icaltimetype     icaltime;
-
-       /* Sanity check */
-       if (!exchange2ical->created) return;
-
-       icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->created);
-
-       prop = icalproperty_new_created(icaltime);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-void ical_property_DTSTART(struct exchange2ical *exchange2ical)
-{
-       icalproperty            *prop;
-       icalparameter           *tzid;
-       struct icaltimetype     icaltime;
-
-       /* Sanity check */
-       if (!exchange2ical->apptStartWhole) return;
-
-       /* If this is an all-day appointment */
-       if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-               icaltime = get_icaldate_from_FILETIME(exchange2ical->apptStartWhole);
-               prop = icalproperty_new_dtstart(icaltime);
-               icalcomponent_add_property(exchange2ical->vevent, prop);
-       } else {
-               if (exchange2ical->TimeZoneDesc) {
-                       icaltime = get_icaltime_from_FILETIME(exchange2ical->apptStartWhole);
-                       prop = icalproperty_new_dtstart(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-                       tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                       icalproperty_add_parameter(prop, tzid);
-               } else {
-                       icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->apptStartWhole);
-                       prop = icalproperty_new_dtstart(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               }
-       
-               
-       }
-}
-
-
-void ical_property_DTEND(struct exchange2ical *exchange2ical)
-{
-       icalproperty            *prop;
-       icalparameter           *tzid;
-       struct icaltimetype     icaltime;
-
-       /* Sanity check */
-       if (!exchange2ical->apptEndWhole) return;
-
-       /* If this is an all-day appointment */
-       if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-               icaltime = get_icaldate_from_FILETIME(exchange2ical->apptEndWhole);
-               prop = icalproperty_new_dtend(icaltime);
-               icalcomponent_add_property(exchange2ical->vevent, prop);
-       } else {
-               if (exchange2ical->TimeZoneDesc) {
-                       icaltime = get_icaltime_from_FILETIME(exchange2ical->apptEndWhole);
-                       prop = icalproperty_new_dtend(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-                       tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                       icalproperty_add_parameter(prop, tzid);
-               } else {
-                       icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->apptEndWhole);
-                       prop = icalproperty_new_dtend(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               }
-               
-       }
-}
-
-
-void ical_property_DTSTAMP(struct exchange2ical *exchange2ical)
-{
-       icalproperty            *prop;
-       struct icaltimetype     icaltime;
-       struct tm               *tm;
-       icalparameter           *tzid;
-       time_t                  t;
-
-       /* Sanity check */
-       /*If OwnerCriticalChange field is null, get time system time*/
-       if (!exchange2ical->OwnerCriticalChange) {
-               t=time(NULL);
-               tm = gmtime(&t);
-               icaltime = get_icaltimetype_from_tm_UTC(tm);
-               prop = icalproperty_new_dtstamp(icaltime);
-               icalcomponent_add_property(exchange2ical->vevent, prop);
-               return;
-       } else {
-             icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->OwnerCriticalChange);
-             prop = icalproperty_new_dtstamp(icaltime);
-             icalcomponent_add_property(exchange2ical->vevent, prop);
-             if (exchange2ical->TimeZoneDesc) {
-                       tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                       icalproperty_add_parameter(prop, tzid);
-               }
-       }
-}
-
-
-void ical_property_DESCRIPTION(struct exchange2ical *exchange2ical)
-{
-       icalproperty    *prop;
-
-       if (exchange2ical->method == ICAL_METHOD_REPLY) return;
-       if (!exchange2ical->body) return;
-
-       prop = icalproperty_new_description(exchange2ical->body);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_EXDATE(struct exchange2ical *exchange2ical)
-{
-       uint32_t        i;
-       uint32_t        j;
-       uint8_t         modified;
-       struct icaltimetype     icaltime;
-       struct icaltimetype     dttime;
-
-       icalproperty    *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-
-       /* Sanity check */
-       if (exchange2ical->Recurring && (*exchange2ical->Recurring == 0x0)) return;
-       if (!pat) return;
-       if (!pat->DeletedInstanceCount) return;
-
-       for (i = 0; i < pat->DeletedInstanceCount; i++) {
-               modified=0;
-               if(pat->ModifiedInstanceDates && pat->ModifiedInstanceCount){
-                       for(j=0; j < pat->ModifiedInstanceCount; j++){
-                               if(pat->ModifiedInstanceDates[j]==pat->DeletedInstanceDates[i]){
-                                       modified=1;
-                                       break;
-                               }
-                       }
-               }
-               /* If this is an all-day appointment */
-               if (!modified && exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-                       struct tm       tm;
-                       tm = get_tm_from_minutes_UTC(pat->DeletedInstanceDates[i]);
-                       icaltime= get_icaldate_from_tm(&tm);
-                       prop = icalproperty_new_exdate(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               } else if (!modified){
-                       /* number of minutes between midnight of the specified
-                       * day and midnight, January 1, 1601 */
-                       struct tm       tm;
-                       tm = get_tm_from_minutes_UTC(pat->DeletedInstanceDates[i]);
-                       icaltime= get_icaltimetype_from_tm(&tm);
-
-                       if (exchange2ical->TimeZoneDesc) {
-                               /*Get time from dtstart*/
-                               if (exchange2ical->apptEndWhole){
-                                       dttime = get_icaltime_from_FILETIME(exchange2ical->apptStartWhole);
-                                       icaltime.hour   = dttime.hour;
-                                       icaltime.minute = dttime.minute;
-                               }
-
-                               prop = icalproperty_new_exdate(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               icalparameter *tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                               icalproperty_add_parameter(prop, tzid);
-                       } else {
-                               /*Get time from dtstart*/
-                               icaltime.is_utc = 1;
-                               if (exchange2ical->apptEndWhole){
-                                       dttime = get_icaltime_from_FILETIME_UTC(exchange2ical->apptStartWhole);
-                                       icaltime.hour   = dttime.hour;
-                                       icaltime.minute = dttime.minute;
-                               }
-                               prop = icalproperty_new_exdate(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-               }               
-               
-       }
-}
-
-
-void ical_property_LAST_MODIFIED(struct exchange2ical *exchange2ical)
-{
-       icalproperty            *prop;
-       struct icaltimetype     icaltime;
-       icalparameter           *tzid;
-
-
-       /* Sanity check */
-       if (!exchange2ical->LastModified) return;
-       if (exchange2ical->TimeZoneDesc) {
-               icaltime=get_icaltime_from_FILETIME(exchange2ical->LastModified);
-               prop = icalproperty_new_lastmodified(icaltime);
-               tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-               icalproperty_add_parameter(prop, tzid);
-       } else {
-               icaltime=get_icaltime_from_FILETIME_UTC(exchange2ical->LastModified);
-               prop = icalproperty_new_lastmodified(icaltime);
-       }
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_LOCATION(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       /* Sanity check */
-       if (!exchange2ical->Location) return;
-
-       prop = icalproperty_new_location(exchange2ical->Location);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_ORGANIZER(struct exchange2ical *exchange2ical)
-{
-       const char      *smtp;
-       const char      *display_name;
-       uint32_t        *RecipientFlags;
-       uint32_t        *RecipientType;
-       uint32_t        i;
-       struct SRowSet  *SRowSet;
-
-       /* Sanity check */
-       if (!exchange2ical->apptStateFlags) return;
-       if (!(*exchange2ical->apptStateFlags & 0x1)) return;
-
-       SRowSet = &(exchange2ical->Recipients.SRowSet);
-
-       /* Loop over the recipient table */
-       for (i = 0; i < SRowSet->cRows; i++) {
-               smtp = (const char *) octool_get_propval(&(SRowSet->aRow[i]), PR_SMTP_ADDRESS);
-               display_name = (const char *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_DISPLAY_NAME);
-               RecipientFlags = (uint32_t *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_FLAGS);
-               RecipientType = (uint32_t *) octool_get_propval(&(SRowSet->aRow[i]), PR_RECIPIENT_TYPE);
-
-               if (RecipientFlags && !(*RecipientFlags & 0x20) &&
-                   ((*RecipientFlags & 0x2) || (RecipientType && !*RecipientType))) {
-                       icalproperty *prop;
-                       icalparameter *cn;
-
-                       if (smtp) {
-                               char *mailtoURL;
-                               mailtoURL = talloc_strdup(exchange2ical->mem_ctx, "mailto:");
-                               mailtoURL = talloc_strdup_append(mailtoURL, smtp);
-                               prop = icalproperty_new_organizer(mailtoURL);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               talloc_free(mailtoURL);
-                       } else {
-                               prop = icalproperty_new_organizer("invalid:nomail");
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-
-                       if (display_name) {
-                               cn = icalparameter_new_cn(display_name);
-                               icalproperty_add_parameter(prop, cn);
-                       }
-               }
-       }
-}
-
-
-void ical_property_PRIORITY(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       /* Sanity check */
-       if (!exchange2ical->Importance) return;
-
-       switch (*exchange2ical->Importance) {
-       case 0x00000000:
-               prop = icalproperty_new_priority(9);
-               break;
-       case 0x00000001:
-               prop = icalproperty_new_priority(5);
-               break;
-       case 0x00000002:
-               prop = icalproperty_new_priority(1);
-               break;
-       default:
-               prop = icalproperty_new_priority(5);
-       }
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE_Daily(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_DAILY_RECURRENCE;
-       recurrence.interval = (pat->Period / 1440);
-
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       }
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE_Weekly(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-       uint32_t rdfDaysBitmask = pat->PatternTypeSpecific.WeekRecurrencePattern;
-       short idx = 0;
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_WEEKLY_RECURRENCE;
-       recurrence.interval = pat->Period;
-       
-       if(pat->Period > 1){
-               switch(pat->FirstDOW){
-                       case FirstDOW_Sunday:
-                               recurrence.week_start=ICAL_SUNDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Monday:
-                               recurrence.week_start=ICAL_MONDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Tuesday:
-                               recurrence.week_start=ICAL_TUESDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Wednesday:
-                               recurrence.week_start=ICAL_WEDNESDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Thursday:
-                               recurrence.week_start=ICAL_THURSDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Friday:
-                               recurrence.week_start=ICAL_FRIDAY_WEEKDAY;
-                               break;
-                       case FirstDOW_Saturday:
-                               recurrence.week_start=ICAL_SATURDAY_WEEKDAY;
-                               break;
-               }
-       }
-       
-       if (rdfDaysBitmask & Su) {
-               recurrence.by_day[idx] = ICAL_SUNDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & M) {
-               recurrence.by_day[idx] = ICAL_MONDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Tu) {
-               recurrence.by_day[idx] = ICAL_TUESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & W) {
-               recurrence.by_day[idx] = ICAL_WEDNESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Th) {
-               recurrence.by_day[idx] = ICAL_THURSDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & F) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Sa) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       recurrence.by_day[idx] = ICAL_RECURRENCE_ARRAY_MAX;
-
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       }
-
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE_Monthly(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-       uint32_t day = pat->PatternTypeSpecific.Day;
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_MONTHLY_RECURRENCE;
-       recurrence.interval = pat->Period;
-
-       if (day == 0x0000001F) {
-               recurrence.by_month_day[0] = -1;
-       } else {
-               recurrence.by_month_day[0] = day;
-       }
-       recurrence.by_month_day[1] = ICAL_RECURRENCE_ARRAY_MAX;
-
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       }
-
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE_NthMonthly(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-       uint32_t rdfDaysBitmask = pat->PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern;
-       short idx = 0;
-       enum RecurrenceN setpos = pat->PatternTypeSpecific.MonthRecurrencePattern.N;
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_MONTHLY_RECURRENCE;
-       recurrence.interval = pat->Period;
-
-       if (rdfDaysBitmask & Su) {
-               recurrence.by_day[idx] = ICAL_SUNDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & M) {
-               recurrence.by_day[idx] = ICAL_MONDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Tu) {
-               recurrence.by_day[idx] = ICAL_TUESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & W) {
-               recurrence.by_day[idx] = ICAL_WEDNESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Th) {
-               recurrence.by_day[idx] = ICAL_THURSDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & F) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Sa) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       recurrence.by_day[idx] = ICAL_RECURRENCE_ARRAY_MAX;
-
-       if (setpos == RecurrenceN_First) {
-               recurrence.by_set_pos[0] = 1;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Second) {
-               recurrence.by_set_pos[0] = 2;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Third) {
-               recurrence.by_set_pos[0] = 3;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Fourth) {
-               recurrence.by_set_pos[0] = 4;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Last) {
-               recurrence.by_set_pos[0] = -1;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       }
-
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       }
-
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE_Yearly(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-       uint32_t day = pat->PatternTypeSpecific.Day;
-       struct icaltimetype icaltime;
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_YEARLY_RECURRENCE;
-       recurrence.interval = (pat->Period / 12);
-
-       if (day == 0x0000001F) {
-               recurrence.by_month_day[0] = -1;
-       } else {
-               recurrence.by_month_day[0] = day;
-       }
-       recurrence.by_month_day[1] = ICAL_RECURRENCE_ARRAY_MAX;
-
-       icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->apptStartWhole);
-       recurrence.by_month[0] = icaltime.month;
-       recurrence.by_month[1] = ICAL_RECURRENCE_ARRAY_MAX;
-
-
-       
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       } 
-       
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-void ical_property_RRULE_NthYearly(struct exchange2ical *exchange2ical)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       struct RecurrencePattern *pat = exchange2ical->RecurrencePattern;
-       uint32_t rdfDaysBitmask = pat->PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern;
-       short idx = 0;
-       enum RecurrenceN setpos = pat->PatternTypeSpecific.MonthRecurrencePattern.N;
-
-       struct icaltimetype icaltime;
-
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_YEARLY_RECURRENCE;
-       recurrence.interval = (pat->Period / 12);
-
-       if (rdfDaysBitmask & Su) {
-               recurrence.by_day[idx] = ICAL_SUNDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & M) {
-               recurrence.by_day[idx] = ICAL_MONDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Tu) {
-               recurrence.by_day[idx] = ICAL_TUESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & W) {
-               recurrence.by_day[idx] = ICAL_WEDNESDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Th) {
-               recurrence.by_day[idx] = ICAL_THURSDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & F) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       if (rdfDaysBitmask & Sa) {
-               recurrence.by_day[idx] = ICAL_FRIDAY_WEEKDAY;
-               ++idx;
-       }
-       recurrence.by_day[idx] = ICAL_RECURRENCE_ARRAY_MAX;
-
-       if (setpos == RecurrenceN_First) {
-               recurrence.by_set_pos[0] = 1;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Second) {
-               recurrence.by_set_pos[0] = 2;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Third) {
-               recurrence.by_set_pos[0] = 3;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Fourth) {
-               recurrence.by_set_pos[0] = 4;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       } else if (setpos == RecurrenceN_Last) {
-               recurrence.by_set_pos[0] = -1;
-               recurrence.by_set_pos[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       }
-
-       icaltime = get_icaltime_from_FILETIME(exchange2ical->apptStartWhole);
-       recurrence.by_month[0] = icaltime.month;
-       recurrence.by_month[1] = ICAL_RECURRENCE_ARRAY_MAX;
-       
-       if (pat->EndType == END_AFTER_N_OCCURRENCES || pat->EndType == END_AFTER_DATE) {
-               recurrence.count = pat->OccurrenceCount;
-       }
-
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_RRULE(struct exchange2ical *exchange2ical)
-{
-       struct RecurrencePattern *pat;
-
-       /* Sanity check */
-       if (!(exchange2ical->RecurrencePattern)) return;
-
-       pat = exchange2ical->RecurrencePattern;
-
-       switch(pat->PatternType) {
-       case PatternType_Day:
-               ical_property_RRULE_Daily(exchange2ical);
-               break;
-       case PatternType_Week:
-               ical_property_RRULE_Weekly(exchange2ical);
-               break;
-       case PatternType_Month:
-               if ((pat->Period % 12 ) == 0) {
-                       ical_property_RRULE_Yearly(exchange2ical);
-               } else {
-                       ical_property_RRULE_Monthly(exchange2ical);
-               }
-               break;
-       case PatternType_MonthNth:
-               if ((pat->Period % 12 ) == 0) {
-                       ical_property_RRULE_NthYearly(exchange2ical);
-               } else {
-                       ical_property_RRULE_NthMonthly(exchange2ical);
-               }
-               break;
-       default:
-               printf("RRULE pattern type not implemented yet!:0x%x\n", pat->PatternType);
-       }
-}
-
-void ical_property_RRULE_daylight_standard(icalcomponent* component , struct SYSTEMTIME st)
-{
-       struct icalrecurrencetype recurrence;
-       icalproperty *prop;
-       
-       icalrecurrencetype_clear(&recurrence);
-       recurrence.freq = ICAL_YEARLY_RECURRENCE;
-
-       if(st.wYear ==0x0000){
-               recurrence.by_month[0]=st.wMonth;
-               /* Microsoft day of week = libIcal day of week +1; */
-               /* Day encode = day + occurrence*8 */
-               if (st.wDay==5){
-                       /* Last occurrence of day in the month*/
-                       recurrence.by_day[0] = -1 * (st.wDayOfWeek + 9);
-               }else{
-                       /* st.wDay occurrence of day in the month */
-                       recurrence.by_day[0] = (st.wDayOfWeek + 1 + st.wDay*8);
-               }
-               
-       }else{
-               recurrence.by_month_day[0]=st.wDay;
-               recurrence.by_month[0]=st.wMonth;
-       }
-
-       
-       prop = icalproperty_new_rrule(recurrence);
-       icalcomponent_add_property(component, prop);
-}
-
-
-void ical_property_RECURRENCE_ID(struct exchange2ical *exchange2ical)
-{      
-       struct icaltimetype     icaltime;
-       icalproperty            *prop;
-       icalparameter           *tzid;
-       struct GlobalObjectId   *GlbObjId;
-
-       
-       if (exchange2ical->ExceptionReplaceTime){
-               /*if parent has an all day event*/
-               if (exchange2ical->apptSubType && (*exchange2ical->apptSubType == 0x1)) {
-                       icaltime = get_icaldate_from_FILETIME(exchange2ical->ExceptionReplaceTime);
-                       prop = icalproperty_new_recurrenceid(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-               } else {
-                       if (exchange2ical->TimeZoneDesc) {
-                               icaltime=get_icaltime_from_FILETIME(exchange2ical->ExceptionReplaceTime);
-                               prop = icalproperty_new_recurrenceid(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                               tzid = icalparameter_new_tzid(exchange2ical->TimeZoneDesc);
-                               icalproperty_add_parameter(prop, tzid);
-                       } else {
-                               icaltime = get_icaltime_from_FILETIME_UTC(exchange2ical->ExceptionReplaceTime);
-                               prop = icalproperty_new_recurrenceid(icaltime);
-                               icalcomponent_add_property(exchange2ical->vevent, prop);
-                       }
-               }
-       } else if (exchange2ical->GlobalObjectId){
-               GlbObjId = get_GlobalObjectId(exchange2ical->mem_ctx, exchange2ical->GlobalObjectId);
-               if(GlbObjId){
-                       icaltime=get_icaldate_from_GlobalObjectId(GlbObjId);
-                       prop = icalproperty_new_recurrenceid(icaltime);
-                       icalcomponent_add_property(exchange2ical->vevent, prop);
-                       talloc_free(GlbObjId);
-
-               }
-       }
-       
-}
-
-
-void ical_property_RESOURCES(struct exchange2ical *exchange2ical)
-{
-       char            *NonSendableBcc = NULL;
-       icalproperty    *prop;
-
-       /* Sanity check */
-       if (!exchange2ical->NonSendableBcc) return;
-       
-       NonSendableBcc = talloc_strdup(exchange2ical->mem_ctx, exchange2ical->NonSendableBcc);
-       all_string_sub(NonSendableBcc, ";", ",", 0);
-       prop = icalproperty_new_resources(NonSendableBcc);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-       talloc_free(NonSendableBcc);
-}
-
-
-void ical_property_SEQUENCE(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       if (!exchange2ical->Sequence) {
-               prop = icalproperty_new_sequence(0);
-       } else {
-               prop = icalproperty_new_sequence(*(exchange2ical->Sequence));
-       }
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_SUMMARY(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       icalparameter *language;
-
-       if (exchange2ical->Subject) {
-               prop = icalproperty_new_summary(exchange2ical->Subject);
-       } else {
-               prop = icalproperty_new_summary("");
-       }
-
-       if (exchange2ical->MessageLocaleId) {
-               const char *langtag = mapi_get_locale_from_lcid( *(exchange2ical->MessageLocaleId) ); 
-               language = icalparameter_new_language( langtag );
-               icalproperty_add_parameter(prop, language);
-       }
-
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_TRANSP(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-
-       /* Sanity check */
-       if (!exchange2ical->BusyStatus) return;
-
-       switch (*exchange2ical->BusyStatus) {
-       case 0x00000000:
-               prop = icalproperty_new_transp(ICAL_TRANSP_TRANSPARENT);
-               break;
-       case 0x00000001:
-       case 0x00000002:
-       case 0x00000003:
-               prop = icalproperty_new_transp(ICAL_TRANSP_OPAQUE);
-               break;
-       default:
-               prop = icalproperty_new_transp(ICAL_TRANSP_NONE);
-       }
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-}
-
-
-void ical_property_TRIGGER(struct exchange2ical *exchange2ical)
-{
-       struct icaltriggertype duration;
-       icalproperty *prop;
-       if (!exchange2ical->ReminderDelta) return;
-       if (*exchange2ical->ReminderDelta == 0x5AE980E1) {
-               duration = icaltriggertype_from_int(-15 * 60);
-               prop = icalproperty_new_trigger(duration);
-               icalcomponent_add_property(exchange2ical->valarm, prop);
-       } else {
-               duration = icaltriggertype_from_int(*(exchange2ical->ReminderDelta) * -1 * 60);
-               prop = icalproperty_new_trigger(duration);
-               icalcomponent_add_property(exchange2ical->valarm, prop);
-       }
-}
-
-
-#define        GLOBAL_OBJECT_ID_DATA_START     "\x76\x43\x61\x6c\x2d\x55\x69\x64\x01\x00\x00\x00"
-
-void ical_property_UID(struct exchange2ical *exchange2ical)
-{
-       uint32_t                i;
-       const char              *uid;
-       char*                   outstr;
-       struct GlobalObjectId   *GlbObjId;
-       icalproperty            *prop;
-
-       outstr = talloc_strdup(exchange2ical->mem_ctx, "");
-       
-       if(exchange2ical->GlobalObjectId){
-               GlbObjId = get_GlobalObjectId(exchange2ical->mem_ctx, exchange2ical->GlobalObjectId);
-       }
-       
-      
-       if (exchange2ical->GlobalObjectId && (exchange2ical->GlobalObjectId->cb >= 36) && GlbObjId) {
-               if (GlbObjId->Size >= 16 && (0 == memcmp(GlbObjId->Data, GLOBAL_OBJECT_ID_DATA_START, 12))) {
-                       fflush(0);
-                       for (i = 12; i < exchange2ical->GlobalObjectId->cb; i++) {
-                               char objID[6];
-                               snprintf(objID, 6, "%.2X", exchange2ical->GlobalObjectId->lpb[i]);
-                               outstr = talloc_strdup_append(outstr, objID);
-                       }
-
-                       uid = (const char *)&(GlbObjId->Data[13]);
-                       outstr = talloc_strdup_append(outstr, uid);
-               } else {
-                       fflush(0);
-                       for (i = 0; i < 16; i++) {
-                               char objID[6];
-                               snprintf(objID, 6, "%.2X", exchange2ical->GlobalObjectId->lpb[i]);
-                               outstr = talloc_strdup_append(outstr, objID);
-                       }
-                       /* YH, YL, Month and D must be set to 0 */
-                       outstr = talloc_strdup_append(outstr, "00000000");
-
-                       for (i = 20; i < exchange2ical->GlobalObjectId->cb; i++) {
-                               char objID[6];
-                               snprintf(objID, 6, "%.2X", exchange2ical->GlobalObjectId->lpb[i]);
-                               outstr = talloc_strdup_append(outstr, objID);
-                       }
-               }
-               talloc_free(GlbObjId);
-       } else {
-               char objID[32];
-               snprintf(objID, 32, "%i", exchange2ical->idx);
-               outstr = talloc_strdup(outstr, objID);
-       }
-       
-       prop = icalproperty_new_uid(outstr);
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-       talloc_free(outstr);
-}
-
-
-static icalproperty * ical_property_add_x_property_value(icalcomponent *parent, const char* propname, const char* value)
-{
-       icalproperty *prop;
-       icalvalue *icalText;
-
-       /* Sanity checks */
-       if (!parent) return NULL;
-       if (!propname) return NULL;
-       if (!value) return NULL;
-
-       icalText = icalvalue_new_text(value);
-       prop = icalproperty_new_x(icalvalue_as_ical_string(icalText));
-       icalvalue_free(icalText);
-       icalproperty_set_x_name(prop, propname);
-       icalcomponent_add_property(parent, prop);
-       return prop;
-}
-
-void ical_property_X_ALT_DESC(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       icalparameter *param;
-       
-       /*sanity check */
-       if(!exchange2ical->bodyHTML) return;
-       prop = ical_property_add_x_property_value(exchange2ical->vevent, "X-ALT-DESC",exchange2ical->bodyHTML);
-       param = icalparameter_new_fmttype("text/html");
-       icalproperty_add_parameter(prop, param);        
-}
-
-void ical_property_X_MICROSOFT_CDO_ATTENDEE_CRITICAL_CHANGE(struct exchange2ical *exchange2ical)
-{
-       struct tm       *tm;
-       char            outstr[200];
-
-       /* Sanity check */
-       if (!exchange2ical->AttendeeCriticalChange) return;
-
-       tm = get_tm_from_FILETIME(exchange2ical->AttendeeCriticalChange);
-       strftime(outstr, sizeof(outstr), "%Y%m%dT%H%M%SZ", tm);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE", outstr);
-}
-
-
-void ical_property_X_MICROSOFT_CDO_BUSYSTATUS(struct exchange2ical *exchange2ical)
-{
-       /*sanity check*/
-       if(!exchange2ical->BusyStatus) return;
-       
-       switch (*exchange2ical->BusyStatus) {
-       case 0x00000000:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-BUSYSTATUS", "FREE");
-               break;
-       case 0x00000001:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-BUSYSTATUS", "TENTATIVE");
-               break;
-       case 0x00000002:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-BUSYSTATUS", "BUSY");
-               break;
-       case 0x00000003:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-BUSYSTATUS", "OOF");
-               break;
-       }
-}
-void ical_property_X_MICROSOFT_MSNCALENDAR_IMPORTANCE(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->Importance) return;
-
-       switch (*exchange2ical->Importance) {
-       case 0x00000000:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-MSNCALENDAR-IMPORTANCE", "0");
-               break;
-       case 0x00000001:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-MSNCALENDAR-IMPORTANCE", "1");
-               break;
-       case 0x00000002:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-MSNCALENDAR-IMPORTANCE", "2");
-               break;
-       }
-}
-
-void ical_property_X_MICROSOFT_CDO_INTENDEDSTATUS(struct exchange2ical *exchange2ical)
-{
-       if (!exchange2ical->IntendedBusyStatus) return;
-
-       switch (*exchange2ical->IntendedBusyStatus) {
-       case 0x00000000:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-INTENDEDSTATUS", "FREE");
-               break;
-       case 0x00000001:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-INTENDEDSTATUS", "TENTATIVE");
-               break;
-       case 0x00000002:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-INTENDEDSTATUS", "BUSY");
-               break;
-       case 0x00000003:
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-INTENDEDSTATUS", "OOF");
-               break;
-       }
-}
-
-
-void ical_property_X_MICROSOFT_CDO_OWNERAPPTID(struct exchange2ical *exchange2ical)
-{
-       char outstr[200];
-       /* Sanity check */
-       if (!exchange2ical->OwnerApptId) return;
-       snprintf(outstr, 200, "%d", *(exchange2ical->OwnerApptId));
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-OWNERAPPTID", outstr);
-}
-
-
-void ical_property_X_MICROSOFT_CDO_OWNER_CRITICAL_CHANGE(struct exchange2ical *exchange2ical)
-{
-       struct tm       *tm;
-       char            outstr[200];
-       
-       /* Sanity check */
-       if (!exchange2ical->OwnerCriticalChange) return;
-
-
-       tm = get_tm_from_FILETIME(exchange2ical->OwnerCriticalChange);
-       
-
-       strftime(outstr, sizeof(outstr), "%Y%m%dT%H%M%SZ", tm);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE", outstr);
-}
-
-
-void ical_property_X_MICROSOFT_CDO_REPLYTIME(struct exchange2ical *exchange2ical)
-{
-       struct tm       *tm;
-       char            outstr[200];
-
-       /* Sanity check */
-       if (!exchange2ical->apptReplyTime) return;
-
-       tm = get_tm_from_FILETIME(exchange2ical->apptReplyTime);
-       strftime(outstr, sizeof(outstr), "%Y%m%dT%H%M%SZ", tm);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-CDO-REPLYTIME", outstr);
-}
-
-
-void ical_property_X_MICROSOFT_DISALLOW_COUNTER(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->NotAllowPropose) return;
-
-       if (*(exchange2ical->NotAllowPropose) == true) {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-DISALLOW-COUNTER", "TRUE");
-       } else {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-DISALLOW-COUNTER", "FALSE");
-       }
-}
-
-
-void ical_property_X_MS_OLK_ALLOWEXTERNCHECK(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->AllowExternCheck) return;
-
-       if (*(exchange2ical->AllowExternCheck) == true) {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-ALLOWEXTERNCHECK", "TRUE");
-       } else {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MICROSOFT-ALLOWEXTERNCHECK", "FALSE");
-       }
-}
-
-
-void ical_property_X_MS_OLK_APPTLASTSEQUENCE(struct exchange2ical *exchange2ical)
-{
-       char outstr[20];
-       /* Sanity check */
-       if (!exchange2ical->apptLastSequence) return;
-
-       snprintf(outstr, 20, "%d", *exchange2ical->apptLastSequence);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-APPTLASTSEQUENCE", outstr);
-}
-
-
-void ical_property_X_MS_OLK_APPTSEQTIME(struct exchange2ical *exchange2ical)
-{
-       struct tm       *tm = NULL;
-       char            outstr[200];
-
-       /* Sanity check */
-       if (!exchange2ical->apptSeqTime) return;
-
-       tm = get_tm_from_FILETIME(exchange2ical->apptSeqTime);
-       strftime(outstr, sizeof(outstr), "%Y%m%dT%H%M%SZ", tm);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-APPTSEQTIME", outstr);
-}
-
-
-void ical_property_X_MS_OLK_AUTOFILLLOCATION(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->AutoFillLocation) return;
-
-       if (*(exchange2ical->AutoFillLocation) == true) {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-AUTOFILLLOCATION", "TRUE");
-       } else {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-AUTOFILLLOCATION", "FALSE");
-       }
-}
-
-
-void ical_property_X_MS_OLK_AUTOSTARTCHECK(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->AutoStartCheck) return;
-       if (*(exchange2ical->AutoStartCheck) == true) {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-AUTOSTARTCHECK", "TRUE");
-       } else {
-               ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-AUTOSTARTCHECK", "FALSE");
-       }
-}
-
-
-void ical_property_X_MS_OLK_COLLABORATEDOC(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->CollaborateDoc) return;
-       if(!(*exchange2ical->CollaborateDoc)) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-COLLABORATEDOC", exchange2ical->CollaborateDoc);
-}
-
-
-void ical_property_X_MS_OLK_CONFCHECK(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if (!exchange2ical->ConfCheck) return;
-       
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-CONFCHECK", (*exchange2ical->ConfCheck == true) ? "TRUE" : "FALSE");
-}
-
-
-void ical_property_X_MS_OLK_CONFTYPE(struct exchange2ical *exchange2ical)
-{
-       char outstr[20];
-       /* Sanity check */
-       if (!exchange2ical->ConfType) return;
-
-       snprintf(outstr, 20, "%d", *exchange2ical->ConfType);
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-CONFTYPE", outstr);
-}
-
-
-void ical_property_X_MS_OLK_DIRECTORY(struct exchange2ical *exchange2ical)
-{
-       /*Sanity Check*/
-       if(!exchange2ical->Directory) return;
-       if(!(*exchange2ical->Directory)) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-DIRECTORY", exchange2ical->Directory);
-}
-
-
-void ical_property_X_MS_OLK_MWSURL(struct exchange2ical *exchange2ical)
-{
-       /*Sanity Check*/
-       if(!exchange2ical->MWSURL) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-MWSURL", exchange2ical->MWSURL);
-}
-
-
-void ical_property_X_MS_OLK_NETSHOWURL(struct exchange2ical *exchange2ical)
-{
-       /*Sanity Check*/
-       if(!exchange2ical->NetShowURL) return;
-       if(!(*exchange2ical->NetShowURL)) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-NETSHOWURL", exchange2ical->NetShowURL);
-}
-
-void ical_property_X_MS_OLK_ONLINEPASSWORD(struct exchange2ical *exchange2ical)
-{
-       /*Sanity Check*/
-       if(!exchange2ical->OnlinePassword) return;
-       if(!(*exchange2ical->OnlinePassword)) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-ONLINEPASSWORD", exchange2ical->OnlinePassword);
-}
-
-void ical_property_X_MS_OLK_ORGALIAS(struct exchange2ical *exchange2ical)
-{
-       /* Sanity check */
-       if(!exchange2ical->OrgAlias) return;
-       if(!(*exchange2ical->OrgAlias)) return;
-
-       ical_property_add_x_property_value(exchange2ical->vevent, "X-MS-OLK-ORGALIAS", exchange2ical->OrgAlias);
-}
-
-
-// TODO: double check this - need an example.
-void ical_property_X_MS_OLK_SENDER(struct exchange2ical *exchange2ical)
-{
-       icalproperty *prop;
-       icalparameter *param;
-       char outstr[200];
-
-       /* Sanity check */
-       if (!exchange2ical->apptStateFlags) return;
-       if (!(*exchange2ical->apptStateFlags & 0x1)) return;
-       if (!exchange2ical->SenderName) return;
-
-       if (exchange2ical->SenderEmailAddress) {
-               snprintf(outstr, 200, "mailto:%s",exchange2ical->SenderEmailAddress);
-               prop = icalproperty_new_x(outstr);
-       } else {
-               prop = icalproperty_new_x("invalid:nomail");
-       }
-
-       icalproperty_set_x_name(prop, "X-MS-OLK-SENDER");
-       icalcomponent_add_property(exchange2ical->vevent, prop);
-
-       param = icalparameter_new_cn(exchange2ical->SenderName);
-       icalproperty_add_parameter(prop, param);
-}
diff --git a/branches/plugfest/libexchange2ical/exchange2ical_utils.c b/branches/plugfest/libexchange2ical/exchange2ical_utils.c
deleted file mode 100644 (file)
index c2c655c..0000000
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
-   Common conversion routines for exchange2ical
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-static struct ical_method      ical_method[] = {
-       { ICAL_METHOD_PUBLISH,  ICAL_PARTSTAT_NONE,     "IPM.Appointment"               },
-       { ICAL_METHOD_REQUEST,  ICAL_PARTSTAT_NONE,     "IPM.Schedule.Meeting.Request"  },
-       { ICAL_METHOD_REPLY,    ICAL_PARTSTAT_ACCEPTED, "IPM.Schedule.Meeting.Resp.Pos" },
-       { ICAL_METHOD_REPLY,    ICAL_PARTSTAT_TENTATIVE,"IPM.Schedule.Meeting.Resp.Tent"},
-       { ICAL_METHOD_REPLY,    ICAL_PARTSTAT_DECLINED, "IPM.Schedule.Meeting.Resp.Neg" },
-       { ICAL_METHOD_CANCEL,   ICAL_PARTSTAT_NONE,     "IPM.Schedule.Meeting.Canceled" },
-       { ICAL_METHOD_NONE,     ICAL_PARTSTAT_NONE,     NULL }
-};
-
-static struct ical_calendartype        ical_calendartype[] = {
-       { 0x0001,       "Gregorian"             },
-       { 0x0002,       "Gregorian_us"          },
-       { 0x0003,       "Japan"                 },
-       { 0x0004,       "Taiwan"                },
-       { 0x0005,       "Korean"                },
-       { 0x0006,       "Hijri"                 },
-       { 0x0007,       "Thai"                  },
-       { 0x0008,       "Hebrew"                },
-       { 0x0009,       "GregorianMeFrench"     },
-       { 0x000A,       "GregorianArabic"       },
-       { 0x000B,       "GregorianXlitEnglish"  },
-       { 0x000C,       "GregorianXlitFrench"   },
-       { 0x000E,       "JapanLunar"            },
-       { 0x000F,       "ChineseLunar"          },
-       { 0x0010,       "Saka"                  },
-       { 0x0011,       "LunarEtoChn"           },
-       { 0x0012,       "LunarEthoKor"          },
-       { 0x0013,       "LunarRockuyou"         },
-       { 0x0014,       "KoreanLunar"           },
-       { 0x0017,       "Umalqura"              },
-       { 0x0000,       NULL                    }
-};
-
-static struct ical_class       ical_class[] = {
-       { 0x00000000,   ICAL_CLASS_PUBLIC       },
-       { 0x00000001,   ICAL_CLASS_X            },
-       { 0x00000002,   ICAL_CLASS_PRIVATE      },
-       { 0x00000003,   ICAL_CLASS_CONFIDENTIAL },
-       { 0x00000000,   ICAL_CLASS_NONE         }
-};
-
-static struct ical_day ical_day[] = {
-       { ICAL_SUNDAY_WEEKDAY,          FirstDOW_Sunday,        Su },
-       { ICAL_MONDAY_WEEKDAY,          FirstDOW_Monday,        M  },
-       { ICAL_TUESDAY_WEEKDAY,         FirstDOW_Tuesday,       Tu },
-       { ICAL_WEDNESDAY_WEEKDAY,       FirstDOW_Wednesday,     W  },
-       { ICAL_THURSDAY_WEEKDAY,        FirstDOW_Thursday,      Th },
-       { ICAL_FRIDAY_WEEKDAY,          FirstDOW_Friday,        F  },
-       { ICAL_SATURDAY_WEEKDAY,        FirstDOW_Saturday,      Sa },
-       { ICAL_NO_WEEKDAY,              0,                      0 }
-
-};
-
-bool has_component_DAYLIGHT(struct exchange2ical *exchange2ical)
-{
-       if (!exchange2ical->TimeZoneStruct) return false;
-       if (!exchange2ical->TimeZoneStruct->stStandardDate.wYear &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wMonth &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wDayOfWeek &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wDay &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wHour &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wMinute &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wSecond &&
-           !exchange2ical->TimeZoneStruct->stStandardDate.wMilliseconds) return false;
-
-       return true;
-}
-
-struct FILETIME get_FILETIME_from_string(const char *time)
-{
-       icaltimetype icaltime;
-       
-       icaltime = icaltime_from_string(time);
-       return get_FILETIME_from_icaltimetype(&icaltime);
-}
-
-
-char *get_ical_date(TALLOC_CTX *mem_ctx, struct SYSTEMTIME *time)
-{
-       char    *date;
-
-       date = talloc_asprintf(mem_ctx, "%.4d%.2d%.2dT%.2d%.2d%.2d", time->wYear + 1601, time->wMonth,
-                              time->wDay, time->wHour, time->wMinute, time->wSecond);
-       return date;
-}
-
-
-enum icalproperty_method get_ical_method(const char *msgclass)
-{
-       uint32_t        i;
-
-       /* Sanity check */
-       if (!msgclass) return ICAL_METHOD_NONE;
-
-       for (i = 0; ical_method[i].PidTagMessageClass; i++) {
-               if (!strcmp(msgclass, ical_method[i].PidTagMessageClass)) {
-                       return ical_method[i].method;
-               }
-       }
-
-       return ICAL_METHOD_NONE;
-}
-
-uint16_t get_exchange_calendartype(const char *CalendarType)
-{
-       uint32_t        i;
-
-       /* Sanity check */
-       if (!CalendarType) return 0x0000;
-
-       for (i = 0; ical_calendartype[i].type; i++) {
-               if (strcmp(CalendarType, ical_calendartype[i].calendar)) {
-                       return ical_calendartype[i].type;
-               }
-       }
-       return 0x0000;
-}
-
-const char *get_ical_calendartype(uint16_t CalendarType)
-{
-       uint32_t        i;
-
-       /* Sanity check */
-       if (!CalendarType) return NULL;
-
-       for (i = 0; ical_calendartype[i].type; i++) {
-               if (CalendarType == ical_calendartype[i].type) {
-                       return ical_calendartype[i].calendar;
-               }
-       }
-       
-       return NULL;
-}
-enum icalparameter_partstat get_ical_partstat_from_status(uint32_t status)
-{
-       enum icalparameter_partstat partstat;
-       switch(status){
-               case 0x00000003:
-                       partstat = ICAL_PARTSTAT_ACCEPTED;
-                       break;
-               case 0x00000004:
-                       partstat = ICAL_PARTSTAT_DECLINED;
-                       break;
-               case 0x00000002:
-                       partstat = ICAL_PARTSTAT_TENTATIVE;
-                       break;
-               default:
-                       partstat = ICAL_PARTSTAT_NONE;
-       }
-       return partstat;
-}
-
-enum icalparameter_partstat get_ical_partstat(const char *msgclass)
-{
-       uint32_t        i;
-
-       /* Sanity check */
-       if (!msgclass) return ICAL_PARTSTAT_NONE;
-
-       for (i = 0; ical_method[i].PidTagMessageClass; i++) {
-               if (!strcmp(msgclass, ical_method[i].PidTagMessageClass)) {
-                       return ical_method[i].partstat;
-               }
-       }
-
-       return ICAL_PARTSTAT_NONE;
-}
-
-enum icalproperty_class get_ical_class(uint32_t sensivity)
-{
-       uint32_t        i;
-       
-       for (i = 0; ical_class[i].classtype != ICAL_CLASS_NONE; ++i) {
-               if (sensivity == ical_class[i].sensivity) {
-                       return ical_class[i].classtype;
-               }
-       }
-
-       return ICAL_CLASS_NONE;
-}
-
-enum FirstDOW get_exchange_day_from_ical(enum icalrecurrencetype_weekday weekday)
-{
-       
-       uint32_t        i;
-       
-       for (i = 0; ical_day[i].ical != ICAL_NO_WEEKDAY; ++i) {
-               if (weekday == ical_day[i].ical) {
-                       return ical_day[i].exchange;
-               }
-       }
-
-       return 0x00000000;
-}
-
-uint32_t get_exchange_rdfDays_from_ical(enum icalrecurrencetype_weekday weekday){
-       
-       uint32_t        i;
-       
-       for (i = 0; ical_day[i].ical != ICAL_NO_WEEKDAY; ++i) {
-               if (weekday == ical_day[i].ical) {
-                       return ical_day[i].rdfDays;
-               }
-       }
-
-       return 0;
-}
-
-struct icaltimetype get_icaltimetype_from_tm(struct tm *tm)
-{
-       struct icaltimetype tt;
-
-       tt.year   = tm->tm_year+1900;
-       tt.month  = tm->tm_mon+1;
-       tt.day    = tm->tm_mday;
-       tt.hour   = tm->tm_hour;
-       tt.minute = tm->tm_min;
-       tt.second = tm->tm_sec;
-
-       tt.is_utc      = 0;
-       tt.is_date     = 0;
-       tt.is_daylight = 0;
-       tt.zone        = 0;
-
-       return tt;
-}
-
-struct icaltimetype get_icaltimetype_from_tm_UTC(struct tm *tm)
-{
-       struct icaltimetype tt;
-       
-       tt = get_icaltimetype_from_tm(tm);
-       tt.is_utc      = 1;
-       
-       return tt;
-}
-
-struct icaltimetype get_icaldate_from_tm(struct tm *tm)
-{
-       struct icaltimetype tt;
-
-       tt.year   = tm->tm_year+1900;
-       tt.month  = tm->tm_mon+1;
-       tt.day    = tm->tm_mday;
-       tt.hour   = 0;
-       tt.minute = 0;
-       tt.second = 0;
-
-       tt.is_utc      = 1;
-       tt.is_date     = 1;
-       tt.is_daylight = 0;
-       tt.zone        = NULL;
-
-       return tt;
-}
-
-struct tm *get_tm_from_FILETIME(const struct FILETIME *ft)
-{
-       NTTIME          time;
-       struct timeval  t;
-       struct tm       *tm;
-       
-       time = FILETIME_to_NTTIME(*ft);
-       nttime_to_timeval(&t, time);
-       tm = localtime(&t.tv_sec);
-
-       return tm;
-}
-
-struct icaltimetype get_icaltime_from_FILETIME(const struct FILETIME *ft)
-{
-       struct icaltimetype     tt;
-       NTTIME                  nttime;
-       struct timeval          temp_timeval;
-       struct tm               *tm;
-
-       nttime = FILETIME_to_NTTIME(*ft);
-       nttime_to_timeval(&temp_timeval, nttime);
-       
-       tm = localtime(&temp_timeval.tv_sec);
-       
-       tt.year   = tm->tm_year + 1900;                                        
-       tt.month  = tm->tm_mon + 1;                                            
-       tt.day    = tm->tm_mday;                                               
-       tt.hour   = tm->tm_hour;                                               
-       tt.minute = tm->tm_min;                                                
-       tt.second = tm->tm_sec;
-       tt.is_date = 0;
-       tt.is_utc = 0;
-       tt.is_daylight = 0;
-       tt.zone = NULL;
-
-       return tt;
-}
-
-struct icaltimetype get_icaltime_from_FILETIME_UTC(const struct FILETIME *ft)
-{
-       struct icaltimetype     tt;
-       NTTIME                  nttime;
-       struct timeval          temp_timeval;
-       struct tm               *tm;
-
-       nttime = FILETIME_to_NTTIME(*ft);
-       nttime_to_timeval(&temp_timeval, nttime);
-
-       tm = gmtime(&temp_timeval.tv_sec);
-       
-       tt.year   = tm->tm_year + 1900;                                        
-       tt.month  = tm->tm_mon + 1;                                            
-       tt.day    = tm->tm_mday;                                               
-       tt.hour   = tm->tm_hour;                                               
-       tt.minute = tm->tm_min;                                                
-       tt.second = tm->tm_sec;
-       tt.is_date = 0;
-       tt.is_utc = 1;
-       tt.is_daylight = 0;
-       tt.zone = NULL;
-
-       return tt;
-}
-
-struct icaltimetype get_icaldate_from_FILETIME(const struct FILETIME *ft)
-{
-       struct icaltimetype     tt;
-       NTTIME                  nttime;
-       struct timeval          temp_timeval;
-       struct tm               *tm;
-
-       nttime = FILETIME_to_NTTIME(*ft);
-       nttime_to_timeval(&temp_timeval, nttime);
-
-       tm = gmtime(&temp_timeval.tv_sec);
-                                                                 
-       tt.year   = tm->tm_year + 1900;                                        
-       tt.month  = tm->tm_mon + 1;                                            
-       tt.day    = tm->tm_mday;
-       if (tm->tm_hour >= 12) {
-               /* If the time is greater than or equal to 12, and we're representing midnight, then
-               the actual day is one less (e.g. if we're at UTC+11 timezone, then local
-               midnight is 1300 UTC, on the day before). So we add a day. */
-               tt.day++;
-       }
-       tt.hour   = 0;                                               
-       tt.minute = 0;                                                
-       tt.second = 0;
-       tt.is_date = 1;
-       tt.is_utc = 1;
-       tt.is_daylight = 0;
-       tt.zone = NULL;
-
-       return tt;
-}
-
-struct icaltimetype get_icaldate_from_GlobalObjectId(struct GlobalObjectId *GlobalObjectId)
-{
-       struct icaltimetype     tt;
-       tt.year   = GlobalObjectId->YH;
-       tt.year   = tt.year <<8;
-       tt.year   |= GlobalObjectId->YL;
-       tt.month  = GlobalObjectId->Month;
-       tt.day    = GlobalObjectId->D;
-       tt.hour   = 0;
-       tt.minute = 0;
-       tt.second = 0;
-
-       tt.is_utc      = 1;
-       tt.is_date     = 1;
-       tt.is_daylight = 0;
-       tt.zone        = NULL;
-
-       return tt;
-}
-
-struct tm get_tm_from_minutes(uint32_t mins)
-{
-       struct timeval  t;
-       struct tm       tm;
-       NTTIME          nt;
-       nt = mins;
-       nt *= 10000000;
-       nt *= 60;
-       nttime_to_timeval(&t, nt);
-       tm= *localtime(&t.tv_sec);
-       return tm;
-}
-
-struct tm get_tm_from_minutes_UTC(uint32_t mins)
-{
-       struct timeval  t;
-       struct tm       tm;
-       NTTIME          nt;
-       nt = mins;
-       nt *= 10000000;
-       nt *= 60;
-       nttime_to_timeval(&t, nt);
-       tm= *gmtime(&t.tv_sec);
-       return tm;
-}
-
-bool compareGlobalObjectIds(struct GlobalObjectId *glb1, struct GlobalObjectId *glb2)
-{
-       int i;
-       time_t creationTime1;
-       time_t creationTime2;
-       
-       
-       creationTime1=mktime(get_tm_from_FILETIME(&glb1->CreationTime));
-       creationTime2=mktime(get_tm_from_FILETIME(&glb2->CreationTime));
-       
-       if(difftime(creationTime1, creationTime2)!=0) return false;
-       
-       for(i=0; i<16; i++){
-               if(glb1->ByteArrayID[i]!=glb2->ByteArrayID[i]) return false;
-       }
-       if(glb1->YH!=glb2->YH) return false;
-       if(glb1->YL!=glb2->YL) return false;
-       if(glb1->Month!=glb2->Month) return false;
-       if(glb1->D!=glb2->D) return false;
-       
-       for(i=0; i<8; i++){
-               if(glb1->X[i]!=glb2->X[i]) return false;
-       }
-       if(glb1->Size!=glb2->Size) return false;
-       for(i=0; i<glb1->Size; i++){
-               if(glb1->Data[i]!=glb2->Data[i]) return false;
-       }
-       return true;
-}
-
-
-
-bool checkEvent(struct exchange2ical *exchange2ical, struct exchange2ical_check *exchange2ical_check, struct tm *aptStart)
-{
-       time_t beginTime;
-       time_t endTime;
-       time_t dtstart;
-       struct GlobalObjectId   *GlbObjId;
-       enum exchange2ical_flags eFlags= exchange2ical_check->eFlags;
-
-       if(eFlags & EntireFlag) return true;
-               
-       if(eFlags & RangeFlag){
-               dtstart = mktime(aptStart);
-               if(dtstart==-1) return false;
-               if(exchange2ical_check->begin){
-                       beginTime=mktime(exchange2ical_check->begin);
-                       if(beginTime!=-1){
-                               if(difftime(dtstart, beginTime)<0){
-                                       return false;
-                               }
-                       }
-               }
-               if(exchange2ical_check->end){
-                       endTime=mktime(exchange2ical_check->end);
-                       if(endTime!=-1){
-                               if(difftime(endTime, dtstart)<0){
-                                       return false;
-                               }
-                       }
-               }
-               return true;
-       }
-       
-       if(eFlags & EventFlag){
-               if(!exchange2ical->Sequence) return false;
-               GlbObjId = get_GlobalObjectId(exchange2ical->mem_ctx, exchange2ical->GlobalObjectId);
-               if(!GlbObjId || !exchange2ical_check->GlobalObjectId) return false;
-               if (!compareGlobalObjectIds(GlbObjId, exchange2ical_check->GlobalObjectId)) return false;
-               if(*exchange2ical->Sequence != exchange2ical_check->Sequence) return false;
-               talloc_free(GlbObjId);
-               return true;
-       }
-       
-       if(eFlags & EventsFlag){
-               GlbObjId = get_GlobalObjectId(exchange2ical->mem_ctx, exchange2ical->GlobalObjectId);
-               if(!GlbObjId || !exchange2ical_check->GlobalObjectId) return false;
-               if (!compareGlobalObjectIds(GlbObjId, exchange2ical_check->GlobalObjectId)) return false;
-               talloc_free(GlbObjId);
-               return true;
-       }
-       
-       return false;
-}
-
-
-
-#define WIN32_UNIX_EPOCH_DIFF 194074560
-
-uint32_t get_minutes_from_icaltimetype(icaltimetype icaltime)
-{
-       struct tm               tm;
-       time_t                  time;
-       NTTIME                  nttime;
-       struct timeval          t;
-       
-       tm.tm_year      = icaltime.year - 1900;
-       tm.tm_mon       = icaltime.month - 1;
-       tm.tm_mday      = icaltime.day;
-       tm.tm_hour      = icaltime.hour;
-       tm.tm_min       = icaltime.minute;
-       tm.tm_sec       = icaltime.second;
-       tm.tm_isdst     = 0;
-
-       /* TODO: fix this properly when we implement ical2exchange */
-#if !defined(__FreeBSD__)
-       if(timezone!=0){
-               tm.tm_hour-=timezone/3600;
-       }
-#endif
-       time = mktime(&tm);
-       unix_to_nt_time(&nttime, time);
-       nttime_to_timeval(&t, nttime);
-       
-       return t.tv_sec/60+WIN32_UNIX_EPOCH_DIFF;
-       
-}
-
-
-struct FILETIME get_FILETIME_from_icaltimetype(icaltimetype *tt)
-{
-       struct FILETIME         ft;
-       struct tm               tm;
-       time_t                  time;
-       NTTIME                  nttime;
-       
-       tm.tm_year      = tt->year - 1900;
-       tm.tm_mon       = tt->month - 1;
-       tm.tm_mday      = tt->day;
-       tm.tm_hour      = tt->hour;
-       tm.tm_min       = tt->minute;
-       tm.tm_sec       = tt->second;
-       tm.tm_isdst     = 0;
-
-       /* TODO: fix this properly when we implement ical2exchange */
-#if !defined(__FreeBSD__)
-       if(timezone!=0){
-               tm.tm_hour-=timezone/3600;
-       }
-#endif
-       time = mktime(&tm);
-       unix_to_nt_time(&nttime, time);
-       
-       ft.dwHighDateTime=(uint32_t) (nttime>>32);
-       ft.dwLowDateTime=(uint32_t) (nttime);
-       
-       return ft;
-}
-
-
-NTTIME FILETIME_to_NTTIME(struct FILETIME ft)
-{
-       NTTIME nt;
-       nt = ft.dwHighDateTime;
-       nt = nt << 32;
-       nt |= ft.dwLowDateTime;
-       return nt;
-}
-
-int compare_minutes(const void *min1, const void *min2)
-{
-       if( *(uint32_t *) min1 > * (uint32_t *) min2) return -1;
-       return 1;
-}
diff --git a/branches/plugfest/libexchange2ical/ical2exchange.c b/branches/plugfest/libexchange2ical/ical2exchange.c
deleted file mode 100644 (file)
index 8a7c84a..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
-   Common conversion routines for exchange2ical
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-static void ical2exchange_get_properties(struct ical2exchange *ical2exchange, icalcomponent *vevent){
-       icalproperty *icalProp = NULL;
-       icalproperty *prop = NULL;
-       const char *xname;
-       enum icalproperty_kind propType;
-
-       icalProp=icalcomponent_get_first_property(vevent, ICAL_ANY_PROPERTY);
-       
-       while(icalProp!=0){
-               propType=icalproperty_isa(icalProp);
-               switch (propType){
-                       case ICAL_ATTACH_PROPERTY:
-                               if(!ical2exchange->attachEvent){
-                                       ical2exchange->attachEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               icalcomponent_add_property(ical2exchange->attachEvent, prop);
-                               break;
-                       case ICAL_ATTENDEE_PROPERTY:
-                               if(!ical2exchange->attendeeEvent){
-                                       ical2exchange->attendeeEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               icalcomponent_add_property(ical2exchange->attendeeEvent, prop);
-                               break;
-                       case ICAL_CATEGORIES_PROPERTY:
-                               if(!ical2exchange->categoriesEvent){
-                                       ical2exchange->categoriesEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               icalcomponent_add_property(ical2exchange->categoriesEvent, prop);
-                               break;
-                       case ICAL_CLASS_PROPERTY:
-                               ical2exchange->classProp=icalProp;
-                               break;
-                       case ICAL_COMMENT_PROPERTY:
-                               ical2exchange->commentProp=icalProp;
-                               break;
-                       case ICAL_CONTACT_PROPERTY:
-                               if(!ical2exchange->contactEvent){
-                                       ical2exchange->contactEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               icalcomponent_add_property(ical2exchange->contactEvent, prop);
-                               break;
-                       case ICAL_CREATED_PROPERTY:
-                               break;
-                       case ICAL_DESCRIPTION_PROPERTY:
-                               ical2exchange->descriptionProp=icalProp;
-                               break;
-                       case ICAL_DTEND_PROPERTY:
-                               ical2exchange->dtendProp=icalProp;
-                               break;
-                       case ICAL_DTSTAMP_PROPERTY:
-                               ical2exchange->dtstampProp=icalProp;
-                               break;
-                       case ICAL_DTSTART_PROPERTY:
-                               ical2exchange->dtstartProp=icalProp;
-                               break;
-                       case ICAL_DURATION_PROPERTY:
-                               ical2exchange->durationProp=icalProp;
-                               break;
-                       case ICAL_EXDATE_PROPERTY:
-                               if(!ical2exchange->exdateEvent){
-                                       ical2exchange->exdateEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               ical2exchange->exdateCount ++;
-                               icalcomponent_add_property(ical2exchange->exdateEvent, prop);
-                               break;
-                       case ICAL_LASTMODIFIED_PROPERTY:
-                               break;
-                       case ICAL_LOCATION_PROPERTY:
-                               ical2exchange->locationProp=icalProp;
-                               break;
-                       case ICAL_ORGANIZER_PROPERTY:
-                               //TODO: figure out how to MS-OXOABK
-                               ical2exchange->organizerProp=icalProp;
-                               break;
-                       case ICAL_PRIORITY_PROPERTY:
-                               ical2exchange->priorityProp=icalProp;
-                               break;
-                       case ICAL_RDATE_PROPERTY:
-                               if(!ical2exchange->rdateEvent){
-                                       ical2exchange->rdateEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               ical2exchange->rdateCount ++;
-                               icalcomponent_add_property(ical2exchange->rdateEvent, prop);
-                               break;
-                       case ICAL_RECURRENCEID_PROPERTY:
-                               ical2exchange->recurrenceidProp=icalProp;
-                               break;
-                       case ICAL_RESOURCES_PROPERTY:
-                               if(!ical2exchange->resourcesEvent){
-                                       ical2exchange->resourcesEvent=icalcomponent_new_vevent();
-                               }
-                               prop = icalproperty_new_clone(icalProp);
-                               icalcomponent_add_property(ical2exchange->resourcesEvent, prop);
-                               break;
-                       case ICAL_RRULE_PROPERTY:
-                               ical2exchange->rruleProp=icalProp;
-                               break;
-                       case ICAL_SEQUENCE_PROPERTY:
-                               ical2exchange->sequenceProp=icalProp;
-                               break;
-                       case ICAL_STATUS_PROPERTY:
-                               ical2exchange->statusProp=icalProp;
-                               break;
-                       case ICAL_SUMMARY_PROPERTY:
-                               ical2exchange->summaryProp=icalProp;
-                               break;
-                       case ICAL_TRANSP_PROPERTY:
-                               ical2exchange->transpProp=icalProp;
-                               break;
-                       case ICAL_UID_PROPERTY:
-                               //TODO
-                               ical2exchange->uidProp=icalProp;
-                               break;
-                       case ICAL_X_PROPERTY: 
-                               xname=icalproperty_get_x_name(icalProp);
-                               if(!strcmp(xname,"X-MICROSOFT-CDO-BUSYSTATUS")){
-                                       ical2exchange->x_busystatusProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-MSNCALENDAR-BUSYSTATUS")){
-                                       ical2exchange->x_busystatusProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-APPT-SEQUENCE")){
-                                       ical2exchange->x_sequenceProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-IMPORTANCE")){
-                                       ical2exchange->x_importanceProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-MSNCALENDAR-IMPORTANCE")){
-                                       ical2exchange->x_importanceProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-INTENDEDSTATUS")){
-                                       ical2exchange->x_intendedProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-MSNCALENDAR-INTENDEDSTATUS")){
-                                       ical2exchange->x_intendedProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-OWNERAPPTID")){
-                                       ical2exchange->x_ownerapptidProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE")){
-                                       ical2exchange->x_attendeecriticalchangeProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE")){
-                                       ical2exchange->x_ownercriticalchangeProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-CDO-REPLYTIME")){
-                                       ical2exchange->x_replytimeProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-DISALLOW-COUNTER")){
-                                       ical2exchange->x_disallowcounterProp=icalProp;
-                               } else if(!strcmp(xname,"X-MICROSOFT-ISDRAFT")){
-                                       ical2exchange->x_isdraftProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-ALLOWEXTERNCHECK")){
-                                       ical2exchange->x_allowexterncheckProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-APPTLASTSEQUENCE")){
-                                       ical2exchange->x_apptlastsequenceProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-APPTSEQTIME")){
-                                       ical2exchange->x_apptseqtimeProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-AUTOFILLLOCATION")){
-                                       ical2exchange->x_autofilllocationProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-AUTOSTARTCHECK")){
-                                       ical2exchange->x_autostartcheckProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-CONFCHECK")){
-                                       ical2exchange->x_confcheckProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-COLLABORATEDDOC")){
-                                       ical2exchange->x_collaborateddocProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-CONFTYPE")){
-                                       ical2exchange->x_conftypeProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-MWSURL")){
-                                       ical2exchange->x_mwsurlProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-NETSHOWURL")){
-                                       ical2exchange->x_netshowurlProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-ONLINEPASSWORD")){
-                                       ical2exchange->x_onlinepasswordProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-ORGALIAS")){
-                                       ical2exchange->x_orgaliasProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-ORIGINALEND")){
-                                       ical2exchange->x_originalendProp=icalProp;
-                               } else if(!strcmp(xname,"X-MS-OLK-ORIGINALSTART")){
-                                       ical2exchange->x_originalstartProp=icalProp;
-                               }
-                               
-                               break;
-                       default:
-                               break;
-               }
-               icalProp=icalcomponent_get_next_property(vevent, ICAL_ANY_PROPERTY);
-       }
-       
-       ical2exchange->valarmEvent = icalcomponent_get_first_component(vevent,ICAL_VALARM_COMPONENT);
-       
-}
-
-static void ical2exchange_convert_event(struct ical2exchange *ical2exchange)
-{
-       ical2exchange_property_ATTACH(ical2exchange);
-//     //TODO ATTENDEE, ORGANIZER, x_ms_ok_sender
-       ical2exchange_property_CATEGORIES(ical2exchange);
-       ical2exchange_property_CLASS(ical2exchange);
-       ical2exchange_property_COMMENT(ical2exchange);
-       ical2exchange_property_CONTACT(ical2exchange);
-       ical2exchange_property_DESCRIPTION(ical2exchange);
-       ical2exchange_property_DTSTAMP(ical2exchange);
-       ical2exchange_property_DTSTART_DTEND(ical2exchange);
-       ical2exchange_property_LOCATION(ical2exchange);
-       ical2exchange_property_PRIORITY(ical2exchange);
-       ical2exchange_property_RRULE_EXDATE_RDATE(ical2exchange);
-       ical2exchange_property_SEQUENCE(ical2exchange);
-       ical2exchange_property_STATUS(ical2exchange);
-       ical2exchange_property_SUMMARY(ical2exchange);
-       ical2exchange_property_VALARM(ical2exchange);
-       ical2exchange_property_X_ALLOWEXTERNCHECK(ical2exchange);
-       ical2exchange_property_X_APPTSEQTIME(ical2exchange);
-       ical2exchange_property_X_APPTLASTSEQUENCE(ical2exchange);
-       ical2exchange_property_X_ATTENDEE_CRITICAL_CHANGE(ical2exchange);
-       ical2exchange_property_X_AUTOFILLLOCATION(ical2exchange);
-       ical2exchange_property_X_AUTOSTARTCHECK(ical2exchange);
-       ical2exchange_property_X_COLLABORATEDDOC(ical2exchange);
-       ical2exchange_property_X_CONFCHECK(ical2exchange);
-       ical2exchange_property_X_CONFTYPE(ical2exchange);
-       ical2exchange_property_X_DISALLOW_COUNTER(ical2exchange);
-       ical2exchange_property_X_INTENDEDSTATUS(ical2exchange);
-       ical2exchange_property_X_ISDRAFT(ical2exchange);
-       ical2exchange_property_X_MWSURL(ical2exchange);
-       ical2exchange_property_X_NETSHOWURL(ical2exchange);
-       ical2exchange_property_X_ONLINEPASSWORD(ical2exchange);
-       ical2exchange_property_X_ORGALIAS(ical2exchange);
-       ical2exchange_property_X_ORIGINALEND_ORIGINALSTART(ical2exchange);
-       ical2exchange_property_X_OWNER_CRITICAL_CHANGE(ical2exchange);
-       ical2exchange_property_X_OWNERAPPTID(ical2exchange);
-       ical2exchange_property_X_REPLYTIME(ical2exchange);
-}
-
-static void ical2exchange_init(struct ical2exchange *ical2exchange, TALLOC_CTX *mem_ctx)
-{
-       ical2exchange->mem_ctx = mem_ctx;
-       ical2exchange->classProp = NULL;
-       ical2exchange->commentProp = NULL;
-       ical2exchange->descriptionProp = NULL;
-       ical2exchange->dtendProp = NULL;
-       ical2exchange->dtstampProp = NULL;
-       ical2exchange->dtstartProp = NULL;
-       ical2exchange->durationProp = NULL;
-       ical2exchange->locationProp = NULL;
-       ical2exchange->organizerProp = NULL;
-       ical2exchange->priorityProp = NULL;
-       ical2exchange->recurrenceidProp = NULL;
-       ical2exchange->rruleProp = NULL;
-       ical2exchange->sequenceProp = NULL;
-       ical2exchange->statusProp = NULL;
-       ical2exchange->summaryProp = NULL;
-       ical2exchange->transpProp = NULL;
-       ical2exchange->uidProp = NULL;
-       ical2exchange->attachEvent = NULL;
-       ical2exchange->attendeeEvent = NULL;
-       ical2exchange->categoriesEvent = NULL;
-       ical2exchange->contactEvent = NULL;
-       ical2exchange->exdateEvent = NULL;
-       ical2exchange->rdateEvent = NULL;
-       ical2exchange->resourcesEvent = NULL;
-       ical2exchange->valarmEvent = NULL;
-       ical2exchange->x_busystatusProp = NULL;
-       ical2exchange->x_sequenceProp = NULL;
-       ical2exchange->x_importanceProp = NULL;
-       ical2exchange->x_intendedProp= NULL;
-       ical2exchange->x_ownerapptidProp = NULL;
-       ical2exchange->x_attendeecriticalchangeProp = NULL;
-       ical2exchange->x_ownercriticalchangeProp = NULL;
-       ical2exchange->x_replytimeProp = NULL;
-       ical2exchange->x_disallowcounterProp = NULL;
-       ical2exchange->x_isdraftProp = NULL;
-       ical2exchange->x_allowexterncheckProp = NULL;
-       ical2exchange->x_apptlastsequenceProp = NULL;
-       ical2exchange->x_apptseqtimeProp = NULL;
-       ical2exchange->x_autofilllocationProp = NULL;
-       ical2exchange->x_autostartcheckProp = NULL;
-       ical2exchange->x_confcheckProp = NULL;
-       ical2exchange->x_collaborateddocProp = NULL;
-       ical2exchange->x_conftypeProp = NULL;
-       ical2exchange->x_mwsurlProp = NULL;
-       ical2exchange->x_netshowurlProp = NULL;
-       ical2exchange->x_onlinepasswordProp = NULL;
-       ical2exchange->x_originalstartProp = NULL;
-       ical2exchange->x_originalendProp = NULL;
-       ical2exchange->x_orgaliasProp = NULL;
-       
-       ical2exchange->lpProps = NULL;
-       ical2exchange->rdateCount = 0 ;
-       ical2exchange->exdateCount = 0;
-       ical2exchange->cValues = 0;
-       
-}
-
-static void ical2exchange_reset(struct ical2exchange *ical2exchange)
-{
-       if(ical2exchange->attachEvent){
-               icalcomponent_free(ical2exchange->attachEvent);
-       }
-       if(ical2exchange->attendeeEvent){
-               icalcomponent_free(ical2exchange->attendeeEvent);
-       }
-
-       if(ical2exchange->contactEvent){
-               icalcomponent_free(ical2exchange->contactEvent);
-       }
-       if(ical2exchange->exdateEvent){
-               icalcomponent_free(ical2exchange->exdateEvent);
-       }
-       if(ical2exchange->rdateEvent){
-               icalcomponent_free(ical2exchange->rdateEvent);
-       }
-       if(ical2exchange->resourcesEvent){
-               icalcomponent_free(ical2exchange->resourcesEvent);
-       }
-       if(ical2exchange->categoriesEvent){
-               icalcomponent_free(ical2exchange->categoriesEvent);
-       }
-       ical2exchange_init(ical2exchange, NULL);
-}
-
-void _IcalEvent2Exchange(mapi_object_t *obj_folder, icalcomponent *vevent)
-{
-       struct ical2exchange ical2exchange;
-       TALLOC_CTX      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       mapi_object_t           obj_message;
-       ical2exchange.obj_message = &obj_message;
-
-       ical2exchange.method=ICAL_METHOD_PUBLISH;
-       mapi_object_init(&obj_message);
-       
-       /*sanity check*/
-       if(icalcomponent_isa(vevent) != ICAL_VEVENT_COMPONENT) return;
-       
-       mem_ctx = talloc_named(NULL, 0, "ical2exchange");
-       ical2exchange.lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       ical2exchange_init(&ical2exchange, mem_ctx);
-       ical2exchange_get_properties(&ical2exchange, vevent);
-       ical2exchange_convert_event(&ical2exchange);
-       
-       retval = CreateMessage(obj_folder, &obj_message);
-       
-       if (retval != MAPI_E_SUCCESS){
-               mapi_errstr("CreateMessage", GetLastError());
-       } else {
-               retval = SetProps(&obj_message, ical2exchange.lpProps, ical2exchange.cValues);
-               if (retval != MAPI_E_SUCCESS){
-                       mapi_errstr("SetProps", GetLastError());
-               } else {
-                       retval = SaveChangesMessage(obj_folder, &obj_message, KeepOpenReadOnly);
-                       if (retval != MAPI_E_SUCCESS){
-                               mapi_errstr("SaveChangesMessage", GetLastError());
-                       }
-               }
-       }
-       
-
-       MAPIFreeBuffer(ical2exchange.lpProps);
-       ical2exchange_reset(&ical2exchange);
-       talloc_free(mem_ctx);
-
-}
diff --git a/branches/plugfest/libexchange2ical/ical2exchange_property.c b/branches/plugfest/libexchange2ical/ical2exchange_property.c
deleted file mode 100644 (file)
index ef9675c..0000000
+++ /dev/null
@@ -1,1209 +0,0 @@
-/*
-   Common conversion routines for exchange2ical
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-#define MAXCAT  100000
-
-
-/*Taken from Samba4 code*/
-/*
-  this base64 decoder was taken from jitterbug (written by tridge).
-  we might need to replace it with a new version
-*/
-static int ldb_base64_decode(char *s)
-{
-       const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-       int bit_offset=0, byte_offset, idx, i, n;
-       uint8_t *d = (uint8_t *)s;
-       char *p=NULL;
-
-       n=i=0;
-
-       while (*s && (p=strchr(b64,*s))) {
-               idx = (int)(p - b64);
-               byte_offset = (i*6)/8;
-               bit_offset = (i*6)%8;
-               d[byte_offset] &= ~((1<<(8-bit_offset))-1);
-               if (bit_offset < 3) {
-                       d[byte_offset] |= (idx << (2-bit_offset));
-                       n = byte_offset+1;
-               } else {
-                       d[byte_offset] |= (idx >> (bit_offset-2));
-                       d[byte_offset+1] = 0;
-                       d[byte_offset+1] |= (idx << (8-(bit_offset-2))) & 0xFF;
-                       n = byte_offset+2;
-               }
-               s++; i++;
-       }
-       if (bit_offset >= 3) {
-               n--;
-       }
-
-       if (*s && !p) {
-               /* the only termination allowed */
-               if (*s != '=') {
-                       return -1;
-               }
-       }
-
-       /* null terminate */
-       d[n] = 0;
-       return n;
-}
-
-
-void ical2exchange_property_ATTACH(struct ical2exchange *ical2exchange)
-{
-       int             data;
-       char            *extension = NULL;
-       char            *filename = NULL;
-       const char      *fmttype = NULL;
-       icalattach      *icalattach = NULL;
-       icalparameter   *fmttypePar = NULL;
-       icalparameter   *xfilePar = NULL;
-       const char      *xname = NULL;
-       icalproperty    *attachProp = NULL;
-       
-       /*sanity check*/
-       if(!ical2exchange->attachEvent) return;
-       
-       attachProp=icalcomponent_get_first_property(ical2exchange->attachEvent, ICAL_ATTACH_PROPERTY);
-       while(attachProp){
-       
-               icalattach = icalproperty_get_attach(attachProp);
-               data = ldb_base64_decode((char *) icalattach_get_data (icalattach));
-               
-               /*FMTTYPE*/
-               fmttypePar = icalproperty_get_first_parameter(attachProp, ICAL_FMTTYPE_PARAMETER);
-               if(fmttypePar){
-                       fmttype = icalparameter_get_fmttype(fmttypePar);
-               }
-               
-               /*X-FIlename*/
-               xfilePar = icalproperty_get_first_parameter(attachProp, ICAL_X_PARAMETER);
-               if(xfilePar){
-                       xname = icalparameter_get_xname(xfilePar);
-                       if(!strcmp(xname,"X-FILENAME")){
-                               filename = (char *) icalparameter_get_x(xfilePar);
-               
-                       }
-               }
-               
-               /*Extension*/
-               if(filename){
-                       char buff[256]; 
-                       char *temp;
-                       strncpy(buff,filename, 255);
-                       buff[255] = '\0';
-                       extension = strtok(buff, ".");
-                       while((temp = strtok(NULL, "."))) extension = temp;
-               }
-               
-               printf("Create a new attachment object with\n");
-               printf("        set PidTagAttachDataBinary to %d\n", data);
-               printf("        set PidTagAttachExtension to %s\n", extension);
-               printf("        set PidTagAttachFilename to %s\n", filename);
-               printf("        set PidTagAttachLongFilename to %s\n", filename);
-               printf("        set PidTagAttachMimeTag to %s\n", fmttype);
-               printf("        set PidTagAttachFlags to 0x00000000\n");
-               printf("        set PidTagAttachMethod to 0x00000001\n");
-               printf("        set PidTagAttachmentContactPhoto to FALSE\n");
-               printf("        set PidTagAttachmentFlags to 0x00000000\n");
-               printf("        set PidTagAttachEncoding to empty SBinary");
-               printf("        set PidTagAttachmentHidden to FALSE\n");
-               printf("        set PidTagAttachmentLinkId to 0x00000000\n");
-               printf("        set PidTagDisplayName to  %s\n", filename);
-               printf("        set PidTagExceptionEndTime to 0x0CB34557A3DD4000\n");
-               printf("        set PidTagExceptionStartTime to 0x0CB34557A3DD4000\n");
-               printf("        set PidTagRenderingPosition to 0xFFFFFFFF\n");
-               
-               attachProp=icalcomponent_get_next_property(ical2exchange->attachEvent, ICAL_ATTACH_PROPERTY);
-       }
-}
-
-
-//TODO:
-void ical2exchange_property_CATEGORIES(struct ical2exchange *ical2exchange)
-{
-       struct StringArray_r *sArray;
-       char **stringArray = NULL;
-       char string[256];
-       char *value;
-       char *tok;
-       icalproperty *categoriesProp;
-       uint32_t i = 0;
-
-       /*sanity check*/
-       if(!ical2exchange->categoriesEvent) return;
-       
-       sArray = talloc(ical2exchange->mem_ctx, struct StringArray_r);
-       
-       categoriesProp = icalcomponent_get_first_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
-       sArray->cValues = 0;
-       while(categoriesProp){
-       
-               value = strdup(icalproperty_get_categories(categoriesProp));
-               tok = strtok(value, ",");
-               while(tok){
-                       if(!stringArray){
-                               stringArray = talloc_array(ical2exchange->mem_ctx, char *, 1);
-                       } else {
-                               stringArray = talloc_realloc(ical2exchange->mem_ctx, stringArray, char *, sArray->cValues+2);
-                       }
-                       strcpy(string, "");
-                       while(tok[i]){
-                               if (strlen(string) == 255) break;
-                               //remove beginning and ending white spaces
-                               if((tok[i]!= ' ' || (tok[i+1] && tok[i+1] != ' ')) && (strlen(string) || tok[i]!=' ')){
-                                       strncat(string, &tok[i], 1);
-                               }
-                               i++;
-                       }
-                       stringArray[sArray->cValues] = talloc_strdup(ical2exchange->mem_ctx, string);
-                       sArray->cValues++;
-                       i=0;
-                       tok= strtok(NULL, ",");
-               }
-               categoriesProp = icalcomponent_get_next_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
-
-       }
-       sArray->lppszA= (const char **) stringArray;
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidNameKeywords, 
-                                       (const void *) sArray);
-}
-
-void ical2exchange_property_CLASS(struct ical2exchange *ical2exchange)
-{
-       enum icalproperty_class class;
-       uint32_t        temp = 0;
-       uint32_t        *tag;
-       
-       /*sanity check*/
-       if(!ical2exchange->classProp) return;
-       
-       class = icalproperty_get_class(ical2exchange->classProp); 
-       
-       switch(class){
-               case ICAL_CLASS_PUBLIC:
-                       temp = 0x00000000;
-                       break;
-               case ICAL_CLASS_X:
-                       temp = 0x00000001;
-                       break;
-               case ICAL_CLASS_PRIVATE:
-                       temp = 0x00000002;
-                       break;
-               case ICAL_CLASS_CONFIDENTIAL:
-                       temp = 0x00000003;
-                       break;
-               case ICAL_CLASS_NONE:
-                       return;
-       }
-       
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag = temp;
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_SENSITIVITY, 
-                                       (const void *) tag);
-}
-
-void ical2exchange_property_COMMENT(struct ical2exchange *ical2exchange)
-{
-       const char *comment;
-
-       /*sanity check*/
-       if(!ical2exchange->commentProp) return;
-       if(ical2exchange->method != ICAL_METHOD_COUNTER && ical2exchange->method != ICAL_METHOD_REPLY) return;
-       
-       comment  = icalproperty_get_comment(ical2exchange->commentProp);
-       comment = talloc_strdup(ical2exchange->mem_ctx, comment);
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_BODY,
-                       (const void *) comment);
-}
-
-void ical2exchange_property_CONTACT(struct ical2exchange *ical2exchange)
-{
-       struct StringArray_r *sArray;
-       char *value;
-       char **stringArray = NULL;
-       icalproperty *contactProp;
-       
-       /*sanity check*/
-       if(!ical2exchange->contactEvent) return;
-       
-
-       contactProp=icalcomponent_get_first_property(ical2exchange->contactEvent, ICAL_CONTACT_PROPERTY);
-       sArray = talloc(ical2exchange->mem_ctx, struct StringArray_r);  
-       sArray->cValues =0;
-       while(contactProp){
-               if(!stringArray){
-                       stringArray = talloc_array(ical2exchange->mem_ctx, char *, 1);
-               } else {
-                       stringArray = talloc_realloc(ical2exchange->mem_ctx, stringArray, char *, sArray->cValues+2);
-               }
-               value = strdup(icalproperty_get_contact(contactProp));
-               if(strlen(value)<500){
-                       stringArray[sArray->cValues] = talloc_strdup(ical2exchange->mem_ctx, value);
-               } else {
-                       value[499] = '\0';
-                       stringArray[sArray->cValues] = talloc_strndup(ical2exchange->mem_ctx, value, 500);
-               }
-               sArray->cValues++;
-               contactProp=icalcomponent_get_next_property(ical2exchange->contactEvent, ICAL_CONTACT_PROPERTY);
-       }
-               
-       /*set up struct*/
-       sArray->lppszA=(const char **) stringArray;
-
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidContacts, 
-                                       (const void *) sArray);
-
-}
-
-void ical2exchange_property_DESCRIPTION(struct ical2exchange *ical2exchange)
-{
-       const char *description;
-       
-       /*sanity check*/
-       if(!ical2exchange->descriptionProp) return;
-       
-       if(ical2exchange->method == ICAL_METHOD_COUNTER || ical2exchange->method == ICAL_METHOD_REPLY) return;
-       
-       description  = icalproperty_get_description(ical2exchange->descriptionProp);
-       description = talloc_strdup(ical2exchange->mem_ctx, description);
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_BODY,
-                       (const void *) description);    
-}
-
-void ical2exchange_property_DTSTAMP(struct ical2exchange *ical2exchange)
-{
-       struct FILETIME *ft;
-       icaltimetype dtstamp;
-       
-       /*sanity check*/
-       if(!ical2exchange->dtstampProp) return;
-               
-       dtstamp  = icalproperty_get_dtstamp(ical2exchange->dtstampProp);
-       ft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       *ft = get_FILETIME_from_icaltimetype(&dtstamp);
-       
-       if(ical2exchange->method == ICAL_METHOD_COUNTER || ical2exchange->method == ICAL_METHOD_REPLY){
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAttendeeCriticalChange,
-                              (const void *) ft);
-       } else {
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidOwnerCriticalChange,
-                              (const void *) ft);
-       }
-}
-
-void ical2exchange_property_DTSTART_DTEND(struct ical2exchange *ical2exchange)
-{
-       icaltimetype dtstart;
-       icaltimetype dtend;
-       struct FILETIME *startft; 
-       struct FILETIME *endft; 
-       double difference;
-       uint32_t *duration; 
-       
-       /*sanity check*/
-       if(!ical2exchange->dtstartProp) return;
-       if(!ical2exchange->dtendProp) return;
-
-       /*dtstart property*/
-       dtstart  = icalproperty_get_dtstart(ical2exchange->dtstartProp);
-       startft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       *startft = get_FILETIME_from_icaltimetype(&dtstart);
-       
-       /*dtend property*/
-       dtend  = icalproperty_get_dtend(ical2exchange->dtendProp);
-       endft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       *endft = get_FILETIME_from_icaltimetype(&dtend);
-       
-       if(ical2exchange->method == ICAL_METHOD_COUNTER){
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentProposedStartWhole,
-                              (const void *) startft);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentProposedEndWhole,
-                              (const void *) endft);
-       } else {
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentStartWhole,
-                              (const void *) startft);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentEndWhole,
-                              (const void *) endft);
-                              
-               /*duration property*/
-               duration = talloc(ical2exchange->mem_ctx, uint32_t);
-               difference =  difftime(nt_time_to_unix(FILETIME_to_NTTIME(*endft)), 
-                                      nt_time_to_unix(FILETIME_to_NTTIME(*startft)));  
-               *duration = difference/60;
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentDuration,
-                               (const void *) duration);
-               /*check if all day appointment*/
-               if(*duration==1440 && dtstart.hour==0 && dtstart.minute==0){
-                       uint32_t *allday = talloc(ical2exchange->mem_ctx, uint32_t);
-                       *allday = 0x00000001;
-                       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentSubType,
-                                       (const void *) allday);
-               }
-       }
-}
-
-void ical2exchange_property_LOCATION(struct ical2exchange *ical2exchange)
-{
-       uint32_t *langtag;
-       char location[256] = "";
-       icalparameter *param = NULL;
-       const char *value;
-       char *string;
-       
-       /*sanity check*/
-       if(!ical2exchange->locationProp) return;
-               
-       value  = icalproperty_get_location(ical2exchange->locationProp);
-       int i;
-       
-       for(i=0; i<255; i++){
-               if(!value[i]) break;
-               char c = value[i];
-               if(c !='\xD' && c!='\xA' )
-                       strncat(location, &c, 1);
-       }
-       string = talloc_strdup(ical2exchange->mem_ctx, location);
-
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidLocation, 
-                       (const void *) string);
-                       
-       if((param=icalproperty_get_first_parameter(ical2exchange->locationProp, ICAL_LANGUAGE_PARAMETER))){
-               const char* langName;
-               langtag = talloc(ical2exchange->mem_ctx, uint32_t);
-               langName = icalparameter_get_language(param);
-               *langtag = mapi_get_lcid_from_language(langName);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_MESSAGE_LOCALE_ID, 
-                                       (const void *) langtag);
-       } 
-
-}
-
-void ical2exchange_property_PRIORITY(struct ical2exchange *ical2exchange)
-{
-       uint32_t temp = 0;
-       uint32_t *tag;
-       
-       if(ical2exchange->x_importanceProp){
-               const char *value = icalproperty_get_x(ical2exchange->x_importanceProp);
-               switch(atoi(value)){
-                       case 0:
-                               temp = 0x00000000;
-                               break;
-                       case 1:
-                               temp = 0x00000001;
-                               break;
-                       case 2:
-                               temp = 0x00000002;
-                               break;
-               }
-       } else if(ical2exchange->priorityProp){
-               switch(icalproperty_get_priority(ical2exchange->priorityProp)){
-                       case 0:
-                               return;
-                       case 1:
-                       case 2:
-                       case 3:
-                       case 4:
-                               temp = 0x00000002;
-                               break;
-                       case 5:
-                               temp = 0x00000001;
-                               break;
-                       case 6:
-                       case 7:
-                       case 8:
-                       case 9:
-                               temp = 0x00000000;
-                               break;
-                       default:
-                               return;
-               }
-       } else return;
-       
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag = temp;
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentSequence, 
-                                       (const void *) tag);    
-}
-
-//TODO: Finish this
-void ical2exchange_property_RRULE_EXDATE_RDATE(struct ical2exchange *ical2exchange)
-{
-       struct RecurrencePattern        rp;
-       struct icalrecurrencetype       irt;
-       struct icaltimetype             next;
-       struct icaltimetype             last;
-       icalrecur_iterator              *ritr;
-       icaltimetype                    dtstart;
-       icaltimetype                    rdate;
-       icaltimetype                    exdate;
-       icalproperty                    *exdateProp;
-       icalproperty                    *rdateProp;
-       enum CalendarType               calendarType;
-       enum EndType                    endType;
-       enum icalrecurrencetype_weekday weekday; 
-       uint32_t                        startTime;
-       uint32_t                        endTime;
-       uint32_t                        occurrenceCount;
-       uint32_t                        i;
-       uint32_t                        modifiedInstanceDates[ical2exchange->rdateCount];
-       uint32_t                        deletedInstanceDates[ical2exchange->exdateCount+ical2exchange->rdateCount];
-       
-       if(!ical2exchange->rruleProp) return;
-       if(!ical2exchange->dtstartProp) return;
-       
-       irt =  icalproperty_get_rrule(ical2exchange->rruleProp);
-
-       /*StartTime*/
-       enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
-       dtstart  = icalproperty_get_dtstart(ical2exchange->dtstartProp);
-       dtstart.hour = 0;
-       dtstart.minute = 0;
-       dtstart.second = 0;
-       startTime = get_minutes_from_icaltimetype(dtstart);
-       
-       /*WeekDay*/
-       if(irt.week_start == ICAL_NO_WEEKDAY){
-               weekday = icalrecurrencetype_day_day_of_week(icaltime_day_of_week(dtstart));
-       } else {
-               weekday = irt.week_start;
-       }
-       
-       /*calendarType*/
-       //if(ical2exchange->calscaleProp){
-               //calendarType = get_exchange_calendartype(icalproperty_get_x(ical2exchange->calscaleProp));
-               
-       //} else {
-               calendarType = CAL_DEFAULT;
-       //}
-       
-       /*endType occurrenceCount endTime*/
-       if(irt.count || !icaltime_is_null_time(irt.until)){
-               endType = END_AFTER_N_OCCURRENCES;
-               occurrenceCount = irt.count;
-               
-               ritr = icalrecur_iterator_new(irt,dtstart);
-               next=icalrecur_iterator_next(ritr);
-               
-               while (!icaltime_is_null_time(next)){
-                       last = next;
-                       next=icalrecur_iterator_next(ritr);
-                       
-                       if(!irt.count) occurrenceCount++;
-               }
-               
-               endTime = get_minutes_from_icaltimetype(last); 
-               icalrecur_iterator_free(ritr);
-               
-       } else {
-               endType = END_NEVER_END;
-               occurrenceCount = 0x0000000A;
-               endTime         = 0x5AE980DF;
-       }
-       
-       /*Common values for all rrule*/
-       rp.ReaderVersion        = 0x3004;
-       rp.WriterVersion        = 0x3004;
-       rp.CalendarType         = calendarType;
-       rp.FirstDateTime        = startTime;
-       rp.SlidingFlag          = 0x00000000;
-       rp.EndType              = endType;
-       rp.OccurrenceCount      = occurrenceCount;
-       rp.FirstDOW             = get_exchange_day_from_ical(weekday);  
-       rp.StartDate            = startTime;
-       rp.EndDate              = endTime;
-       
-       /*Specific values*/
-       switch(irt.freq){
-               case ICAL_DAILY_RECURRENCE:
-                       rp.RecurFrequency       = RecurFrequency_Daily;
-                       rp.PatternType          = PatternType_Day;
-                       rp.Period               = 1440 * irt.interval;
-                       break;
-               case ICAL_WEEKLY_RECURRENCE:
-                       rp.RecurFrequency       = RecurFrequency_Weekly;
-                       rp.PatternType          = PatternType_Day;
-                       rp.Period               = irt.interval;
-                       break;
-               case ICAL_MONTHLY_RECURRENCE:
-                       rp.RecurFrequency       = RecurFrequency_Monthly;
-                       rp.Period               = irt.interval;
-                       
-                       if(irt.by_day[0] == ICAL_RECURRENCE_ARRAY_MAX){
-                               rp.PatternType  = PatternType_Month;
-                               
-                               if(irt.by_month_day[0] == -1){
-                                       rp.PatternTypeSpecific.Day = 0x0000001F;
-                               } else {
-                                       rp.PatternTypeSpecific.Day = irt.by_month_day[0];
-                               }
-                               
-                       } else {
-                               rp.PatternType  = PatternType_MonthNth;
-                               i = 0;
-                               rp.PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern = 0;
-                               while( irt.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX){
-                                       rp.PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern  |= get_exchange_rdfDays_from_ical(irt.by_day[i]);
-                                       i++;
-                               }
-                               if(irt.by_set_pos[0] == -1) rp.PatternTypeSpecific.MonthRecurrencePattern.N = RecurrenceN_Last;
-                               else rp.PatternTypeSpecific.MonthRecurrencePattern.N = irt.by_set_pos[0];
-                       }
-                       break;
-               case ICAL_YEARLY_RECURRENCE:
-                       rp.RecurFrequency       = RecurFrequency_Yearly;
-                       rp.Period               = 12 * irt.interval;
-                       
-                       /*Nth*/
-                       if(irt.by_day[0] == ICAL_RECURRENCE_ARRAY_MAX){
-                               rp.PatternType  = PatternType_Month;
-                               if(irt.by_month_day[0] == -1){
-                                       rp.PatternTypeSpecific.Day = 0x0000001F;
-                               } else {
-                                       rp.PatternTypeSpecific.Day = irt.by_month_day[0];
-                               }
-                       } else {
-                               rp.PatternType  = PatternType_MonthNth;
-                               i = 0;
-                               rp.PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern = 0;
-                               while( irt.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX){
-                                       rp.PatternTypeSpecific.MonthRecurrencePattern.WeekRecurrencePattern  |= get_exchange_rdfDays_from_ical(irt.by_day[i]);
-                                       i++;
-                               }
-                               if(irt.by_set_pos[0] == -1) rp.PatternTypeSpecific.MonthRecurrencePattern.N = RecurrenceN_Last;
-                               else rp.PatternTypeSpecific.MonthRecurrencePattern.N = irt.by_set_pos[0];
-                       }
-                       break;
-               default:
-                       printf("not handled yet\n");
-                       
-       }
-       
-
-       /*deletedInstanceDates & modifiedInstanceDates*/
-       if(ical2exchange->exdateEvent){
-               exdateProp=icalcomponent_get_first_property(ical2exchange->exdateEvent, ICAL_EXDATE_PROPERTY);
-
-               for(i=0; i<ical2exchange->exdateCount; i++){
-                       exdate = icalproperty_get_exdate(exdateProp);
-                       deletedInstanceDates[i] = get_minutes_from_icaltimetype(exdate);
-                       exdateProp=icalcomponent_get_first_property(ical2exchange->exdateEvent, ICAL_EXDATE_PROPERTY);
-               }
-       }
-       
-       if(ical2exchange->rdateEvent){
-               rdateProp = icalcomponent_get_first_property(ical2exchange->rdateEvent, ICAL_EXDATE_PROPERTY);
-
-               for(i=0; i<ical2exchange->rdateCount; i++){
-                       rdate = icalproperty_get_exdate(rdateProp);
-                       deletedInstanceDates[i + ical2exchange->exdateCount] = get_minutes_from_icaltimetype(rdate);
-                       modifiedInstanceDates[i] = get_minutes_from_icaltimetype(rdate);
-                       rdateProp = icalcomponent_get_first_property(ical2exchange->rdateEvent, ICAL_EXDATE_PROPERTY);
-               }
-       }
-       /*Sort array*/
-       qsort(deletedInstanceDates, ical2exchange->rdateCount + ical2exchange->exdateCount, sizeof(uint32_t), compare_minutes);
-       qsort(modifiedInstanceDates, ical2exchange->rdateCount, sizeof(uint32_t), compare_minutes);
-       
-       rp.DeletedInstanceCount = ical2exchange->rdateCount + ical2exchange->exdateCount;
-       rp.ModifiedInstanceCount = ical2exchange->rdateCount;
-       
-       rp.DeletedInstanceDates = deletedInstanceDates;
-       rp.ModifiedInstanceDates = modifiedInstanceDates;
-       
-       
-}
-
-void ical2exchange_property_SEQUENCE(struct ical2exchange *ical2exchange)
-{
-       uint32_t temp;
-       uint32_t *tag;
-       
-       if(ical2exchange->x_sequenceProp){
-               temp = atoi(icalproperty_get_x(ical2exchange->x_sequenceProp));
-       } else if(ical2exchange->sequenceProp){
-               temp = icalproperty_get_sequence(ical2exchange->sequenceProp);
-       } else return;
-       
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag = temp;
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentSequence, 
-                                       (const void *) tag);    
-}
-
-void ical2exchange_property_STATUS(struct ical2exchange *ical2exchange)
-{
-       
-       enum icalproperty_status status;
-       enum icalproperty_transp transp;
-       uint32_t *tag;
-       uint32_t temp = 0;
-       const char *prop;
-       
-       if(ical2exchange->x_busystatusProp){
-               prop=icalproperty_get_x(ical2exchange->x_busystatusProp);
-
-               if(!strcmp(prop, "FREE")){
-                       temp = 0x00000000;
-               } else if(!strcmp(prop, "TENTATIVE")){
-                       temp = 0x00000001;
-               } else if(!strcmp(prop, "BUSY")){
-                       temp = 0x00000002;
-               } else if(!strcmp(prop, "OOF")){
-                       temp = 0x00000003;
-               }
-               
-       } else if(ical2exchange->transpProp){
-               transp = icalproperty_get_transp(ical2exchange->transpProp); 
-               switch(transp){
-                       case ICAL_TRANSP_TRANSPARENT:
-                               temp = 0x00000000;
-                               break;
-                       case ICAL_TRANSP_OPAQUE:
-                               temp = 0x00000002;
-                               break;
-                       default:
-                               return;
-               }
-               
-       } else if(ical2exchange->statusProp){
-               status = icalproperty_get_status(ical2exchange->classProp); 
-               switch(status){
-                       case ICAL_STATUS_CANCELLED:
-                               temp = 0x00000000;
-                               break;
-                       case ICAL_STATUS_TENTATIVE:
-                               temp = 0x00000001;
-                               break;
-                       case ICAL_STATUS_CONFIRMED:
-                               temp = 0x00000002;
-                               break;
-                       default:
-                               return;
-               }
-       } else return;
-       
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag = temp;
-       
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidBusyStatus, 
-                                       (const void *) tag);    
-}
-
-void ical2exchange_property_SUMMARY(struct ical2exchange *ical2exchange)
-{
-       const char *value;
-       uint32_t langtag;
-       char summary[256] = "";
-       icalparameter *param = NULL;
-       char *string;
-       
-       /*sanity check*/
-       if(!ical2exchange->summaryProp) return;
-       
-       value  = icalproperty_get_summary(ical2exchange->summaryProp);
-       
-       int i;
-       
-       for(i=0; i<255; i++){
-               if(!value[i]) break;
-               char c = value[i];
-               if(c !='\xD' && c!='\xA' )
-                       strncat(summary, &c, 1);
-       }
-       string = talloc_strdup(ical2exchange->mem_ctx, summary);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_SUBJECT, 
-                       (const void *) string);
-       if((param=icalproperty_get_first_parameter(ical2exchange->summaryProp, ICAL_LANGUAGE_PARAMETER))){
-               const char *langName;
-               langName = icalparameter_get_language(param);
-               langtag = mapi_get_lcid_from_language(langName);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_MESSAGE_LOCALE_ID, 
-                                               (const void *) &langtag);
-       }
-}
-
-void ical2exchange_property_VALARM(struct ical2exchange *ical2exchange)
-{
-       icalproperty *triggerProp = NULL;
-       uint32_t *duration;
-       icaltimetype dtstart;
-       icaltimetype current;
-       icaltimetype triggerSet;
-       icaltimetype next;
-       
-       const icaltimezone *timezone; 
-       struct FILETIME *rtimeft;
-       struct FILETIME *rsignalft;
-       struct icalrecurrencetype       irt;
-       icalrecur_iterator              *ritr;
-       struct icaltriggertype trigger;
-       bool *set;
-       
-
-       /*sanity check*/
-       if(!ical2exchange->valarmEvent) return;
-       if(!ical2exchange->dtstartProp) return;
-
-       triggerProp = icalcomponent_get_first_property(ical2exchange->valarmEvent, ICAL_TRIGGER_PROPERTY);
-       if(!triggerProp) return;
-       
-       trigger = icalproperty_get_trigger(triggerProp);
-       dtstart  = icalproperty_get_dtstart(ical2exchange->dtstartProp);
-       duration = talloc(ical2exchange->mem_ctx, uint32_t);
-       
-       if(trigger.duration.is_neg){
-               *duration = -trigger.duration.minutes;
-       } else {
-               *duration = trigger.duration.minutes;
-       }
-
-       timezone = icaltime_get_timezone(dtstart);
-       current = icaltime_current_time_with_zone(timezone);
-       
-       if(icaltime_compare(dtstart, current)) {
-               rtimeft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-               rsignalft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-
-               *rtimeft = get_FILETIME_from_icaltimetype(&dtstart);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderTime, 
-                                               (const void *) rtimeft);
-                       
-               triggerSet = icaltime_add(dtstart, trigger.duration);
-               *rsignalft = get_FILETIME_from_icaltimetype(&triggerSet);
-               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderSignalTime, 
-                                               (const void *) rsignalft);
-       } else if(ical2exchange->rruleProp) {
-               irt =  icalproperty_get_rrule(ical2exchange->rruleProp);
-               ritr = icalrecur_iterator_new(irt,dtstart);
-               next = icalrecur_iterator_next(ritr);
-               
-               while (!icaltime_is_null_time(next)){
-                       if(icaltime_compare(next, current)) {
-                               rtimeft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-                               rsignalft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-                               
-                               *rtimeft = get_FILETIME_from_icaltimetype(&next);
-                               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderTime, 
-                                       (const void *) rtimeft);
-                                       
-                               triggerSet = icaltime_add(next, trigger.duration);
-                               *rsignalft = get_FILETIME_from_icaltimetype(&triggerSet);
-                               ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderSignalTime, 
-                                       (const void *) &rsignalft);
-                               break;
-                       }
-                       next=icalrecur_iterator_next(ritr);
-               }
-       } else return;
-       
-       set = talloc(ical2exchange->mem_ctx, bool);
-       *set = true;
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderSet, 
-                                       (const void *) set);
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidReminderDelta, 
-                                       (const void *) duration);
-}
-
-void ical2exchange_property_X_ALLOWEXTERNCHECK(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *allow;
-       
-       if(!ical2exchange->x_allowexterncheckProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_allowexterncheckProp);
-       allow = talloc(ical2exchange->mem_ctx, bool);
-       
-       if(strcmp(prop, "TRUE")){
-               *allow = true;
-       } else {
-               *allow = false;
-       }
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAllowExternalCheck, 
-                                       (const void *) allow);
-}
-
-void ical2exchange_property_X_APPTSEQTIME(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       struct FILETIME *ft;
-       
-       if(!ical2exchange->x_apptseqtimeProp) return;
-       
-       ft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       
-       prop=icalproperty_get_x(ical2exchange->x_apptseqtimeProp);
-       *ft = get_FILETIME_from_string(prop);
-
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentSequenceTime, 
-                                       (const void *) ft);
-}
-
-void ical2exchange_property_X_APPTLASTSEQUENCE(struct ical2exchange *ical2exchange)
-{
-       uint32_t *tag;
-       const char *prop;
-       
-       if(!ical2exchange->x_apptlastsequenceProp) return;
-
-       prop=icalproperty_get_x(ical2exchange->x_apptlastsequenceProp);
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag=atoi(prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentLastSequence, 
-                                       (const void *) tag);
-}
-
-void ical2exchange_property_X_ATTENDEE_CRITICAL_CHANGE(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       struct FILETIME *ft;
-       
-       if(!ical2exchange->x_attendeecriticalchangeProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_attendeecriticalchangeProp);
-       ft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       *ft = get_FILETIME_from_string(prop);
-
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAttendeeCriticalChange, 
-                                       (const void *) ft);
-}
-
-void ical2exchange_property_X_AUTOFILLLOCATION(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *autoFill;
-       
-       if(!ical2exchange->x_autofilllocationProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_autofilllocationProp);
-       autoFill = talloc(ical2exchange->mem_ctx, bool);
-       
-       if(strcmp(prop, "TRUE")){
-               *autoFill = true;
-       } else {
-               *autoFill = false;
-       }
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAutoFillLocation, 
-                                       (const void *) autoFill);
-}
-
-void ical2exchange_property_X_AUTOSTARTCHECK(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *autoStart;
-       
-       if(!ical2exchange->x_autostartcheckProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_autostartcheckProp);
-       autoStart = talloc(ical2exchange->mem_ctx, bool);       
-       
-       if(strcmp(prop, "TRUE")){
-               *autoStart = true;
-       } else {
-               *autoStart = false;
-       }
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAutoStartCheck, 
-                                       (const void *) autoStart);
-}
-
-void ical2exchange_property_X_COLLABORATEDDOC(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       
-       if(!ical2exchange->x_collaborateddocProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_collaborateddocProp);          
-       
-       prop = talloc_strdup(ical2exchange->mem_ctx, prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidCollaborateDoc, 
-                                       (const void *) prop);
-}
-
-void ical2exchange_property_X_CONFCHECK(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *confCheck;
-       
-       if(!ical2exchange->x_confcheckProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_confcheckProp);
-       confCheck = talloc(ical2exchange->mem_ctx, bool);
-       
-       if(strcmp(prop, "TRUE")){
-               *confCheck = true;
-       } else {
-               *confCheck = false;
-       }
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidConferencingCheck, 
-                                       (const void *) confCheck);
-}
-
-void ical2exchange_property_X_CONFTYPE(struct ical2exchange *ical2exchange)
-{
-       uint32_t *tag;
-       const char *prop;
-       
-       if(!ical2exchange->x_conftypeProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_conftypeProp);
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag=atoi(prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidConferencingType, 
-                                       (const void *) tag);
-}
-
-void ical2exchange_property_X_DISALLOW_COUNTER(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *disallow;
-       
-       if(!ical2exchange->x_disallowcounterProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_disallowcounterProp);
-       disallow = talloc(ical2exchange->mem_ctx, bool);
-       
-       if(strcmp(prop, "TRUE")){
-               *disallow = true;
-       } else {
-               *disallow = false;
-       }
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentNotAllowPropose, 
-                                       (const void *) disallow);
-}
-
-void ical2exchange_property_X_INTENDEDSTATUS(struct ical2exchange *ical2exchange)
-{
-       uint32_t *tag;
-       const char *prop;
-       
-       if(!ical2exchange->x_intendedProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_intendedProp);
-       tag = talloc(ical2exchange->mem_ctx,uint32_t);
-       
-       if(!strcmp(prop, "FREE")){
-               *tag = 0x00000000;
-       } else if(!strcmp(prop, "TENTATIVE")){
-               *tag = 0x00000001;
-       } else if(!strcmp(prop, "BUSY")){
-               *tag = 0x00000002;
-       } else if(!strcmp(prop, "OOF")){
-               *tag = 0x00000003;
-       }
-       
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidIntendedBusyStatus, 
-                                       (const void *) tag);
-}
-
-void ical2exchange_property_X_ISDRAFT(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       bool *isDraft;
-       
-       isDraft = talloc(ical2exchange->mem_ctx, bool);
-       
-       if(ical2exchange->method == ICAL_METHOD_COUNTER || ical2exchange->method == ICAL_METHOD_REPLY 
-               || ical2exchange->method == ICAL_METHOD_REQUEST || ical2exchange->method == ICAL_METHOD_CANCEL){
-               
-               *isDraft = true;
-       } else {
-               if(ical2exchange->x_isdraftProp){
-                       prop=icalproperty_get_x(ical2exchange->x_isdraftProp);          
-                       if(strcmp(prop, "TRUE")){
-                               *isDraft = true;
-                       } else {
-                               *isDraft = false;
-                       }
-               } else {
-                       *isDraft = false;
-               }
-       }
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidFInvited, 
-                                       (const void *) isDraft);
-}
-
-void ical2exchange_property_X_MWSURL(struct ical2exchange *ical2exchange)
-{
-       char *mwsurl;
-       const char *prop;
-       
-       if(!ical2exchange->x_mwsurlProp) return;
-       
-       prop = icalproperty_get_x(ical2exchange->x_mwsurlProp);         
-       mwsurl = talloc_strdup(ical2exchange->mem_ctx, prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidMeetingWorkspaceUrl, 
-                                       (const void *) mwsurl);
-}
-
-void ical2exchange_property_X_NETSHOWURL(struct ical2exchange *ical2exchange)
-{
-       char *netshow;
-       const char *prop;
-       
-       if(!ical2exchange->x_netshowurlProp) return;
-       
-       prop = icalproperty_get_x(ical2exchange->x_netshowurlProp);             
-       netshow = talloc_strdup(ical2exchange->mem_ctx, prop);
-
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidNetShowUrl, 
-                                       (const void *) netshow);
-}
-
-void ical2exchange_property_X_ONLINEPASSWORD(struct ical2exchange *ical2exchange)
-{
-       char *onlinepass;
-       const char *prop;
-       
-       if(!ical2exchange->x_onlinepasswordProp) return;
-       
-       prop = icalproperty_get_x(ical2exchange->x_onlinepasswordProp);         
-       onlinepass = talloc_strdup(ical2exchange->mem_ctx, prop);
-
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidOnlinePassword, 
-                                       (const void *) onlinepass);
-}
-
-void ical2exchange_property_X_ORGALIAS(struct ical2exchange *ical2exchange)
-{
-       char *orgalias;
-       const char *prop;
-       
-       if(!ical2exchange->x_orgaliasProp) return;
-       
-       prop = icalproperty_get_x(ical2exchange->x_orgaliasProp);               
-       orgalias = talloc_strdup(ical2exchange->mem_ctx, prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidOrganizerAlias, 
-                                       (const void *) orgalias);
-}
-
-void ical2exchange_property_X_ORIGINALEND_ORIGINALSTART(struct ical2exchange *ical2exchange)
-{
-       const char *start;
-       const char *end;
-       double difference;
-       uint32_t duration;
-       struct FILETIME startft;
-       struct FILETIME endft;
-       
-       /*sanity check*/
-       if(!ical2exchange->x_originalendProp) return;
-       if(!ical2exchange->x_originalstartProp) return;
-       if(ical2exchange->method != ICAL_METHOD_COUNTER) return;
-       
-       start = icalproperty_get_x(ical2exchange->x_originalstartProp);
-       end = icalproperty_get_x(ical2exchange->x_originalendProp);
-
-       startft = get_FILETIME_from_string(start);
-       endft = get_FILETIME_from_string(end);
-       
-       /*duration property*/
-       difference =  difftime(nt_time_to_unix(FILETIME_to_NTTIME(endft)), 
-                                    nt_time_to_unix(FILETIME_to_NTTIME(startft)));
-       duration = difference/60;
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentStartWhole, 
-                       (const void *) &startft);
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentEndWhole, 
-                       (const void *) &endft);
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentDuration, 
-                       (const void *) &duration);
-                       
-}
-
-void ical2exchange_property_X_OWNER_CRITICAL_CHANGE(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       struct FILETIME ft;
-       
-       if(!ical2exchange->x_ownercriticalchangeProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_ownercriticalchangeProp);
-       ft = get_FILETIME_from_string(prop);
-
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidOwnerCriticalChange, 
-                                       (const void *) &ft);
-}
-
-void ical2exchange_property_X_OWNERAPPTID(struct ical2exchange *ical2exchange)
-{
-       uint32_t *tag;
-       const char *prop;
-       
-       if(!ical2exchange->x_ownerapptidProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_ownerapptidProp);
-       
-       tag = talloc(ical2exchange->mem_ctx, uint32_t);
-       *tag = atoi(prop);
-       
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PR_OWNER_APPT_ID, 
-                                       (const void *) tag);
-}
-
-void ical2exchange_property_X_REPLYTIME(struct ical2exchange *ical2exchange)
-{
-       const char *prop;
-       struct FILETIME *ft;
-       
-       if(!ical2exchange->x_replytimeProp) return;
-       
-       prop=icalproperty_get_x(ical2exchange->x_replytimeProp);
-       ft = talloc(ical2exchange->mem_ctx, struct FILETIME);
-       *ft = get_FILETIME_from_string(prop);
-
-       /* SetProps */
-       ical2exchange->lpProps = add_SPropValue(ical2exchange->mem_ctx, ical2exchange->lpProps, &ical2exchange->cValues, PidLidAppointmentReplyTime, 
-                                       (const void *) ft);
-}
diff --git a/branches/plugfest/libexchange2ical/libexchange2ical.c b/branches/plugfest/libexchange2ical/libexchange2ical.c
deleted file mode 100644 (file)
index d619cd3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-   Convert Exchange appointments to ICAL
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-
-icalcomponent * Exchange2Ical(mapi_object_t *obj_folder)
-{
-       struct exchange2ical_check exchange2ical_check;
-       exchange2ical_check.eFlags=EntireFlag;
-       
-       return _Exchange2Ical(obj_folder, &exchange2ical_check);
-}
-
-
-icalcomponent * Exchange2IcalRange(mapi_object_t *obj_folder, struct tm *begin, struct tm *end)
-{
-       struct exchange2ical_check exchange2ical_check;
-       exchange2ical_check.eFlags=RangeFlag;
-       exchange2ical_check.begin = begin;
-       exchange2ical_check.end = end;
-       return _Exchange2Ical(obj_folder, &exchange2ical_check);
-}
-
-
-icalcomponent *Exchange2IcalEvent(mapi_object_t *obj_folder, struct GlobalObjectId *GlobalObjectId, uint32_t Sequence)
-{
-       struct exchange2ical_check exchange2ical_check;
-       exchange2ical_check.eFlags=EventFlag;
-       exchange2ical_check.GlobalObjectId=GlobalObjectId;
-       exchange2ical_check.Sequence=Sequence;
-       return _Exchange2Ical(obj_folder, &exchange2ical_check);
-}
-
-
-icalcomponent *Exchange2IcalEvents(mapi_object_t *obj_folder, struct GlobalObjectId *GlobalObjectId)
-{
-       struct exchange2ical_check exchange2ical_check;
-       exchange2ical_check.eFlags=EventsFlag;
-       exchange2ical_check.GlobalObjectId=GlobalObjectId;
-       return _Exchange2Ical(obj_folder, &exchange2ical_check);
-}
diff --git a/branches/plugfest/libexchange2ical/libexchange2ical.h b/branches/plugfest/libexchange2ical/libexchange2ical.h
deleted file mode 100644 (file)
index c1c8795..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-   Convert Exchange appointments to ICAL
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libexchange2ical/exchange2ical.h>
-#ifndef        __LIBEXCHANGE2ICAL_H_
-#define        __LIBEXCHANGE2ICAL_H_
-
-/**
-   \details Retrieve entire exchange calendar as an Icalendar
-
-   This function returns an Icalendar of the entire exchange calendar inside the obj_folder
-
-   \param obj_folder the folder to operate in
-  
-   \return Icalendar on success, otherwise Null
-
-   \note Developers should call ical_component_free() on the returned icalendar after use.
-
- */
-icalcomponent * Exchange2Ical(mapi_object_t *obj_folder);
-
-/**
-   \details Retrieve a range of exchange appointments as an Icalendar
-
-   This function returns an Icalendar of exchange appointments that begin within the specified range.
-
-   \param obj_folder the folder to operate in
-   \param begin        a tm that specifies the start date of the range
-   \param end a tm that specifies the end date of the range
-
-   \return Icalendar on success, otherwise Null
-
-   \note Developers should call ical_component_free() on the returned icalendar after use.
-   If no events are within the specified range, an icalendar will be returned without any vevents.
-
- */
-icalcomponent * Exchange2IcalRange(mapi_object_t *obj_folder, struct tm *begin, struct tm *end);
-
-
-/**
-   \details Retrieve a specific exchange appointment as an Icalendar
-
-   This function returns an Icalendar with an appointments that match
-   the specified GlobalObjectId and sequence number.
-
-   \param obj_folder the folder to operate in
-   \param GlobalObjectId the unique GlobalObjectId of the appointment
-   \param Sequence the sequence number of the appointment
-
-   \return Icalendar on success, otherwise Null
-
-   \note Developers should call ical_component_free() on the returned icalendar after use.
-   If no event's GlobalObjectId match the specifid GlobalObjectId, an icalendar will be returned without any vevents.
-
- */
-icalcomponent *Exchange2IcalEvent(mapi_object_t *obj_folder, struct GlobalObjectId *GlobalObjectId, uint32_t Sequence);
-
-
-/**
-   \details Retrieve an exchange appointment and its occurrences as an Icalendar
-
-   This function returns an Icalendar with any appointments that match
-   the specified GlobalObjectId and sequence number.
-   
-   \param obj_folder the folder to operate in
-   \param GlobalObjectId the unique GlobalObjectId of the appointment
-
-   \return Icalendar on success, otherwise Null
-
-   \note Developers should call ical_component_free() on the returned icalendar after use.
-   If no event's GlobalObjectId match the specifid GlobalObjectId, an icalendar will be returned without any vevents.
-
- */
-icalcomponent *Exchange2IcalEvents(mapi_object_t *obj_folder, struct GlobalObjectId *GlobalObjectId);
-
-#endif /* __LIBEXCHANGE2ICAL_H_ */
diff --git a/branches/plugfest/libexchange2ical/libical2exchange.c b/branches/plugfest/libexchange2ical/libical2exchange.c
deleted file mode 100644 (file)
index e0ee9c6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-   Common conversion routines for exchange2ical
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
diff --git a/branches/plugfest/libmapi++.pc.in b/branches/plugfest/libmapi++.pc.in
deleted file mode 100644 (file)
index 60eda1b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: OpenChange C++ bindings
-Description: C++ bindings for the OpenChange MAPI library
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmapipp
-Cflags: -I${includedir}
-Requires: libmapi
diff --git a/branches/plugfest/libmapi++/Doxyfile.in b/branches/plugfest/libmapi++/Doxyfile.in
deleted file mode 100644 (file)
index 82e9618..0000000
+++ /dev/null
@@ -1,1250 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = MAPI C++ Client Library Bindings
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = libmapi++
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.h *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = libmapi++/tests libmapi++/examples
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/libmapi++
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/libmapi++/attachment.h b/branches/plugfest/libmapi++/attachment.h
deleted file mode 100644 (file)
index 4d285b2..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Attachment Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef LIBMAPIPP__ATTACHMENT_H__
-#define LIBMAPIPP__ATTACHMENT_H__
-
-#include <iostream> //for debugging
-#include <string>
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/message.h>
-
-namespace libmapipp
-{
-class object;
-
-/**
- * \brief This class represents a message %attachment
- *
- * A message can contain both text content, and also have attached
- * (embedded) files and messages. This class represents the attachments
- * for one messaage.
- * 
- * You may not need to create the attachments yourself, since you can 
- * create a container with all the attachments using message::fetch_attachments().
- */
-class attachment : public object {
-       public:
-               /** \brief Constructor
-                *
-                *  \param mapi_message the message that this attachment belongs to.
-                *  \param attach_num Attachment Number.
-                */
-               attachment(message& mapi_message, const uint32_t attach_num) throw(mapi_exception);
-
-               /**
-                * \brief The %attachment number
-                */
-               uint32_t get_num() const { return m_attach_num; }
-
-               /**
-                * \brief the contents of the %attachment
-                *
-                * \note the length of the array is given by get_data_size()
-                */
-               const uint8_t* get_data() const  { return m_bin_data; }
-
-               /**
-                * \brief the size of the %attachment
-                *
-                * \return the size of the %attachment in bytes
-                */
-               uint32_t get_data_size() const { return m_data_size; }
-
-               /**
-                * \brief the filename of the %attachment
-                *
-                * \note not all attachments have file names
-                *
-                * \return string containing the file name of the %attachment, if any
-                */
-               std::string get_filename() const { return m_filename; }
-
-               /**
-                * Destructor
-                */
-               virtual ~attachment() throw()
-               {
-                       if (m_bin_data) delete[] m_bin_data;
-               }
-
-       private:
-               uint32_t        m_attach_num;
-               uint8_t*        m_bin_data;     // (same as unsigned char* ?)
-               uint32_t        m_data_size;
-               std::string     m_filename;
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__ATTACHMENT_H__
diff --git a/branches/plugfest/libmapi++/clibmapi.h b/branches/plugfest/libmapi++/clibmapi.h
deleted file mode 100644 (file)
index 94eafee..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __CLIBMAPI_H
-#define        __CLIBMAPI_H
-
-extern "C" {
-#include <libmapi/libmapi.h>
-}
-
-#endif /* ! __CLIBMAPI_H */
diff --git a/branches/plugfest/libmapi++/examples/foldertree.cpp b/branches/plugfest/libmapi++/examples/foldertree.cpp
deleted file mode 100644 (file)
index b1d8506..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Sample folder tree list application
-
-   Copyright (C) Brad Hards <bradh@frogmouth.net> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <exception>
-#include <string>
-
-#include <libmapi++/libmapi++.h>
-
-int main ()
-{
-        try {
-                // Initialize MAPI Session
-                libmapipp::session mapi_session;
-               // You could log in with a non-default profile here
-                mapi_session.login();
-
-               // Get the private (user) folders message store
-               libmapipp::message_store &msg_store = mapi_session.get_message_store();
-
-               // Get a property of the top level message store
-               libmapipp::property_container msg_store_props = msg_store.get_property_container();
-               msg_store_props << PR_DISPLAY_NAME; // you could use other properties here
-               msg_store_props.fetch();
-
-               // Display the property. You can also use a property_container_iterator 
-               // to work through the properties, but in this case there is only one.
-               std::cout << "Message store display name: "
-                         << (const char*)msg_store_props[PR_DISPLAY_NAME]
-                         << std::endl;
-
-               // Fetch the folder list.
-               // We start off by fetching the top level folder
-               mapi_id_t top_folder_id = msg_store.get_default_folder(olFolderTopInformationStore);
-               libmapipp::folder top_folder(msg_store, top_folder_id);
-               // Now get the child folders of the top level folder. These are returned as
-               // a std::vector of pointers to folders
-               libmapipp::folder::hierarchy_container_type child_folders = top_folder.fetch_hierarchy();
-               // Display the name, total item count and unread item count for each folder
-               for (unsigned int i = 0; i < child_folders.size(); ++i) {
-                       libmapipp::property_container child_props = child_folders[i]->get_property_container();
-                       child_props << PR_DISPLAY_NAME << PR_CONTENT_COUNT << PR_CONTENT_UNREAD;
-                       child_props.fetch();
-                       std::cout << "|-----> " << (const char*)child_props[PR_DISPLAY_NAME]
-                                 << " (" << (*(int*)child_props[PR_CONTENT_COUNT]) << " items, "
-                                 << (*(int*)child_props[PR_CONTENT_UNREAD]) << " unread)"
-                                 << std::endl;
-               }
-
-        }
-        catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
-        {
-                std::cout << "MAPI Exception in main: " <<  e.what()
-                         << std::endl;
-        }
-        catch (std::runtime_error e) // Catch any other runtime exceptions
-        {
-                std::cout << "std::runtime_error exception in main: "
-                         << e.what() << std::endl;
-        }
-
-        return 0;
-}
diff --git a/branches/plugfest/libmapi++/examples/messages.cpp b/branches/plugfest/libmapi++/examples/messages.cpp
deleted file mode 100644 (file)
index c285eff..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Sample folder message application
-
-   Copyright (C) Brad Hards <bradh@frogmouth.net> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <exception>
-#include <string>
-
-#include <libmapi++/libmapi++.h>
-
-int main ()
-{
-        try {
-                // Initialize MAPI Session
-                libmapipp::session mapi_session;
-               // You could log in with a non-default profile here
-                mapi_session.login();
-
-               // Get the private (user) folders message store
-               libmapipp::message_store &msg_store = mapi_session.get_message_store();
-
-               // We start off by fetching the inbox
-               mapi_id_t inbox_id = msg_store.get_default_folder(olFolderInbox);
-               libmapipp::folder inbox_folder(msg_store, inbox_id);
-               // Now get the messages in this folder These are returned as
-               // a std::vector of pointers to messages
-               libmapipp::folder::message_container_type messages = inbox_folder.fetch_messages();
-               std::cout << "Inbox contains " << messages.size() << " messages" << std::endl;
-
-               // Work through each message
-               for (unsigned int i = 0; i < messages.size(); ++i) {
-                       // Get the properties we are interested in
-                       libmapipp::property_container msg_props = messages[i]->get_property_container();
-                       // We get the "to" addressee, and the subject
-                       // You can get a lot of other properties here (e.g. sender, body, etc).
-                       msg_props << PR_DISPLAY_TO << PR_CONVERSATION_TOPIC;
-                       msg_props.fetch();
-                       // Display those properties
-                       if (msg_props[PR_DISPLAY_TO] != 0) {
-                               std::cout << "|-----> " << (const char*)msg_props[PR_DISPLAY_TO];
-                               if(msg_props[PR_CONVERSATION_TOPIC] != 0) {
-                                       std::cout << "\t\t| " << (const char*)msg_props[PR_CONVERSATION_TOPIC];
-                               }
-                               std::cout << std::endl;
-                       }
-               }
-        }
-        catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
-        {
-                std::cout << "MAPI Exception in main: " <<  e.what()
-                         << std::endl;
-        }
-        catch (std::runtime_error e) // Catch any other runtime exceptions
-        {
-                std::cout << "std::runtime_error exception in main: "
-                         << e.what() << std::endl;
-        }
-
-        return 0;
-}
diff --git a/branches/plugfest/libmapi++/folder.h b/branches/plugfest/libmapi++/folder.h
deleted file mode 100644 (file)
index da499db..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Folder Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef LIBMAPIPP__FOLDER_H__
-#define LIBMAPIPP__FOLDER_H__
-
-#include <iostream> //for debugging
-#include <vector>
-#include <boost/shared_ptr.hpp>
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/mapi_exception.h>
-#include <libmapi++/object.h>
-#include <libmapi++/message.h>
-
-namespace libmapipp
-{
-
-/**
- *  This class represents a %folder or container within Exchange
- */
-class folder : public object {
-       public:
-               /**
-                * Pointer to a message
-               */
-               typedef boost::shared_ptr<message>              message_shared_ptr;
-
-               typedef std::vector<message_shared_ptr >        message_container_type;
-
-               /**
-                * Pointer to a %folder
-               */
-               typedef boost::shared_ptr<folder>               folder_shared_ptr;
-
-               /**
-                * Hierarchy folders
-                *
-                * This is a vector (list) of child folders for a given %folder
-               */
-               typedef std::vector<folder_shared_ptr>          hierarchy_container_type;
-
-               /** 
-                * \brief Constructor
-                *
-                * \param parent_folder The parent of this %folder.
-                * \param folder_id     This folder's id.
-               */
-               folder(object& parent_folder, const mapi_id_t folder_id) throw(mapi_exception) 
-               : object(parent_folder.get_session(), "folder"), m_id(folder_id)
-               {
-                       if (OpenFolder(&parent_folder.data(), folder_id, &m_object) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "folder::folder : OpenFolder");
-               }
-
-               /**
-                * \brief Obtain %folder id
-                *
-                * \return This folder's id.
-                */
-               mapi_id_t get_id() const { return m_id; }
-
-               /** 
-                * \brief Delete a message that belongs to this %folder
-                *
-                * \param message_id The id of the message to delete.
-                */
-               void delete_message(mapi_id_t message_id) throw (mapi_exception)
-               {
-                       if (DeleteMessage(&m_object, &message_id, 1) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "folder::delete_message : DeleteMessage");
-               }
-
-               /**
-                * \brief Fetch all messages in this %folder
-                *
-                * \return A container of message shared pointers.
-                */
-               message_container_type fetch_messages() throw(mapi_exception);
-
-               /**
-                * \brief Fetch all subfolders within this %folder
-                *
-                * \return A container of %folder shared pointers.
-                */
-               hierarchy_container_type fetch_hierarchy() throw(mapi_exception);
-
-               /**
-                * Destructor
-                */
-               virtual ~folder() throw()
-               {
-               }
-
-       private:
-               mapi_id_t       m_id;
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__FOLDER_H__
diff --git a/branches/plugfest/libmapi++/libmapi++-example.doxy b/branches/plugfest/libmapi++/libmapi++-example.doxy
deleted file mode 100644 (file)
index ac9c59a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/** \example test.cpp
-
-An example that shows reading mail.
-
-*/
-
-/** \example attach_test.cpp
-
-An example that shows reading of attachments.
-
-*/
-
-/** \example foldertree.cpp
-
-This example lists the top level folders in the message store,
-with output like:
-\code
-Message store display name: Mailbox - Test User1
-|-----> Calendar (0 items, 0 unread)
-|-----> Contacts (0 items, 0 unread)
-|-----> Deleted Items (0 items, 0 unread)
-|-----> Drafts (0 items, 0 unread)
-|-----> Inbox (26 items, 24 unread)
-|-----> Journal (0 items, 0 unread)
-|-----> Notes (0 items, 0 unread)
-|-----> Outbox (9 items, 0 unread)
-|-----> Sent Items (0 items, 0 unread)
-|-----> Tasks (0 items, 0 unread)
-\endcode
-
-The example shows how to create a session, get the message_store, get
-properties of the message store, and then gets the list of child folders and
-some associated folder properties.
-
-*/
-
-/** \example messages.cpp
-
-This example displays information about the messages in the inbox, with
-output like:
-\code
-Inbox contains 2 messages
-|-----> Test User1              | Working Remotely with Windows Small Business Server
-|-----> Test User1              | Welcome to Windows Small Business Server 2003
-\endcode
-
-The example shows how to create a session, get the message_store, and open 
-the inbox folder. It then determines how many messages are in the inbox folder,
-and retrieves and prints the intended addressee and the message subject.
-
-*/
diff --git a/branches/plugfest/libmapi++/libmapi++-mainpage.doxy b/branches/plugfest/libmapi++/libmapi++-mainpage.doxy
deleted file mode 100644 (file)
index 3d4de13..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
-\mainpage libmapi++
-
-<h2>libmapi++ - C++ Bindings for OpenChange Clients</h2>
-
-libmapi++ provides C++ bindings for OpenChange client libraries (<a href="../libmapi/index.html">libmapi</a>).
-It is intended to provide a higher level abstraction of the OpenChange client libraries for C++ users who
-would prefer to work with an object-oriented API.
-
-<h2>Using libmapi++</h2>
-
-\note libmapi++ classes live in the libmapipp namespace.
-
-When using libmapi++, you start by creating a session, and logging in to the server.
-\code
-// Initialize MAPI Session
-libmapipp::session mapi_session;
-
-// login() can use an optional profile_name, and an optional password
-mapi_session.login();
-\endcode
-
-The session can then access the message store, which is the tree of private folders associated
-with a single user (containing various folders, such as the Inbox, Sent Mail, Calendar, Journal
-and so on).
-
-The message store is associated with the session, so you don't create it yourself. Instead,
-you obtain it using the session object's get_message_store() method.
-\code
-// Take a reference to the message store
-libmapipp::message_store &msg_store = mapi_session.get_message_store();
-\endcode
-\note It has to be a reference, not a copy / assignment.
-
-Most objects in libmapi++ (and any kind of MAPI library) can be considered to have properties
-that belong to them, and subordinate (child) objects. For example, the name of the message
-store is a property of the message store, but the various folders in the message store (or equally,
-the messages in a folder, or the attachments to a message) are part of a hierachy. 
-
-To get access to the properties of an object, you obtain the property_container associated
-with the object, set the properties you want to access, call fetch(), and then read off the
-various properties.
-\code
-// Get a property of the top level message store
-libmapipp::property_container msg_store_props = msg_store.get_property_container();
-msg_store_props << PR_DISPLAY_NAME; // you could use other properties here
-msg_store_props.fetch();
-std::cout << "Message store display name: "
-         << (const char*)msg_store_props[PR_DISPLAY_NAME]
-         << std::endl;
-\endcode
-
-Note that the operator[] is essentially a lookup operator. If you'd prefer to use an
-iterator, look at libmapipp::property_container_iterator.
-
-As noted above, the objects in libmapi++ can be considered as a hierachy. To get the
-child elements for an object, you use the hierachy table for that element. For example,
-to get the various folders in the private information store, you could use code like this:
-\code
-// We start off by fetching the top level folder
-mapi_id_t top_folder_id = msg_store.get_default_folder(olFolderTopInformationStore);
-libmapipp::folder top_folder(msg_store, top_folder_id);
-// Now get the child folders of the top level folder. These are returned as
-// a std::vector of pointers to folders
-libmapipp::folder::hierarchy_container_type child_folders = top_folder.fetch_hierarchy();
-
-// Display the name, total item count and unread item count for each folder
-for (unsigned int i = 0; i < child_folders.size(); ++i) {
-    libmapipp::property_container child_props = child_folders[i]->get_property_container();
-    child_props << PR_DISPLAY_NAME << PR_CONTENT_COUNT << PR_CONTENT_UNREAD;
-    child_props.fetch();
-    std::cout << "|-----> " << (const char*)child_props[PR_DISPLAY_NAME]
-              << " (" << (*(int*)child_props[PR_CONTENT_COUNT]) << " items, "
-              << (*(int*)child_props[PR_CONTENT_UNREAD]) << " unread)"
-              << std::endl;
-}
-\endcode
-
-As an alternative to working through the folder tree hierachy, you can also open 
-folders directly. In the example below, we open the Inbox. The API documentation
-for message_store::get_default_folder() provides a list of other folder IDs that
-you may find useful.
-\code
-mapi_id_t inbox_id = msg_store.get_default_folder(olFolderInbox);
-libmapipp::folder inbox_folder(msg_store, inbox_id);
-\endcode
-
-You can then get each message in the folder:
-\code
-// These are returned as a std::vector of pointers to messages
-libmapipp::folder::message_container_type messages = inbox_folder.fetch_messages();
-std::cout << "Inbox contains " << messages.size() << " messages" << std::endl;
-\endcode
-
-You can then get the various properties of each message in the same way as was
-used for the folder properties - you get the associated property_container, set
-the required properties, and call fetch() before reading off the required
-properties:
-\code
-// Work through each message
-for (unsigned int i = 0; i < messages.size(); ++i) {
-       // Get the properties we are interested in
-       libmapipp::property_container msg_props = messages[i]->get_property_container();
-       // We get the "to" addressee, and the subject
-       msg_props << PR_DISPLAY_TO << PR_CONVERSATION_TOPIC;
-       msg_props.fetch();
-       // Display those properties
-       std::cout << "|-----> " << (const char*)msg_props[PR_DISPLAY_TO]
-                 << "\t\t| " << (const char*)msg_props[PR_CONVERSATION_TOPIC]
-                 << std::endl;
-}
-\endcode
-
-\todo Explain attachments.
-
-*/
diff --git a/branches/plugfest/libmapi++/libmapi++.h b/branches/plugfest/libmapi++/libmapi++.h
deleted file mode 100644 (file)
index 830b0df..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   MAPI Exception Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __LIBMAPIPP_H
-#define        __LIBMAPIPP_H
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/session.h>
-#include <libmapi++/message_store.h>
-#include <libmapi++/mapi_exception.h>
-#include <libmapi++/folder.h>
-#include <libmapi++/message.h>
-#include <libmapi++/attachment.h>
-#include <libmapi++/property_container.h>
-#include <libmapi++/profile.h>
-
-#endif /* ! __LIBMAPIPP_H */
diff --git a/branches/plugfest/libmapi++/mapi_exception.h b/branches/plugfest/libmapi++/mapi_exception.h
deleted file mode 100644 (file)
index 475208a..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   MAPI Exception Class
-
-   Copyright (C) Alan Alvarez 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef LIBMAPIPP__MAPI_EXCEPTION_H__
-#define LIBMAPIPP__MAPI_EXCEPTION_H__
-
-#include <exception>
-#include <map>
-#include <iostream>
-#include <string>
-
-#include <cstring>
-
-#include <libmapi++/clibmapi.h>
-
-#define STATUS_TABLE_INSERT(status) sm_status_map.insert(status_map::value_type(status, #status));
-
-namespace libmapipp {
-
-class mapi_exception : public std::exception
-{
-       public:
-               explicit mapi_exception(enum MAPISTATUS status, const std::string& origin = "") : std::exception(), m_status(status), m_origin(origin), m_what_string(origin)
-               {
-                       status_map::iterator iter = sm_status_map.find(m_status);
-
-                       m_what_string += ": ";
-                       m_what_string += (iter != sm_status_map.end()) ? iter->second : "Unknown MAPISTATUS value";
-               }
-
-               virtual const char* what() const throw() { return m_what_string.c_str(); }
-
-               enum MAPISTATUS get_status() const { return m_status; }
-
-               virtual ~mapi_exception() throw() {}
-
-       private:
-               enum MAPISTATUS m_status;
-               std::string     m_origin;
-               std::string     m_what_string;
-               friend class session;
-
-               typedef std::map<enum MAPISTATUS, const char*> status_map;
-               static status_map       sm_status_map;
-
-               static void fill_status_map()
-               {
-                       static bool filled = false;
-
-                       if (!filled) {
-                               STATUS_TABLE_INSERT(MAPI_E_SUCCESS);
-                               STATUS_TABLE_INSERT(MAPI_E_CALL_FAILED);
-                               STATUS_TABLE_INSERT(MAPI_E_NO_SUPPORT);
-                               STATUS_TABLE_INSERT(MAPI_E_BAD_CHARWIDTH);
-                               STATUS_TABLE_INSERT(MAPI_E_STRING_TOO_LONG);
-                               STATUS_TABLE_INSERT(MAPI_E_UNKNOWN_FLAGS);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_ENTRYID);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_OBJECT);
-                               STATUS_TABLE_INSERT(MAPI_E_OBJECT_CHANGED);
-                               STATUS_TABLE_INSERT(MAPI_E_OBJECT_DELETED);
-                               STATUS_TABLE_INSERT(MAPI_E_BUSY);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_ENOUGH_DISK);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_ENOUGH_RESOURCES);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_FOUND);
-                               STATUS_TABLE_INSERT(MAPI_E_VERSION);
-                               STATUS_TABLE_INSERT(MAPI_E_LOGON_FAILED);
-                               STATUS_TABLE_INSERT(MAPI_E_SESSION_LIMIT);
-                               STATUS_TABLE_INSERT(MAPI_E_USER_CANCEL);
-                               STATUS_TABLE_INSERT(MAPI_E_UNABLE_TO_ABORT);
-                               STATUS_TABLE_INSERT(MAPI_E_NETWORK_ERROR);
-                               STATUS_TABLE_INSERT(MAPI_E_DISK_ERROR);
-                               STATUS_TABLE_INSERT(MAPI_E_TOO_COMPLEX);
-                               STATUS_TABLE_INSERT(MAPI_E_BAD_COLUMN);
-                               STATUS_TABLE_INSERT(MAPI_E_EXTENDED_ERROR);
-                               STATUS_TABLE_INSERT(MAPI_E_COMPUTED);
-                               STATUS_TABLE_INSERT(MAPI_E_CORRUPT_DATA);
-                               STATUS_TABLE_INSERT(MAPI_E_UNCONFIGURED);
-                               STATUS_TABLE_INSERT(MAPI_E_FAILONEPROVIDER);
-                               STATUS_TABLE_INSERT(MAPI_E_UNKNOWN_CPID);
-                               STATUS_TABLE_INSERT(MAPI_E_UNKNOWN_LCID);
-                               STATUS_TABLE_INSERT(MAPI_E_PASSWORD_CHANGE_REQUIRED);
-                               STATUS_TABLE_INSERT(MAPI_E_PASSWORD_EXPIRED);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_WORKSTATION_ACCOUNT);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_ACCESS_TIME);
-                               STATUS_TABLE_INSERT(MAPI_E_ACCOUNT_DISABLED);
-                               STATUS_TABLE_INSERT(MAPI_E_END_OF_SESSION);
-                               STATUS_TABLE_INSERT(MAPI_E_UNKNOWN_ENTRYID);
-                               STATUS_TABLE_INSERT(MAPI_E_MISSING_REQUIRED_COLUMN);
-                               STATUS_TABLE_INSERT(MAPI_E_BAD_VALUE);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_TYPE);
-                               STATUS_TABLE_INSERT(MAPI_E_TYPE_NO_SUPPORT);
-                               STATUS_TABLE_INSERT(MAPI_E_UNEXPECTED_TYPE);
-                               STATUS_TABLE_INSERT(MAPI_E_TOO_BIG);
-                               STATUS_TABLE_INSERT(MAPI_E_DECLINE_COPY);
-                               STATUS_TABLE_INSERT(MAPI_E_UNEXPECTED_ID);
-                               STATUS_TABLE_INSERT(MAPI_E_UNABLE_TO_COMPLETE);
-                               STATUS_TABLE_INSERT(MAPI_E_TIMEOUT);
-                               STATUS_TABLE_INSERT(MAPI_E_TABLE_EMPTY);
-                               STATUS_TABLE_INSERT(MAPI_E_TABLE_TOO_BIG);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_BOOKMARK);
-                               STATUS_TABLE_INSERT(MAPI_E_WAIT);
-                               STATUS_TABLE_INSERT(MAPI_E_CANCEL);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_ME);
-                               STATUS_TABLE_INSERT(MAPI_E_CORRUPT_STORE);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_IN_QUEUE);
-                               STATUS_TABLE_INSERT(MAPI_E_NO_SUPPRESS);
-                               STATUS_TABLE_INSERT(MAPI_E_COLLISION);
-                               STATUS_TABLE_INSERT(MAPI_E_NOT_INITIALIZED);
-                               STATUS_TABLE_INSERT(MAPI_E_NON_STANDARD);
-                               STATUS_TABLE_INSERT(MAPI_E_NO_RECIPIENTS);
-                               STATUS_TABLE_INSERT(MAPI_E_SUBMITTED);
-                               STATUS_TABLE_INSERT(MAPI_E_HAS_FOLDERS);
-                               STATUS_TABLE_INSERT(MAPI_E_HAS_MESAGES);
-                               STATUS_TABLE_INSERT(MAPI_E_FOLDER_CYCLE);
-                               STATUS_TABLE_INSERT(MAPI_E_AMBIGUOUS_RECIP);
-                               STATUS_TABLE_INSERT(MAPI_E_NO_ACCESS);
-                               STATUS_TABLE_INSERT(MAPI_E_INVALID_PARAMETER);
-                               STATUS_TABLE_INSERT(MAPI_E_RESERVED);
-
-                               filled = true;
-                       }
-               }       
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__EXCEPTION_H__
diff --git a/branches/plugfest/libmapi++/message.h b/branches/plugfest/libmapi++/message.h
deleted file mode 100644 (file)
index 9cfba3f..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Message Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef LIBMAPIPP__MESSAGE_H__
-#define LIBMAPIPP__MESSAGE_H__
-
-#include <iostream> //for debugging
-#include <vector>
-#include <boost/shared_ptr.hpp>
-
-#include <libmapi++/mapi_exception.h>
-#include <libmapi++/session.h>
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/object.h>
-#include <libmapi++/message_store.h>
-
-namespace libmapipp
-{
-class attachment;
-
-/** 
- * \brief This class represents a %message in Exchange.
- *
- * It is important to note that a %message is not necessarily an email %message.
- * It could be a contact, journal or anything else that is not a folder.
- */
-class message : public object {
-       public:
-               typedef boost::shared_ptr<attachment>           attachment_shared_ptr;
-               typedef std::vector<attachment_shared_ptr>      attachment_container_type;
-
-               /**
-                * \brief Constructor
-                *
-                * \param mapi_session The session to use to retrieve this %message.
-                * \param folder_id The id of the folder this %message belongs to.
-                * \param message_id The %message id.
-                */
-               message(session& mapi_session, const mapi_id_t folder_id, const mapi_id_t message_id) throw(mapi_exception) 
-               : object(mapi_session, "message"), m_folder_id(folder_id), m_id(message_id)
-               {
-                       if (OpenMessage(&mapi_session.get_message_store().data(), folder_id, message_id, &m_object, 0) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "message::message : OpenMessage");
-               }
-
-               /**
-                * \brief Fetches all attachments in this %message.
-                *
-                * \return A container of attachment shared pointers.
-                */
-               attachment_container_type fetch_attachments();
-
-               /**
-                * \brief Get this %message's ID.
-                */
-               mapi_id_t get_id() const { return m_id; }
-
-               /**
-                * \brief Get this message's parent folder ID.
-                */
-               mapi_id_t get_folder_id() const { return m_folder_id; } 
-
-               /**
-                * Destructor
-                */
-               virtual ~message() throw()
-               {
-               }
-
-       private:
-               mapi_id_t       m_folder_id;
-               mapi_id_t       m_id;
-
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__MESSAGE_H__
diff --git a/branches/plugfest/libmapi++/message_store.h b/branches/plugfest/libmapi++/message_store.h
deleted file mode 100644 (file)
index 889e7bb..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Message Store Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef LIBMAPIPP__MESSAGE_STORE_H__
-#define LIBMAPIPP__MESSAGE_STORE_H__
-
-#include <stdint.h>
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/mapi_exception.h>
-#include <libmapi++/object.h>
-
-namespace libmapipp
-{
-class session;
-
-/**
- * \brief This class represents the Message Store in Exchange.
- *
- * The message_store is the grouping of message folders (which could be the 
- * users private store including mail, calendar, todo list, journal, contacts
- * and so on) or could be the public store (e.g. shared public folders).
- *
- * It is not possible for you, the user, to create a message_store object.
- * Instead, you should retrieve the message_store associated with a session
- * using session::get_message_store()
- */
-class message_store : public object {
-       public:
-               /**
-                * \brief Retrieves the folder id for the specified default folder in the Message Store.
-                *
-                * \param id The type of folder to search for.
-                *
-                * The following types of folders are supported:
-                * - olFolderTopInformationStore
-                * - olFolderDeletedItems
-                * - olFolderOutbox
-                * - olFolderSentMail
-                * - olFolderInbox
-                * - olFolderCalendar
-                * - olFolderContacts
-                * - olFolderJournal
-                * - olFolderNotes
-                * - olFolderTasks
-                * - olFolderDrafts
-                *
-                * If you are trying to enumerate all folders, you should open the 
-                * olFolderTopInformationStore, and then get the hierarchy container for
-                * that top level folder.
-                *
-                * \return The resulting folder id.
-                */
-               mapi_id_t get_default_folder(const uint32_t id) const throw(mapi_exception)
-               {
-                       mapi_id_t folder;
-
-                       if (GetDefaultFolder(const_cast<mapi_object_t*>(&m_object), &folder, id) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "message_store::get_default_folder() : GetDefaultFolder");
-
-                       return folder;
-               }
-
-
-       private:
-               friend class session;
-               message_store(session& mapi_session) throw() : object(mapi_session, "message_store")
-               {}
-
-               void open(mapi_session *mapi_session) throw(mapi_exception)
-               {
-                       if (OpenMsgStore(mapi_session, &m_object) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "message_store::open() : OpenMsgStore");
-               }
-
-               ~message_store() throw()
-               {
-               }
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__MESSAGE_STORE_H__
diff --git a/branches/plugfest/libmapi++/object.h b/branches/plugfest/libmapi++/object.h
deleted file mode 100644 (file)
index fd90519..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Base Object Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef LIBMAPIPP__OBJECT_H__
-#define LIBMAPIPP__OBJECT_H__
-
-#include <iostream> //for debugging
-
-#include <stdexcept>
-
-#include <libmapi++/clibmapi.h>
-
-/**
- *  The libmapi++ classes and other definitions are all enclosed in
- *  the libmapipp namespace.
- */
-namespace libmapipp
-{
-// #define INVALID_HANDLE_VALUE 0xffffffff
-class property_container;
-class session;
-/**
- * Base Object class
- *
- * Most classes such as folder, message and message_store derive from this class.
- * It is important that objects be passed around as references and that no unnecessary
- * copies are made as this will call the class destructor which will call
- * mapi_object_release() and release the handle associated with this object.
- */
-class object {
-       public:
-               /**
-                * \brief Object Constructor
-                *
-                * \param mapi_session Session this object is to be associated with.
-                * \param object_type The name of the type of object (to be set in a subclass)
-                */
-               explicit object(session& mapi_session, const std::string& object_type = "") throw() : m_session(mapi_session), m_object_type(object_type)
-               {
-                       mapi_object_init(&m_object);
-               }
-
-               /**
-                * \brief Obtain a reference to the mapi_object_t associated with this object
-                * 
-                * \return A reference to the C struct mapi_object_t associated with this object
-                */
-               virtual mapi_object_t& data() throw() { return m_object; }
-
-               /**
-                * \brief Obtain a property_container to be used with this object.
-                *
-                * \return A property_container to be used with this object.
-                */
-               virtual property_container get_property_container();
-
-               /**
-                * \brief Obtain the session associated with this object.
-                *
-                * \return The session associated with this object
-                */
-               virtual session& get_session() { return m_session; }
-
-               /**
-                * \brief Destructor
-                *
-                * Calls mapi_object_release() which releases the handle associated with this object.
-                */ 
-               virtual ~object() throw()
-               {
-                       // TODO: Check for invalid handle in libmapi 0.7
-                       // if (m_object.handle != INVALID_HANDLE_VALUE)
-                       mapi_object_release(&m_object);
-
-//                     std::cout << "destroying object " << m_object_type << std::endl;
-               }
-
-       protected:
-               mapi_object_t   m_object;
-               session&        m_session;
-
-       private:
-               std::string m_object_type; // for debugging purposes
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__OBJECT_H__
diff --git a/branches/plugfest/libmapi++/profile.h b/branches/plugfest/libmapi++/profile.h
deleted file mode 100644 (file)
index 0487cd1..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Profile Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef LIBMAPIPP__PROFILE_H__
-#define LIBMAPIPP__PROFILE_H__
-
-#include <libmapi++/clibmapi.h>
-
-#include <string>
-#include <stdexcept>
-#include <libmapi++/mapi_exception.h>
-
-namespace libmapipp {
-
-/**
- * This class represents a user %profile database
- *
- * \todo possibly rename profile class to profile_database?
- * \todo we should be able to create a profile using libmapi++ classes
- * \todo we should be able to delete a profile using libmapi++ classes
- * \todo maybe move some of the session.h documentation on profiles to profile.h?
- */
-class profile_database
-{
-       public:
-               /**
-                * \brief Constructor
-                *
-                * \param profiledb_path An absolute path specifying the location of the
-                * %profile database. If not specified (or ""  is specified) the default
-                * location will be used (~/.openchange.profiles.ldb).
-                */
-               explicit profile_database(const std::string& profiledb_path = "")  throw(std::runtime_error, mapi_exception);
-
-               /* Create an new profile database
-                *
-                * \param profiledb the absolute path to the profile database intended to be created
-                * \param ldif_path the absolute path to the LDIF information to use for initial setup
-                *
-                */
-               static bool create_profile_store(const char* profiledb, const char* ldif_path = NULL);
-               /**
-                * Create an new profile database
-                *
-                * \param profiledb the absolute path to the profile database intended to be created
-                * \param ldif_path the absolute path to the LDIF information to use for initial setup
-                *
-                */
-               static bool create_profile_store(const std::string& profiledb, const std::string& ldif_path = "");
-
-               /**
-                * Make the specified profile the default profile
-                *
-                * \param profname the name of the profile to make default
-                */
-               bool set_default(const char* profname)
-               {
-                       return (SetDefaultProfile(m_mapi_context, profname) == MAPI_E_SUCCESS);
-               }
-
-               /**
-                * Make the specified profile the default profile
-                *
-                * \param profname the name of the profile to make default
-                */
-               bool set_default(const std::string& profname)
-               {
-                       return set_default(profname.c_str());
-               }
-
-               /**
-                * Get the default profile name
-                *
-                * \return the name of the default profile
-                */
-               std::string get_default_profile_name() throw (mapi_exception);
-
-               /**
-                * \brief The path to the default %profile database
-                *
-                * This method is not normally required to be called by user applications
-                * but might be useful under some circumstances.
-                */
-               static std::string get_default_profile_path();
-
-               ~profile_database();
-
-       private:
-               struct mapi_context     *m_mapi_context;
-               TALLOC_CTX              *m_memory_ctx;
-};
-
-class profile
-{
-       public:
-               ~profile()
-               {
-                       if (m_profile) {
-                               ::ShutDown(m_profile);
-                       }
-                       if (m_mapi_context) {
-                               MAPIUninitialize(m_mapi_context);
-                       }
-                       talloc_free(m_memory_ctx);
-               }
-       private:
-               mapi_profile            *m_profile;
-               struct mapi_context     *m_mapi_context;
-               TALLOC_CTX              *m_memory_ctx;
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__PROFILE_H__
diff --git a/branches/plugfest/libmapi++/property_container.h b/branches/plugfest/libmapi++/property_container.h
deleted file mode 100644 (file)
index 30fa724..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Property Tag Container Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef LIBMAPIPP__PROPERTY_CONTAINER_H__
-#define LIBMAPIPP__PROPERTY_CONTAINER_H__
-
-#include <stdint.h>
-#include <iostream> // for debugging only.
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/mapi_exception.h>
-
-// This is not declared in any of libmapi's headers, but it is defined in libmapi/property.c
-extern "C" {
-extern const void *get_mapi_SPropValue_data(struct mapi_SPropValue *lpProp);
-}
-
-namespace libmapipp
-{
-/// Iterator to use with Property Container
-class property_container_iterator {
-       public:
-               /// Default Constructor. Creates an invalid iterator.
-               property_container_iterator() : m_property_values(NULL), m_mapi_property_values(NULL)
-               {}
-
-               property_container_iterator(SPropValue* property_values) : m_property_values(property_values),
-                                                                          m_mapi_property_values(NULL)
-               {}
-
-               property_container_iterator(mapi_SPropValue* mapi_property_values) : m_property_values(NULL),
-                                                                                    m_mapi_property_values(mapi_property_values)
-               {}
-
-               /** \brief Get Property Tag Type.
-                *  \return Type of property this iterator points to or MAPI_PROP_RESERVED if this is an invalid iterator.
-                *  Valid Types are: 
-                *  - PT_BOOLEAN 
-                *  - PT_I2 
-                *  - PT_LONG 
-                *  - PT_DOUBLE 
-                *  - PT_I8 
-                *  - PT_SYSTIME 
-                *  - PT_ERROR 
-                *  - PT_STRING8 
-                *  - PT_UNICODE 
-                *  - PT_BINARY
-                *  - PT_CLSID
-                *  - PT_ERROR
-                *  - PT_MV_SHORT
-                *  - PT_MV_LONG
-                *  - PT_MV_STRING8
-                *  - PT_MV_BINARY
-                *  - PT_MV_CLSID
-                *  - PT_MV_UNICODE
-                *  - PT_MV_SYSTIME
-                *  - PT_NULL
-                *  - PT_OBJECT
-                */
-               int get_type()
-               {
-                       if (m_property_values) {
-                               return m_property_values->ulPropTag & 0xffff;
-                       } else if (m_mapi_property_values) {
-                               return m_mapi_property_values->ulPropTag & 0xffff;
-                       } else {
-                               return MAPI_PROP_RESERVED;
-                       }
-               }
-
-               /**
-                * \brief Get Property Tag of the Property Value this operator points to.
-                *
-                * \return Property Tag of Property this iterator points to or MAPI_PROP_RESERVED if this is an invalid iterator.
-                */
-               int get_tag()
-               {
-                       if (m_property_values) {
-                               return m_property_values->ulPropTag;
-                       } else if (m_mapi_property_values) {
-                               return m_mapi_property_values->ulPropTag;
-                       } else {
-                               return MAPI_PROP_RESERVED;
-                       }
-               }
-
-               /// operator++
-               property_container_iterator& operator++() // prefix
-               {
-                       if (m_property_values)
-                               ++m_property_values;
-                       else if (m_mapi_property_values)
-                               ++m_mapi_property_values;
-
-                       return *this;
-               }
-
-               /// operator++ postfix
-               property_container_iterator operator++(int postfix) // postfix
-               {
-                       property_container_iterator retval = *this;
-                       if (m_property_values)
-                                ++m_property_values;
-                       else if (m_mapi_property_values)
-                               ++m_mapi_property_values;
-
-                       return retval;
-               }
-               
-               /// operator==
-               bool operator==(const property_container_iterator& rhs) const
-               {
-                       return ( (m_property_values == rhs.m_property_values) && (m_mapi_property_values == rhs.m_mapi_property_values) );
-               }
-
-               /// operator!=
-               bool operator!=(const property_container_iterator& rhs) const
-               {
-                       return !(*this == rhs);
-               }
-
-               /**
-                * \brief operator*
-                *
-                * \return The property value as a void pointer.
-                */
-               const void* operator*()
-               {
-                       if (m_property_values)
-                               return get_SPropValue_data(m_property_values);
-                       else
-                               return get_mapi_SPropValue_data(m_mapi_property_values);
-               }               
-
-       private:
-               SPropValue*             m_property_values;
-               mapi_SPropValue*        m_mapi_property_values;
-};
-
-
-/// A container of properties to be used with classes derived from object.
-class property_container {
-
-       public:
-               typedef property_container_iterator     iterator;
-               typedef const void*                     value_type;
-
-               /// Constructor
-               property_container(TALLOC_CTX* memory_ctx, mapi_object_t& mapi_object) : 
-               m_memory_ctx(memory_ctx), m_mapi_object(mapi_object), m_fetched(false), m_property_tag_array(NULL), m_cn_vals(0), m_property_values(0)
-               {
-                       m_property_value_array.cValues = 0;
-                       m_property_value_array.lpProps = NULL;
-               }
-
-               /**
-                * \brief Fetches properties with the tags supplied using operator<<
-                *
-                * \return The number of objects that were fetched.
-                */
-               uint32_t fetch()
-               {
-                       if (GetProps(&m_mapi_object, m_property_tag_array, &m_property_values, &m_cn_vals) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "property_container::fetch : GetProps");
-
-                       MAPIFreeBuffer(m_property_tag_array);
-                       m_property_tag_array = NULL;
-
-                       m_fetched = true;
-                       return m_cn_vals;
-               }
-
-               /// \brief Fetches \b ALL properties of the object associated with this container.
-               void fetch_all()
-               {
-                       if (GetPropsAll(&m_mapi_object, &m_property_value_array) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "property_container::fetch_all : GetPropsAll");
-
-                       // Free property_tag_array in case user used operator<< by mistake.
-                       if (m_property_tag_array) {
-                               MAPIFreeBuffer(m_property_tag_array);
-                               m_property_tag_array = NULL;
-                       }
-
-                       m_fetched = true;
-               }
-
-               /// \brief Adds a Property Tag to be fetched by fetch().
-               property_container& operator<<(uint32_t property_tag)
-               {
-                       if (!m_property_tag_array) {
-                               m_property_tag_array = set_SPropTagArray(m_memory_ctx, 1, property_tag);
-                       } else {
-                               if (SPropTagArray_add(m_memory_ctx, m_property_tag_array, (enum MAPITAGS)property_tag) != MAPI_E_SUCCESS)
-                                       throw mapi_exception(GetLastError(), "property_container::operator<< : SPropTagArray_add");
-                       }
-
-                       return *this;
-               }
-
-               /**
-                * \brief Finds the property value associated with a property tag
-                *
-                * \param property_tag The Property Tag to be searched for
-                *
-                * \return Property Value as a const void pointer
-                */
-               const void* operator[](uint32_t property_tag)
-               {
-                       if (!m_fetched) return NULL;
-
-                       if (m_property_values)
-                               return find_SPropValue_value(property_tag);
-                       else
-                               return find_mapi_SPropValue_data(&m_property_value_array, property_tag);
-               }
-
-               enum MAPITAGS get_tag_at(uint32_t pos)
-               {
-                       if (m_property_values)
-                               return m_property_values[pos].ulPropTag;
-                       else
-                               return m_property_value_array.lpProps[pos].ulPropTag;
-               }
-
-               iterator begin() const
-               {
-                       if (!m_fetched) return iterator();
-               
-                       if (m_property_values)
-                               return iterator(m_property_values);
-                       else
-                               return iterator(m_property_value_array.lpProps);
-               }
-
-               iterator end() const
-               {
-                       if (!m_fetched) return iterator();
-                       
-                       if (m_property_values)
-                               return iterator(m_property_values + m_cn_vals);
-                       else
-                               return iterator(m_property_value_array.lpProps + m_property_value_array.cValues);
-               }
-
-               /// \brief Get number of properties in container.
-               size_t size() const
-               {
-                       if (!m_fetched) return 0;
-
-                       if (m_property_values)
-                               return m_cn_vals;
-                       else
-                               return m_property_value_array.cValues;
-               }
-
-               /// Destructor
-               ~property_container()
-               {
-                       if (m_property_tag_array) MAPIFreeBuffer(m_property_tag_array);
-               }
-
-       private:
-               TALLOC_CTX*             m_memory_ctx;
-               mapi_object_t&          m_mapi_object;
-
-               bool                    m_fetched;
-
-               SPropTagArray*          m_property_tag_array;
-
-               // Used when calling GetProps (fetch)
-               uint32_t                m_cn_vals;
-               SPropValue*             m_property_values;
-
-               // Used when calling GetPropsAll (fetch_all)
-               mapi_SPropValue_array   m_property_value_array;
-
-               const void* find_SPropValue_value(uint32_t property_tag)
-               {
-                       for (uint32_t i = 0; i < m_cn_vals; ++i)
-                       {
-                         if ((uint32_t)m_property_values[i].ulPropTag == property_tag)
-                                       return get_SPropValue_data(&m_property_values[i]);
-                       }
-
-                       return NULL;
-               }
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__PROPERTY_CONTAINER_H__
diff --git a/branches/plugfest/libmapi++/session.h b/branches/plugfest/libmapi++/session.h
deleted file mode 100644 (file)
index 5ef8997..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Session Class
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef LIBMAPIPP__SESSION_H__
-#define LIBMAPIPP__SESSION_H__
-
-#include <cstdlib>
-#include <cstring>
-#include <string>
-#include <stdexcept>
-
-#include <iostream> // for debugging
-
-#include <libmapi++/clibmapi.h>
-#include <libmapi++/mapi_exception.h>
-#include <libmapi++/message_store.h>
-
-using std::cout;
-using std::endl;
-
-namespace libmapipp
-{
-/**
- * This class represents a MAPI %session with the Exchange Server
- *
- * The %session is best thought of as the connection by a single user to a
- * single server. It is possible to have multiple sessions open at the same
- * time.
- *
- * A key concept in the %session is that of a \em profile, and the %profile
- * database. The %profile is a pre-established data set that specifies the
- * server information (e.g. server name / IP address, and Exchange domain)
- * and client information (e.g. the user name, preferred language, and
- * optionally the users password). The profiles are stored in a local store
- * (Samba LDB database) known as the %profile store or %profile database. One
- * of the profiles in the %profile database can be designated as the default
- * %profile (which is particularly useful given that most users may only have
- * one). See the profile class documentation for more information.
- *
- * The general concept is that you create a %session %object, log in to the
- * %session using a selected %profile name, and then work with the message_store
- * associated with that %session. The message_store is only valid so long
- * as the session is valid.
- */
-class session {
-       public:
-               /**
-                * \brief Constructor
-                *
-                * \param profiledb An absolute path specifying the location of the
-                * %profile database. If not specified (or ""  is specified) the default
-                * location will be used (~/.openchange.profiles.ldb).
-                *
-                * \param debug Whether to output debug information to stdout
-                */
-               explicit session(const std::string& profiledb = "", const bool debug = false) throw(std::runtime_error, mapi_exception);
-
-               /**
-                * \brief Log-in to the Exchange Server
-                *
-                * \param profile_name The name of the profile to use to login with.
-                * If not specified (or "" is specified), then the default %profile will
-                * be used.
-                *
-                * \param password The password to use to login with. It is possible to
-                * omit this if the password is stored in the %profile database.
-                */
-               void login(const std::string& profile_name = "", const std::string& password = "") throw(mapi_exception); 
-
-               /**
-                * \brief The name of the profile that is in use
-                *
-                * Calling this method only makes sense if login() has been called with
-                * this %session object.
-               */
-               std::string get_profile_name() const { return m_profile_name; }
-
-               /**
-                * \brief Obtain a reference to the message_store associated with this %session
-                *
-                * \return The message_store associated with this %session.
-                */
-               message_store& get_message_store() throw() { return *m_message_store; }
-
-               /**
-                * \brief Obtain a talloc memory context for this %session
-                *
-                * This pointer can be used for subsequent memory allocations, and
-                * these will be cleaned up when the %session is terminated.
-                */
-               TALLOC_CTX* get_memory_ctx() throw() { return m_memory_ctx; }
-
-               /**
-                * \brief Uninitialize and clean up the MAPI %session.
-                */
-               ~session()
-               {
-                       uninitialize();
-               }
-
-               /**
-                * \brief The underlying mapi_session
-                * 
-                * Exposing this is temporary. Maybe be removed when we sort it out
-                */
-               mapi_session* get_mapi_session() throw() { return m_session; }
-
-       private:
-               mapi_session            *m_session;
-               struct mapi_context     *m_mapi_context;
-               TALLOC_CTX              *m_memory_ctx;
-               message_store           *m_message_store;
-               std::string             m_profile_name;
-
-               void uninitialize() throw()
-               {
-                       if (m_message_store) {
-                               delete m_message_store;
-                       }
-                       if (m_mapi_context) {
-                               MAPIUninitialize(m_mapi_context);
-                       }
-                       talloc_free(m_memory_ctx);
-               }
-};
-
-} // namespace libmapipp
-
-#endif //!LIBMAPIPP__SESSION_H__
diff --git a/branches/plugfest/libmapi++/src/attachment.cpp b/branches/plugfest/libmapi++/src/attachment.cpp
deleted file mode 100644 (file)
index 9743101..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Attachment Class implementation.
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/attachment.h>
-#include <libmapi++/property_container.h>
-
-namespace libmapipp {
-
-attachment::attachment(message& mapi_message, const uint32_t attach_num) throw(mapi_exception)
-: object(mapi_message.get_session(), "attachment"), m_attach_num(attach_num), m_bin_data(NULL), m_data_size(0), m_filename("")
-{
-       if (OpenAttach(&mapi_message.data(), attach_num, &m_object) != MAPI_E_SUCCESS)
-               throw mapi_exception(GetLastError(), "attachment::attachment : OpenAttach");
-
-       property_container properties = get_property_container();
-       properties << PR_ATTACH_FILENAME << PR_ATTACH_LONG_FILENAME << PR_ATTACH_SIZE << PR_ATTACH_DATA_BIN << PR_ATTACH_METHOD;
-       properties.fetch();
-
-       const char* filename = static_cast<const char*>(properties[PR_ATTACH_LONG_FILENAME]);
-       if (!filename) {
-               filename = static_cast<const char*>(properties[PR_ATTACH_FILENAME]);
-       }
-
-       if (filename)
-               m_filename = filename;
-
-       m_data_size = *(static_cast<const uint32_t*>(properties[PR_ATTACH_SIZE]));
-
-       const Binary_r* attachment_data = static_cast<const Binary_r*>(properties[PR_ATTACH_DATA_BIN]);
-
-       // Don't load PR_ATTACH_DATA_BIN if it's embedded in message.
-       // NOTE: Use RopOpenEmbeddedMessage when it is implemented.
-       const uint32_t attach_method = *static_cast<const uint32_t*>(properties[PR_ATTACH_METHOD]);
-       if (attach_method != ATTACH_BY_VALUE)
-               return;
-
-       // Get Binary Data.
-       if (attachment_data) {
-               m_data_size = attachment_data->cb;
-               m_bin_data = new uint8_t[m_data_size];
-               memcpy(m_bin_data, attachment_data->lpb, attachment_data->cb);
-       } else {
-               mapi_object_t obj_stream;
-               mapi_object_init(&obj_stream);
-               if (OpenStream(&m_object, PR_ATTACH_DATA_BIN, OpenStream_ReadOnly, &obj_stream) != MAPI_E_SUCCESS)
-                       throw mapi_exception(GetLastError(), "attachment::attachment : OpenStream");
-
-               if (GetStreamSize(&obj_stream, &m_data_size) != MAPI_E_SUCCESS)
-                       throw mapi_exception(GetLastError(), "attachment::attachment : GetStreamSize");
-
-               m_bin_data = new uint8_t[m_data_size];
-
-               uint32_t pos = 0;
-               uint16_t bytes_read = 0;
-               do {
-                       if (ReadStream(&obj_stream, m_bin_data+pos, 1024, &bytes_read) != MAPI_E_SUCCESS)
-                               throw mapi_exception(GetLastError(), "attachment::attachment : ReadStream");
-
-                       pos += bytes_read;
-
-               } while (bytes_read && pos < m_data_size);
-
-               mapi_object_release(&obj_stream);
-       }
-}
-
-
-} // namespace libmapipp
-
diff --git a/branches/plugfest/libmapi++/src/folder.cpp b/branches/plugfest/libmapi++/src/folder.cpp
deleted file mode 100644 (file)
index 10bb73c..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Folder Class implementation.
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/folder.h>
-
-namespace libmapipp {
-
-folder::message_container_type folder::fetch_messages() throw(mapi_exception)
-{
-       uint32_t        contents_table_row_count = 0;
-        mapi_object_t  contents_table;
-
-       mapi_object_init(&contents_table);
-       if (GetContentsTable(&m_object, &contents_table, 0, &contents_table_row_count) != MAPI_E_SUCCESS) {
-               mapi_object_release(&contents_table);
-               throw mapi_exception(GetLastError(), "folder::fetch_messages : GetContentsTable");
-       }
-
-       SPropTagArray* property_tag_array = set_SPropTagArray(m_session.get_memory_ctx(), 0x2, PR_FID,
-                                                                                              PR_MID);
-
-       if (SetColumns(&contents_table, property_tag_array) != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(property_tag_array);
-               mapi_object_release(&contents_table);
-               throw mapi_exception(GetLastError(), "folder::fetch_messages : SetColumns");
-       }
-
-       MAPIFreeBuffer(property_tag_array);
-
-       uint32_t rows_to_read = contents_table_row_count;
-       SRowSet  row_set;
-
-       message_container_type message_container;
-       message_container.reserve(contents_table_row_count);
-
-       while( (QueryRows(&contents_table, rows_to_read, TBL_ADVANCE, &row_set) == MAPI_E_SUCCESS) && row_set.cRows) {
-               rows_to_read -= row_set.cRows;
-               for (unsigned int i = 0; i < row_set.cRows; ++i) {
-                       try {
-                               message_container.push_back(message_shared_ptr(new message(m_session,
-                                                                                          m_id,
-                                                                                          row_set.aRow[i].lpProps[1].value.d)));
-                       } catch(mapi_exception e) {
-                               mapi_object_release(&contents_table);
-                               throw;
-                       }
-               }
-       }
-
-       mapi_object_release(&contents_table);
-
-       return message_container;
-}
-
-folder::hierarchy_container_type folder::fetch_hierarchy() throw(mapi_exception)
-{
-       mapi_object_t   hierarchy_table;
-       uint32_t        hierarchy_table_row_count = 0;
-
-       mapi_object_init(&hierarchy_table);
-       if (GetHierarchyTable(&m_object, &hierarchy_table, 0, &hierarchy_table_row_count) != MAPI_E_SUCCESS) {
-               mapi_object_release(&hierarchy_table);
-               throw mapi_exception(GetLastError(), "folder::fetch_hierarchy : GetHierarchyTable");
-       }
-
-       SPropTagArray* property_tag_array = set_SPropTagArray(m_session.get_memory_ctx(), 0x1, PR_FID);
-
-       if (SetColumns(&hierarchy_table, property_tag_array)) {
-               MAPIFreeBuffer(property_tag_array);
-               mapi_object_release(&hierarchy_table);
-               throw mapi_exception(GetLastError(), "folder::fetch_hierarchy : SetColumns");
-       }
-
-       MAPIFreeBuffer(property_tag_array);
-
-       uint32_t rows_to_read = hierarchy_table_row_count;
-       SRowSet  row_set;
-
-       hierarchy_container_type hierarchy_container;
-       hierarchy_container.reserve(hierarchy_table_row_count);
-
-       while( (QueryRows(&hierarchy_table, rows_to_read, TBL_ADVANCE, &row_set) == MAPI_E_SUCCESS) && row_set.cRows) {
-               rows_to_read -= row_set.cRows;
-               for (unsigned int i = 0; i < row_set.cRows; ++i) {
-                       try {
-                               hierarchy_container.push_back(folder_shared_ptr(new folder(*this,
-                                                             row_set.aRow[i].lpProps[0].value.d)));
-                       } catch(mapi_exception e) {
-                               mapi_object_release(&hierarchy_table);
-                               throw;
-                       }
-               }
-       }
-
-       mapi_object_release(&hierarchy_table);
-
-       return hierarchy_container;
-}
-
-} // namespace libmapipp
-
diff --git a/branches/plugfest/libmapi++/src/mapi_exception.cpp b/branches/plugfest/libmapi++/src/mapi_exception.cpp
deleted file mode 100644 (file)
index af12c47..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   mapi_exception Class implementation.
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/mapi_exception.h>
-
-namespace libmapipp {
-
-mapi_exception::status_map mapi_exception::sm_status_map = status_map();
-
-} // namespace libmapipp
-
diff --git a/branches/plugfest/libmapi++/src/message.cpp b/branches/plugfest/libmapi++/src/message.cpp
deleted file mode 100644 (file)
index fe76480..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Message class implementation
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/attachment.h>
-
-namespace libmapipp {
-
-message::attachment_container_type message::fetch_attachments()
-{
-       mapi_object_t   attachment_table;
-
-       mapi_object_init(&attachment_table);
-       if (GetAttachmentTable(&m_object, &attachment_table) != MAPI_E_SUCCESS) {
-               mapi_object_release(&attachment_table);
-               throw mapi_exception(GetLastError(), "message::fetch_attachments : GetAttachmentTable");
-       }
-
-       SPropTagArray* property_tag_array = set_SPropTagArray(m_session.get_memory_ctx(), 0x1, PR_ATTACH_NUM);
-
-       if (SetColumns(&attachment_table, property_tag_array) != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(property_tag_array);
-               mapi_object_release(&attachment_table);
-               throw mapi_exception(GetLastError(), "message::fetch_attachments : SetColumns");
-       }
-
-       MAPIFreeBuffer(property_tag_array);
-
-       SRowSet  row_set;
-       attachment_container_type attachment_container;
-
-       while( (QueryRows(&attachment_table, 0x32, TBL_ADVANCE, &row_set) == MAPI_E_SUCCESS) && row_set.cRows) {
-               for (unsigned int i = 0; i < row_set.cRows; ++i) {
-                       try {
-                               attachment_container.push_back(attachment_shared_ptr(new attachment(*this, row_set.aRow[i].lpProps[0].value.l)));
-                       }
-                       catch(mapi_exception e) {
-                               mapi_object_release(&attachment_table);
-                               throw;
-                       }
-               }
-       }
-       mapi_object_release(&attachment_table);
-
-       return attachment_container;
-}
-
-} // namespace libmapipp
diff --git a/branches/plugfest/libmapi++/src/object.cpp b/branches/plugfest/libmapi++/src/object.cpp
deleted file mode 100644 (file)
index 03b9240..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Object Class implementation.
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/object.h>
-#include <libmapi++/property_container.h>
-#include <libmapi++/session.h>
-
-namespace libmapipp {
-
-property_container object::get_property_container() 
-{ 
-       return property_container(m_session.get_memory_ctx(), m_object); 
-}
-
-} // namespace libmapipp
-
diff --git a/branches/plugfest/libmapi++/src/profile.cpp b/branches/plugfest/libmapi++/src/profile.cpp
deleted file mode 100644 (file)
index d81a6f3..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Profile and Profile database Classes
-
-   Copyright (C) Alan Alvarez 2008.
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/profile.h>
-
-namespace libmapipp {
-
-
-profile_database::profile_database(const std::string& profiledb_path)  throw(std::runtime_error, mapi_exception)
-  : m_mapi_context(0), m_memory_ctx(talloc_named(NULL, 0, "libmapipp-profile"))
-{
-       std::string profile_path;
-
-       // If profile is not provided, attempt to get it from default location
-       // (~/.openchange/profiles.ldb)
-       if (profiledb_path == "") {
-               profile_path = get_default_profile_path();
-               if (profile_path == "") {
-                       talloc_free(m_memory_ctx);
-                       throw std::runtime_error("libmapipp::session(): Failed to get $HOME env variable");
-               }
-       } else {
-               profile_path = profiledb_path;
-       }
-       enum MAPISTATUS retval = MAPIInitialize(&m_mapi_context, profile_path.c_str());
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(m_memory_ctx);
-               throw mapi_exception(retval, "session::session : MAPIInitialize");
-       }
-}
-
-
-profile_database::~profile_database()
-{
-       if (m_mapi_context) {
-               MAPIUninitialize(m_mapi_context);
-       }
-       talloc_free(m_memory_ctx);
-}
-
-
-
-std::string profile_database::get_default_profile_name() throw (mapi_exception)
-{
-       char* profname = NULL;
-       enum MAPISTATUS retval = GetDefaultProfile(m_mapi_context, &profname);
-       if (retval != MAPI_E_SUCCESS)
-               throw mapi_exception(retval, "profile::get_default_profile : GetDefaultProfile()");
-       return std::string(profname);
-}
-
-
-
-bool profile_database::create_profile_store(const char* profiledb, const char* ldif_path)
-{
-       if (ldif_path == NULL)
-           ldif_path = ::mapi_profile_get_ldif_path();
-       return (CreateProfileStore(profiledb, ldif_path) == MAPI_E_SUCCESS);
-}
-
-
-
-bool profile_database::create_profile_store(const std::string& profiledb, const std::string& ldif_path)
-{
-       if (ldif_path == "") {
-               return (create_profile_store(profiledb.c_str()));
-       } else {
-               return create_profile_store(profiledb.c_str(), ldif_path.c_str());
-       }
-}
-
-
-
-std::string profile_database::get_default_profile_path()
-{
-       const char* profile_path = getenv("HOME");
-       std::string retval = "";
-       if (profile_path) {
-               retval = profile_path;
-               retval += "/.openchange/profiles.ldb";
-       }
-
-       return retval;
-}
-
-
-} // namespace libmapipp
\ No newline at end of file
diff --git a/branches/plugfest/libmapi++/src/session.cpp b/branches/plugfest/libmapi++/src/session.cpp
deleted file mode 100644 (file)
index 4a22bd8..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-   libmapi C++ Wrapper
-   Session Class implementation.
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <libmapi++/message_store.h>
-#include <libmapi++/profile.h>
-#include <libmapi++/session.h>
-
-namespace libmapipp {
-
-session::session(const std::string& profiledb, bool debug) throw(std::runtime_error, mapi_exception) 
-: m_session(NULL), m_mapi_context(0), m_memory_ctx(talloc_named(NULL, 0, "libmapipp-session")), m_message_store(new message_store(*this))
-{
-       mapi_exception::fill_status_map();
-
-       std::string profile_path;
-
-       // If profile is not provided, attempt to get it from default location
-       // (~/.openchange/profiles.ldb)
-       if (profiledb == "") {
-               profile_path = profile_database::get_default_profile_path();
-               if (profile_path == "") {
-                       talloc_free(m_memory_ctx);
-                       delete m_message_store;
-                       throw std::runtime_error("libmapipp::session(): Failed to get $HOME env variable");
-               }
-       } else {
-               profile_path = profiledb;
-       }
-
-       if (MAPIInitialize(&m_mapi_context, profile_path.c_str()) != MAPI_E_SUCCESS) {
-               talloc_free(m_memory_ctx);
-               delete m_message_store;
-               throw mapi_exception(GetLastError(), "session::session : MAPIInitialize");
-       }
-
-       if (debug) {
-               m_mapi_context->dumpdata = true;
-       }
-}
-
-void session::login(const std::string& profile_name, const std::string& password) throw (mapi_exception)
-{
-       m_profile_name = profile_name;
-       if (m_profile_name == "") { // if profile is not set, try to get default profile
-               try {
-                       m_profile_name = profile_database().get_default_profile_name();
-               } catch(mapi_exception e) {
-                       uninitialize();
-                       throw;
-               }
-       }
-
-       if (MapiLogonEx(m_mapi_context, &m_session, m_profile_name.c_str(), (password != "") ? password.c_str() : 0 ) != MAPI_E_SUCCESS) {
-               uninitialize();
-               throw mapi_exception(GetLastError(), "session::session : MapiLogonEx");
-       }
-
-       try {
-               m_message_store->open(m_session);
-       } catch (mapi_exception e) {
-               throw;
-       }
-}
-
-} // namespace libmapipp
diff --git a/branches/plugfest/libmapi++/tests/attach_test.cpp b/branches/plugfest/libmapi++/tests/attach_test.cpp
deleted file mode 100644 (file)
index 4430115..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Sample attachment test application
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <iostream>
-
-#include <libmapi++/libmapi++.h>
-
-using namespace std;
-using namespace libmapipp;
-
-static uint32_t get_attachment_count(message& mapi_message)
-{
-       message::attachment_container_type attachment_container = mapi_message.fetch_attachments();
-       return attachment_container.size();
-}
-
-static void print_messages_with_attachments(folder& up_folder)
-{
-       folder::message_container_type messages = up_folder.fetch_messages();
-       for (folder::message_container_type::iterator Iter = messages.begin(); Iter != messages.end(); ++Iter) {
-               uint32_t attachment_count = get_attachment_count(*(*Iter));
-//             cout << "Attachment Count: " << attachment_count << endl;
-               if (attachment_count) {
-                       cout << "Message (" << (*Iter)->get_id() << ") has " << attachment_count << " attachments." << endl; 
-               }
-       }
-}
-
-static void print_folder_tree(folder& up_folder, session& mapi_session, unsigned int deep = 0)
-{
-       property_container up_folder_property_container = up_folder.get_property_container();
-       up_folder_property_container << PR_DISPLAY_NAME << PR_CONTENT_COUNT;
-       up_folder_property_container.fetch();
-
-       string display_name = static_cast<const char*>(up_folder_property_container[PR_DISPLAY_NAME]);
-       const uint32_t message_count = *(static_cast<const uint32_t*>(up_folder_property_container[PR_CONTENT_COUNT]));
-
-       for (unsigned int i = 0; i < deep; ++i) {
-               cout << "|----> ";
-       }
-
-       cout << display_name << " (id: " << up_folder.get_id()  << ") (messages: " << message_count << ")" << endl;
-       
-       print_messages_with_attachments(up_folder);
-
-       // Fetch Top Information Folder Hierarchy (child folders)
-       folder::hierarchy_container_type hierarchy = up_folder.fetch_hierarchy();
-       for (unsigned int i = 0; i < hierarchy.size(); ++i) {
-               print_folder_tree(*hierarchy[i], mapi_session, deep+1);
-       }
-}
-
-
-int main()
-{
-       try {
-               session mapi_session;
-
-               mapi_session.login();
-
-               // Get Default Top Information Store folder ID
-               mapi_id_t top_folder_id = mapi_session.get_message_store().get_default_folder(olFolderTopInformationStore);
-
-               // Open Top Information Folder
-               folder top_folder(mapi_session.get_message_store(), top_folder_id);
-
-               print_folder_tree(top_folder, mapi_session);
-       }
-       catch (mapi_exception e) // Catch any mapi exceptions
-       {
-               cout << "MAPI Exception @ main: " <<  e.what() << endl;
-       }
-       catch (std::runtime_error e) // Catch runtime exceptions
-       {
-               cout << "std::runtime_error exception @ main: " << e.what() << endl;
-       }
-
-        return 0;
-}
diff --git a/branches/plugfest/libmapi++/tests/exception_test.cpp b/branches/plugfest/libmapi++/tests/exception_test.cpp
deleted file mode 100644 (file)
index 698311a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <iostream>
-
-#include <libmapi++/libmapi++.h>
-
-static void dotest() throw(libmapipp::mapi_exception)
-{
-       throw libmapipp::mapi_exception(MAPI_E_SUCCESS, "mapi_exception test");
-}
-
-int main()
-{
-       try {
-               dotest();
-       }
-       catch (libmapipp::mapi_exception e) {
-               std::cout << e.what() << std::endl;
-       }
-       
-       return 0;
-}
-
diff --git a/branches/plugfest/libmapi++/tests/profile_test.cpp b/branches/plugfest/libmapi++/tests/profile_test.cpp
deleted file mode 100644 (file)
index 801befb..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Test application for profile database and profile classes
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <exception>
-#include <vector>
-#include <string>
-
-#include <libmapi++/libmapi++.h>
-#define PROFILEDB_NAME_TEMPLATE "/tmp/mapidbXXXXXX"
-int main ()
-{
-       try {
-               libmapipp::profile_database db;
-
-               std::cout << "default profile name: " << db.get_default_profile_name() << std::endl;
-
-               {
-                       char *tmpname = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
-                       strncpy(tmpname, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
-                       int ret = mkstemp(tmpname);
-                       if (ret < 0) {
-                               std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
-                       }
-                       if (libmapipp::profile_database::create_profile_store(tmpname)) {
-                               std::cout << "success creating a temporary profile store" << std::endl;
-                       } else {
-                               std::cout << "failed to create a temporary profile store" << std::endl;
-                       }
-                       unlink(tmpname);
-               }
-               
-               {
-                       char *tmpname2 = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
-                       strncpy(tmpname2, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
-                       int ret = mkstemp(tmpname2);
-                       if (ret < 0) {
-                               std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
-                       }
-                       if (libmapipp::profile_database::create_profile_store(std::string(tmpname2))) {
-                               std::cout << "success creating a temporary profile store with std::string" << std::endl;
-                       } else {
-                               std::cout << "failed to create a temporary profile store with std::string" << std::endl;
-                       }
-                       unlink(tmpname2);
-               }
-
-               std::cout << "finished profile and profile database tests" << std::endl;
-       }
-       catch (libmapipp::mapi_exception e) // Catch any mapi exceptions
-       {
-               std::cout << "MAPI Exception @ main: " <<  e.what() << std::endl;
-       }
-       catch (std::runtime_error e) // Catch runtime exceptions
-       {
-               std::cout << "std::runtime_error exception @ main: " << e.what() << std::endl;
-
-       }
-
-       return 0;
-}
diff --git a/branches/plugfest/libmapi++/tests/test.cpp b/branches/plugfest/libmapi++/tests/test.cpp
deleted file mode 100644 (file)
index d185828..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-   libmapi C++ Wrapper
-
-   Sample test application
-
-   Copyright (C) Alan Alvarez 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <exception>
-#include <vector>
-#include <string>
-
-#include <libmapi++/libmapi++.h>
-
-using namespace libmapipp;
-using std::string;
-
-// The best way to get a folder message count is to get property PR_FOLDER_CHILD_COUNT.
-// This is only used to test opening all messages.
-static unsigned int get_message_count(folder& the_folder, session& mapi_session)
-{
-       folder::message_container_type messages = the_folder.fetch_messages();
-       return messages.size();
-}
-
-static void print_folder_tree(folder& up_folder, session& mapi_session, unsigned int deep = 0)
-{
-       property_container up_folder_property_container = up_folder.get_property_container();
-       up_folder_property_container << PR_DISPLAY_NAME << PR_CONTAINER_CLASS;
-       up_folder_property_container.fetch();
-
-       string display_name = static_cast<const char*>(up_folder_property_container[PR_DISPLAY_NAME]);
-       string container_class;
-       if (up_folder_property_container[PR_CONTAINER_CLASS])
-               container_class = static_cast<const char*>(up_folder_property_container[PR_CONTAINER_CLASS]);
-
-       for (unsigned int i = 0; i < deep; ++i) {
-               cout << "|----> ";
-       }
-
-       cout << display_name << " (id: " << up_folder.get_id()  << ") (messages: " << get_message_count(up_folder, mapi_session) << ")" 
-            << " container class: " << container_class << endl;
-
-       // Fetch Top Information Folder Hierarchy (child folders)
-       folder::hierarchy_container_type hierarchy = up_folder.fetch_hierarchy();
-       for (unsigned int i = 0; i < hierarchy.size(); ++i) {
-               print_folder_tree(*hierarchy[i], mapi_session, deep+1);
-       }
-}
-
-int main ()
-{
-       try {
-               // Initialize MAPI Session
-               session mapi_session;
-
-               mapi_session.login();
-
-               property_container store_properties = mapi_session.get_message_store().get_property_container();
-               store_properties << PR_DISPLAY_NAME;
-               store_properties.fetch();
-               cout << "Mailbox Name: " << static_cast<const char*>(*store_properties.begin()) << endl;
-
-               // Get Default Inbox folder ID.
-               mapi_id_t inbox_id = mapi_session.get_message_store().get_default_folder(olFolderInbox);
-               cout << "inbox_id: " << inbox_id << endl;
-
-               // Open Inbox Folder
-               folder inbox_folder(mapi_session.get_message_store(), inbox_id);
-
-               // Fetch messages in Inbox Folder
-               folder::message_container_type messages = inbox_folder.fetch_messages();
-               cout << "Inbox size: " << messages.size() << endl;
-
-               // Get and Print some information about the first message in the Inbox Folder
-               if (messages.size() > 0) {
-                       // Get a property container associated to the first message
-                       property_container message_property_container = messages[0]->get_property_container();
-
-                       // Add Property Tags to be fetched and then fetch the properties.
-                       message_property_container << PR_DISPLAY_TO << PR_CONVERSATION_TOPIC;
-                       message_property_container.fetch_all();
-
-                       string to;
-                       string subject;
-                       // Get some property values using property_container::operator[]
-                       // to           = static_cast<const char*>(message_property_container[PR_DISPLAY_TO]);
-                       // subject      = static_cast<const char*>(message_property_container[PR_CONVERSATION_TOPIC]);
-                       // Print property values
-                       // cout << "To: " << to << endl;
-                       // cout << "Subject: " << subject << endl;
-
-                       for (property_container::iterator Iter = message_property_container.begin(); Iter != message_property_container.end(); Iter++)
-                       {
-                               if (Iter.get_tag() == PR_DISPLAY_TO) 
-                                       to = (const char*) *Iter;
-                               else if (Iter.get_tag() == PR_CONVERSATION_TOPIC) 
-                                       subject = (const char*) *Iter;
-                       }
-
-                       // Print property values
-                       cout << "To: " << to << endl;
-                       cout << "Subject: " << subject << endl;
-               }
-
-               // Get Default Top Information Store folder ID
-               mapi_id_t top_folder_id = mapi_session.get_message_store().get_default_folder(olFolderTopInformationStore);
-
-               // Open Top Information Folder
-               folder top_folder(mapi_session.get_message_store(), top_folder_id);
-
-               print_folder_tree(top_folder, mapi_session);
-
-               cout << "finished session" << endl;
-       }
-       catch (mapi_exception e) // Catch any mapi exceptions
-       {
-               cout << "MAPI Exception @ main: " <<  e.what() << endl;
-       }
-       catch (std::runtime_error e) // Catch runtime exceptions
-       {
-               cout << "std::runtime_error exception @ main: " << e.what() << endl;
-
-       }
-
-       return 0;
-}
diff --git a/branches/plugfest/libmapi.pc.in b/branches/plugfest/libmapi.pc.in
deleted file mode 100644 (file)
index 80a647c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: MAPI
-Description: MAPI Protocol Implementation
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmapi
-Libs.private: @LIBS@
-Cflags: -I${includedir}
-Requires: talloc dcerpc ndr tevent
-Requires.private: samba-hostconfig ldb
diff --git a/branches/plugfest/libmapi/Doxyfile.in b/branches/plugfest/libmapi/Doxyfile.in
deleted file mode 100644 (file)
index 1f00245..0000000
+++ /dev/null
@@ -1,1271 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = MAPI Client Libraries
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = libmapi doc/doxygen
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.h *.c *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =  *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c *_private.h
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = doc/examples
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed \
-                        -e '20,40s/.*\<libmapi\/proto_private.h\>//'   \
-                        -e '20,40s/.*\<gen_ndr\/ndr_exchange.h\>//'            \
-                        -e '20,40s/.*\<gen_ndr\/ndr_exchange_c.h\>//'  \
-                        -e '20,40s/.*\<gen_ndr\/ndr_misc.h\>//'                \
-                        -e '20,40s/.*\<gen_ndr\/ndr_property.h\>//'            \
-                        -e '20,40s/.*\<param.h\>//'                            \
-                        -e '20,40s/.*\<core\/error.h\>//'                      \
-                        -e '20,40s/.*\<credentials.h\>//'                      \
-                        -e '20,40s/.*\<ldb.h\>//'                              \
-                        -e '20,40s/.*\<ldb_errors.h\>//'                       \
-                        -e '20,40s/.*\<libmapi\/dlinklist.h\>//'               \
-                        -e '20,40s/.*\<libmapi\/mapi_nameid.h\>//'             \
-                        -e '20,40s/.*\<libmapi\/mapicode.h\>//'                \
-                        -e '20,40s/.*\<libmapi\/mapidump.h\>//'                \
-                        -e '20,40s/.*\<libmapi\/mapitags.h\>//'                \
-                        -e '20,40s/.*\<libmapi\/mapi_nameid_private.h\>//'     \
-                        -e '20,40s/.*\<libmapi\/defs_private.h\>//'            \
-                        -e '20,40s/.*\<libgen.h\>//'                   \
-                        -e '20,40s/.*\<time.h\>//'                             \
-                        -e '20,40s/.*\<sys\/*\>//'                             \
-                         -e '20,40s/_PUBLIC_//'"
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/libmapi
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = YES
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/libmapi/FXICS.c b/branches/plugfest/libmapi/FXICS.c
deleted file mode 100644 (file)
index 7a27d8f..0000000
+++ /dev/null
@@ -1,1294 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file FXICS.c
-
-   \brief Fast Transfer and Incremental Change Synchronization operations
- */
-
-
-/**
-   \details Reserves a range of IDs to be used by a local replica
-
-   \param obj_store pointer on the store MAPI object
-   \param IdCount ID range length to reserve
-   \param ReplGuid pointer to the GUID structure returned by the
-   server
-   \param GlobalCount byte array that specifies the first allocated
-   field
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS GetLocalReplicaIds(mapi_object_t *obj_store, 
-                                           uint32_t IdCount,
-                                           struct GUID *ReplGuid,
-                                           uint8_t GlobalCount[6])
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetLocalReplicaIds_req   request;
-       struct GetLocalReplicaIds_repl  *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplGuid, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetLocalReplicaIds");
-       size = 0;
-
-       /* Fill the GetLocalReplicaIds operation */
-       request.IdCount = IdCount;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetLocalReplicaIds;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetLocalReplicaIds = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-       
-       /* Retrieve output parameters */
-       reply = &mapi_response->mapi_repl->u.mapi_GetLocalReplicaIds;
-       *ReplGuid = reply->ReplGuid;
-       memcpy(GlobalCount, reply->GlobalCount, 6);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for Fast Transfer receive
-
-   This function is used to configure a server for fast-transfer receive operation.
-   This could be the target server in a server->client->server copy, or for a
-   client->server upload.
-
-   \param obj the target object for the upload (folder, message or attachment)
-   \param sourceOperation the type of transfer (one of FastTransferDest_CopyTo,
-   FastTransferDest_CopyProperties,FastTransferDest_CopyMessages or
-   FastTransferDest_CopyFolder)
-   \param obj_destination_context the fast transfer context for future ROPs.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS FXDestConfigure(mapi_object_t *obj,
-                                        enum FastTransferDestConfig_SourceOperation sourceOperation,
-                                        mapi_object_t *obj_destination_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferDestinationConfigure_req     request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_destination_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXDestConfigure");
-       size = 0;
-
-       /* Fill the ConfigureDestination operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.SourceOperation = sourceOperation;
-       size += sizeof(uint8_t);
-       request.CopyFlags = 0x00; /* we don't support move yet */
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferDestConfigure;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferDestinationConfigure = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xFFFFFFFF;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_destination_context, session);
-       mapi_object_set_handle(obj_destination_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_destination_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Advise a server of the "other server" version
-
-   This function is used to set up a fast server-client-server transfer.
-
-   \param obj_store pointer to the store MAPI object
-   \param version the server version
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameter is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS TellVersion(mapi_object_t *obj_store, uint16_t version[3])
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct TellVersion_req          request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!version, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "TellVersion");
-       size = 0;
-
-       /* Fill the operation */
-       request.version[0] = version[0];
-       request.version[1] = version[1];
-       request.version[2] = version[2];
-       size += 3 * sizeof (uint16_t);
-
-
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_TellVersion;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_TellVersion = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for Fast Transfer transmission of a folder hierachy
-
-   This function is used to configure a server for a fast-transfer folder hierachy 
-   send operation. This could be the origin server in a server->client->server copy, or for a
-   server to client download.
-   
-   This operation copies the folder object, and any sub-objects (including folder properties
-   and messages). It can optionally copy sub-folders, depending on copyFlags.
-
-   \param obj the source object for the operation (folder)
-   \param copyFlags flags that change the copy behaviour (see below)
-   \param sendOptions flags that change the format of the transfer (see FXCopyMessages)
-   \param obj_source_context the fast transfer source context for future ROPs
-
-   \a copyflags can be zero or more of the following:
-   - FastTransferCopyFolder_CopySubfolders to recursively copy any sub-folders and contained messages
-   - FastTransferCopyFolder_NoGhostedContent to omit any ghosted content when copying public folders
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS FXCopyFolder(mapi_object_t *obj, uint8_t copyFlags, uint8_t sendOptions,
-                                     mapi_object_t *obj_source_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferSourceCopyFolder_req         request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_source_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXCopyFolder");
-       size = 0;
-
-       /* Fill the CopyFolder operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint8_t);
-       request.SendOptions = sendOptions;
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferSourceCopyFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferSourceCopyFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_source_context, session);
-       mapi_object_set_handle(obj_source_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_source_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for Fast Transfer transmission of a list of messages
-   
-   This function is used to configure a server for a fast-transfer message
-   send operation. This could be the origin server in a server->client->server copy, or for a
-   server to client download.
-   
-   This operation copies the message objects, and any sub-objects (including attachments and embedded
-   messages).
-
-   \param obj the source object for the operation (folder)
-   \param message_ids the message IDs for the messages to copy.
-   \param copyFlags flags that change the copy behaviour (see below)
-   \param sendOptions flags that change the format of the transfer (see below)
-   \param obj_source_context the fast transfer source context for future ROPs
-
-   \a copyflags can be zero or more of the following:
-   - FastTransferCopyMessage_Move - configure output for move
-   - FastTransferCopyMessage_BestBody - output message bodies in original format (if not set, output in RTF)
-   - FastTransferCopyMessage_SendEntryId - include message and change identification in the output stream
-
-   \a sendOptions can be zero or more of the following:
-   - FastTransfer_Unicode - enable Unicode output
-   - FastTransfer_UseCpid (not normally used directly - implied by ForUpload)
-   - FastTransfer_ForUpload - (enable Unicode, and advise the server that transfer is server->client->server)
-   - FastTransfer_RecoverMode - advise the server that the client supports recovery mode
-   - FastTransfer_ForceUnicode - force Unicode output
-   - FastTransfer_PartialItem - used for synchronisation download
-   
-   If the \a FastTransfer_ForUpload is set, the next call must be TellVersion()
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS FXCopyMessages(mapi_object_t *obj, mapi_id_array_t *message_ids,
-                                       uint8_t copyFlags, uint8_t sendOptions,
-                                       mapi_object_t *obj_source_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferSourceCopyMessages_req       request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_source_context, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!message_ids, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXCopyMessages");
-       size = 0;
-
-       /* Fill the CopyMessages operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.MessageIdCount = message_ids->count;
-       size += sizeof (uint16_t);
-       retval = mapi_id_array_get(mem_ctx, message_ids, &(request.MessageIds));
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       size += request.MessageIdCount * sizeof (mapi_id_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint8_t);
-       request.SendOptions = sendOptions;
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferSourceCopyMessages;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferSourceCopyMessages = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_source_context, session);
-       mapi_object_set_handle(obj_source_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_source_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for Fast Transfer transmission of a folder, message or attachment
-
-   This function is used to configure a server for a fast-transfer download of a folder, message
-   or attachment. This could be the origin server in a server->client->server copy, or for a
-   server to client download.
-   
-   This operation copies the source object, potentially omitting some properties. It can optionally
-   copy sub-objects, depending on \a Level.
-
-   \param obj the source object for the operation (folder, message or attachment)
-   \param level whether to copy sub-objects of folders or messages (set to 0) or not (set to any other value)
-   \param copyFlags flags that change the copy behaviour (see below)
-   \param sendOptions flags that change the format of the transfer (see FXCopyMessages)
-   \param excludes the list of properties to exclude from the transfer
-   \param obj_source_context the fast transfer source context for future ROPs
-
-   \a copyflags can be zero or more of the following:
-   - FastTransferCopyTo_Move to configure as part of a move operation
-   - FastTransferCopyTo_BestBody to use original format for message bodies (if not set, use RTF instead)
-
-   Be careful in setting \a level to something other than zero. In particular, if \a level is
-   non-zero for a message, then the list of recipients, and any attachments or embedded messages, will
-   not be transferred.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS FXCopyTo(mapi_object_t *obj, uint8_t level, uint32_t copyFlags,
-                                 uint8_t sendOptions, struct SPropTagArray *excludes,
-                                 mapi_object_t *obj_source_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferSourceCopyTo_req             request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_source_context, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!excludes, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXCopyTo");
-       size = 0;
-
-       /* Fill the CopyTo operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.Level = level;
-       size += sizeof(uint8_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint32_t);
-       request.SendOptions = sendOptions;
-       size += sizeof(uint8_t);
-       request.PropertyTags.cValues = excludes->cValues;
-       size += sizeof(uint16_t);
-       request.PropertyTags.aulPropTag = excludes->aulPropTag;
-       size += excludes->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferSourceCopyTo;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferSourceCopyTo = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_source_context, session);
-       mapi_object_set_handle(obj_source_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_source_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for Fast Transfer transmission of the properties of a folder, message or attachment
-
-   This function is used to configure a server for a fast-transfer download of properties. This could be the
-   origin server in a server->client->server copy, or for a server to client download.
-   
-   This operation copies the specified properties of the source object. It can optionally copy properties of
-   sub-objects, depending on \a Level.
-
-   \param obj the source object for the operation (folder, message or attachment)
-   \param level whether to copy properties of sub-objects of folders or messages (set to 0) or not (set to any other value)
-   \param copyFlags flags that change the copy behaviour (see below)
-   \param sendOptions flags that change the format of the transfer (see FXCopyMessages)
-   \param properties the list of properties to transfer
-   \param obj_source_context the fast transfer source context for future ROPs
-
-   \a copyflags may be the following:
-   - FastTransferCopyProperties_Move to configure as part of a move operation
-
-   Be careful in setting \a level to something other than zero. In particular, if \a level is
-   non-zero for a message, then the list of recipients, and any attachments or embedded messages, will
-   not be transferred.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS FXCopyProperties(mapi_object_t *obj, uint8_t level, uint32_t copyFlags,
-                                         uint8_t sendOptions, struct SPropTagArray *properties,
-                                         mapi_object_t *obj_source_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferSourceCopyProperties_req     request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_source_context, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!properties, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXCopyProperties");
-       size = 0;
-
-       /* Fill the CopyTo operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.Level = level;
-       size += sizeof(uint8_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint8_t);
-       request.SendOptions = sendOptions;
-       size += sizeof(uint8_t);
-       request.PropertyTags.cValues = properties->cValues;
-       size += sizeof(uint16_t);
-       request.PropertyTags.aulPropTag = properties->aulPropTag;
-       size += properties->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferSourceCopyProps;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferSourceCopyProperties = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_source_context, session);
-       mapi_object_set_handle(obj_source_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_source_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-    Get data from source fast transfer object
-
-    Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block
-    is small, it will fit into a single call, and the transferStatus will indicate completion. However
-    larger transfers will require multiple calls.
-
-    \param obj_source_context the source object (from FXCopyTo, FXCopyProperties, FXCopyFolder or FXCopyMessages)
-    \param maxSize the maximum size (pass 0 to indicate maximum available size)
-    \param transferStatus result of the transfer
-    \param progressStepCount the approximate number of steps (of totalStepCount) completed
-    \param totalStepCount the approximate number of steps (total)
-    \param blob this part of the transfer
-    
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-*/
-_PUBLIC_ enum MAPISTATUS FXGetBuffer(mapi_object_t *obj_source_context, uint16_t maxSize, enum TransferStatus *transferStatus,
-                                    uint16_t *progressStepCount, uint16_t *totalStepCount, DATA_BLOB *blob)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferSourceGetBuffer_req          request;
-       struct FastTransferSourceGetBuffer_repl         *reply;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_source_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_source_context);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_source_context, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXGetBuffer");
-       size = 0;
-
-       /* Fill the GetBuffer operation */
-       if ((maxSize == 0) || (maxSize < 15480)) {
-               request.BufferSize = 0xBABE;
-               size += sizeof(uint16_t);
-               request.MaximumBufferSize.MaximumBufferSize = 0x8000;
-               size += sizeof(uint16_t);
-       } else {
-               request.BufferSize = maxSize;
-               size += sizeof(uint16_t);
-       }
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferSourceGetBuffer;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferSourceGetBuffer = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_source_context);
-
-       // TODO: handle backoff (0x00000480)
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Retrieve the result */
-       reply = &(mapi_response->mapi_repl->u.mapi_FastTransferSourceGetBuffer);
-       *transferStatus = reply->TransferStatus;
-       *progressStepCount = reply->InProgressCount;
-       *totalStepCount = reply->TotalStepCount;
-       blob->length = reply->TransferBufferSize;
-       blob->data = (uint8_t *)talloc_size((TALLOC_CTX *)session, blob->length);
-       memcpy(blob->data, reply->TransferBuffer.data, blob->length);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-    Send data to a destination fast transfer object
-
-    Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block
-    is small, it will fit into a single call, and the transferStatus will indicate completion. However
-    larger transfers will require multiple calls.
-
-    \param obj_dest_context the destination object (from FXDestConfigure)
-    \param blob this part of the transfer
-    \param usedSize how many bytes of this part of the transfer that were used (only less than the total if an error occurred)
-    
-    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-    \note Developers may also call GetLastError() to retrieve the last
-    MAPI error code. Possible MAPI error codes are:
-    - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-    - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-      invalid
-    - MAPI_E_CALL_FAILED: A network problem was encountered during the
-      transaction
-*/
-_PUBLIC_ enum MAPISTATUS FXPutBuffer(mapi_object_t *obj_dest_context, DATA_BLOB *blob, uint16_t *usedSize)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct FastTransferDestinationPutBuffer_req     request;
-       struct FastTransferDestinationPutBuffer_repl    *reply;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_dest_context, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!blob, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!usedSize, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_dest_context);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_dest_context, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FXPutBuffer");
-       size = 0;
-
-       /* Fill the PutBuffer operation */
-       request.TransferBufferSize = blob->length;
-       size += sizeof(uint16_t);
-       request.TransferBuffer = *blob;
-       size += blob->length;
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FastTransferDestPutBuffer;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FastTransferDestinationPutBuffer = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_dest_context);
-
-       // TODO: handle backoff (0x00000480)
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Retrieve the result */
-       reply = &(mapi_response->mapi_repl->u.mapi_FastTransferDestinationPutBuffer);
-       *usedSize = reply->BufferUsedCount;
-       /* we could pull more stuff here, but it doesn't seem useful */
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Prepare a server for ICS download
-
-   This function is used to configure a server for ICS (Incremental Change Synchronization)
-   download. You use the synchronization context handle for other ICS and Fast Transfer
-   operations.
-
-   \param obj the target object for the upload (folder)
-   \param sync_type the type of synchronization that will be performed (just
-                   folder contents, or whole folder hierachy)
-   \param send_options flags that change the format of the transfer (see FXCopyMessages)
-   \param sync_flags flags that change the behavior of the transfer (see below)
-   \param sync_extraflags additional flags that change the behavior of the transfer (see below)
-   \param restriction a Restriction structure to limit downloads (only for sync_type ==
-   SynchronizationType_Content)
-   \param property_tags the properties to exclude (or include, if
-   SynchronizationFlag_OnlySpecifiedProperties flag is set) in the download
-   \param obj_sync_context the resulting synchronization context handle
-
-   \a sync_flags can be zero or more of the following:
-   - SynchronizationFlag_Unicode to use Unicode format (must match in send_options)
-   - SynchronizationFlag_NoDeletions - whether to download changes about message deletion
-   - SynchronizationFlag_IgnoreNoLongerInScope - whether to download changes for messages that have
-   gone out of scope.
-   - SynchronizationFlag_ReadState - server to download changes to read state
-   - SynchronizationFlag_FAI server to download changes to FAI messages
-   - SynchronizationFlag_Normal - server to download changes to normal messages
-   - SynchronizationFlag_OnlySpecifiedProperties - set means to include only properties
-   that are listed in property_tags, not-set means to exclude properties that are listed
-   in property_tags
-   - SynchronizationFlag_NoForeignIdentifiers - ignore persisted values (usually want this set)
-   - SynchronizationFlag_BestBody - format for outputting message bodies (set means original format,
-   not-set means output in RTF)
-   - SynchronizationFlag_IgnoreSpecifiedOnFAI - ignore property_tags restrictions for FAI messages
-   - SynchronizationFlag_Progress - whether to output progress information.
-
-   \note SynchronizationFlag_IgnoreNoLongerInScope, SynchronizationFlag_ReadState,
-   SynchronizationFlag_FAI, SynchronizationFlag_Normal, SynchronizationFlag_OnlySpecifiedProperties,
-   SynchronizationFlag_BestBody and SynchronizationFlag_IgnoreSpecifiedOnFAI are only
-   valid if the synchronization type is SynchronizationType_Content.
-
-   \a sync_extraflags can be zero or more of the following:
-   - SynchronizationExtraFlag_Eid - whether the server includes the PR_FID / PR_MID in the download
-   - SynchronizationExtraFlag_MessageSize - whether the server includes the PR_MESSAGE_SIZE property
-   in the download (only for sync_type == SynchronizationType_Content)
-   - SynchronizationExtraFlag_Cn - whether the server includes the PR_CHANGE_NUM property in the
-   download.
-   - SynchronizationExtraFlag_OrderByDeliveryTime - whether the server sends messages sorted by
-   delivery time (only for sync_type == SynchronizationType_Content)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-     invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS ICSSyncConfigure(mapi_object_t *obj, enum SynchronizationType sync_type,
-                                         uint8_t send_options, uint16_t sync_flags,
-                                         uint32_t sync_extraflags, DATA_BLOB restriction,
-                                         struct SPropTagArray *property_tags,
-                                         mapi_object_t *obj_sync_context)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SyncConfigure_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_sync_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "RopSynchronizationConfigure");
-       size = 0;
-
-       /* Fill the SyncConfigure operation */
-       request.handle_idx = 0x01;
-       size += sizeof(uint8_t);
-       request.SynchronizationType = sync_type;
-       size += sizeof(uint8_t);
-       request.SendOptions = send_options;
-       size += sizeof(uint8_t);
-       request.SynchronizationFlags = sync_flags;
-       size += sizeof(uint16_t);
-       request.RestrictionSize = restriction.length;
-       size += sizeof(uint16_t);
-       request.RestrictionData = restriction;
-       size += request.RestrictionSize; /* for the RestrictionData BLOB */
-       request.SynchronizationExtraFlags = sync_extraflags;
-       size += sizeof(uint32_t);
-       request.PropertyTags.cValues = property_tags->cValues;
-       size += sizeof(uint16_t);
-       request.PropertyTags.aulPropTag = property_tags->aulPropTag;
-       size += property_tags->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SyncConfigure;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SyncConfigure = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xFFFFFFFF;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_sync_context, session);
-       mapi_object_set_handle(obj_sync_context, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_sync_context, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-    Initialize an ICS Initial State upload
-
-    This is one of three operations (along with ICSSyncUploadStateContinue and ICSSyncUploadStateEnd)
-    used to send the initial state for an ICS download to the server.
-
-    \param obj_sync_context the synchronization context (from ICSSyncConfigure)
-    \param state_property the type of ICS state that will be uploaded (see below)
-    \param length the length (in bytes) of the ICS state that will be uploaded
-
-    state_property can be one of the following:
-    - PidTagIdsetGiven
-    - PidTagCnsetSeen
-    - PidTagCnsetSeenFAI
-    - PidTagCnsetRead
-
-    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-    \note Developers may also call GetLastError() to retrieve the last
-    MAPI error code. Possible MAPI error codes are:
-    - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-    - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-      invalid
-    - MAPI_E_CALL_FAILED: A network problem was encountered during the
-      transaction
-*/
-_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateBegin(mapi_object_t *obj_sync_context,
-                                                enum StateProperty state_property,
-                                                uint32_t length)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct SyncUploadStateStreamBegin_req           request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_sync_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_sync_context);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_sync_context, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ICSSyncUploadStateBegin");
-       size = 0;
-
-       /* Fill the RopSynchronizationUploadStateBegin operation */
-       request.StateProperty = state_property;
-       size += sizeof(uint32_t);
-       request.TransferBufferSize = length;
-       size += sizeof(uint32_t);
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SyncUploadStateStreamBegin;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SyncUploadStateStreamBegin = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_sync_context);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-    Send data for an ICS Initial State upload
-
-    This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateEnd)
-    used to send the initial state for an ICS download to the server.
-
-    \param obj_sync_context the synchronization context (from ICSSyncConfigure)
-    \param state the state data for this part of the upload
-
-    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-    \note Developers may also call GetLastError() to retrieve the last
-    MAPI error code. Possible MAPI error codes are:
-    - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-    - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-      invalid
-    - MAPI_E_CALL_FAILED: A network problem was encountered during the
-      transaction
-*/
-_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateContinue(mapi_object_t *obj_sync_context, DATA_BLOB state)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct SyncUploadStateStreamContinue_req        request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_sync_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_sync_context);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_sync_context, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ICSSyncUploadStateContinue");
-       size = 0;
-
-       /* Fill the RopSynchronizationUploadStateBegin operation */
-       request.StreamDataSize = state.length;
-       size += sizeof(uint32_t);
-       request.StreamData = state.data;
-       size += state.length;
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SyncUploadStateStreamContinue;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SyncUploadStateStreamContinue = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_sync_context);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-    Signal completion of an ICS Initial State upload
-
-    This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateContinue)
-    used to send the initial state for an ICS download to the server.
-
-    \param obj_sync_context the synchronization context (from ICSSyncConfigure)
-
-    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-    \note Developers may also call GetLastError() to retrieve the last
-    MAPI error code. Possible MAPI error codes are:
-    - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-    - MAPI_E_INVALID_PARAMETER: one of the function parameters is
-      invalid
-    - MAPI_E_CALL_FAILED: A network problem was encountered during the
-      transaction
-*/
-_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateEnd(mapi_object_t *obj_sync_context)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size = 0;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_sync_context, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_sync_context);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_sync_context, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ICSSyncUploadStateEnd");
-       size = 0;
-
-       /* Fill the MAPI_REQ structure */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SyncUploadStateStreamEnd;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_sync_context);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IABContainer.c b/branches/plugfest/libmapi/IABContainer.c
deleted file mode 100644 (file)
index 433547d..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IABContainer.c
-
-   \brief Provides access to address book containers -- Used to
-   perform name resolution
-*/
-
-
-/**
-   \details Resolve user names against the Windows Address Book Provider
-
-   \param session pointer to the MAPI session context
-   \param usernames list of user names to resolve
-   \param rowset resulting list of user details
-   \param props resulting list of resolved names
-   \param flaglist resulting list of resolution status (see below)
-   \param flags if set to MAPI_UNICODE then UNICODE MAPITAGS can be
-   used, otherwise only UTF8 encoded fields may be returned.
-
-   Possible flaglist values are:
-   -# MAPI_UNRESOLVED: could not be resolved
-   -# MAPI_AMBIGUOUS: resolution match more than one entry
-   -# MAPI_RESOLVED: resolution matched a single entry
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   -# MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   -# MAPI_E_SESSION_LIMIT: No session has been opened on the provider
-   -# MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   -# MAPI_E_NOT_FOUND: No suitable profile database was found in the
-     path pointed by profiledb
-   -# MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-     It is the developer responsibility to call MAPIFreeBuffer on
-     rowset and flaglist once they have finished to use them.
-   
-   \sa MAPILogonProvider, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS ResolveNames(struct mapi_session *session,
-                                     const char **usernames, 
-                                     struct SPropTagArray *props, 
-                                     struct SRowSet **rowset, 
-                                     struct PropertyTagArray_r **flaglist, 
-                                     uint32_t flags)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct nspi_context     *nspi;
-       enum MAPISTATUS         retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!rowset, MAPI_E_INVALID_PARAMETER, NULL);
-
-       nspi = (struct nspi_context *)session->nspi->ctx;
-       mem_ctx = talloc_named(NULL, 0, "ResolveNames");
-
-       switch (flags) {
-       case MAPI_UNICODE:
-               retval = nspi_ResolveNamesW(nspi, mem_ctx, usernames, props, &rowset, &flaglist);
-               break;
-       default:
-               retval = nspi_ResolveNames(nspi, mem_ctx, usernames, props, &rowset, &flaglist);
-               break;
-       }
-
-       *rowset = talloc_steal(nspi->mem_ctx, *rowset);
-       *flaglist = talloc_steal(nspi->mem_ctx, *flaglist);
-
-       talloc_free(mem_ctx);
-
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the global address list
-   
-   The Global Address List is the full list of email addresses (and other
-   account-type things, such as "rooms" and distribution lists) accessible
-   on the server. A user will usually have access to both a personal
-   address book, and to the Global Address List. Public Address Book is
-   another name for Global Address List.
-   
-   You access the Global Address List by setting the list of things that
-   you want to retrieve from the Global Address List as property names
-   in the SPropTagArray argument, and then calling this function. The 
-   results are returned in SRowSet.
-   
-   You can get a convenient output of the results using mapidump_PAB_entry()
-   for each row returned.
-   
-   \param session pointer to the MAPI session context
-   \param SPropTagArray pointer to an array of MAPI properties we want
-   to fetch
-   \param SRowSet pointer to the rows of the table returned
-   \param count the number of rows we want to fetch
-   \param ulFlags specify the table cursor location
-
-   Possible value for ulFlags:
-   -# TABLE_START: Fetch rows from the beginning of the table
-   -# TABLE_CUR: Fetch rows from current table location
-   
-   The Global Address List may be quite large (tens of thousands of
-   entries in a large deployment), so you usually call this function
-   with ulFlags set to TABLE_START the first time, and then subsequent
-   calls will be made with TABLE_CUR to progress through the table.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   -# MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   -# MAPI_E_SESSION_LIMIT: No session has been opened on the provider
-   -# MAPI_E_INVALID_PARAMETER: if a function parameter is invalid
-   -# MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MapiLogonEx, MapiLogonProvider, mapidump_PAB_entry
- */
-_PUBLIC_ enum MAPISTATUS GetGALTable(struct mapi_session *session,
-                                    struct SPropTagArray *SPropTagArray, 
-                                    struct SRowSet **SRowSet, 
-                                    uint32_t count,
-                                    uint8_t ulFlags)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct nspi_context     *nspi;
-       struct SRowSet          *srowset;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!SRowSet, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "GetGALTable");
-       nspi = (struct nspi_context *)session->nspi->ctx;
-
-       if (ulFlags == TABLE_START) {
-               nspi->pStat->CurrentRec = 0;
-               nspi->pStat->Delta = 0;
-               nspi->pStat->NumPos = 0;
-               nspi->pStat->TotalRecs = 0xffffffff;
-       }
-
-       srowset = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi, mem_ctx, SPropTagArray, NULL, count, &srowset);
-       srowset = talloc_steal(session, srowset);
-       *SRowSet = srowset;
-
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve the total number of records in the global address
-   list
-
-   The Global Address List is the full list of email addresses (and other
-   account-type things, such as "rooms" and distribution lists) accessible
-   on the server. A user will usually have access to both a personal
-   address book, and to the Global Address List. Public Address Book is
-   another name for Global Address List.
-
-   \param session pointer to the MAPI session context
-   \param totalRecs pointers to the total number of records in the
-   global address list returned
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   -# MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   -# MAPI_E_SESSION_LIMIT: No session has been opened on the provider
-   -# MAPI_E_INVALID_PARAMETER: if a function parameter is invalid
-   -# MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS GetGALTableCount(struct mapi_session *session,
-                                         uint32_t *totalRecs)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct nspi_context     *nspi;
-       enum MAPISTATUS         retval;
-       struct SRowSet          *srowset;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_SESSION_LIMIT, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "GetGALTableCount");
-       nspi = (struct nspi_context *) session->nspi->ctx;
-
-       nspi->pStat->CurrentRec = 0;
-       nspi->pStat->Delta = 0;
-       nspi->pStat->NumPos = 0;
-       nspi->pStat->TotalRecs = 0xffffffff;
-
-       srowset = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi, mem_ctx, NULL, NULL, 0, &srowset);
-
-       *totalRecs = nspi->pStat->TotalRecs;
-       
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve Address Book information for a given recipient
-
-   \param session pointer to the MAPI session context
-   \param username pointer to the username to retrieve information from
-   \param pPropTags pointer to the property tags array to lookup
-   \param ppRowSet pointer on pointer to the results
-
-   Note that if pPropTags is NULL, then GetABNameInfo will fetch
-   the following default property tags:
-   -# PR_ADDRTYPE_UNICODE
-   -# PR_EMAIL_ADDRESS_UNICODE
-   -# PR_DISPLAY_NAME_UNICODE
-   -# PR_OBJECT_TYPE
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. 
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   -# MAPI_E_NOT_INITIALIZED if MAPI subsystem is not initialized
-   -# MAPI_E_SESSION_LIMIT if the NSPI session is unavailable
-   -# MAPI_E_INVALID_PARAMETER if a function parameter is invalid
-   -# MAPI_E_NOT_FOUND if the username to lookup doesn't match any
-      records
-
-   \sa nspi_DNToMId, nspi_GetProps
- */
-_PUBLIC_ enum MAPISTATUS GetABRecipientInfo(struct mapi_session *session,
-                                      const char *username,
-                                      struct SPropTagArray *pPropTags,
-                                      struct SRowSet **ppRowSet)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct nspi_context             *nspi_ctx;
-       struct SRowSet                  *SRowSet;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropTagArray            *pMId = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct StringsArray_r           pNames;
-       const char                      *usernames[2];
-       char                            *email = NULL;
-       bool                            allocated = false;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_SESSION_LIMIT, NULL);
-       OPENCHANGE_RETVAL_IF(!ppRowSet, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "GetABRecipientInfo");
-       nspi_ctx = (struct nspi_context *)session->nspi->ctx;
-
-       /* Step 1. Resolve the username */
-       usernames[0] = username;
-       usernames[1] = NULL;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xc,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_SEND_INTERNET_ENCODING,
-                                         PR_SEND_RICH_INFO,
-                                         PR_SEARCH_KEY,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-       retval = ResolveNames(session, usernames, SPropTagArray, &SRowSet, &flaglist, MAPI_UNICODE);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_RETVAL_IF((flaglist->aulPropTag[0] != MAPI_RESOLVED), MAPI_E_NOT_FOUND, mem_ctx);
-
-       username = (const char *) get_SPropValue_SRowSet_data(SRowSet, PR_7BIT_DISPLAY_NAME_UNICODE);
-       email = talloc_strdup(mem_ctx, (const char *) get_SPropValue_SRowSet_data(SRowSet, PR_EMAIL_ADDRESS_UNICODE));
-       MAPIFreeBuffer(SRowSet);
-
-       /* Step 2. Map recipient DN to MId */
-       pNames.Count = 0x1;
-       pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-       pNames.Strings[0] = email;
-       pMId = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &pMId);
-       MAPIFreeBuffer((char *)pNames.Strings[0]);
-       MAPIFreeBuffer((char **)pNames.Strings);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Step 3. Get recipient's properties */
-       if (!pPropTags) {
-               allocated = true;
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x4,
-                                                 PR_ADDRTYPE_UNICODE,
-                                                 PR_EMAIL_ADDRESS_UNICODE,
-                                                 PR_DISPLAY_NAME_UNICODE,
-                                                 PR_OBJECT_TYPE);
-       } else {
-               SPropTagArray = pPropTags;
-       }
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_GetProps(nspi_ctx, mem_ctx, SPropTagArray, pMId, &SRowSet);
-       if (allocated == true) {
-               MAPIFreeBuffer(SPropTagArray);
-       }
-       MAPIFreeBuffer(pMId);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       SRowSet = talloc_steal((TALLOC_CTX *)session, SRowSet);
-       *ppRowSet = SRowSet;
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPIContainer.c b/branches/plugfest/libmapi/IMAPIContainer.c
deleted file mode 100644 (file)
index 8a5a21d..0000000
+++ /dev/null
@@ -1,797 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMAPIContainer.c
-
-   \brief Containers and tables related operations
-*/
-
-
-/**
-   \details Returns a pointer to a container's table object
-
-   This function takes a pointer to a container object and returns a
-   pointer to its associated contents
-
-   \param obj_container the object to get the contents of
-   \param obj_table the resulting table containing the container's
-   contents.
-   \param TableFlags flags controlling the type of table
-   \param RowCount the number of rows in the hierarchy table
-
-   TableFlags possible values:
-
-   - TableFlags_Associated (0x2): Get the contents table for "Folder Associated
-   Information" messages, rather than normal messages.
-
-   - TableFlags_DeferredErrors (0x8): The call response can return immediately,
-   possibly before the call execution is complete and in this case the
-   ReturnValue as well the RowCount fields in the return buffer might
-   not be accurate.  Only retval reporting failure can be considered
-   valid in this case.
-
-   - TableFlags_NoNotifications (0x10): Disables all notifications on .this Table
-   object.
-
-   - TableFlags_SoftDeletes (0x20): Enables the client to get a list of the soft
-   deleted folders.
-
-   - TableFlags_UseUnicode (0x40): Requests that the columns that contain string
-   data be returned in Unicode format.
-
-   - TableFlags_SuppressNotifications (0x80): Suppresses notifications generated
-   by this client’s actions on this Table object.
-
-   Developers can either set RowCount to a valid pointer on uint32_t
-   or set it to NULL. In this last case, GetHierarchyTable won't
-   return any value to the calling function.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, GetHierarchyTable, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetContentsTable(mapi_object_t *obj_container, mapi_object_t *obj_table,
-                                         uint8_t TableFlags, uint32_t *RowCount)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetContentsTable_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_container, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_container);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_container, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetContentsTable");
-       size = 0;
-
-       /* Fill the GetContentsTable operation */
-       request.handle_idx = 0x1;
-       request.TableFlags = TableFlags;
-       size += 2;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetContentsTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetContentsTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_container);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session, handle and logon_id */
-       mapi_object_set_session(obj_table, session);
-       mapi_object_set_handle(obj_table, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_table, logon_id);
-
-       /* Retrieve RowCount if a valid pointer was set */
-       if (RowCount) {
-               *RowCount = mapi_response->mapi_repl->u.mapi_GetContentsTable.RowCount;
-       }
-       
-       /* new table */
-       mapi_object_table_init((TALLOC_CTX *)session, obj_table);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a pointer to a container's table object
-
-   This function takes a pointer to a container object and returns a
-   pointer to its associated hierarchy table
-
-   \param obj_container the object to get the contents of
-   \param obj_table the resulting table containing the container's
-   hierarchy
-   \param TableFlags flags controlling the type of table
-   \param RowCount the number of rows in the hierarchy table
-
-   TableFlags possible values:
-
-   - TableFlags_Depth (0x4): Fills the hierarchy table with containers
-   from all levels. If this flag is not set, the hierarchy table
-   contains only the container's immediate child containers.
-
-   - TableFlags_DeferredErrors (0x8): The call response can return immediately,
-   possibly before the call execution is complete and in this case the
-   ReturnValue as well the RowCount fields in the return buffer might
-   not be accurate.  Only retval reporting failure can be considered
-   valid in this case.
-
-   - TableFlags_NoNotifications (0x10): Disables all notifications on .this Table
-   object.
-
-   - TableFlags_SoftDeletes (0x20): Enables the client to get a list of the soft
-   deleted folders.
-
-   - TableFlags_UseUnicode (0x40): Requests that the columns that contain string
-   data be returned in Unicode format.
-
-   - TableFlags_SuppressNotifications (0x80): Suppresses notifications generated
-   by this client’s actions on this Table object.
-
-   Developers can either set RowCount to a valid pointer on uint32_t
-   or set it to NULL. In this last case, GetHierarchyTable won't
-   return any value to the calling function.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, GetContentsTable, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetHierarchyTable(mapi_object_t *obj_container, mapi_object_t *obj_table,
-                                          uint8_t TableFlags, uint32_t *RowCount)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetHierarchyTable_req    request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_container, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_container);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_container, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetHierarchyTable");
-       size = 0;
-
-       /* Fill the GetHierarchyTable operation */
-       request.handle_idx = 0x1;
-       request.TableFlags = TableFlags;
-       size += 2;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetHierarchyTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetHierarchyTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_container);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session, handle and logon_id */
-       mapi_object_set_session(obj_table, session);
-       mapi_object_set_handle(obj_table, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_table, logon_id);
-
-       /* Retrieve RowCount if a valid pointer was set */
-       if (RowCount) {
-               *RowCount = mapi_response->mapi_repl->u.mapi_GetHierarchyTable.RowCount;
-       }
-
-       /* new table */
-       mapi_object_table_init((TALLOC_CTX *)session, obj_table);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a pointer to the permission's table object.  
-
-   This function takes a pointer to a container object and returns a
-   pointer to its associated permission table
-
-   \param obj_container the object to get the contents of
-   \param flags any special flags to pass
-   \param obj_table the resulting table containing the container's
-   permissions
-   
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   The only meaningful value for flags is IncludeFreeBusy (0x02). This
-   should be set when getting permissions on the Calendar folder when
-   using Exchange 2007 and later. It should not be set in other situations.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa ModifyPermissions
- */
-_PUBLIC_ enum MAPISTATUS GetPermissionsTable(mapi_object_t *obj_container, uint8_t flags, mapi_object_t *obj_table)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetPermissionsTable_req  request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_container, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_container);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_container, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetPermissionsTable");
-       size = 0;
-
-       /* Fill the GetPermissionsTable operation */
-       request.handle_idx = 0x1;
-       request.TableFlags = flags;
-       size += 2;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetPermissionsTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx= 0;
-       mapi_req->u.mapi_GetPermissionsTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_container);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session, handle and logon_id */
-       mapi_object_set_session(obj_table, session);
-       mapi_object_set_handle(obj_table, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_table, logon_id);
-
-       /* new table */
-       mapi_object_table_init((TALLOC_CTX *)session, obj_table);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Gets the rules table of a folder
-
-   \param obj_folder the folder we want to retrieve the rules table
-   from
-   \param obj_table the rules table
-   \param TableFlags bitmask associated to the rules table
-
-   Possible values for TableFlags:
-
-   - RulesTableFlags_Unicode (0x40): Set if the client is requesting
-     that string values in the table to be returned as Unicode
-     strings.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-    \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction  
- */
-_PUBLIC_ enum MAPISTATUS GetRulesTable(mapi_object_t *obj_folder, 
-                                      mapi_object_t *obj_table,
-                                      uint8_t TableFlags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetRulesTable_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetRulesTable");
-       size = 0;
-
-       /* Fill the GetRulesTable operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.TableFlags = TableFlags;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetRulesTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetRulesTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session, handle and logon_id */
-       mapi_object_set_session(obj_table, session);
-       mapi_object_set_handle(obj_table, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_table, logon_id);
-
-       /* new table */
-       mapi_object_table_init((TALLOC_CTX *)session, obj_table);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-
-/**
-   \details Modify the entries of a permission table
-
-   This function takes a pointer to a table object, a list of entries
-   to modify and alter the permission table of its associated
-   container. This function can be used to add, modify or remove
-   permissions.
-
-   \param obj_table the table containing the container's permissions
-   \param flags any special flags to use
-   \param permsdata the list of permissions table entries to modify
-
-   Possible values for flags:
-
-   - 0x02 for IncludeFreeBusy.  This should be set when modifying permissions
-   on the Calendar folder when using Exchange 2007 and later. It should not
-   be set in other situations.
-   - 0x01 for ReplaceRows. This means "remove all current permissions and use
-   this set instead", so the permsdata must consist of ROW_ADD operations.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetPermissionsTable, AddUserPermission, ModifyUserPermission,
-   RemoveUserPermission
- */
-_PUBLIC_ enum MAPISTATUS ModifyPermissions(mapi_object_t *obj_table, uint8_t flags, struct mapi_PermissionsData *permsdata)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct ModifyPermissions_req    request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        i, j;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!permsdata, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ModifyPermissions");
-
-       /* Fill the ModifyPermissions operation */
-       request.rowList = *permsdata;
-       request.rowList.ModifyFlags = flags;
-       size += sizeof (uint8_t) + sizeof (uint16_t);
-
-       for (i = 0; i < permsdata->ModifyCount; i++) {
-               size += sizeof (uint8_t);
-                       for (j = 0; j < permsdata->PermissionsData[i].lpProps.cValues; j++) {
-                               size += get_mapi_property_size(&(permsdata->PermissionsData[i].lpProps.lpProps[j]));
-                               size += sizeof (uint32_t);
-                       }
-       size += sizeof (uint16_t);
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ModifyPermissions;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx= 0;
-       mapi_req->u.mapi_ModifyPermissions = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Establishes search criteria for the container
-
-   \param obj_container the object we apply search criteria to
-   \param res pointer to a mapi_SRestriction structure defining the
-   search criteria
-   \param SearchFlags bitmask of flags that controls how the search
-   is performed
-   \param lpContainerList pointer to a list of identifiers
-   representing containers to be included in the search
-
-   SearchFlags can take the following values:
-
-   - BACKGROUND_SEARCH: Search run at normal priority relative to
-     other searches. This flag is mutually exclusive with the
-     FOREGROUND_SEARCH one.
-   - FOREGROUND_SEARCH: Search run at high priority relative to other
-     searches. This flag is mutually exclusive with the
-     BACKGROUND_SEARCH one.
-   - RECURSIVE_SEARCH: The search should include the containers
-     specified in the lpContainerList parameter and all of their child
-     container. This flag is mutually exclusive with the
-     SHALLOW_SEARCH one.
-   - RESTART_SEARCH: The search should be initiated, if this is the
-     first call to SetSearchCriteria, or restarted, if the search is
-     inactive. This flag is mutually exclusive with the STOP_SEARCH
-     flag.
-   - SHALLOW_SEARCH: The search should only look in the containers
-     specified in the lpContainerList parameter for matching
-     entries. This flag is mutually exclusive with the
-     RECURSIVE_SEARCH one.
-   - STOP_SEARCH: The search should be aborted. This flag is mutually
-     exclusive with the RESTART_SEARCH one.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: One or more parameters were invalid (usually null pointer)
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-     
-   \sa GetSearchCriteria
- */
-_PUBLIC_ enum MAPISTATUS SetSearchCriteria(mapi_object_t *obj_container, 
-                                          struct mapi_SRestriction *res, 
-                                          uint32_t SearchFlags,
-                                          mapi_id_array_t *lpContainerList)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetSearchCriteria_req    request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_container, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!res, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_container);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_container, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetSearchCriteria");
-       size = 0;
-
-       /* Fill the SetSearchCriteria operation */
-       request.res = *res;
-       size += get_mapi_SRestriction_size(res);
-       if (lpContainerList != NULL) {
-               request.FolderIdCount = lpContainerList->count;
-               size += sizeof (uint16_t);
-
-               mapi_id_array_get(mem_ctx, lpContainerList, &request.FolderIds);
-               size += lpContainerList->count * sizeof (uint64_t);
-       } else {
-               request.FolderIdCount = 0;
-               size += sizeof (uint16_t);
-               request.FolderIds = NULL;
-       }
-       request.SearchFlags = SearchFlags;
-       size += sizeof (uint32_t);
-
-       /* add subcontext size */
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetSearchCriteria;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetSearchCriteria = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_container);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Obtains the search criteria for a container
-
-   \param obj_container the object we retrieve search criteria from
-   \param res pointer to a mapi_SRestriction structure defining the
-   search criteria 
-   \param SearchFlags bitmask of flags that controls how the search
-   is performed
-   \param FolderIdCount number of FolderIds entries
-   \param FolderIds pointer to a list of identifiers
-   representing containers included in the search
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-     
-   \sa SetSearchCriteria
- */
-_PUBLIC_ enum MAPISTATUS GetSearchCriteria(mapi_object_t *obj_container,
-                                          struct mapi_SRestriction *res,
-                                          uint32_t *SearchFlags,
-                                          uint16_t *FolderIdCount,
-                                          uint64_t **FolderIds)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetSearchCriteria_req    request;
-       struct GetSearchCriteria_repl   *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_container, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SearchFlags, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!FolderIdCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!FolderIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_container);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_container, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetSearchCriteria");
-       size = 0;
-
-       /* Fill the GetSearchCriteria operation */
-       request.UseUnicode = 0x1;
-       request.IncludeRestriction = 0x1;
-       request.IncludeFolders = 0x1;
-       size += 3 * sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetSearchCriteria;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetSearchCriteria = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_container);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_GetSearchCriteria;
-
-       res = &reply->RestrictionData;
-       *FolderIdCount = reply->FolderIdCount;
-       *FolderIds = talloc_steal((TALLOC_CTX *)session, reply->FolderIds);
-       *SearchFlags = reply->SearchFlags;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPIFolder.c b/branches/plugfest/libmapi/IMAPIFolder.c
deleted file mode 100644 (file)
index 429a56d..0000000
+++ /dev/null
@@ -1,1308 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMAPIFolder.c
-
-   \brief Folder related functions
- */
-
-
-/**
-   \details The function creates a message in the specified folder,
-   and returns a pointer on this message.
-
-   \param obj_folder the folder to create the message in.
-   \param obj_message pointer to the newly created message.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, DeleteMessage, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS CreateMessage(mapi_object_t *obj_folder, mapi_object_t *obj_message)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct CreateMessage_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CreateMessage");
-       size = 0;
-
-       /* Fill the OpenFolder operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-       request.CodePageId = 0xfff;
-       size += sizeof (uint16_t);
-       request.FolderId = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-       request.AssociatedFlag = 0;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CreateMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CreateMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(mapi_handle_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, mapi_handle_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session and handle */
-       mapi_object_set_session(obj_message, session);
-       mapi_object_set_handle(obj_message, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_message, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Delete one or more messages
-
-   This function deletes one or more messages based on their ids from
-   a specified folder.
-
-   \param obj_folder the folder to delete messages from
-   \param id_messages the list of ids
-   \param cn_messages the number of messages in the id list.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, CreateMessage, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS DeleteMessage(mapi_object_t *obj_folder, mapi_id_t *id_messages,
-                                      uint32_t cn_messages)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct DeleteMessages_req       request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "DeleteMessages");
-       size = 0;
-
-       /* Fill the DeleteMessages operation */
-       request.WantAsynchronous = 0x0;
-       size += sizeof (uint8_t);
-       request.NotifyNonRead = 0x1;
-       size += sizeof(uint8_t);
-       request.cn_ids = (uint16_t)cn_messages;
-       size += sizeof(uint16_t);
-       request.message_ids = id_messages;
-       size += request.cn_ids * sizeof(mapi_id_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_DeleteMessages;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_DeleteMessages = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Hard delete one or more messages
-
-   This function hard deletes one or more messages based on their
-   ids from a specified folder.
-
-   \param obj_folder the folder to hard delete messages from
-   \param id_messages the list of ids
-   \param cn_messages the number of messages in the id list.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: the parent folder was not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, CreateMessage, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS HardDeleteMessage(mapi_object_t *obj_folder,
-                                          mapi_id_t *id_messages,
-                                          uint16_t cn_messages)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct HardDeleteMessages_req   request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "HardDeleteMessages");
-       size = 0;
-
-       /* Fill the HardDeleteMessages operation */
-       request.WantAsynchronous = 0x0;
-       size += sizeof (uint8_t);
-       request.NotifyNonRead = 0x1;
-       size += sizeof(uint8_t);
-       request.MessageIdCount = cn_messages;
-       size += sizeof(uint16_t);
-       request.MessageIds = id_messages;
-       size += request.MessageIdCount * sizeof(mapi_id_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_HardDeleteMessages;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_HardDeleteMessages = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Obtain the status associated with a message
-
-   This function obtains the status associated with a message in the
-   given folder.
-
-   \param obj_folder the folder where the message is located
-   \param msgid the message ID
-   \param ulStatus the message status
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS GetMessageStatus(mapi_object_t *obj_folder, 
-                                         mapi_id_t msgid, 
-                                         uint32_t *ulStatus)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetMessageStatus_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!msgid, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetMessageStatus");
-       size = 0;
-
-       /* Fill the GetMessageStatus operation */
-       request.msgid = msgid;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetMessageStatus;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetMessageStatus = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *ulStatus = mapi_response->mapi_repl->u.mapi_SetMessageStatus.ulOldStatus;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the status associated with a message
-
-   This function sets the status associated with a message in the
-   given folder.
-
-   \param obj_folder the folder where the message is located
-   \param msgid the message ID
-   \param ulNewStatus the new status to be assigned
-   \param ulNewStatusMask bitmask of flags hat is applied to the new
-   status indicating the flags to be set
-   \param ulOldStatus pointer on the previous status of the message
-
-   ulNewStatusMask possible values:
-   - MSGSTATUS_DELMARKED: the message is marked for deletion
-   - MSGSTATUS_HIDDEN: the message is not to be displayed
-   - MSGSTATUS_HIGHLIGHTED: the message is to be displayed highlighted
-   - MSGSTATUS_REMOTE_DELETE: the message has been marked for deletion
-     on the remote message store without downloading to the local
-     client.
-   - MSGSTATUS_REMOTE_DOWNLOAD: the message has been marked for
-     downloading from the remote message store to the local client.
-   - MSGSTATUS_TAGGED: The message has been tagged for a
-     client-defined purpose.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS SetMessageStatus(mapi_object_t *obj_folder,
-                                         mapi_id_t msgid,
-                                         uint32_t ulNewStatus,
-                                         uint32_t ulNewStatusMask,
-                                         uint32_t *ulOldStatus)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetMessageStatus_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!msgid, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetMessageStatus");
-       size = 0;
-
-       /* Fill the SetMessageStatus operation */
-       request.msgid = msgid;
-       size += sizeof (uint64_t);
-
-       request.ulNewStatus = ulNewStatus;
-       size += sizeof (uint32_t);
-
-       request.ulNewStatusMask = ulNewStatusMask;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetMessageStatus;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetMessageStatus = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *ulOldStatus = mapi_response->mapi_repl->u.mapi_SetMessageStatus.ulOldStatus;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy or Move a message from a folder to another
-
-   \param obj_src The source folder
-   \param obj_dst The destination folder
-   \param message_id pointer to container object for message ids.
-   \param WantCopy boolean value, defines whether the operation is a
-   copy or a move
-
-   Possible values for WantCopy:
-   -# 0: Move
-   -# 1: Copy
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS MoveCopyMessages(mapi_object_t *obj_src,
-                                         mapi_object_t *obj_dst,
-                                         mapi_id_array_t *message_id,
-                                         bool WantCopy)
-{
-       NTSTATUS                        status;
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct MoveCopyMessages_req     request;
-       struct mapi_session             *session[2];
-       uint32_t                        size;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       session[0] = mapi_object_get_session(obj_src);
-       session[1] = mapi_object_get_session(obj_dst);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_src, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "MoveCopyMessages");
-       size = 0;
-
-       /* Fill the CopyMessage operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.count = message_id->count;
-       size += sizeof (uint16_t);
-
-       retval = mapi_id_array_get(mem_ctx, message_id, &(request.message_id));
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       size += request.count * sizeof (mapi_id_t);
-
-       request.WantAsynchronous = 0;
-       size += sizeof (uint8_t);
-
-       request.WantCopy = WantCopy;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_MoveCopyMessages;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_MoveCopyMessages = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Create a folder
-
-   The function creates a folder (defined with its name, comment and type)
-   within a specified folder.
-
-   \param obj_parent the folder to create the new folder in
-   \param ulFolderType the type of the folder
-   \param name the name of the new folder
-   \param comment the comment associated with the new folder
-   \param ulFlags flags associated with folder creation
-   \param obj_child pointer to the newly created folder
-
-   ulFlags possible values:
-   - MAPI_UNICODE: use UNICODE folder name and comment
-   - OPEN_IF_EXISTS: open the folder if it already exists
-
-   ulFolderType possible values:
-   - FOLDER_GENERIC
-   - FOLDER_SEARCH
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, DeleteFolder, EmptyFolder, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS CreateFolder(mapi_object_t *obj_parent, 
-                                     enum FOLDER_TYPE ulFolderType,
-                                     const char *name,
-                                     const char *comment, 
-                                     uint32_t ulFlags,
-                                     mapi_object_t *obj_child)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CreateFolder_req request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_parent, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!name, MAPI_E_NOT_INITIALIZED, NULL);
-       session = mapi_object_get_session(obj_parent);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_parent, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       /* Sanitify check on the folder type */
-       OPENCHANGE_RETVAL_IF((ulFolderType != FOLDER_GENERIC && 
-                       ulFolderType != FOLDER_SEARCH),
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "CreateFolder");
-       size = 0;
-
-       /* Fill the CreateFolder operation */
-       request.handle_idx = 0x1;
-       size+= sizeof(uint8_t);
-       switch (ulFlags & 0xFFFF0000) {
-       case MAPI_UNICODE:
-               request.ulType = MAPI_FOLDER_UNICODE;
-               break;
-       default:
-               request.ulType = MAPI_FOLDER_ANSI;
-               break;
-       }
-       request.ulFolderType = ulFolderType;
-       size += sizeof(uint16_t);
-       request.ulFlags = (enum FOLDER_FLAGS)((int)ulFlags & 0xFFFF);
-       size += sizeof(uint16_t);
-
-       switch (request.ulType) {
-       case MAPI_FOLDER_ANSI:
-               request.FolderName.lpszA = name;
-               size += strlen(name) + 1;
-               break;
-       case MAPI_FOLDER_UNICODE:
-               request.FolderName.lpszW = name;
-               size += get_utf8_utf16_conv_length(name);
-               break;
-       }
-
-       if (comment) {
-               switch(request.ulType) {
-               case MAPI_FOLDER_ANSI:
-                       request.FolderComment.lpszA = comment;
-                       size += strlen(comment) + 1;
-                       break;
-               case MAPI_FOLDER_UNICODE:
-                       request.FolderComment.lpszW = comment;
-                       size +=  get_utf8_utf16_conv_length(comment);
-                       break;
-               }
-       } else {
-               switch(request.ulType) {
-               case MAPI_FOLDER_ANSI:
-                       request.FolderComment.lpszA = "";
-                       size += 1;
-                       break;
-               case MAPI_FOLDER_UNICODE:
-                       request.FolderComment.lpszW = "";
-                       size += 2;
-                       break;
-               }
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CreateFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CreateFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + (2 * sizeof(uint32_t));
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_parent);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session, handle and id */
-       mapi_object_init(obj_child);
-       mapi_object_set_session(obj_child, session);
-       mapi_object_set_handle(obj_child, mapi_response->handles[1]);
-       mapi_object_set_id(obj_child, mapi_response->mapi_repl->u.mapi_CreateFolder.folder_id);
-       mapi_object_set_logon_id(obj_child, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Empty the contents of a folder
-
-   This function empties (clears) the contents of a specified folder.
-
-   \param obj_folder the folder to empty
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, CreateFolder, DeleteFolder, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS EmptyFolder(mapi_object_t *obj_folder)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct EmptyFolder_req  request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "EmptyFolder");
-       size = 0;
-
-       /* Fill the EmptyFolder operation */
-       request.WantAsynchronous = 0x0;
-       size += sizeof (uint8_t);
-
-       request.WantDeleteAssociated = 0x0;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_EmptyFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_EmptyFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Delete a folder
-
-   The function deletes a specified folder.
-
-   \param obj_parent the folder containing the folder to be deleted
-   \param FolderId the ID of the folder to delete
-   \param DeleteFolderFlags control DeleteFolder operation behavior
-   \param PartialCompletion pointer on a boolean value which specify
-   whether the operation was partially completed or not
-
-   Possible values for DeleteFolderFlags are:
-   -# DEL_MESSAGES Delete all the messages in the folder
-   -# DEL_FOLDERS Delete the subfolder and all of its subfolders
-   -# DELETE_HARD_DELETE Hard delete the folder
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, CreateFolder, EmptyFolder, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS DeleteFolder(mapi_object_t *obj_parent, 
-                                     mapi_id_t FolderId,
-                                     uint8_t DeleteFolderFlags,
-                                     bool *PartialCompletion)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct DeleteFolder_req request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_parent, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_parent);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF((!(DeleteFolderFlags & 0x1)) &&
-                            (!(DeleteFolderFlags & 0x4)) &&
-                            (!(DeleteFolderFlags & 0x10)), 
-                            MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_parent, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "DeleteFolder");
-       size = 0;
-
-       /* Fill the DeleteFolder operation */
-       request.DeleteFolderFlags = DeleteFolderFlags;
-       size += sizeof (uint8_t);
-       request.FolderId = FolderId;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_DeleteFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_DeleteFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_parent);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       if (PartialCompletion) {
-               *PartialCompletion = mapi_response->mapi_repl->u.mapi_DeleteFolder.PartialCompletion;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Moves a folder
-
-   \param obj_folder the folder to move
-   \param obj_src source object where the folder to move is stored
-   \param obj_dst destination object where the folder will be moved
-   \param NewFolderName the new folder name in the destination folder
-   \param UseUnicode whether the folder name is unicode encoded or not
-
-    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, CopyFolder
- */
-_PUBLIC_ enum MAPISTATUS MoveFolder(mapi_object_t *obj_folder,
-                                   mapi_object_t *obj_src, 
-                                   mapi_object_t *obj_dst,
-                                   char *NewFolderName,
-                                   bool UseUnicode)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct MoveFolder_req   request;
-       struct mapi_session     *session[3];
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!NewFolderName, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_folder);
-       session[1] = mapi_object_get_session(obj_src);
-       session[2] = mapi_object_get_session(obj_dst);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[2], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "MoveFolder");
-       size = 0;
-
-       /* Fill the MoveFolder operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.WantAsynchronous = 0;
-       size += sizeof (uint8_t);
-
-       request.UseUnicode = UseUnicode;
-       size += sizeof (uint8_t);
-
-       request.FolderId = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-
-       if (!request.UseUnicode) {
-               request.NewFolderName.lpszA = NewFolderName;
-               size += strlen(NewFolderName) + 1;
-       } else {
-               request.NewFolderName.lpszW = NewFolderName;
-               size += get_utf8_utf16_conv_length(NewFolderName);
-       }
-
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_MoveFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_MoveFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy a folder
-
-   \param obj_folder the folder to copy
-   \param obj_src source object where the folder to copy is stored
-   \param obj_dst destination object where the folder will be copied
-   \param NewFolderName the new folder name in the destination folder
-   \param UseUnicode whether the folder name is unicode encoded or not
-   \param WantRecursive whether we should copy folder's subdirectories
-   or not
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developer may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenFolder, MoveFolder
- */
-_PUBLIC_ enum MAPISTATUS CopyFolder(mapi_object_t *obj_folder,
-                                   mapi_object_t *obj_src,
-                                   mapi_object_t *obj_dst,
-                                   char *NewFolderName,
-                                   bool UseUnicode,
-                                   bool WantRecursive)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CopyFolder_req   request;
-       struct mapi_session     *session[3];
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!NewFolderName, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_folder);
-       session[1] = mapi_object_get_session(obj_src);
-       session[2] = mapi_object_get_session(obj_dst);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[2], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CopyFolder");
-
-       size = 0;
-
-       /* Fill the CopyFolder operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-       
-       request.WantAsynchronous = 0x0;
-       size += sizeof (uint8_t);
-
-       request.WantRecursive = WantRecursive;
-       size += sizeof (uint8_t);
-
-       request.UseUnicode = UseUnicode;
-       size += sizeof (uint8_t);
-
-       request.FolderId = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-
-       if (!request.UseUnicode) {
-               request.NewFolderName.lpszA = NewFolderName;
-               size += strlen(NewFolderName) + 1;
-       } else {
-               request.NewFolderName.lpszW = NewFolderName;
-               size += get_utf8_utf16_conv_length(NewFolderName);
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CopyFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CopyFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the Read Flags on one or more messages
-
-   \param obj_folder the folder containing the messages to change
-   \param ReadFlags a bitmap of flags controlling the changes to
-   PR_PROPERTY_FLAGS
-   \param MessageIdCount the number of messages in the MessageIds array
-   \param MessageIds an array of message ids to set Read flags for
-
-   Note that the obj_folder argument is the object corresponding to the
-   folder containing the messages (e.g. the result of CreateFolder() or
-   OpenFolder(). It is \em not the content table of that folder (unlike
-   SetMessageReadFlag().)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetMessageReadFlags for a slightly different version, working on
-   a single message
-*/
-_PUBLIC_ enum MAPISTATUS SetReadFlags(mapi_object_t *obj_folder,
-                                     uint8_t ReadFlags, 
-                                     uint16_t MessageIdCount,
-                                     uint64_t *MessageIds)
-{
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       struct SetReadFlags_req request;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_request     *mapi_request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       struct mapi_response    *mapi_response;
-       enum MAPISTATUS         retval;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetReadFlags");
-
-       size = 0;
-
-       /* Fill the SetReadFlags operation */
-       request.WantAsynchronous = 0;
-       size += sizeof(uint8_t);
-       request.ReadFlags = ReadFlags;
-       size += sizeof(uint8_t);
-       request.MessageIdCount = MessageIdCount;
-       size += sizeof(uint16_t);
-       request.MessageIds = MessageIds;
-       size += sizeof(uint64_t) * MessageIdCount;
-
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetReadFlags;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetReadFlags = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* TODO: parse response */
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Hard delete the contents of a folder, including subfolders
-
-   This function empties (clears) the contents of a specified folder.
-
-   \param obj_folder the folder to empty
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_folder is not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa DeleteFolder, EmptyFolder
-*/
-_PUBLIC_ enum MAPISTATUS HardDeleteMessagesAndSubfolders(mapi_object_t *obj_folder)
-{
-       struct mapi_request                             *mapi_request;
-       struct mapi_response                            *mapi_response;
-       struct EcDoRpc_MAPI_REQ                         *mapi_req;
-       struct HardDeleteMessagesAndSubfolders_req      request;
-       struct mapi_session                             *session;
-       NTSTATUS                                        status;
-       enum MAPISTATUS                                 retval;
-       uint32_t                                        size;
-       TALLOC_CTX                                      *mem_ctx;
-       uint8_t                                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "HardDeleteMessagesAndSubfolders");
-       size = 0;
-
-       /* Fill the EmptyFolder operation */
-       request.WantAsynchronous = 0x0;
-       size += sizeof (uint8_t);
-
-       request.WantDeleteAssociated = 0x0;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_HardDeleteMessagesAndSubfolders;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_HardDeleteMessagesAndSubfolders = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPIProp.c b/branches/plugfest/libmapi/IMAPIProp.c
deleted file mode 100644 (file)
index 343591a..0000000
+++ /dev/null
@@ -1,1395 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-   Copyright (C) Brad Hards 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMAPIProp.c
-
-   \brief Properties and named properties operations.
- */
-
-
-/**
-   \details Returns values of one or more properties for an object
-   The function takes a pointer on the object obj, a MAPITAGS array
-   specified in mapitags, and the count of properties.  The function
-   returns associated values within the SPropValue values pointer.
-
-   The array of MAPI property tags can be filled with both known and
-   named properties.
-
-   \param obj the object to get properties on
-   \param SPropTagArray an array of MAPI property tags
-   \param lpProps the result of the query
-   \param PropCount the count of property tags
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj or SPropTagArray are null, or the
-   session context could not be obtained
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj, 
-                                 struct SPropTagArray *SPropTagArray,
-                                 struct SPropValue **lpProps, 
-                                 uint32_t *PropCount)
-{
-       struct mapi_context     *mapi_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct GetProps_req     request;
-       struct mapi_session     *session;
-       struct mapi_nameid      *nameid;
-       struct SPropTagArray    *SPropTagArray2 = NULL;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       enum MAPISTATUS         mapistatus;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       bool                    named = false;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetProps");
-
-       /* Named property mapping */
-       nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropTagArray(nameid, SPropTagArray);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray2 = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray2);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);          
-               mapi_nameid_map_SPropTagArray(nameid, SPropTagArray, SPropTagArray2);
-               MAPIFreeBuffer(SPropTagArray2);
-
-       }
-       errno = 0;
-
-       /* Reset */
-       *PropCount = 0;
-       *lpProps = 0;
-       size = 0;
-
-       /* Fill the GetProps operation */
-       request.PropertySizeLimit = 0x0;
-       size += sizeof (uint16_t);
-       request.WantUnicode = 0x0;
-       size += sizeof (uint16_t);
-       request.prop_count = (uint16_t) SPropTagArray->cValues;
-       size += sizeof (uint16_t);
-       request.properties = SPropTagArray->aulPropTag;
-       size += request.prop_count * sizeof(uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetProps;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetProps = request;
-       size += 5;
-       
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF((retval && retval != MAPI_W_ERRORS_RETURNED), retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-       
-       /* Read the SPropValue array from data blob.
-          fixme: replace the memory context by the object one.
-       */
-       if (named == true) {
-               mapi_nameid_unmap_SPropTagArray(nameid, SPropTagArray);
-       }
-       talloc_free(nameid);
-
-       mapistatus = emsmdb_get_SPropValue((TALLOC_CTX *)session,
-                                          mapi_ctx->lp_ctx,
-                                          &mapi_response->mapi_repl->u.mapi_GetProps.prop_data,
-                                          SPropTagArray, lpProps, PropCount, 
-                                          mapi_response->mapi_repl->u.mapi_GetProps.layout);
-       OPENCHANGE_RETVAL_IF(!mapistatus && (retval == MAPI_W_ERRORS_RETURNED), retval, mem_ctx);
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set one or more properties on a given object
-
-   This function sets one or more properties on a specified object.
-
-   \param obj the object to set properties on
-   \param lpProps the list of properties to set
-   \param PropCount the number of properties
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj, 
-                                 struct SPropValue *lpProps, 
-                                 unsigned long PropCount)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct SetProps_req     request;
-       struct mapi_session     *session;
-       struct mapi_nameid      *nameid;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       unsigned long           i;
-       struct mapi_SPropValue  *mapi_props;
-       bool                    named = false;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetProps");
-       size = 0;
-
-       /* Named property mapping */
-       nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-       }
-       errno = 0;
-
-       /* build the array */
-       request.values.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, PropCount);
-       mapi_props = request.values.lpProps;
-       for (i = 0; i < PropCount; i++) {
-               size += cast_mapi_SPropValue((TALLOC_CTX *)request.values.lpProps, &mapi_props[i], &lpProps[i]);
-               size += sizeof(uint32_t);
-       }
-
-       request.values.cValues = PropCount;
-       size += sizeof(uint16_t);
-
-       /* add the size of the subcontext that will be added on ndr layer */
-       size += sizeof(uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetProps;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetProps = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       if (named == true) {
-               mapi_nameid_unmap_SPropValue(nameid, lpProps, PropCount);
-       }
-       talloc_free(nameid);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Makes permanent any changes made to an attachment since the
-   last save operation.
-
-   \param obj_parent the parent of the object to save changes for
-   \param obj_child the object to save changes for
-   \param flags the access flags to set on the saved object 
-
-   Possible flags:
-   - KeepOpenReadOnly
-   - KeepOpenReadWrite
-   - ForceSave
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetProps, ModifyRecipients, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS SaveChangesAttachment(mapi_object_t *obj_parent, 
-                                              mapi_object_t *obj_child,
-                                              enum SaveFlags flags)
-{
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct SaveChangesAttachment_req        request;
-       struct mapi_session                     *session[2];
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       TALLOC_CTX                              *mem_ctx;
-       uint8_t                                 logon_id;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!obj_parent, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_child, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF((flags != 0x9) && (flags != 0xA) && (flags != 0xC), 
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_parent);
-       session[1] = mapi_object_get_session(obj_child);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_parent, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SaveChangesAttachment");
-       size = 0;
-
-       /* Fill the SaveChangesAttachment operation */
-       request.handle_idx = 0x0;
-       request.SaveFlags = flags;
-       size += sizeof(uint8_t) + sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SaveChangesAttachment;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SaveChangesAttachment = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_child);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_parent);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve all the properties associated with a given object
-
-   \param obj the object to retrieve properties for
-   \param proptags the resulting list of properties associated with
-   the object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:   
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-     The developer MUST provide an allocated SPropTagArray structure
-     to the function.
-
-   \sa GetProps, GetPropsAll, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS GetPropList(mapi_object_t *obj, 
-                                    struct SPropTagArray *proptags)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetPropList");
-
-       /* Reset */
-       proptags->cValues = 0;
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetPropList;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 1;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Get the repsonse */
-       proptags->cValues = mapi_response->mapi_repl->u.mapi_GetPropList.count;
-       if (proptags->cValues) {
-               size = proptags->cValues * sizeof(enum MAPITAGS);
-               proptags->aulPropTag = talloc_array((TALLOC_CTX *) proptags, enum MAPITAGS, proptags->cValues);
-               memcpy((void*)proptags->aulPropTag,
-                      (void*)mapi_response->mapi_repl->u.mapi_GetPropList.tags,
-                      size);
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve all properties and values associated with an
-   object
-
-   This function returns all the properties and and associated values
-   for a given object.
-
-   \param obj the object to get the properties for
-   \param properties the properties / values for the object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetProps, GetPropList, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj,
-                                    struct mapi_SPropValue_array *properties)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct GetPropsAll_req  request;
-       struct GetPropsAll_repl *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetPropsAll");
-       size = 0;
-
-       /* Fill the GetPropsAll operation */
-       request.PropertySizeLimit = 0;
-       size += sizeof (uint16_t);
-       request.WantUnicode = 0;
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetPropsAll;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetPropsAll = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_GetPropsAll;
-       properties->cValues = reply->properties.cValues;
-       properties->lpProps = talloc_steal((TALLOC_CTX *)session, reply->properties.lpProps);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Delete one or more properties from an object
-
-   \param obj the object to remove properties from
-   \param proptags the properties to remove from the given object
-       
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetProps, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS DeleteProps(mapi_object_t *obj, 
-                                    struct SPropTagArray *proptags)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct DeleteProps_req  request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!proptags, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "DeleteProps");
-       size = 0;
-
-       /* Fill the DeleteProps operation */
-       request.count = proptags->cValues;
-       size += sizeof(uint16_t);
-       request.tags = proptags->aulPropTag;
-       size += proptags->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_DeleteProps;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_DeleteProps = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Set one or more properties on a given object without 
-    invoking replication.
-
-   This function sets one or more properties on a specified object. It
-   is the same as SetProps, except if the object is a folder, where
-   this function does not result in folder properties being replicated.
-
-   \param obj the object to set properties on
-   \param lpProps the list of properties to set
-   \param PropCount the number of properties
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj is not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetProps, DeletePropertiesNoReplicate
-*/
-_PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj,
-                                                 struct SPropValue *lpProps, 
-                                                 unsigned long PropCount)
-{
-       TALLOC_CTX                              *mem_ctx;
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct SetPropertiesNoReplicate_req     request;
-       struct mapi_session                     *session;
-       struct mapi_nameid                      *nameid;
-       struct SPropTagArray                    *SPropTagArray = NULL;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       unsigned long                           i;
-       struct mapi_SPropValue                  *mapi_props;
-       bool                                    named = false;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetPropertiesNoReplicate");
-       size = 0;
-
-       /* Named property mapping */
-       nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-       }
-       errno = 0;
-
-       /* build the array */
-       request.values.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, PropCount);
-       mapi_props = request.values.lpProps;
-       for (i = 0; i < PropCount; i++) {
-               size += cast_mapi_SPropValue((TALLOC_CTX *)request.values.lpProps, &mapi_props[i], &lpProps[i]);
-               size += sizeof(uint32_t);
-       }
-
-       request.values.cValues = PropCount;
-       size += sizeof(uint16_t);
-
-       /* add the size of the subcontext that will be added on ndr layer */
-       size += sizeof(uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetPropertiesNoReplicate;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetPropertiesNoReplicate = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       if (named == true) {
-               mapi_nameid_unmap_SPropValue(nameid, lpProps, PropCount);
-       }
-       talloc_free(nameid);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Deletes property values from an object without invoking
-   replication.
-
-   \param obj the object to remove properties from
-   \param proptags the properties to remove from the given object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-     \sa DeleteProps
- */
-_PUBLIC_ enum MAPISTATUS DeletePropertiesNoReplicate(mapi_object_t *obj,
-                                                    struct SPropTagArray *proptags)
-{
-       TALLOC_CTX                              *mem_ctx;
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct DeletePropertiesNoReplicate_req  request;
-       struct mapi_session                     *session;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!proptags, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "DeletePropertiesNoReplicate");
-       size = 0;
-
-       /* Fill the DeletePropertiesNoReplicate operation */
-       request.PropertyTags.cValues = proptags->cValues;
-       size += sizeof (uint16_t);
-       request.PropertyTags.aulPropTag = proptags->aulPropTag;
-       size += proptags->cValues * sizeof (enum MAPITAGS);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_DeletePropertiesNoReplicate;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_DeletePropertiesNoReplicate = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;  
-}
-
-
-/**
-   \details Provides the property names that correspond to one
-   or more property identifiers.
-   
-   \param obj the object we are retrieving the names from
-   \param ulPropTag the mapped property tag
-   \param count count of property names pointed to by the nameid
-   parameter returned by the server
-   \param nameid pointer to a pointer to property names returned by
-   the server
-
-   ulPropTag must be a property with type set to PT_NULL
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-  
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetIDsFromNames, QueryNamesFromIDs
-*/
-_PUBLIC_ enum MAPISTATUS GetNamesFromIDs(mapi_object_t *obj,
-                                        enum MAPITAGS ulPropTag,
-                                        uint16_t *count,
-                                        struct MAPINAMEID **nameid)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetNamesFromIDs_req      request;
-       struct GetNamesFromIDs_repl     *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size= 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       /* Initialization */
-       mem_ctx = talloc_named(NULL, 0, "GetNamesFromIDs");
-       size = 0;
-
-       /* Fill the GetNamesFromIDs operation */
-       request.PropertyIdCount = 0x1;
-       size += sizeof (uint16_t);
-       request.PropertyIds = talloc_array(mem_ctx, uint16_t, request.PropertyIdCount);
-       request.PropertyIds[0] = ((ulPropTag & 0xFFFF0000) >> 16);
-       size += request.PropertyIdCount * sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetNamesFromIDs;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetNamesFromIDs = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Fill in count */
-       reply = &mapi_response->mapi_repl->u.mapi_GetNamesFromIDs;
-       *count = reply->count;
-
-       /* Fill MAPINAMEID struct */
-       *nameid = talloc_steal((TALLOC_CTX *)session, reply->nameid);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Provides the property identifiers that correspond to one
-   or more property names.
-   
-   \param obj the object we are retrieving the identifiers from
-   \param count count of property names pointed to by the nameid
-   parameter.
-   \param nameid pointer to an array of property names
-   \param ulFlags indicates how the property identifiers should be
-   returned
-   \param proptags pointer to a pointer to an array of property tags
-   containing existing or newly assigned property
-   identifiers. Property types in this array are set to PT_NULL.
-
-   ulFlags can be set to:
-   - 0 retrieves named properties from the server
-   - MAPI_CREATE create the named properties if they don't exist on
-     the server
-
-   \note count and nameid parameter can automatically be built
-   using the mapi_nameid API.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetNamesFromIds, QueryNamesFromIDs, mapi_nameid_new
-*/
-_PUBLIC_ enum MAPISTATUS GetIDsFromNames(mapi_object_t *obj,
-                                        uint16_t count,
-                                        struct MAPINAMEID *nameid,
-                                        uint32_t ulFlags,
-                                        struct SPropTagArray **proptags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetIDsFromNames_req      request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        i;
-       uint8_t                         logon_id;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!count, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!proptags, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!proptags[0], MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       /* Initialization */
-       mem_ctx = talloc_named(NULL, 0, "GetIDsFromNames");
-       size = 0;
-       
-       /* Fill the GetIDsFromNames operation */
-       request.ulFlags = ulFlags;
-       request.count = count;
-       size += sizeof (uint8_t) + sizeof (uint16_t);
-
-       request.nameid = nameid;
-       for (i = 0; i < count; i++) {
-               size += sizeof (uint8_t) + sizeof (request.nameid[i].lpguid);
-               switch (request.nameid[i].ulKind) {
-               case MNID_ID:
-                       size += sizeof (request.nameid[i].kind.lid);
-                       break;
-               case MNID_STRING:
-                 size +=  get_utf8_utf16_conv_length(request.nameid[i].kind.lpwstr.Name);
-                       size += sizeof (uint8_t);
-                       break;
-               default:
-                       break;
-               }
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetIDsFromNames;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetIDsFromNames = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Fill the SPropTagArray */
-       proptags[0]->cValues = mapi_response->mapi_repl->u.mapi_GetIDsFromNames.count;
-       proptags[0]->aulPropTag = (enum MAPITAGS *) talloc_array((TALLOC_CTX *)proptags[0], uint32_t, proptags[0]->cValues);
-       for (i = 0; i < proptags[0]->cValues; i++) {
-         proptags[0]->aulPropTag[i] = (enum MAPITAGS)(((int)mapi_response->mapi_repl->u.mapi_GetIDsFromNames.propID[i] << 16) | PT_UNSPECIFIED);
-       }
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Provides the property names that correspond to one or more
-   property identifiers.
-
-   \param obj the object to obtain the properties for
-   \param queryFlags A set of flags that can restrict the type of properties
-   \param guid a pointer to the GUID for the property set to fetch (null for all
-   property sets.
-   \param count count of property names pointed to by the nameid and propID
-   parameters returned by the server
-   \param propID pointer to an array of property IDs returned by the server
-   \param nameid pointer to an array of property names returned by
-   the server
-
-   \note queryFlags can be NoStrings (0x1) or NoIds (0x2), neither or both.
-   NoStrings will produce only ID properties, NoIds will produce only named
-   properties, and both will result in no output.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \sa GetNamesFromIDs
-*/
-_PUBLIC_ enum MAPISTATUS QueryNamedProperties(mapi_object_t *obj,
-                                             uint8_t queryFlags,
-                                             struct GUID *guid,
-                                             uint16_t *count,
-                                             uint16_t **propID,
-                                             struct MAPINAMEID **nameid)
-{
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct QueryNamedProperties_req         request;
-       struct QueryNamedProperties_repl        *reply;
-       struct mapi_session                     *session;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size;
-       TALLOC_CTX                              *mem_ctx;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       /* Initialization */
-       mem_ctx = talloc_named(NULL, 0, "QueryNamesFromIDs");
-       size = 0;
-
-       /* Fill the QueryNamedProperties operation */
-       request.QueryFlags = queryFlags;
-       size += sizeof (uint8_t);
-
-       if (guid) {
-               request.HasGuid = 0x1; /* true */
-               size += sizeof (uint8_t);
-               request.PropertyGuid.guid = *guid;
-               size += sizeof (struct GUID);
-       } else {
-               request.HasGuid = 0x0; /* false */
-               size += sizeof (uint8_t);
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_QueryNamedProperties;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_QueryNamedProperties = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Fill [out] parameters */
-       reply = &mapi_response->mapi_repl->u.mapi_QueryNamedProperties;
-
-       *count = reply->IdCount;
-       *propID = talloc_steal((TALLOC_CTX *)session, reply->PropertyIds);
-       *nameid = talloc_steal((TALLOC_CTX *)session, reply->PropertyNames);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy properties from one object to another
-
-   This function copies (or moves) specified properties from
-   one object to another.
-
-   \param obj_src the object to copy properties from
-   \param obj_dst the object to set properties on
-   \param copyFlags flags to determine whether to copy or
-   move, and whether to overwrite existing properties.
-   \param tags the list of properties to copy
-   \param problemCount (return value) number of entries in the problems array
-   \param problems (return value) array of problemCount entries.
-
-   The caller is responsible for freeing the \b problems array
-   using MAPIFreeBuffer(). If the \b problemCount pointer is NULL,
-   then the problems array will not be returned.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetProps, SetProps, DeleteProps, CopyTo, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS CopyProps(mapi_object_t *obj_src,
-                                  mapi_object_t *obj_dst,
-                                  struct SPropTagArray *tags,
-                                  uint8_t copyFlags,
-                                  uint16_t *problemCount,
-                                  struct PropertyProblem **problems)
-
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct CopyProperties_req       request;
-       struct mapi_session             *session[2];
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       int                             i;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!tags, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_src);
-       session[1] = mapi_object_get_session(obj_dst);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_src, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CopyProps");
-       size = 0;
-
-       /* Fill the CopyProperties operation */
-       request.handle_idx = 0x1;
-       size += sizeof(uint8_t);
-       request.WantAsynchronous = 0x0;
-       size += sizeof(uint8_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint8_t);
-       request.PropertyTags.cValues = tags->cValues;
-       size += sizeof(uint16_t);
-       request.PropertyTags.aulPropTag = tags->aulPropTag;
-       size += tags->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CopyProperties;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CopyProperties = request;
-       size += 5; // sizeof( EcDoRpc_MAPI_REQ )
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) *2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       if (problemCount) {
-               *problemCount = mapi_response->mapi_repl->u.mapi_CopyProperties.PropertyProblemCount;
-               *problems = talloc_array((TALLOC_CTX *)session[0], struct PropertyProblem, *problemCount);
-               for(i = 0; i < *problemCount; i++) {
-                       (*(problems[i])).index = mapi_response->mapi_repl->u.mapi_CopyProperties.PropertyProblem[i].index;
-                       (*(problems[i])).property_tag = mapi_response->mapi_repl->u.mapi_CopyProperties.PropertyProblem[i].property_tag;
-                       (*(problems[i])).error_code = mapi_response->mapi_repl->u.mapi_CopyProperties.PropertyProblem[i].error_code;
-               }
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Copy multiple properties from one object to another
-
-   This function copies (or moves) properties from one object to
-   another. Unlike CopyProperties, this function copies all properties
-   except those identified.
-
-   \param obj_src the object to copy properties from
-   \param obj_dst the object to set properties on
-   \param excludeTags the list of properties to \em not copy
-   \param copyFlags flags to determine whether to copy or
-   move, and whether to overwrite existing properties.
-   \param problemCount (return value) number of entries in the problems array
-   \param problems (return value) array of problemCount entries.
-
-   The caller is responsible for freeing the \b problems array
-   using MAPIFreeBuffer(). If the \b problemCount pointer is NULL,
-   then the problems array will not be returned.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetProps, SetProps, DeleteProps, CopyProps
-*/
-_PUBLIC_ enum MAPISTATUS CopyTo(mapi_object_t *obj_src,
-                               mapi_object_t *obj_dst,
-                               struct SPropTagArray *excludeTags,
-                               uint8_t copyFlags,
-                               uint16_t *problemCount,
-                               struct PropertyProblem **problems)
-
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CopyTo_req       request;
-       struct mapi_session     *session[2];
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       int                     i;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!excludeTags, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_src);
-       session[1] = mapi_object_get_session(obj_dst);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_src, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CopyProps");
-       size = 0;
-
-       /* Fill the CopyProperties operation */
-       request.handle_idx = 0x1;
-       size += sizeof(uint8_t);
-       request.WantAsynchronous = 0x0;
-       size += sizeof(uint8_t);
-       request.WantSubObjects = 0x1;
-       size += sizeof(uint8_t);
-       request.CopyFlags = copyFlags;
-       size += sizeof(uint8_t);
-       request.ExcludedTags.cValues = (uint16_t)excludeTags->cValues;
-       size += sizeof(uint16_t);
-       request.ExcludedTags.aulPropTag = excludeTags->aulPropTag;
-       size += excludeTags->cValues * sizeof(enum MAPITAGS);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CopyTo;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CopyTo = request;
-       size += 5; // sizeof( EcDoRpc_MAPI_REQ )
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) *2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       if (problemCount) {
-               *problemCount = mapi_response->mapi_repl->u.mapi_CopyTo.PropertyProblemCount;
-               *problems = talloc_array((TALLOC_CTX *)session[0], struct PropertyProblem, *problemCount);
-               for(i=0; i < *problemCount; ++i) {
-                       (*(problems[i])).index = mapi_response->mapi_repl->u.mapi_CopyTo.PropertyProblem[i].index;
-                       (*(problems[i])).property_tag = mapi_response->mapi_repl->u.mapi_CopyTo.PropertyProblem[i].property_tag;
-                       (*(problems[i])).error_code = mapi_response->mapi_repl->u.mapi_CopyTo.PropertyProblem[i].error_code;
-               }
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPISession.c b/branches/plugfest/libmapi/IMAPISession.c
deleted file mode 100644 (file)
index 4b7a5be..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMAPISession.c
-
-   \brief Session initialization options
- */
-
-
-static enum MAPISTATUS FindGoodServer(struct mapi_session *session, 
-                                     const char *legacyDN, 
-                                     bool server)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi;
-       struct StringsArray_r   pNames;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SPropTagArray    *MId_array;
-       struct StringArray_r    *MVszA = NULL;
-       const char              *binding = NULL;
-       char                    *HomeMDB = NULL;
-       char                    *server_dn;
-       uint32_t                i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_END_OF_SESSION, NULL);
-       OPENCHANGE_RETVAL_IF(!legacyDN, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "FindGoodServer");
-       nspi = (struct nspi_context *) session->nspi->ctx;
-
-       if (server == false) {
-               /* Step 1. Retrieve a MID for our legacyDN */
-               pNames.Count = 0x1;
-               pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-               pNames.Strings[0] = (const char *) talloc_strdup(pNames.Strings, legacyDN);
-
-               MId_array = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_array);
-               MAPIFreeBuffer(pNames.Strings);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-               /* Step 2. Retrieve the Server DN associated to this MId */
-               SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_EMS_AB_HOME_MDB);
-               retval = nspi_GetProps(nspi, mem_ctx, SPropTagArray, MId_array, &SRowSet);
-               MAPIFreeBuffer(SPropTagArray);
-               MAPIFreeBuffer(MId_array);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-               HomeMDB = (char *)find_SPropValue_data(&(SRowSet->aRow[0]), PR_EMS_AB_HOME_MDB);
-               OPENCHANGE_RETVAL_IF(!HomeMDB, MAPI_E_NOT_FOUND, mem_ctx);
-               server_dn = x500_truncate_dn_last_elements(mem_ctx, HomeMDB, 1);
-               MAPIFreeBuffer(SRowSet);
-       } else {
-               server_dn = talloc_strdup(mem_ctx, legacyDN);
-       }
-
-       /* Step 3. Retrieve the MId for this server DN */
-       pNames.Count = 0x1;
-       pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-       pNames.Strings[0] = (const char *) talloc_strdup(pNames.Strings, server_dn);
-       MId_array = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_array);
-       MAPIFreeBuffer(pNames.Strings);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Step 4. Retrieve the binding strings associated to this DN */
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_EMS_AB_NETWORK_ADDRESS);
-       retval = nspi_GetProps(nspi, mem_ctx, SPropTagArray, MId_array, &SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(MId_array);
-       MAPIFreeBuffer(server_dn);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Step 5. Extract host from ncacn_ip_tcp binding string */
-       MVszA = (struct StringArray_r *) find_SPropValue_data(&(SRowSet->aRow[0]), PR_EMS_AB_NETWORK_ADDRESS);
-       OPENCHANGE_RETVAL_IF(!MVszA, MAPI_E_NOT_FOUND, mem_ctx);
-       for (i = 0; i != MVszA->cValues; i++) {
-               if (!strncasecmp(MVszA->lppszA[i], "ncacn_ip_tcp:", 13)) {
-                       binding = MVszA->lppszA[i] + 13;
-                       break;
-               }
-       }
-       MAPIFreeBuffer(SRowSet);
-       OPENCHANGE_RETVAL_IF(!binding, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 6. Close the existing session and initiates it again */
-       talloc_free(session->emsmdb);
-       session->emsmdb = talloc_zero(session, struct mapi_provider);
-       talloc_set_destructor((void *)session->emsmdb, (int (*)(void *))emsmdb_disconnect_dtor);
-       session->profile->server = talloc_strdup(session->profile, binding);
-       retval = Logon(session, session->emsmdb, PROVIDER_ID_EMSMDB);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Open the Public Folder store
-
-   This function opens the public folder store. This allows access to
-   the public folders.
-
-   \param obj_store the result of opening the store
-   \param session pointer to the MAPI session context
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize which is required before opening the store
-   \sa GetLastError to check the result of a failed call, if necessary
-   \sa OpenMsgStore if you need access to the message store folders
-*/
-_PUBLIC_ enum MAPISTATUS OpenPublicFolder(struct mapi_session *session,
-                                         mapi_object_t *obj_store)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct Logon_req        request;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       mapi_object_store_t     *store;
-       uint8_t                 logon_id;
-       bool                    retry = false;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* Find the first available logon id */
-       retval = GetNewLogonId(session, &logon_id);
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_FAILONEPROVIDER, NULL);
-
-retry:
-       mem_ctx = talloc_named(NULL, 0, "OpenPublicFolder");
-       size = 0;
-
-       /* Fill the Logon operation */
-       request.LogonFlags = 0;
-       size += sizeof (uint8_t);
-       request.OpenFlags = PUBLIC;
-       size += sizeof (uint32_t);
-       request.StoreState = 0;
-       size += sizeof (uint32_t);
-       request.EssDN = NULL;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_Logon;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_Logon = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) + 2;
-       mapi_request->length = size + 2;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       if (retval == ecWrongServer && retry == false && mapi_response->mapi_repl->us.mapi_Logon.ServerName) {
-               retval = FindGoodServer(session, mapi_response->mapi_repl->us.mapi_Logon.ServerName, true);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               talloc_free(mem_ctx);
-               retry = true;
-               goto retry;
-       }
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* retrieve object session, handle and logon_id */
-       mapi_object_set_session(obj_store, session);
-       mapi_object_set_handle(obj_store, mapi_response->handles[0]);
-       mapi_object_set_logon_id(obj_store, logon_id);
-       mapi_object_set_logon_store(obj_store);
-
-       /* retrieve store content */
-       obj_store->private_data = talloc_zero((TALLOC_CTX *)session, mapi_object_store_t);
-       store = (mapi_object_store_t*)obj_store->private_data;
-       OPENCHANGE_RETVAL_IF(!obj_store->private_data, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       store->fid_pf_public_root = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[0];
-       store->fid_pf_ipm_subtree = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[1];
-       store->fid_pf_non_ipm_subtree = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[2];
-       store->fid_pf_EFormsRegistryRoot = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[3];
-       store->fid_pf_FreeBusyRoot = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[4];
-       store->fid_pf_OfflineAB = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[5];
-       store->fid_pf_EFormsRegistry = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[6];
-       store->fid_pf_LocalSiteFreeBusy = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[7];
-       store->fid_pf_LocalSiteOfflineAB = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[8];
-       store->fid_pf_NNTPArticle = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_pf.FolderIds[9];
-       store->store_type = PublicFolder;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Open the Message Store
-
-   This function opens the main message store. This allows access to
-   the normal user folders.
-
-   \param session pointer to the MAPI session context
-   \param obj_store the result of opening the store
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize which is required before opening the store
-   \sa GetLastError to check the result of a failed call, if necessary
-   \sa OpenPublicFolder if you need access to the public folders
-*/
-_PUBLIC_ enum MAPISTATUS OpenMsgStore(struct mapi_session *session,
-                                     mapi_object_t *obj_store)
-{
-       enum MAPISTATUS         retval;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_NOT_INITIALIZED, NULL);
-
-       retval = OpenUserMailbox(session, session->profile->username, obj_store);
-
-       /* Exchange clustered case */
-       if ((retval != MAPI_E_SUCCESS) && 
-           ((GetLastError() == ecUnknownUser) || (GetLastError() == MAPI_E_LOGON_FAILED))) {
-               errno = 0;
-               retval = OpenUserMailbox(session, NULL, obj_store);
-       }
-
-       return retval;
-}
-
-
-/**
-   \details Open another user mailbox
-
-   This function opens the main message store. This allows access to
-   the normal user folders.
-
-   \param session pointer to the MAPI session context
-   \param username name of the user's mailbox to open
-   \param obj_store the result of opening the store
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize which is required before opening the store
-   \sa GetLastError to check the result of a failed call, if necessary
-   \sa OpenPublicFolder if you need access to the public folders
- */
-_PUBLIC_ enum MAPISTATUS OpenUserMailbox(struct mapi_session *session,
-                                        const char *username,
-                                        mapi_object_t *obj_store)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct Logon_req        request;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       mapi_object_store_t     *store;
-       char                    *mailbox;
-       uint8_t                 logon_id;
-       bool                    retry = false;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* Find the first available logon id */
-       retval = GetNewLogonId(session, &logon_id);
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_FAILONEPROVIDER, NULL);
-
-retry:
-       mem_ctx = talloc_named(NULL, 0, "OpenMsgStore");
-       size = 0;
-
-       if (!username) {
-               mailbox = talloc_strdup(mem_ctx, session->profile->mailbox);
-       } else {
-               mailbox = talloc_asprintf(mem_ctx, "/o=%s/ou=%s/cn=Recipients/cn=%s", session->profile->org,
-                                         session->profile->ou, username);
-       }
-
-       /* Fill the Logon operation */
-       request.LogonFlags = LogonPrivate;
-       size += sizeof (uint8_t);
-       request.OpenFlags = HOME_LOGON | TAKE_OWNERSHIP | NO_MAIL;
-       size += sizeof (uint32_t);
-       request.StoreState = 0;
-       size += sizeof (uint32_t);
-       request.EssDN = talloc_strdup(mem_ctx, mailbox);
-       size += strlen(request.EssDN) + 1;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_Logon;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_Logon = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) + 2;
-       mapi_request->length = size + 2;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       if (retval == ecWrongServer && retry == false) {
-               retval = FindGoodServer(session, mailbox, false);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               talloc_free(mem_ctx);
-               retry = true;
-               goto retry;
-       }
-
-       OPENCHANGE_RETVAL_CALL_IF(retval, retval, mapi_response, mem_ctx);
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* set object session, handle and logon_id */
-       mapi_object_set_session(obj_store, session);
-       mapi_object_set_handle(obj_store, mapi_response->handles[0]);
-       mapi_object_set_logon_id(obj_store, logon_id);
-       mapi_object_set_logon_store(obj_store);
-
-       /* retrieve store content */
-       obj_store->private_data = talloc_zero((TALLOC_CTX *)session, mapi_object_store_t);
-       store = (mapi_object_store_t *)obj_store->private_data;
-       OPENCHANGE_RETVAL_IF(!obj_store->private_data, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       store->fid_mailbox_root = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[0];
-       store->fid_deferred_actions = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[1];
-       store->fid_spooler_queue = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[2];
-       store->fid_top_information_store = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[3];
-       store->fid_inbox = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[4]; 
-       store->fid_outbox = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[5];
-       store->fid_sent_items = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[6];
-       store->fid_deleted_items = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[7];
-       store->fid_common_views = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[8];
-       store->fid_schedule = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[9];
-       store->fid_search = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[10];
-       store->fid_views = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[11];
-       store->fid_shortcuts = mapi_response->mapi_repl->u.mapi_Logon.LogonType.store_mailbox.FolderIds[12];
-       store->store_type = PrivateFolderWithoutCachedFids;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPISupport.c b/branches/plugfest/libmapi/IMAPISupport.c
deleted file mode 100644 (file)
index f0f5889..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMAPISupport.c
-
-   \brief MAPI notifications functions
- */
-
-
-/**
-   \details Register an object to receive notifications
-   This function registers notifications on the Exchange server for an
-   object.  The function holds the notifications intended to be
-   monitored in as a bitmask.
-
-   \param obj the object to get notifications for
-   \param connection connection identifier for callback function
-   \param NotificationFlags mask for events to provide notifications
-   for (see below)
-   \param WholeStore whether the scope for this notification is whole
-   database
-   \param notify_callback notification callback function.
-   \param private_data the data to be passed at the callback function
-   when invoked
-   
-   The Notification Flags can take the following values:
-   - fnevCriticalError
-   - fnevNewMail
-   - fnevObjectCreated
-   - fnevObjectDeleted
-   - fnevObjectModified
-   - fnevObjectMoved
-   - fnevObjectCopied
-   - fnevSearchComplete
-   - fnevTableModified
-   - fnevStatusObjectModified
-   - fnevReservedForMapi
-   - fnevExtended
-   
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.  
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa RegisterNotification, Unsubscribe, MonitorNotification,
-   GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS Subscribe(mapi_object_t *obj, uint32_t        *connection, 
-                                  uint16_t NotificationFlags,
-                                  bool WholeStore,
-                                  mapi_notify_callback_t notify_callback,
-                                  void *private_data)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct RegisterNotification_req request;
-       struct notifications            *notification;
-       struct mapi_notify_ctx          *notify_ctx;
-       struct mapi_session             *session;
-       enum MAPISTATUS                 retval;
-       NTSTATUS                        status;
-       uint32_t                        size = 0;
-       static uint32_t                 ulConnection = 0;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!connection, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->notify_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "Subscribe");
-
-       /* Fill the Subscribe operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.NotificationFlags = NotificationFlags;
-       size += sizeof (uint16_t);
-
-       request.WantWholeStore = WholeStore;
-       size += sizeof (uint8_t);
-
-       if (WholeStore == false) {
-               request.FolderId.ID = mapi_object_get_id(obj);
-               size += sizeof (uint64_t);
-
-               request.MessageId.ID = 0x0;
-               size += sizeof (uint64_t);
-       }
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_RegisterNotification;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_RegisterNotification = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* add the notification to the list */
-       ulConnection++;
-       notify_ctx = session->notify_ctx;
-       notification = talloc_zero((TALLOC_CTX *)session, struct notifications);
-
-       notification->ulConnection = ulConnection;
-       notification->parentID = mapi_object_get_id(obj);
-       *connection = ulConnection;
-
-       /* set notification handle */
-       mapi_object_init(&notification->obj_notif);
-       mapi_object_set_handle(&notification->obj_notif, mapi_response->handles[1]);
-       mapi_object_set_session(&notification->obj_notif, session);
-
-       notification->NotificationFlags = NotificationFlags;
-       notification->callback = notify_callback;
-       notification->private_data = private_data;
-
-       DLIST_ADD(notify_ctx->notifications, notification);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Unregister notifications on a given object.
-
-   Cancel any notification registrations associated with the notify
-   object.  This function unregisters notifications on the Exchange
-   server for the object specified with its connection number
-   ulConnection. The function will releases the notification on the
-   Exchange server and remove the entry from the internal
-   notifications list.
-
-   The function takes a callback to execute when such notification
-   occurs and returns the ulConnection identifier we can use in
-   further management.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.  
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa RegisterNotification, Subscribe, MonitorNotification,
-   GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS Unsubscribe(struct mapi_session *session, uint32_t ulConnection)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_notify_ctx  *notify_ctx;
-       struct notifications    *notification;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->notify_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       notify_ctx = session->notify_ctx;
-       notification = notify_ctx->notifications;
-
-       while (notification) {
-               if (notification->ulConnection == ulConnection) {
-                       retval = Release(&notification->obj_notif);
-                       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-                       DLIST_REMOVE(notify_ctx->notifications, notification);
-                       break;
-               }
-               notification = notification->next;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-enum MAPISTATUS ProcessNotification(struct mapi_notify_ctx *notify_ctx, 
-                                          struct mapi_response *mapi_response)
-{
-       struct notifications    *notification;
-       void                    *NotificationData;
-       uint32_t                i;
-
-       if (!mapi_response || !mapi_response->mapi_repl) return MAPI_E_INVALID_PARAMETER;
-
-       for (i = 0; mapi_response->mapi_repl[i].opnum; i++) {
-               if (mapi_response->mapi_repl[i].opnum == op_MAPI_Notify) {
-                       mapi_handle_t   handle = mapi_response->mapi_repl[i].u.mapi_Notify.NotificationHandle;
-
-                       switch(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationType) {
-                       case fnevNewMail:
-                       case fnevMbit|fnevNewMail:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.NewMailNotification);
-                               break;
-                       case fnevObjectCreated:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderCreatedNotification);
-                               break;
-                       case fnevObjectDeleted:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderDeletedNotification);
-                               break;
-                       case fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderModifiedNotification_10);
-                               break;
-                       case fnevObjectMoved:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderMoveNotification);
-                               break;
-                       case fnevObjectCopied:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderCopyNotification);
-                               break;                  
-                       case fnevSearchComplete:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.SearchCompleteNotification);
-                               break;
-                       case fnevTableModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.HierarchyTableChange);
-                               break;
-                       case fnevStatusObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.IcsNotification);
-                               break;
-                       case fnevTbit|fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderModifiedNotification_1010);
-                               break;
-                       case fnevUbit|fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderModifiedNotification_2010);
-                               break;
-                       case fnevTbit|fnevUbit|fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.FolderModifiedNotification_3010);
-                               break;
-                       case fnevMbit|fnevObjectCreated:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.MessageCreatedNotification);
-                               break;
-                       case fnevMbit|fnevObjectDeleted:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.MessageDeletedNotification);
-                               break;
-                       case fnevMbit|fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.MessageModifiedNotification);
-                               break;
-                       case fnevMbit|fnevObjectMoved:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.MessageMoveNotification);
-                               break;
-                       case fnevMbit|fnevObjectCopied:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.MessageCopyNotification);
-                               break;
-                       case fnevMbit|fnevTableModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.ContentsTableChange);
-                               break;
-                       case fnevMbit|fnevSbit|fnevObjectDeleted:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.SearchMessageRemovedNotification);
-                               break;
-                       case fnevMbit|fnevSbit|fnevObjectModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.SearchMessageModifiedNotification);
-                               break;
-                       case fnevMbit|fnevSbit|fnevTableModified:
-                               NotificationData = (void *)&(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationData.SearchTableChange);
-                               break;                  
-                       default:
-                               NotificationData = NULL;
-                               break;
-                       }
-                       notification = notify_ctx->notifications;
-
-                       while (notification->ulConnection) {
-                               if ((notification->NotificationFlags & mapi_response->mapi_repl[i].u.mapi_Notify.NotificationType) && 
-                                   (handle == mapi_object_get_handle(&(notification->obj_notif)))) {
-                                       if (notification->callback && NotificationData) {
-                                               notification->callback(mapi_response->mapi_repl[i].u.mapi_Notify.NotificationType,
-                                                                      (void *)NotificationData,
-                                                                      notification->private_data);
-                                       }
-                               }
-                               notification = notification->next;
-                       }
-               }
-       }
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Force notification of pending events
-
-   This function force the server to send any pending notificaion and
-   process them. These MAPI notifications are next compared to the
-   registered ones and the callback specified in Subscribe() called if
-   it matches.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.  
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa RegisterNotification, Subscribe, Unsubscribe, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS DispatchNotifications(struct mapi_session *session)
-{
-       struct mapi_response    *mapi_response;
-       enum MAPISTATUS         retval;
-       NTSTATUS                status;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->notify_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       status = emsmdb_transaction_null((struct emsmdb_context *)session->emsmdb->ctx, &mapi_response);
-       if (!NT_STATUS_IS_OK(status))
-               return MAPI_E_CALL_FAILED;
-
-       retval = ProcessNotification(session->notify_ctx, mapi_response);
-       talloc_free(mapi_response);
-       return retval;
-}
-
-
-/**
-   \details Wait for notifications and process them
-
-   This function waits for notifications on the UDP port
-   and generates the traffic needed to receive MAPI
-   notifications. These MAPI notifications are next compared to the
-   registered ones and the callback specified in Subscribe() called if
-   it matches.
-
-   The function takes a callback in cb_data to check if it should 
-   continue to process notifications. Timeval in cb_data can be
-   used to control the behavior of select.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.  
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa RegisterNotification, Subscribe, Unsubscribe, GetLastError
-
-   \note This code is experimental. The current implementation is
-   non-threaded, only supports fnevNewmail and fnevCreatedObject
-   notifications and will block your process until you send a signal.
-*/
-_PUBLIC_ enum MAPISTATUS MonitorNotification(struct mapi_session *session, void *private_data, 
-                                            struct mapi_notify_continue_callback_data *cb_data)
-{
-       struct mapi_response    *mapi_response;
-       struct mapi_notify_ctx  *notify_ctx;
-       NTSTATUS                status;
-       int                     is_done;
-       int                     err;
-       char                    buf[512];
-       fd_set                  read_fds;
-       int                     nread;
-        mapi_notify_continue_callback_t callback;
-       void                    *data;
-       struct timeval          *tv;
-       enum MAPISTATUS         retval;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->notify_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       notify_ctx = session->notify_ctx;
-       callback = cb_data ? cb_data->callback : NULL;
-       data = cb_data ? cb_data->data : NULL;
-       tv = cb_data ? &cb_data->tv : NULL;
-
-       nread = 0;
-       is_done = 0;
-       while (!is_done) {
-               FD_ZERO(&read_fds);
-               FD_SET(notify_ctx->fd, &read_fds);
-
-               err = select(notify_ctx->fd + 1, &read_fds, NULL, NULL, tv);
-               if (FD_ISSET(notify_ctx->fd, &read_fds)) {
-                       do {
-                                nread = read(notify_ctx->fd, buf, sizeof(buf));
-                                if (nread > 0) {
-                                       status = emsmdb_transaction_null((struct emsmdb_context *)session->emsmdb->ctx,
-                                                                        &mapi_response);
-                                       if (!NT_STATUS_IS_OK(status))
-                                                err = -1;
-                                       else {
-                                                retval = ProcessNotification(notify_ctx, mapi_response);
-                                                OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-                                       }
-                                }
-                       } while (nread > 0 && err != -1);
-               }
-               if ((callback != NULL && callback (data)) || err < 0)
-                       is_done = 1;
-       }
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMAPITable.c b/branches/plugfest/libmapi/IMAPITable.c
deleted file mode 100644 (file)
index eae7848..0000000
+++ /dev/null
@@ -1,1931 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-   Copyright (C) Brad Hards 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \file IMAPITable.c
-
-   \brief Operations on tables
- */
-
-
-/**
-   \details Defines the particular properties and order of properties
-  to appear as columns in the table.
-  \param obj_table the table the function is setting columns for
-  \param properties the properties intended to be set
-
-  \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_W_ERROR_RETURNED: Problem encountered while trying to set
-   one or more properties
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-  \sa QueryRows, QueryColumns, SeekRow, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS SetColumns(mapi_object_t *obj_table, 
-                                   struct SPropTagArray *properties)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct SetColumns_req   request;
-       struct mapi_session     *session;
-       TALLOC_CTX              *mem_ctx;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       mapi_object_table_t     *table;
-       uint8_t                 logon_id = 0;
-
-       /* sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetColumns");
-       size = 0;
-
-       /* Fill the SetColumns operation */
-       request.SetColumnsFlags = SetColumns_TBL_SYNC;
-       request.prop_count = properties->cValues;
-       request.properties = properties->aulPropTag;
-       size += 3 + request.prop_count * sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetColumns;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetColumns = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval && (retval != MAPI_W_ERRORS_RETURNED), retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* recopy property tags into table */
-       /* fixme: obj_table->private_data should be initialized during opening, not here */
-       if (obj_table->private_data == NULL) {
-               obj_table->private_data = talloc((TALLOC_CTX *)session, mapi_object_table_t);
-       }
-
-       table = (mapi_object_table_t *)obj_table->private_data;
-       if (table) {
-               table->proptags.cValues = properties->cValues;
-               table->proptags.aulPropTag = talloc_array((TALLOC_CTX *) table,
-                                                         enum MAPITAGS, table->proptags.cValues);
-               memcpy((void*)table->proptags.aulPropTag, (void*)properties->aulPropTag,
-                      table->proptags.cValues * sizeof(enum MAPITAGS));
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns the approximate cursor position
-   \param obj_table pointer to the table's object
-   \param Numerator pointer to the numerator of the fraction
-   identifying the table position
-   \param Denominator pointer to the denominator of the fraction
-   identifying the table position
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa QueryRows
-*/
-_PUBLIC_ enum MAPISTATUS QueryPosition(mapi_object_t *obj_table, 
-                                      uint32_t *Numerator,
-                                      uint32_t *Denominator)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "QueryPosition");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_QueryPosition;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-       
-       if (Numerator) {
-               *Numerator = mapi_response->mapi_repl->u.mapi_QueryPosition.Numerator;
-       }
-
-       if (Denominator) {
-               *Denominator = mapi_response->mapi_repl->u.mapi_QueryPosition.Denominator;
-       }
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a RowSet with the properties returned by the
-   server
-
-   \param obj_table the table we are requesting properties from
-   \param row_count the maximum number of rows to retrieve
-   \param flags flags to use for the query
-   \param rowSet the results
-
-   flags possible values:
-   - TBL_ADVANCE: index automatically increased from last rowcount
-   - TBL_NOADVANCE: should be used for a single QueryRows call
-   - TBL_ENABLEPACKEDBUFFERS: (not yet implemented)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa SetColumns, QueryPosition, QueryColumns, SeekRow
- */
-_PUBLIC_ enum MAPISTATUS QueryRows(mapi_object_t *obj_table, 
-                                  uint16_t row_count,
-                                  enum QueryRowsFlags flags, 
-                                  struct SRowSet *rowSet)
-{
-       struct mapi_context     *mapi_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct QueryRows_req    request;
-       struct QueryRows_repl   *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       mapi_object_table_t     *table;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "QueryRows");
-       size = 0;
-
-       /* Fill the QueryRows operation */
-       request.QueryRowsFlags = flags;
-       /* TODO: search backwards for negative row_count */
-       request.ForwardRead = 1;
-       request.RowCount = row_count;
-       size += 4;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_QueryRows;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_QueryRows = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* table contains mapitags from previous SetColumns */
-       table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_OBJECT, mem_ctx);
-
-       /* TODO: handle Origin */
-       reply = &mapi_response->mapi_repl->u.mapi_QueryRows;
-       rowSet->cRows = reply->RowCount;
-       rowSet->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, rowSet->cRows);
-       emsmdb_get_SRowSet((TALLOC_CTX *)rowSet->aRow, mapi_ctx->lp_ctx, rowSet, &table->proptags, &reply->RowData);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieves the set of columns defined in the current table
-   view
-
-   \param obj_table the table we are retrieving columns from
-   \param cols pointer to an array of property tags
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetColumns, QueryRows
-*/
-_PUBLIC_ enum MAPISTATUS QueryColumns(mapi_object_t *obj_table, 
-                                     struct SPropTagArray *cols)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct QueryColumnsAll_repl     *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       mapi_object_table_t             *table;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "QueryColumns");
-
-       cols->cValues = 0;
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_QueryColumnsAll;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* get columns SPropTagArray */
-       table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_OBJECT, mem_ctx);
-
-       reply = &mapi_response->mapi_repl->u.mapi_QueryColumnsAll;
-       cols->cValues = reply->PropertyTagCount;
-       cols->aulPropTag = talloc_array((TALLOC_CTX *)table, enum MAPITAGS, cols->cValues);
-       memcpy((void *)cols->aulPropTag, (const void *)reply->PropertyTags, cols->cValues * sizeof(enum MAPITAGS));
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Move the table cursor at a specific location
-
-   \param obj_table the table we are moving cursor on
-   \param origin the table position where we start to seek 
-   \param offset a particular offset in the table
-   \param row the position of the seeked row is returned in rows
-
-   origin possible values:
-   - BOOKMARK_BEGINNING: Beginning of the table
-   - BOOKMARK_CURRENT: Current position in the table
-   - BOKMARK_END: End of the table
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa SetColumns, QueryRows
-*/
-_PUBLIC_ enum MAPISTATUS SeekRow(mapi_object_t *obj_table, 
-                                enum BOOKMARK origin, 
-                                int32_t offset, uint32_t *row)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct SeekRow_req      request;
-       struct SeekRow_repl     *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SeekRow");
-       *row = 0;
-
-       /* Fill the SeekRow operation */
-       size = 0;
-       request.origin = origin;
-       size += 1;
-       request.offset = offset;
-       size += 4;
-       request.WantRowMovedCount = 0;
-       size += 1;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SeekRow;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SeekRow = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_SeekRow;
-       *row = reply->RowsSought;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Move the table cursor at a specific location given a
-   bookmark
-
-   \param obj_table the table we are moving cursor on
-   \param lpbkPosition the bookmarked position 
-   \param RowCount a relative number of rows to the bookmark
-   \param row the position of the seeked row is returned in rows
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_INVALID_BOOKMARK: The bookmark specified is invalid or
-     beyond the last row requested
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa CreateBookmark, FreeBookmark
- */
-_PUBLIC_ enum MAPISTATUS SeekRowBookmark(mapi_object_t *obj_table,
-                                        uint32_t lpbkPosition,
-                                        uint32_t RowCount,
-                                        uint32_t *row)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SeekRowBookmark_req      request;
-       struct SeekRowBookmark_repl     *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       struct SBinary_short            bin;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       retval = mapi_object_bookmark_find(obj_table, lpbkPosition, &bin);
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SeekRowBookmark");
-
-       /* Fill the SeekRowBookmark operation */
-       size = 0;
-       request.Bookmark.cb = bin.cb;
-       size += sizeof (uint16_t);
-       request.Bookmark.lpb = bin.lpb;
-       size += bin.cb;
-       request.RowCount = RowCount;
-       size += sizeof (uint32_t);
-       request.WantRowMovedCount = 0x1;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SeekRowBookmark;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SeekRowBookmark = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_SeekRowBookmark;
-       *row = reply->RowsSought;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Moves the cursor to an approximate fractional position in
-   the table
-
-   \param obj_table the table we are moving cursor on
-   \param ulNumerator numerator of the fraction representing the table
-   position.
-   \param ulDenominator denominator of the fraction representing the
-   table position
-
-   - If ulDenominator is NULL, then SeekRowApprox returns
-   MAPI_E_INVALID_PARAMETER.
-   - If ulNumerator is NULL, then SeekRowApprox moves the cursor to
-     the beginning of the table. In such situation, SeekRowApprox call
-     is similar to SeekRow with BOOKMARK_BEGINNING
-   - If ulNumerator and ulDenominator have the same value, then
-     SeekRowApprox moves the cursor to the end of the table. In such
-     situation, SeekRowApprox call is similar to SeekRow with
-     BOOKMARK_END
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa SeekRow, SeekRowBookmark
- */
-_PUBLIC_ enum MAPISTATUS SeekRowApprox(mapi_object_t *obj_table,
-                                      uint32_t ulNumerator,
-                                      uint32_t ulDenominator)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SeekRowApprox_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ulDenominator, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SeekRowApprox");
-       
-       /* Fill the SeekRowApprox operation */
-       size = 0;
-       request.ulNumerator = ulNumerator;
-       size += sizeof (uint32_t);
-       request.ulDenominator = ulDenominator;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SeekRowApprox;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SeekRowApprox = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Marks the table current position
-
-   \param obj_table the table we are creating a bookmark in
-   \param lpbkPosition pointer to the bookmark value. This bookmark
-   can be passed in a call to the SeekRowBookmark method
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa SeekRowBookmark, FreeBookmark
- */
-_PUBLIC_ enum MAPISTATUS CreateBookmark(mapi_object_t *obj_table, 
-                                       uint32_t *lpbkPosition)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct CreateBookmark_repl      *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       mapi_object_table_t             *mapi_table;
-       mapi_object_bookmark_t          *bookmark;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CreateBookmark");      
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CreateBookmark;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_CreateBookmark;
-
-       mapi_table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!mapi_table, MAPI_E_INVALID_PARAMETER, mem_ctx);
-
-       /* Store CreateBookmark data in mapi_object_table private_data */
-       bookmark = talloc_zero((TALLOC_CTX *)mapi_table->bookmark, mapi_object_bookmark_t);
-       mapi_table->bk_last++;
-       bookmark->index = mapi_table->bk_last;
-       bookmark->bin.cb = reply->bookmark.cb;
-       bookmark->bin.lpb = talloc_array((TALLOC_CTX *)bookmark, uint8_t, reply->bookmark.cb);
-       memcpy(bookmark->bin.lpb, reply->bookmark.lpb, reply->bookmark.cb);
-
-       DLIST_ADD(mapi_table->bookmark, bookmark);
-
-       *lpbkPosition = mapi_table->bk_last;
-
-       obj_table->private_data = mapi_table;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Release the resources associated with a bookmark
-
-   \param obj_table the table the bookmark is associated to
-   \param bkPosition the bookmark to be freed
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_INVALID_BOOKMARK: The bookmark specified is invalid or
-     beyond the last row requested
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   \sa CreateBookmark
-*/
-_PUBLIC_ enum MAPISTATUS FreeBookmark(mapi_object_t *obj_table, 
-                                     uint32_t bkPosition)
-{
-       mapi_object_table_t             *table;
-       mapi_object_bookmark_t          *bookmark;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct FreeBookmark_req         request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(bkPosition > table->bk_last, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       bookmark = table->bookmark;
-       OPENCHANGE_RETVAL_IF(!bookmark, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "FreeBookmark");
-
-       while (bookmark) {
-               if (bookmark->index == bkPosition) {
-                       if (bookmark->index == table->bk_last) {
-                               table->bk_last--;
-                       }
-                       size = 0;
-
-                       /* Fill the FreeBookmark operation */
-                       request.bookmark.cb = bookmark->bin.cb;
-                       size += sizeof (uint16_t);
-                       request.bookmark.lpb = bookmark->bin.lpb;
-                       size += bookmark->bin.cb;
-
-                       /* Fill the MAPI_REQ request */
-                       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-                       mapi_req->opnum = op_MAPI_FreeBookmark;
-                       mapi_req->logon_id = logon_id;
-                       mapi_req->handle_idx = 0;
-                       mapi_req->u.mapi_FreeBookmark = request;
-                       size += 5;
-
-                       /* Fill the mapi_request structure */
-                       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-                       mapi_request->mapi_len = size + sizeof (uint32_t);
-                       mapi_request->length = size;
-                       mapi_request->mapi_req = mapi_req;
-                       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-                       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-                       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-                       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-                       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-                       retval = mapi_response->mapi_repl->error_code;
-                       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-                       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-                       MAPIFreeBuffer(bookmark->bin.lpb);
-                       DLIST_REMOVE(table->bookmark, bookmark);
-
-                       talloc_free(mapi_response);
-                       talloc_free(mem_ctx);
-
-                       return MAPI_E_SUCCESS;
-               }
-               bookmark = bookmark->next;
-       }
-       talloc_free(mem_ctx);
-       return MAPI_E_INVALID_BOOKMARK;
-}
-
-
-/**
-   \details Order the rows of the table based on a criteria
-
-   \param obj_table the table we are ordering rows on
-   \param lpSortCriteria pointer on sort criterias to apply
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table or lpSortCriteria is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS SortTable(mapi_object_t *obj_table, 
-                                  struct SSortOrderSet *lpSortCriteria)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct SortTable_req    request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpSortCriteria, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SortTable");
-
-       /* Fill the SortTable operation */
-       size = 0;
-       request.SortTableFlags = 0;
-       size += sizeof (uint8_t);
-       request.lpSortCriteria.cSorts = lpSortCriteria->cSorts;
-       size += sizeof (uint16_t);
-       request.lpSortCriteria.cCategories = lpSortCriteria->cCategories;
-       size += sizeof (uint16_t);
-       request.lpSortCriteria.cExpanded = lpSortCriteria->cExpanded;
-       size += sizeof (uint16_t);
-       request.lpSortCriteria.aSort = lpSortCriteria->aSort;
-       size += lpSortCriteria->cSorts * (sizeof (uint32_t) + sizeof (uint8_t));
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SortTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SortTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the size associated to a mapi SRestriction
-
-   \param res pointer on the mapi_SRestriction
-
-   \return mapi_SRestriction size
- */
-uint32_t get_mapi_SRestriction_size(struct mapi_SRestriction *res)
-{
-       uint32_t        size;
-       uint32_t        i;
-
-       size = 0;
-
-       size += sizeof (res->rt);
-
-       switch(res->rt) {
-       case RES_AND:
-               size += sizeof (res->res.resAnd.cRes);
-               for (i = 0; i < res->res.resAnd.cRes; i++) {
-                       size += get_mapi_SRestriction_size((struct mapi_SRestriction *)&(res->res.resAnd.res[i]));
-               }
-               break;
-       case RES_OR:
-               size += sizeof (res->res.resOr.cRes);
-               for (i = 0; i < res->res.resOr.cRes; i++) {
-                       size += get_mapi_SRestriction_size((struct mapi_SRestriction *)&(res->res.resOr.res[i]));
-               }
-               break;
-       case RES_CONTENT:
-               size += sizeof (res->res.resContent.fuzzy);
-               size += sizeof (res->res.resContent.ulPropTag);
-               size += sizeof (res->res.resContent.lpProp.ulPropTag);
-               size += get_mapi_property_size(&(res->res.resContent.lpProp));
-               break;
-       case RES_PROPERTY:
-               size += sizeof (res->res.resProperty.relop);
-               size += sizeof (res->res.resProperty.ulPropTag);
-               size += sizeof (res->res.resProperty.lpProp.ulPropTag);
-               size += get_mapi_property_size(&(res->res.resProperty.lpProp));
-               break;
-       case RES_COMPAREPROPS:
-               size += sizeof (uint8_t);
-               size += sizeof (res->res.resCompareProps.ulPropTag1);
-               size += sizeof (res->res.resCompareProps.ulPropTag2);
-               break;
-       case RES_BITMASK:
-               size += sizeof (uint8_t);
-               size += sizeof (res->res.resBitmask.ulPropTag);
-               size += sizeof (res->res.resBitmask.ulMask);
-               break;
-       case RES_SIZE:
-               size += sizeof (uint8_t);
-               size += sizeof (res->res.resSize.ulPropTag);
-               size += sizeof (res->res.resSize.size);
-               break;
-       case RES_EXIST:
-               size += sizeof (res->res.resExist.ulPropTag);
-               break;
-       }
-       return (size);
-}
-
-/**
-   \details Removes all filters that are currently on a table
-
-   \param obj_table the table object to reset
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa Restrict
-*/
-_PUBLIC_ enum MAPISTATUS Reset(mapi_object_t *obj_table)
-{
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "Reset");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ResetTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Applies a filter to a table, reducing the row set to only
-   those rows matching the specified criteria.
-
-   \param obj_table the object we are filtering
-   \param res the filters we want to apply
-   \param TableStatus the table status result
-
-   TableStatus can either hold:
-       - TBLSTAT_COMPLETE (0x0)
-       - TBLSTAT_SORTING (0x9)
-       - TBLSTAT_SORT_ERROR (0xA)
-       - TBLSTAT_SETTING_COLS (0xB)
-       - TBLSTAT_SETCOL_ERROR (0xD)
-       - TBLSTAT_RESTRICTING (0xE)
-       - TBLSTAT_RESTRICT_ERROR (0xF)
-
-
-   Unlike MAPI, you don't pass a null restriction argument to remove 
-   the current restrictions. Use Reset() instead.
-
-   TableStatus should be set to NULL if you don't want to retrieve the
-   status of the table.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa QueryRows, Reset
-*/
-_PUBLIC_ enum MAPISTATUS Restrict(mapi_object_t *obj_table, 
-                                 struct mapi_SRestriction *res,
-                                 uint8_t *TableStatus)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct Restrict_req     request;
-       struct Restrict_repl    *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!res, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "Restrict");
-
-       /* Fill the Restrict operation */
-       size = 0;
-       request.handle_idx = 0;
-       size += sizeof (request.handle_idx);
-       request.restrictions = *res;
-       size += get_mapi_SRestriction_size(res);
-
-       /* add subcontext size */
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_Restrict;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_Restrict = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       if (TableStatus) {
-               reply = &mapi_response->mapi_repl->u.mapi_Restrict;
-               *TableStatus = reply->TableStatus;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Find the next row in a table that matches specific search
-   criteria
-
-   \param obj_table the table we are searching in
-   \param res pointer on search criterias
-   \param bkOrigin bookmark identifying the row where FindRow should
-   begin
-   \param ulFlags controls the direction of the search
-   \param SRowSet the resulting row
-
-   bkOrigin can either take the value of a bookmark created with
-   CreateBookmark or any of the default values:
-   - BOOKMARK_BEGINNING
-   - BOOKMARK_CURRENT
-   - BOOKMARK_END
-
-   ulFlags can be set either to DIR_FORWARD (0x0) or DIR_BACKWARD
-   (0x1).
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_INVALID_BOOKMARK: the bookmark specified is invalid or
-     beyond the last row requested.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa CreateBookmark
- */
-_PUBLIC_ enum MAPISTATUS FindRow(mapi_object_t *obj_table, 
-                                struct mapi_SRestriction *res,
-                                enum BOOKMARK bkOrigin,
-                                enum FindRow_ulFlags ulFlags,
-                                struct SRowSet *SRowSet)
-{
-       struct mapi_context     *mapi_ctx;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct FindRow_req      request;
-       struct FindRow_repl     *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       mapi_object_table_t     *table;
-       struct SBinary_short    bin;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!res, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       if (bkOrigin >= 3) {
-               retval = mapi_object_bookmark_find(obj_table, bkOrigin, &bin);
-               OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "FindRow");
-
-       /* Fill the FindRow operation */
-       size = 0;
-       request.ulFlags = ulFlags;
-       size += sizeof (uint8_t);
-       request.res = *res;
-       size += get_mapi_SRestriction_size(res);
-       request.origin = (bkOrigin > BOOKMARK_USER) ? BOOKMARK_USER : bkOrigin;
-       size += sizeof (uint8_t);
-       if (bkOrigin >= 3) {
-               request.bookmark.cb = bin.cb;
-               request.bookmark.lpb = bin.lpb;
-               size += sizeof (uint16_t)+ bin.cb;
-       } else {
-               request.bookmark.cb = 0;
-               request.bookmark.lpb = NULL;
-               size += sizeof (uint16_t);
-       }
-
-       /* add subcontext size */
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_FindRow;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_FindRow = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* table contains SPropTagArray from previous SetColumns call */
-       table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_OBJECT, mem_ctx);
-
-       reply = &mapi_response->mapi_repl->u.mapi_FindRow;
-       SRowSet->cRows = 1;
-       SRowSet->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, SRowSet->cRows);
-       emsmdb_get_SRowSet((TALLOC_CTX *)table, mapi_ctx->lp_ctx, SRowSet, &table->proptags, &reply->row);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the status of a table
-
-   \param obj_table the table we are retrieving the status from
-   \param TableStatus the table status result
-
-   TableStatus can either hold:
-       - TBLSTAT_COMPLETE (0x0)
-       - TBLSTAT_SORTING (0x9)
-       - TBLSTAT_SORT_ERROR (0xA)
-       - TBLSTAT_SETTING_COLS (0xB)
-       - TBLSTAT_SETCOL_ERROR (0xD)
-       - TBLSTAT_RESTRICTING (0xE)
-       - TBLSTAT_RESTRICT_ERROR (0xF)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_INVALID_BOOKMARK: the bookmark specified is invalid or
-     beyond the last row requested.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa SetColumns, Restrict, FindRow, GetHierarchyTable, GetContentsTable
- */
-_PUBLIC_ enum MAPISTATUS GetStatus(mapi_object_t *obj_table, uint8_t *TableStatus)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct GetStatus_repl   *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetStatus");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetStatus;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-       
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve TableStatus */
-       reply = &mapi_response->mapi_repl->u.mapi_GetStatus;
-       *TableStatus = reply->TableStatus;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Aborts an asynchronous table operation in progress
-
-   \param obj_table the table object where we want to abort an
-   asynchronous operation
-   \param TableStatus pointer on the table status returned by the
-   operation
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table or TableStatus are null
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
- */
-_PUBLIC_ enum MAPISTATUS Abort(mapi_object_t *obj_table, uint8_t *TableStatus)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct Abort_repl       *reply;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!TableStatus, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "Abort");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_Abort;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve TableStatus */
-       reply = &mapi_response->mapi_repl->u.mapi_Abort;
-       *TableStatus = reply->TableStatus;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Expand a collapsed row in a table
-
-   After a contents table has been sorted and categorized using
-   SortTable, rows can be expanded and collapsed (using ExpandRow and
-   CollapseRow repectively).
-
-   \param obj_table the table we are collapsing the category in.
-   \param categoryId the row identification for the heading row for
-   the category being expanded.
-   \param maxRows the maximum number of rows to retrieve (can be zero)
-   \param rowData (result) the data rows under this category heading
-   \param expandedRowCount (result) the number of rows that were added
-   to the table when the row was expanded
-
-   You obtain the categoryId argument from the PR_INST_ID property of
-   the heading row for the category that is being collapsed.
-
-   The maxRows argument specifies the upper limit on how many rows to
-   return (as rowData) when the category is expanded. The
-   expandedRowCount argument returns the number of rows that were
-   added to the table. As an example, consider a collapsed category
-   with 8 entries. If you set maxRows to 3, then rowData will contain
-   the data for the first three rows, and expandedRowCount will be set
-   to 8. If you now use QueryRows(), you can read the 5 additional
-   rows. If you'd specified maxRows as 8 (or more), rowData would have
-   contained all 8 rows and expandedRowCount still would have been 8.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table, rowData or rowCount are NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa CollapseRow
- */
-_PUBLIC_ enum MAPISTATUS ExpandRow(mapi_object_t *obj_table, 
-                                  uint64_t categoryId,
-                                  uint16_t maxRows, 
-                                  struct SRowSet *rowData,
-                                  uint32_t *expandedRowCount)
-{
-       struct mapi_context             *mapi_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct ExpandRow_req            request;
-       struct ExpandRow_repl           *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       mapi_object_table_t             *table;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!rowData, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!expandedRowCount, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ExpandRow");
-       size = 0;
-
-       /* Fill the ExpandRow operation */
-       request.MaxRowCount = maxRows;
-       size += sizeof (uint16_t);
-       request.CategoryId = categoryId;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ExpandRow;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_ExpandRow = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* table contains mapitags from previous SetColumns */
-       table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_OBJECT, mem_ctx);
-
-       /* Retrieve the rowData and expandedRowCount */
-       reply = &mapi_response->mapi_repl->u.mapi_ExpandRow;
-       rowData->cRows = reply->RowCount;
-       rowData->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, reply->RowCount);
-       emsmdb_get_SRowSet((TALLOC_CTX *)table, mapi_ctx->lp_ctx, rowData, &table->proptags, &reply->RowData);
-       *expandedRowCount = reply->ExpandedRowCount;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Collapse an expanded row in a table
-
-   After a contents table has been sorted and categorized using
-   SortTable, rows can be expanded and collapsed (using ExpandRow and
-   CollapseRow repectively).
-
-   \param obj_table the table we are collapsing the category in.
-   \param categoryId the row identification for the heading row for
-   the category being collapsed.
-   \param rowCount (result) the number of rows that were removed from the 
-   table when the row was collapsed.
-
-   You obtain the categoryId argument from the PR_INST_ID property of
-   the heading row for the category that is being collapsed.
-
-   If you pass rowCount as null, the number of rows will not be returned.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table is NULL
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa ExpandRow
- */
-_PUBLIC_ enum MAPISTATUS CollapseRow(mapi_object_t *obj_table, uint64_t categoryId,
-                                    uint32_t *rowCount)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct CollapseRow_req          request;
-       struct CollapseRow_repl         *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CollapseRow");
-       size = 0;
-
-       /* Fill the CollapseRow operation */
-       request.CategoryId = categoryId;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CollapseRow;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CollapseRow = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-       
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the RowCount */
-       reply = &mapi_response->mapi_repl->u.mapi_CollapseRow;
-       *rowCount = reply->CollapsedRowCount;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-
-}
-
-/**
-   \details Get the Collapse State of a Table
-
-   After a contents table has been sorted and categorized using
-   SortTable, rows can be expanded and collapsed (using ExpandRow() and
-   CollapseRow() repectively). You can save the state of the table using
-   this function, and restore it using SetCollapseState.
-
-   \param obj_table the table we are retrieving the state from
-   \param rowId the row number for the cursor
-   \param rowInstanceNumber the instance number for the cursor
-   \param CollapseState (result) the returned table Collapse State
-
-   You obtain the row number and row instance number arguments from
-   the PR_INST_ID and  PR_INST_NUM properties of the row you want to
-   use as the cursor.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table or CollapseState are null
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa SetCollapseState
- */
-_PUBLIC_ enum MAPISTATUS GetCollapseState(mapi_object_t *obj_table, uint64_t rowId,
-                                         uint32_t rowInstanceNumber,
-                                         struct SBinary_short *CollapseState)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetCollapseState_req     request;
-       struct GetCollapseState_repl    *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-       mem_ctx = talloc_named(NULL, 0, "GetCollapseState");
-       size = 0;
-
-       /* Fill the GetCollapseState operation */
-       size = 0;
-       request.RowId = rowId;
-       size += sizeof (uint64_t);
-       request.RowInstanceNumber = rowInstanceNumber;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetCollapseState;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetCollapseState = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-       
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the CollapseState */
-       reply = &mapi_response->mapi_repl->u.mapi_GetCollapseState;
-       CollapseState->cb = reply->CollapseState.cb;
-       CollapseState->lpb = talloc_array((TALLOC_CTX *)session, uint8_t, reply->CollapseState.cb);
-       memcpy(CollapseState->lpb, reply->CollapseState.lpb, reply->CollapseState.cb);
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the Collapse State of a Table
-
-   After a contents table has been sorted and categorized using
-   SortTable, rows can be expanded and collapsed (using ExpandRow() and
-   CollapseRow() repectively). You can save the state of the table using
-   GetCollapseState, and restore it using this function.
-
-   \param obj_table the table we are restoring the state for
-   \param CollapseState the Collapse State to restore
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_table or CollapseState are null
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa GetCollapseState
- */
-_PUBLIC_ enum MAPISTATUS SetCollapseState(mapi_object_t *obj_table,
-                                         struct SBinary_short *CollapseState)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetCollapseState_req     request;
-       struct SetCollapseState_repl    *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       mapi_object_table_t             *mapi_table;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!CollapseState, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_table);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetCollapseState");
-       size = 0;
-
-       /* Fill the SetCollapseState operation */
-       size = 0;
-       request.CollapseState.cb = CollapseState->cb;
-       size += sizeof (uint16_t);
-       request.CollapseState.lpb = CollapseState->lpb;
-       size += CollapseState->cb;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetCollapseState;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetCollapseState = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_table);
-       
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_SetCollapseState;
-
-       mapi_table = (mapi_object_table_t *)obj_table->private_data;
-       OPENCHANGE_RETVAL_IF(!mapi_table, MAPI_E_INVALID_PARAMETER, mem_ctx);
-
-       obj_table->private_data = mapi_table;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IMSProvider.c b/branches/plugfest/libmapi/IMSProvider.c
deleted file mode 100644 (file)
index db0b1b2..0000000
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/mapicode.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange.h"
-#include "gen_ndr/ndr_exchange_c.h"
-#include <core/error.h>
-#include <param.h>
-
-
-/**
-   \file IMSProvider.c
-
-   \brief Provider operations
-*/
-
-/*
- * Log MAPI to one instance of a message store provider
- */
-
-static NTSTATUS provider_rpc_connection(TALLOC_CTX *parent_ctx, 
-                                       struct dcerpc_pipe **p, 
-                                       const char *binding,
-                                       struct cli_credentials *credentials,
-                                       const struct ndr_interface_table *table,
-                                       struct loadparm_context *lp_ctx)
-{
-       NTSTATUS                status;
-       struct tevent_context   *ev;
-
-       if (!binding) {
-               DEBUG(3, ("You must specify a ncacn binding string\n"));
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       ev = tevent_context_init(talloc_autofree_context());
-
-       status = dcerpc_pipe_connect(parent_ctx, 
-                                    p, binding, table,
-                                    credentials, ev, lp_ctx); 
-
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("Failed to connect to remote server: %s %s\n", 
-                         binding, nt_errstr(status)));
-       }
-
-       /* dcerpc_pipe_connect set errno, we have to unset it */
-       errno = 0;
-       return status;
-}
-
-
-/**
-   \details Build the binding string and flags given profile and
-   global options.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param mem_ctx pointer to the memory allocation context
-   \param server string representing the server FQDN or IP address
-   \param profile pointer to the MAPI profile structure
-
-   \return valid allocated string on success, otherwise NULL
- */
-static char *build_binding_string(struct mapi_context *mapi_ctx,
-                                 TALLOC_CTX *mem_ctx, 
-                                 const char *server, 
-                                 struct mapi_profile *profile)
-{
-       char    *binding;
-
-       /* Sanity Checks */
-       if (!profile) return NULL;
-       if (!server) return NULL;
-       if (!mapi_ctx) return NULL;
-
-       binding = talloc_asprintf(mem_ctx, "ncacn_ip_tcp:%s[", server);
-
-       /* If dump-data option is enabled */
-       if (mapi_ctx->dumpdata == true) {
-               binding = talloc_strdup_append(binding, "print,");
-       }
-       /* If seal option is enabled in the profile */
-       if (profile->seal == true) {
-               binding = talloc_strdup_append(binding, "seal,");
-       }
-       /* If localaddress parameter is available in the profile */
-       if (profile->localaddr) {
-               binding = talloc_asprintf_append(binding, "localaddress=%s,", profile->localaddr);
-       }
-       
-       binding = talloc_strdup_append(binding, "]");
-
-       return binding;
-}
-
-/**
-   \details Returns the name of an NSPI server
-
-   \param mapi_ctx pointer to the MAPI context
-   \param session pointer to the MAPI session context
-   \param server the Exchange server address (IP or FQDN)
-   \param userDN optional user mailbox DN
-
-   \return a valid allocated string on success, otherwise NULL.
-
-   \note The string returned can either be RfrGetNewDSA one on
-   success, or a copy of the server's argument one on failure. If no
-   server string is provided, NULL is returned.
-
-   It is up to the developer to free the returned string when
-   not needed anymore.
- */
-_PUBLIC_ char *RfrGetNewDSA(struct mapi_context *mapi_ctx,
-                           struct mapi_session *session,
-                           const char *server, 
-                           const char *userDN)
-{
-       NTSTATUS                status;
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_profile     *profile;
-       struct RfrGetNewDSA     r;
-       struct dcerpc_pipe      *pipe;
-       char                    *binding;
-       char                    *ppszServer = NULL;
-
-       /* Sanity Checks */
-       if (!mapi_ctx) return NULL;
-       if (!mapi_ctx->session) return NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "RfrGetNewDSA");
-       profile = session->profile;
-
-       binding = build_binding_string(mapi_ctx, mem_ctx, server, profile);
-       status = provider_rpc_connection(mem_ctx, &pipe, binding, profile->credentials, &ndr_table_exchange_ds_rfr, mapi_ctx->lp_ctx);
-       talloc_free(binding);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-
-       r.in.ulFlags = 0x0;
-       r.in.pUserDN = userDN ? userDN : "";
-       r.in.ppszUnused = NULL;
-       r.in.ppszServer = (const char **) &ppszServer;
-
-       status = dcerpc_RfrGetNewDSA_r(pipe->binding_handle, mem_ctx, &r);
-       if ((!NT_STATUS_IS_OK(status) || !ppszServer) && server) {
-               ppszServer = talloc_strdup((TALLOC_CTX *)session, server);
-       } else {
-               ppszServer = talloc_steal((TALLOC_CTX *)session, ppszServer);
-       }
-
-       talloc_free(mem_ctx);
-
-       return ppszServer;
-}
-
-
-/**
-   \details Returns the FQDN of the NSPI server corresponding to a DN
-
-   \param mapi_ctx pointer to the MAPI context
-   \param session pointer to the MAPI session context
-   \param serverFQDN pointer to the server FQDN string (return value)
-
-   \return MAPI_E_SUCCESS on success, otherwise a MAPI error and
-   serverFQDN content set to NULL.
- */
-_PUBLIC_ enum MAPISTATUS RfrGetFQDNFromLegacyDN(struct mapi_context *mapi_ctx, struct mapi_session *session,
-                                               const char **serverFQDN)
-{
-       NTSTATUS                        status;
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_profile             *profile;
-       struct RfrGetFQDNFromLegacyDN   r;
-       struct dcerpc_pipe              *pipe;
-       char                            *binding;
-       const char                      *ppszServerFQDN;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = (TALLOC_CTX *)session;
-       profile = session->profile;
-       *serverFQDN = NULL;
-
-       binding = build_binding_string(mapi_ctx, mem_ctx, profile->server, profile);
-       status = provider_rpc_connection(mem_ctx, &pipe, binding, profile->credentials, &ndr_table_exchange_ds_rfr, mapi_ctx->lp_ctx);
-       talloc_free(binding);
-
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, NULL);
-
-       r.in.ulFlags = 0x0;
-       r.in.cbMailboxServerDN = strlen(profile->homemdb) + 1;
-       r.in.szMailboxServerDN = profile->homemdb;
-       r.out.ppszServerFQDN = &ppszServerFQDN;
-
-       status = dcerpc_RfrGetFQDNFromLegacyDN_r(pipe->binding_handle, mem_ctx, &r);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       
-       if (ppszServerFQDN) {
-               *serverFQDN = ppszServerFQDN;
-       } else {
-               *serverFQDN = NULL;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-enum MAPISTATUS Logon(struct mapi_session *session,
-                     struct mapi_provider *provider, 
-                     enum PROVIDER_ID provider_id)
-{
-       struct mapi_context     *mapi_ctx;
-       NTSTATUS                status;
-       TALLOC_CTX              *mem_ctx;
-       struct dcerpc_pipe      *pipe;
-       struct mapi_profile     *profile;
-       char                    *binding;
-       char                    *server;
-       int                     retval = 0;
-       enum MAPISTATUS         mapistatus;
-
-       /*Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = (TALLOC_CTX *)provider;
-       profile = session->profile;
-       mapi_ctx = session->mapi_ctx;
-
-       switch(provider_id) {
-       case PROVIDER_ID_EMSMDB:
-       emsmdb_retry:
-               binding = build_binding_string(mapi_ctx, mem_ctx, profile->server, profile);
-               status = provider_rpc_connection(mem_ctx, &pipe, binding, profile->credentials, &ndr_table_exchange_emsmdb, mapi_ctx->lp_ctx);
-               talloc_free(binding);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_REFUSED), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_HOST_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_PORT_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_LOGON_FAILED, NULL);
-               switch (profile->exchange_version) {
-               case 0x0:
-                       provider->ctx = emsmdb_connect(mem_ctx, session, pipe, profile->credentials, &retval);
-                       break;
-               case 0x1:
-               case 0x2:
-                       provider->ctx = emsmdb_connect_ex(mem_ctx, session, pipe, profile->credentials, &retval);
-                       break;
-               }
-               if (retval == ecNotEncrypted) {
-                       profile->seal = true;
-                       retval = 0;
-                       goto emsmdb_retry;
-               }
-               OPENCHANGE_RETVAL_IF(!provider->ctx, MAPI_E_LOGON_FAILED, NULL);
-
-               if (server_version_at_least((struct emsmdb_context *)provider->ctx, 8, 0, 835, 0)){
-                 struct emsmdb_context *prov_ctx = (struct emsmdb_context *)provider->ctx;
-                       status = dcerpc_secondary_context(pipe, &(prov_ctx->async_rpc_connection), &ndr_table_exchange_async_emsmdb);
-                       OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_REFUSED), MAPI_E_NETWORK_ERROR, NULL);
-                       OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_HOST_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-                       OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_PORT_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-                       OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT), MAPI_E_NETWORK_ERROR, NULL);
-                       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_LOGON_FAILED, NULL);
-                       mapistatus = emsmdb_async_connect(prov_ctx);
-                       OPENCHANGE_RETVAL_IF(mapistatus, mapistatus, NULL);
-               }
-
-               break;
-       case PROVIDER_ID_NSPI:
-               /* Call RfrGetNewDSA prior any NSPI call */
-               server = RfrGetNewDSA(mapi_ctx, session, profile->server, profile->mailbox);
-               binding = build_binding_string(mapi_ctx, mem_ctx, server, profile);
-               talloc_free(server);
-               status = provider_rpc_connection(mem_ctx, &pipe, binding, profile->credentials, &ndr_table_exchange_nsp, mapi_ctx->lp_ctx);
-               talloc_free(binding);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_REFUSED), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_HOST_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_PORT_UNREACHABLE), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT), MAPI_E_NETWORK_ERROR, NULL);
-               OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_LOGON_FAILED, NULL);
-               provider->ctx = (void *)nspi_bind(provider, pipe, profile->credentials, 
-                                                 profile->codepage, profile->language, profile->method);
-               OPENCHANGE_RETVAL_IF(!provider->ctx, MAPI_E_LOGON_FAILED, NULL);
-               break;
-       default:
-               OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
-               break;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Logoff an Exchange store
-
-   This function uninitializes the MAPI session associated to the
-   object.
-
-   \param obj_store pointer to the store object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS Logoff(mapi_object_t *obj_store)
-{
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session;
-       struct mapi_session     *el;
-       bool                    found = false;
-
-       /* Sanity checks */
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       for (el = mapi_ctx->session; el; el = el->next) {
-               if (session == el) {
-                       found = true;
-                       mapi_object_release(obj_store);
-                       DLIST_REMOVE(mapi_ctx->session, el);
-                       break;
-               }
-       }
-
-       return (found == true) ? MAPI_E_SUCCESS : MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Retrieve a free logon identifier within the session
-
-   \param session pointer to the MAPI session context
-   \param logon_id pointer to the logon identifier the function
-   returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI eorr
- */
-enum MAPISTATUS GetNewLogonId(struct mapi_session *session, uint8_t *logon_id)
-{
-       int     i = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!logon_id, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < 255; i++) {
-               if (!session->logon_ids[i]) {
-                       session->logon_ids[i] = 1;
-                       *logon_id = i;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Initialize the notification subsystem
-
-   This function initializes the notification subsystem, binds a local
-   UDP port to receive Exchange (server side) notifications and
-   configures the server to send notifications on this port.
-
-   \param session the session context to register for notifications on.
-   \param ulEventMask the mask of events to provide notifications for.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa RegisterAsyncNotification, Subscribe, Unsubscribe, MonitorNotification, GetLastError 
-*/
-_PUBLIC_ enum MAPISTATUS RegisterNotification(struct mapi_session *session,
-                                             uint16_t ulEventMask)
-{
-       NTSTATUS                status;
-       struct mapi_context     *mapi_ctx;
-       struct emsmdb_context   *emsmdb;
-       TALLOC_CTX              *mem_ctx;
-       struct NOTIFKEY         *lpKey;
-       static uint8_t          rand = 0;
-       static uint8_t          attempt = 0;
-       
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->emsmdb, MAPI_E_SESSION_LIMIT, NULL);
-
-       emsmdb = (struct emsmdb_context *)session->emsmdb->ctx;
-       OPENCHANGE_RETVAL_IF(!emsmdb, MAPI_E_SESSION_LIMIT, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = emsmdb->mem_ctx;
-
-       /* bind local udp port */
-       session->notify_ctx = emsmdb_bind_notification(mapi_ctx, mem_ctx);
-       if (!session->notify_ctx) return MAPI_E_CANCEL;
-
-       /* tell exchange where to send notifications */
-       lpKey = talloc_zero(mem_ctx, struct NOTIFKEY);
-       lpKey->cb = 8;
-       lpKey->ab = talloc_array((TALLOC_CTX *)lpKey, uint8_t, lpKey->cb);
-       memcpy(lpKey->ab, "libmapi", 7);
-retry:
-       lpKey->ab[7] = rand;
-
-       status = emsmdb_register_notification(session, lpKey, ulEventMask);
-       if (!NT_STATUS_IS_OK(status)) {
-               if (attempt < 5) {
-                       rand++;
-                       attempt++;
-                       errno = 0;
-                       goto retry;
-               } else {
-                       talloc_free(lpKey);
-                       return MAPI_E_CALL_FAILED;
-               }
-       }
-
-       attempt = 0;
-       talloc_free(lpKey);
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Create an asynchronous notification
-
-   This function initializes the notification subsystem and configures the
-   server to send notifications. Note that this call will block.
-
-   \param session the session context to register for notifications on.
-   \param resultFlag the result of the operation (true if there was anything returned)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa RegisterNotification
-*/
-_PUBLIC_ enum MAPISTATUS RegisterAsyncNotification(struct mapi_session *session, uint32_t *resultFlag)
-{
-       enum MAPISTATUS         mapistatus;
-       struct emsmdb_context   *emsmdb;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session->emsmdb, MAPI_E_SESSION_LIMIT, NULL);
-
-       emsmdb = (struct emsmdb_context *)session->emsmdb->ctx;
-       
-       session->notify_ctx = talloc_zero(emsmdb->mem_ctx, struct mapi_notify_ctx);
-
-       session->notify_ctx->notifications = talloc_zero((TALLOC_CTX *)session->notify_ctx, struct notifications);
-       session->notify_ctx->notifications->prev = NULL;
-       session->notify_ctx->notifications->next = NULL;
-
-       mapistatus = emsmdb_async_waitex(emsmdb, 0, resultFlag);
-       OPENCHANGE_RETVAL_IF(mapistatus, mapistatus, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
diff --git a/branches/plugfest/libmapi/IMessage.c b/branches/plugfest/libmapi/IMessage.c
deleted file mode 100644 (file)
index 64a1931..0000000
+++ /dev/null
@@ -1,1725 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange.h"
-#include <param.h>
-
-
-/**
-   \file IMessage.c
-
-   \brief Operations on messages
- */
-
-
-/**
-   \details Create a new attachment
-
-   This function creates a new attachment to an existing message.
-
-   \param obj_message the message to attach to
-   \param obj_attach the attachment
-
-   Both objects need to exist before you call this message. obj_message
-   should be a valid message on the server. obj_attach needs to be 
-   initialised.
-
-   \code
-   enum MAPISTATUS         retval;
-   mapi_object_t           obj_message;
-   mapi_object_t           obj_attach;
-
-   ... open or create the obj_message ...
-
-   mapi_object_init(&obj_attach);
-   retval = CreateAttach(&obj_message, &obj_attach);
-   ... check the return value ...
-
-   ... use SetProps() to set the attachment up ...
-   ... perhaps OpenStream() / WriteStream() / CommitStream() on obj_attach ...
-
-   // Save the changes to the attachment and then the message
-   retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-   ... check the return value ...
-   retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-   ... check the return value ...
-   \endcode
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa CreateMessage, GetAttachmentTable, OpenAttach, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS CreateAttach(mapi_object_t *obj_message, 
-                                     mapi_object_t *obj_attach)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CreateAttach_req request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CreateAttach");
-       size = 0;
-
-       /* Fill the CreateAttach operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CreateAttach;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CreateAttach = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + (sizeof (uint32_t) * 2);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_attach, session);
-       mapi_object_set_handle(obj_attach, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_attach, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Delete an attachment from a message
-
-   This function deletes one attachment from a message. The attachment
-   to be deleted is specified by its PR_ATTACH_NUM
-
-   \param obj_message the message to operate on
-   \param AttachmentID the attachment number
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-      \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa CreateMessage, GetAttachmentTable, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS DeleteAttach(mapi_object_t *obj_message, uint32_t AttachmentID)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct DeleteAttach_req request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "DeleteAttach");
-       size = 0;
-
-       /* Fill the DeleteAttach operation */
-       request.AttachmentID = AttachmentID;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_DeleteAttach;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_DeleteAttach = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the attachment table for a message
-
-   \param obj_message the message
-   \param obj_table the attachment table for the message
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa CreateMessage, OpenMessage, CreateAttach, OpenAttach, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetAttachmentTable(mapi_object_t *obj_message, 
-                                           mapi_object_t *obj_table)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetAttachmentTable_req   request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size = 0;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetAttachmentTable");
-       size = 0;
-
-       /* Fill the GetAttachmentTable operation */
-       request.handle_idx = 1;
-       size += sizeof (uint8_t);
-
-       request.TableFlags = 0x0;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetAttachmentTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetAttachmentTable = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_table, session);
-       mapi_object_set_handle(obj_table, mapi_response->handles[mapi_response->mapi_repl->handle_idx]);
-       mapi_object_set_logon_id(obj_table, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the valid attachment IDs for a message
-
-   This function returns the list of valid attachment IDs for a message.
-   You can then use these IDs with the OpenAttach and DeleteAttach functions.
-
-   \param obj_message the message to operate on
-   \param NumAttachments the number of attachments for the message
-   \param AttachmentIds array of attachment Ids
-
-   The AttachmentIds array has NumAttachments elements.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: a parameter is incorrect (e.g. null pointer)
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenAttach, DeleteAttach
- */
-_PUBLIC_ enum MAPISTATUS GetValidAttach(mapi_object_t *obj_message, uint16_t *NumAttachments, uint32_t **AttachmentIds)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetValidAttachments_repl *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!NumAttachments, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!AttachmentIds, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-       mem_ctx = talloc_named(NULL, 0, "GetValidAttach");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetValidAttachments;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the result */
-       reply = &(mapi_response->mapi_repl->u.mapi_GetValidAttachments);
-       *NumAttachments = reply->AttachmentIdCount;
-       *AttachmentIds = talloc_steal((TALLOC_CTX *)session, reply->AttachmentIdArray); 
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Open an attachment to a message
-
-   This function opens one attachment from a message. The attachment
-   to be opened is specified by its PR_ATTACH_NUM.
-
-   \param obj_message the message to operate on
-   \param AttachmentID the attachment number
-   \param obj_attach the resulting attachment object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa CreateMessage, CreateAttach, GetAttachmentTable, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS OpenAttach(mapi_object_t *obj_message, uint32_t AttachmentID,
-                                   mapi_object_t *obj_attach)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct OpenAttach_req   request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenAttach");
-       size = 0;
-
-       /* Fill the OpenAttach operation */
-       request.handle_idx = 0x1;
-       size += sizeof(uint8_t);
-       request.OpenAttachmentFlags = OpenAttachmentFlags_ReadOnly;
-       size += sizeof(uint8_t);
-       request.AttachmentID = AttachmentID;
-       size += sizeof(uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenAttach;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenAttach = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_attach, session);
-       mapi_object_set_handle(obj_attach, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_attach, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the type of a recipient
-
-   The function sets the recipient type (RecipClass) in the aRow
-   parameter.  ResolveNames should be used to fill the SRow structure.
-
-   \param aRow the row to set
-   \param RecipClass the type of recipient to set on the specified row
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: The aRow parameter was not set
-     properly.
-
-   \sa ResolveNames, ModifyRecipients, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS SetRecipientType(struct SRow *aRow, enum ulRecipClass RecipClass)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       lpProp;
-
-       lpProp.ulPropTag = PR_RECIPIENT_TYPE;
-       lpProp.value.l = RecipClass;
-
-       retval = SRow_addprop(aRow, lpProp);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/*
- * retrieve the organization length for Exchange recipients
- */
-uint8_t mapi_recipients_get_org_length(struct mapi_profile *profile)
-{
-       if (profile->mailbox && profile->username)
-               return (strlen(profile->mailbox) - strlen(profile->username));
-       return 0;
-}
-
-
-/**
-   \details RecipientFlags bitmask calculation for RecipientRows
-   structure.
-
-   \param aRow pointer to the SRow structures with the properties to
-   pass to ModifyRecipients.
-
-   According to MS-OXCDATA 2.9.3.1 RecipientFlags structure, the bitmask
-   can be represented as the following:
-
-   0      3   4   5   6   7   8   9  10  11         15   16
-   +------+---+---+---+---+---+---+---+---+----------+---+
-   | Type | E | D | T | S | R | N | U | I | Reserved | O |
-   +------+---+---+---+---+---+---+---+---+----------+---+
-   
-   Type: (0x7 mask) 3-bit enumeration describing the Address Type (PR_ADDRTYPE)
-   E: (0x8)    Email address included (PR_SMTP_ADDRESS)
-   D: (0x10)   Display Name included (PR_DISPLAY_NAME)
-   T: (0x20)   Transmittable Display Name included (PR_TRANSMITTABLE_DISPLAY_NAME)
-   S: (0x40)   If Transmittable Display Name is the same than Display Name (D == T)
-   R: (0x80)   Different transport is responsible for delivery
-   N: (0x100)  Recipient does not support receiving Rich Text messages
-   U: (0x200)  If we are using Unicode properties
-   I: (0x400)  If Simple Display Name is included (PR_7BIT_DISPLAY_NAME)
-   Reserved:   Must be zero
-   O: (0x8000) Non-standard address type is used
-
-   The PidTag property to bitmask mapping was unclear for some
-   fields. mapiproxy between Outlook 2003 and Exchange 2010 has been
-   used for this purpose.
-
-   For further information about PidTagAddressType, refer to
-   [MS-OXCMAIL] section 2.1.1.9
-
-   \return uint16_t holding the RecipientFlags value. 0 is returned
-   when an inconsistency or a failure occurs
-
- */
-uint16_t mapi_recipients_RecipientFlags(struct SRow *aRow)
-{
-       uint16_t                bitmask;
-       struct SPropValue       *lpProp = NULL;
-       bool                    unicode = false;
-       const char              *addrtype = NULL;
-       const char              *tmp = NULL;
-       const char              *display_name = NULL;
-       const char              *transmit_display_name = NULL;
-
-       /* Sanity Checks */
-       if (!aRow) return 0;
-
-       bitmask = 0;
-
-       /* (Type) - 0x0 to 0x7: PR_ADDRTYPE */
-       lpProp = get_SPropValue_SRow(aRow, PR_ADDRTYPE);
-       if (lpProp && lpProp->value.lpszA) {
-               addrtype = lpProp->value.lpszA;
-       } else {
-               lpProp = get_SPropValue_SRow(aRow, PR_ADDRTYPE_UNICODE);
-               if (lpProp && lpProp->value.lpszW) {
-                       unicode = true;
-                       addrtype = lpProp->value.lpszW;
-               } 
-       }
-
-       if (!addrtype) {
-               return 0;
-       }
-       /* WARNING: This check is yet incomplete */
-       if (!strcmp("EX", addrtype)) { 
-               bitmask |= 0x1;
-       } else if (!strcmp("SMTP", addrtype)) {
-               bitmask |= 0x3;
-       }
-
-       /* (E) - 0x8: PR_SMTP_ADDRESS (If we have Exchange type, we don't need it) */
-       if (strcmp(addrtype, "EX")) {
-               lpProp = get_SPropValue_SRow(aRow, (unicode == true) ? PR_SMTP_ADDRESS_UNICODE: PR_SMTP_ADDRESS);
-               if (lpProp) {
-                       tmp = (unicode == true) ? lpProp->value.lpszW : lpProp->value.lpszA;
-                       if (tmp) {
-                               bitmask |= 0x8;
-                       }
-               }
-       }
-
-       /* (D) - 0x10: PR_DISPLAY_NAME */
-       lpProp = get_SPropValue_SRow(aRow, (unicode == true) ? PR_DISPLAY_NAME_UNICODE : PR_DISPLAY_NAME);
-       if (lpProp) {
-               display_name = (unicode == true) ? lpProp->value.lpszW : lpProp->value.lpszA;
-               if (display_name) {
-                       bitmask |= 0x10;
-               }
-       }
-
-       /* (T) - 0x20: PR_TRANSMITTABLE_DISPLAY_NAME */
-       lpProp = get_SPropValue_SRow(aRow, (unicode == true) ? PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE : PR_TRANSMITTABLE_DISPLAY_NAME);
-       if (lpProp) {
-               transmit_display_name = (unicode == true) ? lpProp->value.lpszW : lpProp->value.lpszA;
-               if (transmit_display_name) {
-                       if (!display_name) {
-                               bitmask |= 0x20;
-                       } else if (display_name && strcmp(display_name, transmit_display_name)) {
-                               bitmask |= 0x20;
-                       }
-               }
-       }
-
-       /* (S) - 0x40: Does D equals T? If so, we shouldn't include PR_TRANSMITTABLE_DISPLAY_NAME within RecipientRows */
-       if (display_name && transmit_display_name) {
-               if (!strcmp(display_name, transmit_display_name)) {
-                       bitmask |= 0x40;
-               }
-       }
-
-       /* (R) - 0x80: Different transport is responsible for delivery */
-       if (addrtype && strcmp(addrtype, "EX")) {
-               bitmask |= 0x80;
-       }
-
-       /* (N) - 0x100: Recipient doesn't support rich-text messages */
-       lpProp = get_SPropValue_SRow(aRow, PR_SEND_RICH_INFO);
-       if (lpProp && (lpProp->value.b == false)) {
-               bitmask |= 0x100;
-       }
-
-       /* (U) - 0x200: Unicode properties */
-       if (unicode == true) {
-               bitmask |= 0x200;
-       }
-
-       /* (I) - 0x400: PR_7BIT_DISPLAY_NAME */
-       lpProp = get_SPropValue_SRow(aRow, (unicode == true) ? PR_7BIT_DISPLAY_NAME_UNICODE : PR_7BIT_DISPLAY_NAME);
-       if (lpProp) {
-               tmp = (unicode == true) ? lpProp->value.lpszW : lpProp->value.lpszA;
-               if (tmp) {
-                       bitmask |= 0x400;
-               }
-       }
-
-       return bitmask;
-}
-
-
-/**
-   \details Adds, deletes or modifies message recipients
-
-   \param obj_message the message to change the recipients for
-   \param SRowSet the recipients to add
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   When using this function, take care to ensure that the properties
-   that are present on the first row in the rowset are also present
-   in all the following rows. If any are missing, this function will
-   suffer NDR errors. This includes making sure that any string
-   properties are present in the same encoding (e.g. if you use
-   PR_SMTP_ADDRESS_UNICODE on the first row, don't provide
-   PR_SMTP_ADDRESS on subsequent rows).
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \bug ModifyRecipients can only add recipients.
-
-   \sa CreateMessage, ResolveNames, SetRecipientType, GetLastError
-
-*/
-_PUBLIC_ enum MAPISTATUS ModifyRecipients(mapi_object_t *obj_message, 
-                                         struct SRowSet *SRowSet)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct ModifyRecipients_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       unsigned long                   i_prop, j;
-       unsigned long                   i_recip;
-       uint32_t                        count;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SRowSet, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!SRowSet->aRow, MAPI_E_NOT_INITIALIZED, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ModifyRecipients");
-       size = 0;
-
-       /* Fill the ModifyRecipients operation */
-       request.prop_count = SRowSet->aRow[0].cValues;
-       size += sizeof(uint16_t);
-
-       /* 
-        * append here property tags that can be fetched with
-        * ResolveNames but shouldn't be included in ModifyRecipients rows
-        */
-       request.properties = get_MAPITAGS_SRow(mem_ctx, &SRowSet->aRow[0], &count);
-       request.prop_count = MAPITAGS_delete_entries(request.properties, count, 19,
-                                                    PR_ENTRYID,
-                                                    PR_DISPLAY_NAME,
-                                                    PR_DISPLAY_NAME_UNICODE,
-                                                    PR_DISPLAY_NAME_ERROR,
-                                                    PR_GIVEN_NAME,
-                                                    PR_GIVEN_NAME_UNICODE,
-                                                    PR_GIVEN_NAME_ERROR,
-                                                    PR_EMAIL_ADDRESS,
-                                                    PR_EMAIL_ADDRESS_UNICODE,
-                                                    PR_TRANSMITTABLE_DISPLAY_NAME,
-                                                    PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                                    PR_RECIPIENT_TYPE,
-                                                    PR_ADDRTYPE,
-                                                    PR_ADDRTYPE_UNICODE,
-                                                    PR_ADDRTYPE_ERROR,
-                                                    PR_SEND_INTERNET_ENCODING,
-                                                    PR_SEND_INTERNET_ENCODING_ERROR,
-                                                    PR_SEND_RICH_INFO,
-                                                    PR_SEND_RICH_INFO_ERROR);
-       size += request.prop_count * sizeof(uint32_t);
-       request.cValues = SRowSet->cRows;
-       size += sizeof(uint16_t);
-       request.RecipientRow = talloc_array(mem_ctx, struct ModifyRecipientRow, request.cValues);
-
-       for (i_recip = 0; i_recip < request.cValues; i_recip++) {
-               struct SRow                     *aRow;
-               struct RecipientRow             *RecipientRow;
-               struct ndr_push                 *ndr;
-               struct mapi_SPropValue          mapi_sprop;
-               const uint32_t                  *RecipClass = 0;
-
-               ndr = talloc_zero(mem_ctx, struct ndr_push);
-
-               aRow = &(SRowSet->aRow[i_recip]);
-               RecipientRow = &(request.RecipientRow[i_recip].RecipientRow);
-               
-               request.RecipientRow[i_recip].idx = i_recip;
-               size += sizeof(uint32_t);
-
-               RecipClass = (const uint32_t *) find_SPropValue_data(aRow, PR_RECIPIENT_TYPE);
-               OPENCHANGE_RETVAL_IF(!RecipClass, MAPI_E_INVALID_PARAMETER, mem_ctx);
-               request.RecipientRow[i_recip].RecipClass = (enum ulRecipClass) *RecipClass;
-               size += sizeof(uint8_t);
-               
-               RecipientRow->RecipientFlags = mapi_recipients_RecipientFlags(aRow);
-               
-               /* (Type) - 0x0 to 0x7: Recipient type (Exchange, SMTP or other?) */
-               switch (RecipientRow->RecipientFlags & 0x7) {
-               case 0x1: 
-                 //                    RecipientRow->type.EXCHANGE.organization_length = mapi_recipients_get_org_length(session->profile);
-                       RecipientRow->AddressPrefixUsed.prefix_size = 0;
-                       RecipientRow->DisplayType.display_type = SINGLE_RECIPIENT;
-                       switch (RecipientRow->RecipientFlags & 0x200) {
-                       case 0x0:
-                               RecipientRow->X500DN.recipient_x500name = (const char *) find_SPropValue_data(aRow, PR_EMAIL_ADDRESS);
-                               break;
-                       case 0x200:
-                               RecipientRow->X500DN.recipient_x500name = (const char *) find_SPropValue_data(aRow, PR_EMAIL_ADDRESS_UNICODE);
-                               break;
-                       }
-                       size += sizeof(uint32_t) + strlen(RecipientRow->X500DN.recipient_x500name) + 1;
-                       break;
-               case 0x3:
-                       size += sizeof(uint16_t);
-                       break;
-               }
-
-               /* (E) - 0x8: PR_SMTP_ADDRESS */
-               switch (RecipientRow->RecipientFlags & 0x208) {
-               case (0x8):
-                       RecipientRow->EmailAddress.lpszA = (const char *) find_SPropValue_data(aRow, PR_SMTP_ADDRESS);
-                       size += strlen(RecipientRow->EmailAddress.lpszA) + 1;
-                       break;
-               case (0x208):
-                       RecipientRow->EmailAddress.lpszW = (const char *) find_SPropValue_data(aRow, PR_SMTP_ADDRESS_UNICODE);
-                       size += get_utf8_utf16_conv_length(RecipientRow->EmailAddress.lpszW);
-                       break;
-               default:
-                       break;
-               }
-
-               /* (D) - 0x10: PR_DISPLAY_NAME */
-               switch (RecipientRow->RecipientFlags & 0x210) {
-               case (0x10):
-                       RecipientRow->DisplayName.lpszA = (const char *) find_SPropValue_data(aRow, PR_DISPLAY_NAME);
-                       size += strlen(RecipientRow->DisplayName.lpszA) + 1;
-                       break;
-               case (0x210):
-                       RecipientRow->DisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_DISPLAY_NAME_UNICODE);
-                       size += get_utf8_utf16_conv_length(RecipientRow->DisplayName.lpszW);
-                       break;
-               default:
-                       break;
-               }
-
-               /* (T) - 0x20: PR_TRANSMITTABLE_DISPLAY_NAME */
-               switch (RecipientRow->RecipientFlags & 0x260) {
-               case (0x20):
-                       RecipientRow->TransmittableDisplayName.lpszA = (const char *) find_SPropValue_data(aRow, PR_TRANSMITTABLE_DISPLAY_NAME);
-                       size += strlen(RecipientRow->TransmittableDisplayName.lpszA) + 1;
-                       break;
-               case (0x220):
-                       RecipientRow->TransmittableDisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE);
-                       size += get_utf8_utf16_conv_length(RecipientRow->TransmittableDisplayName.lpszW);
-                       break;
-               default:
-                       break;
-               }
-               
-               
-               /* (I) - 0x400: PR_7BIT_DISPLAY_NAME */
-               switch(RecipientRow->RecipientFlags & 0x600) {
-               case (0x400):
-                       RecipientRow->SimpleDisplayName.lpszA = (const char *) find_SPropValue_data(aRow, PR_7BIT_DISPLAY_NAME);
-                       size += strlen(RecipientRow->SimpleDisplayName.lpszA) + 1;
-                       break;
-               case (0x600):
-                       RecipientRow->SimpleDisplayName.lpszW = (const char *) find_SPropValue_data(aRow, PR_7BIT_DISPLAY_NAME_UNICODE);
-                       size += get_utf8_utf16_conv_length(RecipientRow->SimpleDisplayName.lpszW);
-                       break;
-               default:
-                       break;
-               }
-
-               RecipientRow->prop_count = request.prop_count;
-               size += sizeof(uint16_t);
-               RecipientRow->layout = 0;
-               size += sizeof(uint8_t);
-               
-               /* for each property, we set the switch values and ndr_flags then call mapi_SPropValue_CTR */
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               for (i_prop = 0; i_prop < request.prop_count; i_prop++) {
-                       for (j = 0; j < aRow->cValues; j++) {
-                               if (aRow->lpProps[j].ulPropTag == request.properties[i_prop]) {
-                                       enum ndr_err_code ndr_retval;
-                                       ndr_retval = ndr_push_set_switch_value(ndr, &mapi_sprop.value, 
-                                                                              (aRow->lpProps[j].ulPropTag & 0xFFFF));
-                                       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_retval))
-                                               return MAPI_E_CALL_FAILED;
-
-                                       cast_mapi_SPropValue(mem_ctx, &mapi_sprop, &aRow->lpProps[j]);
-                                       ndr_push_mapi_SPropValue_CTR(ndr, NDR_SCALARS, &mapi_sprop.value);
-                               }
-                       }
-               }
-               
-               RecipientRow->prop_values.length = ndr->offset;
-               RecipientRow->prop_values.data = ndr->data;
-               /* add the blob size field */
-               size += sizeof(uint16_t);
-               size += RecipientRow->prop_values.length;
-       }
-       
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ModifyRecipients;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_ModifyRecipients = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof(uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Read Recipients from a message
-
-   \param obj_message the message we want to read recipients from
-   \param RowId the row index we start reading recipients from
-   \param RowCount pointer on the number of recipients
-   \param RecipientRows pointer on the recipients array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-  \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa ModifyRecipients, RemoveAllRecipients, GetRecipientTable,
-   OpenMessage
- */
-_PUBLIC_ enum MAPISTATUS ReadRecipients(mapi_object_t *obj_message, 
-                                       uint32_t RowId, uint8_t *RowCount,
-                                       struct ReadRecipientRow **RecipientRows)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct ReadRecipients_req       request;
-       struct ReadRecipients_repl      *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ReadRecipients");
-       size = 0;
-
-       /* Fill the ReadRecipients operation */
-       request.RowId = RowId;
-       size += sizeof (uint32_t);
-
-       request.ulReserved = 0;
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ReadRecipients;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_ReadRecipients = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-       
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the recipients */
-       reply = &mapi_response->mapi_repl->u.mapi_ReadRecipients;
-       *RowCount = reply->RowCount;
-       *RecipientRows = talloc_steal((TALLOC_CTX *)session, reply->RecipientRows);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Deletes all recipients from a message
-
-   \param obj_message the message we want to remove all recipients from
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa ModifyRecipients, ReadRecipients
-*/
-_PUBLIC_ enum MAPISTATUS RemoveAllRecipients(mapi_object_t *obj_message)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct RemoveAllRecipients_req  request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "RemoveAllRecipients");
-       size = 0;
-
-       /* Fill the RemoveAllRecipients operation */
-       request.ulReserved = 0;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_RemoveAllRecipients;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_RemoveAllRecipients = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Saves all changes to the message and marks it as ready for
-   sending.
-
-   This function saves all changes made to a message and marks it
-   ready to be sent.
-
-   \param obj_message the message to mark complete
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa CreateMessage, SetProps, ModifyRecipients, SetRecipientType,
-   GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS SubmitMessage(mapi_object_t *obj_message)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SubmitMessage_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SubmitMessage");
-       size = 0;
-
-       /* Fill the SubmitMessage operation */
-       request.SubmitFlags = None;
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SubmitMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SubmitMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Aborts a previous message submission.
-
-   \param obj_store the store object
-   \param obj_folder the folder object where the message has been
-   submitted
-   \param obj_message the submitted message object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-   - MAPI_E_UNABLE_TO_ABORT: The operation can not be aborted
-   - MAPI_E_NOT_IN_QUEUE: The message is no longer in the message store's
-     spooler queue
-   - MAPI_E_NO_SUPPORT: the server object associated with the input
-     handle index in the server object table is not of type Logon or
-     the current logon session is a public logon.
-
-    \sa SubmitMessage
- */
-_PUBLIC_ enum MAPISTATUS AbortSubmit(mapi_object_t *obj_store,
-                                    mapi_object_t *obj_folder, 
-                                    mapi_object_t *obj_message)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct AbortSubmit_req  request;
-       struct mapi_session     *session[2];
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_store);
-       session[1] = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "AbortSubmit");
-       size = 0;
-
-       /* Fill the AbortSubmit operation */
-       request.FolderId = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-
-       request.MessageId = mapi_object_get_id(obj_message);
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_AbortSubmit;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_AbortSubmit = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Saves all changes to the message
-
-   \param parent the parent object for the message
-   \param obj_message the message to save
-   \param SaveFlags specify how the save operation behaves
-
-   Possible value for SaveFlags:
-   -# KeepReadOnly Keep the Message object open with read-only access
-   -# KeepOpenReadWrite Keep the Message object open with read-write
-      access
-   -# ForceSave Commit the changes and keep the message object open
-      with read-write access
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa SetProps, ModifyRecipients, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS SaveChangesMessage(mapi_object_t *parent,
-                                           mapi_object_t *obj_message,
-                                           uint8_t SaveFlags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SaveChangesMessage_req   request;
-       struct mapi_session             *session[2];
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!parent, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF((SaveFlags != 0x9) && (SaveFlags != 0xA) && 
-                            (SaveFlags != 0xC), MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(parent);
-       session[1] = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(parent, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SaveChangesMessage");
-       size = 0;
-
-       /* Fill the SaveChangesMessage operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.SaveFlags = SaveFlags;
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SaveChangesMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SaveChangesMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + (2 * sizeof (uint32_t));
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(parent);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       /* store the message_id */
-       mapi_object_set_id(obj_message, mapi_response->mapi_repl->u.mapi_SaveChangesMessage.MessageId);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Sends the specified Message object out for message
-   delivery.
-
-*/
-_PUBLIC_ enum MAPISTATUS TransportSend(mapi_object_t *obj_message, 
-                                      struct mapi_SPropValue_array *lpProps)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct TransportSend_repl       *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpProps, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "TransportSend");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_TransportSend;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve reply parameters */
-       reply = &mapi_response->mapi_repl->u.mapi_TransportSend;
-       if (!reply->NoPropertiesReturned) {
-               lpProps->cValues = reply->properties.lpProps.cValues;
-               lpProps->lpProps = talloc_steal((TALLOC_CTX *)session, reply->properties.lpProps.lpProps);
-       } else {
-               lpProps = NULL;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns the message recipient table
-
-   \param obj_message the message to receive recipients from
-   \param SRowSet pointer to the recipient table
-   \param SPropTagArray pointer to the array of properties listed in
-   the recipient table
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-
-     \sa OpenMessage
- */
-_PUBLIC_ enum MAPISTATUS GetRecipientTable(mapi_object_t *obj_message, 
-                                          struct SRowSet *SRowSet,
-                                          struct SPropTagArray *SPropTagArray)
-{
-       mapi_object_message_t   *message;
-
-       message = (mapi_object_message_t *)obj_message->private_data;
-
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!message, MAPI_E_NOT_INITIALIZED, NULL);
-
-       *SRowSet = message->SRowSet;
-       *SPropTagArray = message->SPropTagArray;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Clear or set the MSGFLAG_READ flag for a given message
-
-   This function clears or sets the MSGFLAG_READ flag in the
-   PR_MESSAGE_FLAGS property of a given message.
-
-   \param obj_folder the folder to operate in
-   \param obj_child the message to set flags on
-   \param flags the new flags (MSGFLAG_READ) value
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenMessage, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS SetMessageReadFlag(mapi_object_t *obj_folder, 
-                                           mapi_object_t *obj_child,
-                                           uint8_t flags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetMessageReadFlag_req   request;
-       struct mapi_session             *session[2];
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_child, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_folder);
-       session[1] = mapi_object_get_session(obj_child);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetMessageReadFlags");
-       size = 0;
-
-       /* Fill the SetMessageReadFlags operation */
-       request.handle_idx = 0x1;
-       size += sizeof(uint8_t);
-       request.flags = flags;
-       size += sizeof(uint8_t);
-
-       request.clientdata.length = 0;
-       request.clientdata.data = NULL;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetMessageReadFlag;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetMessageReadFlag = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_child);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Opens an embedded message object and retrieves a MAPI object that
-   can be used to get or set properties on the embedded message.
-
-   This function essentially takes an attachment and gives you back
-   a message.
-
-   \param obj_attach the attachment object
-   \param obj_embeddedmsg the embedded message
-   \param ulFlags access rights on the embedded message
-
-   Possible ulFlags values:
-   - 0x0: read only access
-   - 0x1: Read / Write access
-   - 0x2: Create 
-
-   \code
-       ... assume we have a message - obj_message ...
-       // Initialise the attachment object
-       mapi_object_init(&obj_attach);
-
-       // Create an attachment to the message
-       retval = CreateAttach(&obj_message, &obj_attach);
-       ... check the return value ...
-
-       // use SetProps() to set the attachment up, noting the special PR_ATTACHM_METHOD property
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_EMBEDDED_MSG;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       retval = SetProps(&obj_attach, attach, 2);
-       ... check the return value ...
-
-        // Initialise the embedded message object
-       mapi_object_init(&obj_embeddedmsg);
-       retval = OpenEmbeddedMessage(&obj_attach, &obj_embeddedmsg, MAPI_CREATE);
-       ... check the return value ...
-
-       // Fill in the embedded message properties, just like any other message (e.g. resulting from CreateMessage())
-
-       // Save the changes to the embedded message
-       retval = SaveChangesMessage(&obj_message, &obj_embeddedmsg, KeepOpenReadOnly);
-       ... check the return value ...
-
-       // Save the changes to the attachment
-       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-       ... check the return value ...
-
-       // Save the changes to the original message
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       ... check the return value ...
-   \endcode
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. Possible
-   MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. 
-
-   \sa CreateAttach, OpenMessage, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS OpenEmbeddedMessage(mapi_object_t *obj_attach,
-                                            mapi_object_t *obj_embeddedmsg,
-                                            enum OpenEmbeddedMessage_OpenModeFlags ulFlags)
-{
-       struct mapi_context             *mapi_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct OpenEmbeddedMessage_req  request;
-       struct OpenEmbeddedMessage_repl *reply;
-       struct mapi_session             *session;
-       mapi_object_message_t           *message;
-       struct SPropValue               lpProp;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        i = 0;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_attach, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_attach);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_embeddedmsg, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_attach, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenEmbeddedMessage");
-
-       /* Fill the OpenEmbeddedMessage request */
-       request.handle_idx = 0x1;
-       size += sizeof(uint8_t);
-       request.CodePageId = 0xfff;
-       size += sizeof(uint16_t);
-       request.OpenModeFlags = ulFlags;
-       size += sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenEmbeddedMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenEmbeddedMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_attach);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_embeddedmsg);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_embeddedmsg, session);
-       mapi_object_set_handle(obj_embeddedmsg, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_embeddedmsg, logon_id);
-
-       /* Store OpenEmbeddedMessage reply data */
-       reply = &mapi_response->mapi_repl->u.mapi_OpenEmbeddedMessage;
-
-       message = talloc_zero((TALLOC_CTX *)session, mapi_object_message_t);
-       message->cValues = reply->RecipientCount;
-       message->SRowSet.cRows = reply->RowCount;
-       message->SRowSet.aRow = talloc_array((TALLOC_CTX *)message, struct SRow, reply->RowCount + 1);
-
-       message->SPropTagArray.cValues = reply->RecipientCount;
-       message->SPropTagArray.aulPropTag = talloc_steal(message, reply->RecipientColumns);
-
-       for (i = 0; i < reply->RowCount; i++) {
-               emsmdb_get_SRow((TALLOC_CTX *)message, mapi_ctx->lp_ctx,
-                               &(message->SRowSet.aRow[i]), &message->SPropTagArray,
-                               reply->RecipientRows[i].RecipientRow.prop_count,
-                               &reply->RecipientRows[i].RecipientRow.prop_values,
-                               reply->RecipientRows[i].RecipientRow.layout, 1);
-
-               lpProp.ulPropTag = PR_RECIPIENT_TYPE;
-               lpProp.value.l = reply->RecipientRows[i].RecipientType;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-
-               lpProp.ulPropTag = PR_INTERNET_CPID;
-               lpProp.value.l = reply->RecipientRows[i].CodePageId;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-       }
-
-       /* add SPropTagArray elements we automatically append to SRow */
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_RECIPIENT_TYPE);
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_INTERNET_CPID);
-       
-       obj_embeddedmsg->private_data = (void *) message;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
diff --git a/branches/plugfest/libmapi/IMsgStore.c b/branches/plugfest/libmapi/IMsgStore.c
deleted file mode 100644 (file)
index b0a5ceb..0000000
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IMsgStore.c
-
-   \brief Folders related operations
- */
-
-
-/**
-   \details Open a folder from the store
-   \param obj_store the store to open a folder in (i.e. the parent)
-   \param id_folder the folder identifier
-   \param obj_folder the resulting open folder
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize, OpenMsgStore, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS OpenFolder(mapi_object_t *obj_store, 
-                                   mapi_id_t id_folder,
-                                   mapi_object_t *obj_folder)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct OpenFolder_req   request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenFolder");
-
-       /* Fill the OpenFolder operation */
-       request.handle_idx = 0x1;
-       request.folder_id = id_folder;
-       request.OpenModeFlags = OpenModeFlags_Folder;
-       size += sizeof (uint8_t) + sizeof(uint64_t) + sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);  
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session, id and handle */
-       mapi_object_set_session(obj_folder, session);
-       mapi_object_set_id(obj_folder, id_folder);
-       mapi_object_set_handle(obj_folder, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_folder, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Determine if a public folder is ghosted.
-
-   This function returns whether a public folder is ghosted or not.
-
-   \param obj_store the store of the public folder
-   \param obj_folder the folder we are querying for ghost
-   \param IsGhosted pointer on the boolean value returned
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-*/
-_PUBLIC_ enum MAPISTATUS PublicFolderIsGhosted(mapi_object_t *obj_store,
-                                              mapi_object_t *obj_folder,
-                                              bool *IsGhosted)
-{
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct PublicFolderIsGhosted_req        request;
-       struct mapi_session                     *session[2];
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       TALLOC_CTX                              *mem_ctx;
-       mapi_id_t                               folderId;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session[0] = mapi_object_get_session(obj_store);
-       session[1] = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       folderId = mapi_object_get_id(obj_folder);
-       OPENCHANGE_RETVAL_IF(!folderId, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "PublicFolderIsGhosted");
-       size = 0;
-
-       /* Fill the PublicFolderIsGhosted operation */
-       request.FolderId = folderId;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_PublicFolderIsGhosted;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_PublicFolderIsGhosted = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       *IsGhosted = mapi_response->mapi_repl->u.mapi_PublicFolderIsGhosted.IsGhosted;
-       
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Open a NNTP Public Folder given its name
-
-   \param obj_folder the parent folder
-   \param obj_child the resulting open folder
-   \param name the folder name
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenPublicFolder
- */
-_PUBLIC_ enum MAPISTATUS OpenPublicFolderByName(mapi_object_t *obj_folder,
-                                               mapi_object_t *obj_child,
-                                               const char *name)
-{
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct OpenPublicFolderByName_req       request;
-       struct mapi_session                     *session;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       TALLOC_CTX                              *mem_ctx;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_child, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!name, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenPublicFolderByName");
-       size = 0;
-
-       /* Fill the OpenPublicFolderByName operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       /* name is prefixed with 32 bit [size] */
-       request.name = name;
-       size += strlen(name) + 1 + sizeof (uint32_t);
-       
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenPublicFolderByName;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenPublicFolderByName = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_folder);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_child, session);
-       mapi_object_set_handle(obj_child, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_child, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Sets a folder as the destination for incoming messages of
-   a particular message class.
-
-   \param obj_store the store to set the receive folder for
-   \param obj_folder the destination folder
-   \param lpszMessageClass the message class the folder will receive
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa GetReceiveFolder, GetReceiveFolderTable
- */
-_PUBLIC_ enum MAPISTATUS SetReceiveFolder(mapi_object_t *obj_store,
-                                         mapi_object_t *obj_folder,
-                                         const char *lpszMessageClass)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetReceiveFolder_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpszMessageClass, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetReceiveFolder");
-
-       /* Fill the SetReceiveFolder operation */
-       size = 0;
-       request.fid = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-       request.lpszMessageClass = lpszMessageClass;
-       size += strlen(lpszMessageClass) + 1;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetReceiveFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetReceiveFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Gets the receive folder for incoming messages of a
-   particular message class.
-
-   This function obtains the folder that was established as the
-   destination for incoming messages of a specified message class, or
-   the default receive folder for the message store.
-
-   \param obj_store the store to get the receiver folder for
-   \param id_folder the resulting folder identification
-   \param MessageClass which message class to find the receivefolder
-   for
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize, OpenMsgStore, GetLastError, SetReceiveFolder,
-   GetReceiveFolderTable
-*/
-_PUBLIC_ enum MAPISTATUS GetReceiveFolder(mapi_object_t *obj_store, 
-                                         mapi_id_t *id_folder,
-                                         const char *MessageClass)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetReceiveFolder_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetReceiveFolder");
-
-       *id_folder = 0;
-
-       /* Fill the GetReceiveFolder operation */
-       if (!MessageClass) {
-               request.MessageClass = "";
-               size += 1;
-       } else {
-               request.MessageClass = MessageClass;
-               size += strlen (MessageClass) + 1;
-       }
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetReceiveFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetReceiveFolder = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *id_folder = mapi_response->mapi_repl->u.mapi_GetReceiveFolder.folder_id;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the receive folder table which includes all the
-   information about the receive folders for the message store
-
-   \param obj_store the message store object
-   \param SRowSet pointer on a SRowSet structure with
-   GetReceiveFolderTable results.
-
-   Developers are required to call MAPIFreeBuffer(SRowSet.aRow) when
-   they don't need the folder table data anymore.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetReceiveFolder, SetReceiveFolder
- */
-_PUBLIC_ enum MAPISTATUS GetReceiveFolderTable(mapi_object_t *obj_store, 
-                                              struct SRowSet *SRowSet)
-{
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct GetReceiveFolderTable_repl       *reply;
-       struct mapi_session                     *session;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       TALLOC_CTX                              *mem_ctx;
-       uint32_t                                i;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetReceiveFolderTable");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetReceiveFolderTable;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       reply = &mapi_response->mapi_repl->u.mapi_GetReceiveFolderTable;
-
-       /* Retrieve the ReceiveFolderTable entries */
-       SRowSet->cRows = reply->cValues;
-       SRowSet->aRow = talloc_array((TALLOC_CTX *)session, struct SRow, reply->cValues);
-       
-       for (i = 0; i < reply->cValues; i++) {
-               SRowSet->aRow[i].ulAdrEntryPad = 0;
-               SRowSet->aRow[i].cValues = 3;
-               SRowSet->aRow[i].lpProps = talloc_array((TALLOC_CTX *)SRowSet->aRow, struct SPropValue, 
-                                                       SRowSet->aRow[i].cValues);
-
-               SRowSet->aRow[i].lpProps[0].ulPropTag = PR_FID;
-               SRowSet->aRow[i].lpProps[0].dwAlignPad = 0x0;
-               SRowSet->aRow[i].lpProps[0].value.d = reply->entries[i].fid;
-
-               if (reply->entries[i].lpszMessageClass && strlen(reply->entries[i].lpszMessageClass)) {
-                       SRowSet->aRow[i].lpProps[1].ulPropTag = PR_MESSAGE_CLASS;
-                       SRowSet->aRow[i].lpProps[1].dwAlignPad = 0x0;
-                       SRowSet->aRow[i].lpProps[1].value.lpszA = talloc_strdup((TALLOC_CTX *)SRowSet->aRow[i].lpProps, reply->entries[i].lpszMessageClass);
-               } else {
-                       SRowSet->aRow[i].lpProps[1].ulPropTag = PR_MESSAGE_CLASS;
-                       SRowSet->aRow[i].lpProps[1].dwAlignPad = 0x0;
-                       SRowSet->aRow[i].lpProps[1].value.lpszA = "";
-               }
-
-               SRowSet->aRow[i].lpProps[2].ulPropTag = PR_LAST_MODIFICATION_TIME;
-               SRowSet->aRow[i].lpProps[2].dwAlignPad = 0x0;
-               SRowSet->aRow[i].lpProps[2].value.ft.dwLowDateTime = reply->entries[i].modiftime.dwLowDateTime;
-               SRowSet->aRow[i].lpProps[2].value.ft.dwHighDateTime = reply->entries[i].modiftime.dwHighDateTime;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieves the folder ID of the temporary transport folder.
-
-   \param obj_store the server object
-   \param FolderId pointer on the returning Folder identifier
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS GetTransportFolder(mapi_object_t *obj_store,
-                                           mapi_id_t *FolderId)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetTransportFolder_repl  *reply;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!FolderId, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetTransportFolder");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetTransportFolder;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the FolderId parameter */
-       reply = &mapi_response->mapi_repl->u.mapi_GetTransportFolder;
-       *FolderId = reply->FolderId;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the list of servers that host replicas of a given
-   public folder.
-
-   \param obj_store the public folder store object
-   \param obj_folder the folder object we search replica for
-   \param OwningServersCount number of OwningServers
-   \param CheapServersCount number of low-cost servers
-   \param OwningServers pointer on the list of NULL terminated ASCII
-   string representing replica servers
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note ecNoReplicaAvailable (0x469) can be returned if no replica is
-   available for the folder.
-
-   Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS GetOwningServers(mapi_object_t *obj_store,
-                                         mapi_object_t *obj_folder,
-                                         uint16_t *OwningServersCount,
-                                         uint16_t *CheapServersCount,
-                                         char **OwningServers)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct GetOwningServers_req     request;
-       struct GetOwningServers_repl    response;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       mapi_id_t                       FolderId;
-       uint32_t                        i;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OwningServersCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!CheapServersCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OwningServers, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       FolderId = mapi_object_get_id(obj_folder);
-       OPENCHANGE_RETVAL_IF(!FolderId, MAPI_E_INVALID_PARAMETER, NULL);
-               
-       mem_ctx = talloc_named(NULL, 0, "GetOwningServers");
-       
-       size = 0;
-
-       /* Fill the GetOwningServers operation */
-       request.FolderId = FolderId;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetOwningServers;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_GetOwningServers = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve GetOwningServers response */
-       response = mapi_response->mapi_repl->u.mapi_GetOwningServers;
-
-       *OwningServersCount = response.OwningServersCount;
-       *CheapServersCount = response.CheapServersCount;
-       if (*OwningServersCount) {
-               OwningServers = talloc_array((TALLOC_CTX *)session, char *, *OwningServersCount + 1);
-               for (i = 0; i != *OwningServersCount; i++) {
-                       OwningServers[i] = talloc_strdup((TALLOC_CTX *)OwningServers, response.OwningServers[i]);
-               }
-               OwningServers[i] = NULL;
-       } else {
-               OwningServers = NULL;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Gets the current store state for the logged in user
-
-   This operation must be performed against a user store (not against
-   a Public Folder store). The StoreState will have the 
-   STORE_HAS_SEARCHES flag set if there are any active search folders.
-   There are (currently) no other flags in the StoreState.
-
-   \param obj_store the store object
-   \param StoreState pointer to the store state returned by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store or StoreState are not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
- */
-_PUBLIC_ enum MAPISTATUS GetStoreState(mapi_object_t *obj_store,
-                                      uint32_t *StoreState)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!StoreState, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetStoreState");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetStoreState;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve the StoreState */
-       *StoreState = mapi_response->mapi_repl->u.mapi_GetStoreState.StoreState;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieves the sending folder (OUTBOX) for a given store
-
-   This function obtains the folder that was established as the
-   destination for outgoing messages of a specified message class.
-
-   This function does not result in any network traffic.
-
-   \param obj_store the store to get the outbox folder for
-   \param outbox_id the resulting folder identification
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize, OpenMsgStore, GetLastError, GetDefaultFolder
-*/
-_PUBLIC_ enum MAPISTATUS GetOutboxFolder(mapi_object_t *obj_store, 
-                                        mapi_id_t *outbox_id)
-{
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-
-       *outbox_id = ((mapi_object_store_t *)obj_store->private_data)->fid_outbox;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Notify the store of a new message to be processed
-
-   \param obj_store the store that the message is in (logon object)
-   \param obj_folder the folder that the message is in
-   \param obj_msg the message to be processed
-   \param MessageClass the message class of the message to be processed
-   \param MessageFlags the message flags on the message
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one the parameters is invalid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa GetReceiveFolder, GetReceiveFolderTable
- */
-_PUBLIC_ enum MAPISTATUS TransportNewMail(mapi_object_t *obj_store, mapi_object_t *obj_folder,
-                                         mapi_object_t *obj_msg,
-                                         const char *MessageClass, uint32_t MessageFlags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct TransportNewMail_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_msg, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!MessageClass, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_folder);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_folder, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "TransportNewMail");
-
-       /* Fill the TransportNewMail operation */
-       size = 0;
-       request.MessageId = mapi_object_get_id(obj_msg);
-       size += sizeof (uint64_t);
-       request.FolderId = mapi_object_get_id(obj_folder);
-       size += sizeof (uint64_t);
-       request.MessageClass = MessageClass;
-       size += strlen(MessageClass) + 1;
-       request.MessageFlags = MessageFlags;
-       size += sizeof(uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_TransportNewMail;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_TransportNewMail = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IProfAdmin.c b/branches/plugfest/libmapi/IProfAdmin.c
deleted file mode 100644 (file)
index 5ac6475..0000000
+++ /dev/null
@@ -1,1700 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <credentials.h>
-#include <ldb_errors.h>
-#include <ldb.h>
-
-/**
-   \file IProfAdmin.c
-
-   \brief MAPI Profiles interface
- */
-
-/*
- * Private functions
- */
-
-/**
- * Load a MAPI profile into a mapi_profile struct
- */
-static enum MAPISTATUS ldb_load_profile(TALLOC_CTX *mem_ctx,
-                                       struct ldb_context *ldb_ctx,
-                                       struct mapi_profile *profile,
-                                       const char *profname, const char *password)
-{
-       int                     ret;
-       enum ldb_scope          scope = LDB_SCOPE_SUBTREE;
-       struct ldb_result       *res;
-       struct ldb_message      *msg;
-       const char * const      attrs[] = { "*", NULL };
-
-       /* fills in profile name */
-       profile->profname = talloc_strdup(mem_ctx, profname);
-       if (!profile->profname) return MAPI_E_NOT_ENOUGH_RESOURCES;
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profile->profname);
-       if (ret != LDB_SUCCESS) return MAPI_E_NOT_FOUND;
-
-       /* profile not found */
-       if (!res->count) return MAPI_E_NOT_FOUND;
-       /* more than one profile */
-       if (res->count > 1) return MAPI_E_COLLISION;
-
-       /* fills in profile with query result */
-       msg = res->msgs[0];
-
-       profile->username = ldb_msg_find_attr_as_string(msg, "username", NULL);
-       profile->password = password ? password : ldb_msg_find_attr_as_string(msg, "password", "");
-       profile->workstation = ldb_msg_find_attr_as_string(msg, "workstation", NULL);
-       profile->realm = ldb_msg_find_attr_as_string(msg, "realm", NULL);
-       profile->domain = ldb_msg_find_attr_as_string(msg, "domain", NULL);
-       profile->mailbox = ldb_msg_find_attr_as_string(msg, "EmailAddress", NULL);
-       profile->homemdb = ldb_msg_find_attr_as_string(msg, "HomeMDB", NULL);
-       profile->localaddr = ldb_msg_find_attr_as_string(msg, "localaddress", NULL);
-       profile->server = ldb_msg_find_attr_as_string(msg, "binding", NULL);
-       profile->seal = ldb_msg_find_attr_as_bool(msg, "seal", false);
-       profile->org = ldb_msg_find_attr_as_string(msg, "Organization", NULL);
-       profile->ou = ldb_msg_find_attr_as_string(msg, "OrganizationUnit", NULL);
-       profile->codepage = ldb_msg_find_attr_as_int(msg, "codepage", 0);
-       profile->language = ldb_msg_find_attr_as_int(msg, "language", 0);
-       profile->method = ldb_msg_find_attr_as_int(msg, "method", 0);
-       profile->exchange_version = ldb_msg_find_attr_as_int(msg, "exchange_version", 0);
-
-       if (!profile->password) return MAPI_E_INVALID_PARAMETER;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Remove the "default" attribute from whichever profile is currently the default profile
- */
-static enum MAPISTATUS ldb_clear_default_profile(struct mapi_context *mapi_ctx,
-                                                TALLOC_CTX *mem_ctx)
-{
-       enum ldb_scope          scope = LDB_SCOPE_SUBTREE;
-       struct ldb_context      *ldb_ctx;
-       struct ldb_dn           *basedn;
-       struct ldb_message      *msg;
-       struct ldb_result       *res;
-       const char              *attrs[] = { "PR_DEFAULT_PROFILE", NULL };
-       int                     ret;
-       uint32_t                i;
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, "CN=Profiles");
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, basedn, scope, attrs, "(cn=*)");
-       
-       if (ret != LDB_SUCCESS) return MAPI_E_NOT_FOUND;
-       if (!res->count) return MAPI_E_NOT_FOUND;
-
-       for (i = 0; i < res->count; i++) {
-               struct ldb_message              *message;
-
-               msg = res->msgs[i];
-               if (msg->num_elements == 1) {
-                       message = talloc_steal(mem_ctx, msg);
-                       message->elements[0].flags = LDB_FLAG_MOD_DELETE;
-
-                       ret = ldb_modify(ldb_ctx, message);
-                       talloc_free(message);
-               }
-       }
-       
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Test if the password is correct
- */
-static enum MAPISTATUS ldb_test_password(struct mapi_context *mapi_ctx,
-                                        TALLOC_CTX *mem_ctx, 
-                                        const char *profile, 
-                                        const char *password)
-{
-       enum ldb_scope          scope = LDB_SCOPE_DEFAULT;
-       struct ldb_context      *ldb_ctx;
-       struct ldb_message      *msg;
-       struct ldb_result       *res;
-       const char              *attrs[] = {"cn", "password", NULL };
-       const char              *ldb_password;
-       int                     ret;
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-       
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, NULL, scope, attrs, 
-                                        "(cn=%s)(cn=Profiles)", profile);
-
-       if (ret != LDB_SUCCESS) return MAPI_E_NO_SUPPORT;
-       if (!res->count) return MAPI_E_NOT_FOUND;
-       
-       msg = res->msgs[0];
-       
-       ldb_password = ldb_msg_find_attr_as_string(msg, "password", NULL);
-       if (!ldb_password) return MAPI_E_NO_SUPPORT;
-       if (strncmp(password, ldb_password, strlen(password))) return MAPI_E_LOGON_FAILED;
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
- * Add a profile to the database with default fields
- */
-static enum MAPISTATUS ldb_create_profile(TALLOC_CTX *mem_ctx,
-                                         struct ldb_context *ldb_ctx,
-                                         const char *profname)
-{
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_message              msg;
-       struct ldb_message_element      el[2];
-       struct ldb_val                  vals[2][1];
-       struct ldb_result               *res;
-       struct ldb_dn                   *basedn;
-       char                            *dn;
-       int                             ret;
-       const char * const              attrs[] = { "*", NULL };
-
-       /* Sanity check */
-       if (profname == NULL) 
-               return MAPI_E_BAD_VALUE;
-
-       /* Does the profile already exists? */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), 
-                                        scope, attrs, "(cn=%s)(cn=Profiles)", profname);
-       if (ret == LDB_SUCCESS && res && res->msgs) return MAPI_E_NO_ACCESS;
-
-       /*
-        * We now prepare the entry for transaction
-        */
-       
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profname);
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       if (!ldb_dn_validate(basedn)) return MAPI_E_BAD_VALUE;
-
-       msg.dn = ldb_dn_copy(mem_ctx, basedn);
-       msg.num_elements = 2;
-       msg.elements = el;
-
-       el[0].flags = 0;
-       el[0].name = talloc_strdup(mem_ctx, "cn");
-       el[0].num_values = 1;
-       el[0].values = vals[0];
-       vals[0][0].data = (uint8_t *)talloc_strdup(mem_ctx, profname);
-       vals[0][0].length = strlen(profname);
-
-       el[1].flags = 0;
-       el[1].name = talloc_strdup(mem_ctx, "name");
-       el[1].num_values = 1;
-       el[1].values = vals[1];
-       vals[1][0].data = (uint8_t *)talloc_strdup(mem_ctx, profname);
-       vals[1][0].length = strlen(profname);
-
-       ret = ldb_add(ldb_ctx, &msg);
-
-       if (ret != LDB_SUCCESS) return MAPI_E_NO_SUPPORT;
-
-       return MAPI_E_SUCCESS;
-}
-
-/*
- * delete the current profile
- */
-static enum MAPISTATUS ldb_delete_profile(TALLOC_CTX *mem_ctx,
-                                         struct ldb_context *ldb_ctx,
-                                         const char *profname)
-{
-       enum ldb_scope          scope = LDB_SCOPE_SUBTREE;
-       struct ldb_result       *res;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profname);
-       if (!res->msgs) return MAPI_E_NOT_FOUND;
-
-       ret = ldb_delete(ldb_ctx, res->msgs[0]->dn);
-       if (ret != LDB_SUCCESS) return MAPI_E_NOT_FOUND;
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy the MAPI profile
-
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer to the LDB context
-   \param profname_src pointer to the source profile name
-   \param profname_dest pointer to the destination profile name
- */
-static enum MAPISTATUS ldb_copy_profile(TALLOC_CTX *mem_ctx,
-                                       struct ldb_context *ldb_ctx,
-                                       const char *profname_src,
-                                       const char *profname_dest)
-{
-       int                             ret;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_result               *res;
-       struct ldb_result               *res_dest;
-       struct ldb_message              *msg;
-       const char * const              attrs[] = { "*", NULL };
-       uint32_t                        i;
-       char                            *dn;
-       struct ldb_message_element      *el;
-       struct ldb_dn                   *basedn;
-
-       /* Step 1. Load the source profile */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs,
-                        "(cn=%s)(cn=Profiles)", profname_src);
-       /* profile not found */
-       if (ret != LDB_SUCCESS) return MAPI_E_NOT_FOUND;
-       /* more than one profile */
-       if (res->count > 1) return MAPI_E_COLLISION;
-
-       /* fills in profile with query result */
-       msg = res->msgs[0];
-
-       /* Step 2. Encure the desintation profile doesn't exist */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res_dest, ldb_get_default_basedn(ldb_ctx), scope, attrs,
-                        "(cn=%s)(cn=Profiles)", profname_dest);
-       /* If profile exists or there is more than one */
-       if (ret == LDB_SUCCESS && res_dest->count) return MAPI_E_COLLISION;
-
-       /* Step 3. Customize destination profile */
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profname_dest);
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       if (!ldb_dn_validate(basedn)) return MAPI_E_BAD_VALUE;
-       msg->dn = ldb_dn_copy(mem_ctx, basedn);
-
-       /* Change cn */
-       el = msg->elements;
-       for (i = 0; i < msg->num_elements; i++) {
-               if (el[i].name && !strcmp(el[i].name, "cn")) {
-                       el[i].values[0].data = (uint8_t *)talloc_strdup(mem_ctx, profname_dest);
-                       el[i].values[0].length = strlen(profname_dest);
-               }
-       }
-
-       /* Step 4. Copy the profile */
-       ret = ldb_add(ldb_ctx, msg);
-       /* talloc_free(basedn); */
-       
-       if (ret != LDB_SUCCESS) return MAPI_E_NO_SUPPORT;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Rename a profile
-
-   \param mem_ctx pointer on the memory context
-   \param old_profname the old profile name string
-   \param new_profname the new profile name string
-
-   \return MAPI_E_SUCCESS on success otherwise MAPI error.
- */
-static enum MAPISTATUS ldb_rename_profile(struct mapi_context *mapi_ctx,
-                                         TALLOC_CTX *mem_ctx, 
-                                         const char *old_profname,
-                                         const char *new_profname)
-{
-       int                     ret;
-       struct ldb_context      *ldb_ctx;
-       struct ldb_dn           *old_dn;
-       struct ldb_dn           *new_dn;
-       char                    *dn;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!old_profname, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!new_profname, MAPI_E_INVALID_PARAMETER, NULL);
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", old_profname);
-       old_dn = ldb_dn_new(mem_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", new_profname);
-       new_dn = ldb_dn_new(mem_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-
-       ret = ldb_rename(ldb_ctx, old_dn, new_dn);
-       OPENCHANGE_RETVAL_IF(ret, MAPI_E_CORRUPT_STORE, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/*
- * Public interface
- */
-
-/**
-   \details Add an attribute to the profile
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile pointer to the profile name
-   \param attr the name of the atribute
-   \param value the value of the attribute
- */
-_PUBLIC_ enum MAPISTATUS mapi_profile_add_string_attr(struct mapi_context *mapi_ctx,
-                                                     const char *profile, 
-                                                     const char *attr, 
-                                                     const char *value)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_message              msg;
-       struct ldb_message_element      el[1];
-       struct ldb_val                  vals[1][1];
-       struct ldb_result               *res;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_dn                   *basedn;
-       char                            *dn;
-       int                             ret;
-       const char * const              attrs[] = { "*", NULL };
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_BAD_VALUE, NULL);
-       OPENCHANGE_RETVAL_IF(!value, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_profile_add_string_attr");
-       ldb_ctx = mapi_ctx->ldb_ctx;
-
-       /* Retrieve the profile from the database */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profile);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_BAD_VALUE, mem_ctx);
-
-       /* Preparing for the transaction */
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profile);
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(basedn), MAPI_E_BAD_VALUE, mem_ctx);
-
-       msg.dn = ldb_dn_copy(mem_ctx, basedn);
-       msg.num_elements = 1;
-       msg.elements = el;
-
-       el[0].flags = LDB_FLAG_MOD_ADD;
-       el[0].name = talloc_strdup(mem_ctx, attr);
-       el[0].num_values = 1;
-       el[0].values = vals[0];
-       vals[0][0].data = (uint8_t *)talloc_strdup(mem_ctx, value);
-       vals[0][0].length = strlen(value);
-
-       ret = ldb_modify(ldb_ctx, &msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-       
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Modify an attribute
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profname the name of the profile
-   \param attr the name of the attribute
-   \param value the value of the attribute
- */
-_PUBLIC_ enum MAPISTATUS mapi_profile_modify_string_attr(struct mapi_context *mapi_ctx,
-                                                        const char *profname, 
-                                                        const char *attr, 
-                                                        const char *value)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_message              msg;
-       struct ldb_message_element      el[1];
-       struct ldb_val                  vals[1][1];
-       struct ldb_result               *res;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_dn                   *basedn;
-       char                            *dn;
-       int                             ret;
-       const char * const              attrs[] = { "*", NULL };
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profname, MAPI_E_BAD_VALUE, NULL);
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-       mem_ctx = talloc_named(NULL, 0, "mapi_profile_modify_string_attr");
-
-       /* Retrieve the profile from the database */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profname);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_BAD_VALUE, mem_ctx);
-
-       /* Preparing for the transaction */
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profname);
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(basedn), MAPI_E_BAD_VALUE, mem_ctx);
-
-       msg.dn = ldb_dn_copy(mem_ctx, basedn);
-       msg.num_elements = 1;
-       msg.elements = el;
-
-       el[0].flags = LDB_FLAG_MOD_REPLACE;
-       el[0].name = talloc_strdup(mem_ctx, attr);
-       el[0].num_values = 1;
-       el[0].values = vals[0];
-       vals[0][0].data = (uint8_t *)talloc_strdup(mem_ctx, value);
-       vals[0][0].length = strlen(value);
-
-       ret = ldb_modify(ldb_ctx, &msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Delete an attribute
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profname the name of the profile
-   \param attr the name of the attribute
-   \param value the value of the attribute
-
-   
- */
-_PUBLIC_ enum MAPISTATUS mapi_profile_delete_string_attr(struct mapi_context *mapi_ctx,
-                                                        const char *profname, 
-                                                        const char *attr, 
-                                                        const char *value)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_message              msg;
-       struct ldb_message_element      el[1];
-       struct ldb_val                  vals[1][1];
-       struct ldb_result               *res;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_dn                   *basedn;
-       char                            *dn;
-       int                             ret;
-       const char * const              attrs[] = { "*", NULL };
-
-       /* Saniy checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profname, MAPI_E_BAD_VALUE, NULL);
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-       mem_ctx = talloc_named(NULL, 0, "mapi_profile_delete_string_attr");
-
-       /* Retrieve the profile from the database */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profname);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_BAD_VALUE, mem_ctx);
-
-       /* Preparing for the transaction */
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profname);
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(basedn), MAPI_E_BAD_VALUE, mem_ctx);
-
-       msg.dn = ldb_dn_copy(mem_ctx, basedn);
-       msg.num_elements = 1;
-       msg.elements = el;
-
-       el[0].flags = LDB_FLAG_MOD_DELETE;
-       el[0].name = talloc_strdup(mem_ctx, attr);
-       el[0].num_values = 1;
-       el[0].values = vals[0];
-       vals[0][0].data = (uint8_t *)talloc_strdup(mem_ctx, value);
-       vals[0][0].length = strlen(value);
-
-       ret = ldb_modify(ldb_ctx, &msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-/*
- * Private function which opens the profile store
- * Should only be called within MAPIInitialize
- */
-enum MAPISTATUS OpenProfileStore(TALLOC_CTX *mem_ctx, struct ldb_context **ldb_ctx, 
-                                const char *profiledb)
-{
-       int                     ret;
-       struct ldb_context      *tmp_ctx;
-       struct tevent_context   *ev;
-       
-       *ldb_ctx = 0;
-       
-       /* store path */
-       if (!profiledb) return MAPI_E_NOT_FOUND;
-
-       ev = tevent_context_init(mem_ctx);
-       if (!ev) return MAPI_E_NOT_ENOUGH_RESOURCES;
-
-       /* connect to the store */
-       tmp_ctx = ldb_init(mem_ctx, ev);
-       if (!tmp_ctx) return MAPI_E_NOT_ENOUGH_RESOURCES;
-
-       ret = ldb_connect(tmp_ctx, profiledb, 0, NULL);
-       if (ret != LDB_SUCCESS) return MAPI_E_NOT_FOUND;
-
-       *ldb_ctx = tmp_ctx;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get default ldif_path
-
-   This function returns the path for the default LDIF files.
-
-   \sa CreateProfileStore
-*/
-_PUBLIC_ const char *mapi_profile_get_ldif_path(void)
-{
-       return DEFAULT_LDIF;
-}
-
-
-/**
-   \details Create a profile database
-   
-   This function creates a new profile database, including doing an
-   initial setup.
-
-   \param profiledb the absolute path to the profile database intended
-   to be created
-   \param ldif_path the absolute path to the LDIF information to use
-   for initial setup.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_CALL_FAILED: profiledb or ldif_path is not set
-   - MAPI_E_NOT_ENOUGH_RESOURCES: ldb subsystem initialization failed
-   - MAPI_E_NO_ACCESS: connection or ldif add failed
-
-   \sa GetLastError, mapi_profile_get_ldif_path
-*/
-_PUBLIC_ enum MAPISTATUS CreateProfileStore(const char *profiledb, const char *ldif_path)
-{
-       int                     ret;
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx;
-       struct ldb_ldif         *ldif;
-       char                    *url = NULL;
-       char                    *filename = NULL;
-       FILE                    *f;
-       struct tevent_context   *ev;
-
-       OPENCHANGE_RETVAL_IF(!profiledb, MAPI_E_CALL_FAILED, NULL);
-       OPENCHANGE_RETVAL_IF(!ldif_path, MAPI_E_CALL_FAILED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "CreateProfileStore");
-
-       ev = tevent_context_init(mem_ctx);
-       OPENCHANGE_RETVAL_IF(!ev, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       ldb_ctx = ldb_init(mem_ctx, ev);
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       url = talloc_asprintf(mem_ctx, "tdb://%s", profiledb);
-       ret = ldb_connect(ldb_ctx, url, 0, 0);
-       talloc_free(url);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_ACCESS, mem_ctx);
-
-       filename = talloc_asprintf(mem_ctx, "%s/oc_profiles_init.ldif", ldif_path);
-       f = fopen(filename, "r");
-       OPENCHANGE_RETVAL_IF(!f, MAPI_E_NO_ACCESS, mem_ctx);
-       talloc_free(filename);
-
-       while ((ldif = ldb_ldif_read_file(ldb_ctx, f))) {
-               struct ldb_message *normalized_msg;
-               ret = ldb_msg_normalize(ldb_ctx, mem_ctx, ldif->msg, &normalized_msg);
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_ACCESS, NULL);
-               ret = ldb_add(ldb_ctx, normalized_msg);
-               if (ret != LDB_SUCCESS) {
-                       fclose(f);
-                       OPENCHANGE_RETVAL_ERR(MAPI_E_NO_ACCESS, mem_ctx);
-               }
-               ldb_ldif_read_free(ldb_ctx, ldif);
-               talloc_free(normalized_msg);
-       }
-       fclose(f);
-
-       filename = talloc_asprintf(mem_ctx, "%s/oc_profiles_schema.ldif", ldif_path);
-       f = fopen(filename, "r");
-       OPENCHANGE_RETVAL_IF(!f, MAPI_E_NO_ACCESS, mem_ctx);
-
-       talloc_free(filename);
-       while ((ldif = ldb_ldif_read_file(ldb_ctx, f))) {
-               struct ldb_message *normalized_msg;
-               ret = ldb_msg_normalize(ldb_ctx, mem_ctx, ldif->msg, &normalized_msg);
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_ACCESS, NULL);
-               ret = ldb_add(ldb_ctx, normalized_msg);
-               if (ret != LDB_SUCCESS) {
-                       fclose(f);
-                       OPENCHANGE_RETVAL_ERR(MAPI_E_NO_ACCESS, mem_ctx);
-               }
-
-               ldb_ldif_read_free(ldb_ctx, ldif);
-               talloc_free(normalized_msg);
-       }
-       fclose(f);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Load a profile from the database
-
-   This function opens a named profile from the database, and fills
-   the mapi_profile structure with common profile information.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile the resulting profile
-   \param profname the name of the profile to open
-   \param password the password to use with the profile
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_ENOUGH_RESOURCES: ldb subsystem initialization failed
-   - MAPI_E_NOT_FOUND: the profile was not found in the profile
-     database
-   - MAPI_E_COLLISION: profname matched more than one entry
-
-   \sa MAPIInitialize, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS OpenProfile(struct mapi_context *mapi_ctx,
-                                    struct mapi_profile *profile, 
-                                    const char *profname, 
-                                    const char *password)
-{
-       TALLOC_CTX      *mem_ctx;
-       enum MAPISTATUS retval;
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = (TALLOC_CTX *) mapi_ctx;
-       
-       /* find the profile in ldb store */
-       retval = ldb_load_profile(mem_ctx, mapi_ctx->ldb_ctx, profile, profname, password);
-
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;  
-}
-
-/**
-   \details Load a MAPI Profile and sets its credentials
-
-   This function loads a named MAPI profile and sets the MAPI session
-   credentials.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile pointer to the MAPI profile
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The profile parameter is not
-     initialized
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to perform the operation
-
-   \sa OpenProfile, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS LoadProfile(struct mapi_context *mapi_ctx, 
-                                    struct mapi_profile *profile)
-{
-       TALLOC_CTX *mem_ctx;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = (TALLOC_CTX *) mapi_ctx->session;
-
-       profile->credentials = cli_credentials_init(mem_ctx);
-       OPENCHANGE_RETVAL_IF(!profile->credentials, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-       cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
-       cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
-       cli_credentials_set_workstation(profile->credentials, profile->workstation, CRED_SPECIFIED);
-       cli_credentials_set_realm(profile->credentials, profile->realm, CRED_SPECIFIED);
-       cli_credentials_set_domain(profile->credentials, profile->domain, CRED_SPECIFIED);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Release a profile
-
-   This function releases the credentials associated with the profile.
-
-   \param profile the profile to release.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: The profile parameter was not set or
-     not valid
- */
-_PUBLIC_ enum MAPISTATUS ShutDown(struct mapi_profile *profile)
-{
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if (profile->credentials) 
-               talloc_free(profile->credentials);
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Create a profile in the MAPI profile database
-
-   This function creates a profile named \a profile in the MAPI profile
-   database and sets the specified username in that profile.
-
-   This function may also set the password. If the flags include
-   OC_PROFILE_NOPASSWORD then the password will not be set. Otherwise,
-   the specified password argument will also be saved to the profile.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile the name of the profile
-   \param username the username of the profile
-   \param password the password for the profile (if used)
-   \param flag the union of the flags. 
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been
-     initialized. The MAPI subsystem must be initialized (using
-     MAPIInitialize) prior to creating a profile.
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   - MAPI_E_NO_SUPPORT: An error was encountered while setting the
-     MAPI profile attributes in the database.
-
-   \note profile information (including the password, if saved to the
-   profile) is stored unencrypted.
-
-   \sa DeleteProfile, SetDefaultProfile, GetDefaultProfile,
-   ChangeProfilePassword, GetProfileTable, ProcessNetworkProfile,
-   GetLastError
- */
-_PUBLIC_ enum MAPISTATUS CreateProfile(struct mapi_context *mapi_ctx,
-                                      const char *profile, 
-                                      const char *username,
-                                      const char *password, 
-                                      uint32_t flag)
-{
-       enum MAPISTATUS retval;
-       TALLOC_CTX      *mem_ctx;
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "CreateProfile");
-       retval = ldb_create_profile(mem_ctx, mapi_ctx->ldb_ctx, profile);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = mapi_profile_add_string_attr(mapi_ctx, profile, "username", username);
-       if (flag != OC_PROFILE_NOPASSWORD) {
-               retval = mapi_profile_add_string_attr(mapi_ctx, profile, "password", password);
-       }
-       talloc_free(mem_ctx);
-
-       return retval;
-}
-
-
-/**
-   \details Delete a profile from the MAPI profile database
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile the name of the profile to delete
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been
-     initialized. The MAPI subsystem must be initialized (using
-     MAPIInitialize) prior to creating a profile.
-   - MAPI_E_NOT_FOUND: The profile was not found in the database.
-
-   \sa CreateProfile, ChangeProfilePassword, GetProfileTable,
-   GetProfileAttr, ProcessNetworkProfile, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS DeleteProfile(struct mapi_context *mapi_ctx,
-                                      const char *profile)
-{
-       TALLOC_CTX      *mem_ctx;
-       enum MAPISTATUS retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "DeleteProfile");
-       retval = ldb_delete_profile(mem_ctx, mapi_ctx->ldb_ctx, profile);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       talloc_free(mem_ctx);
-
-       return retval;
-}
-
-
-/**
-   \details Change the profile password of an existing MAPI profile
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile the name of the profile to have its password changed
-   \param old_password the old password
-   \param password the new password
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: One of the following argument was not
-     set: profile, old_password, password
-   - MAPI_E_NOT_FOUND: The profile was not found in the database
-
-   \sa CreateProfile, GetProfileTable, GetProfileAttr,
-   ProcessNetworkProfile, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS ChangeProfilePassword(struct mapi_context *mapi_ctx,
-                                              const char *profile, 
-                                              const char *old_password,
-                                              const char *password)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profile || !old_password || 
-                            !password, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "ChangeProfilePassword");
-
-       retval = ldb_test_password(mapi_ctx, mem_ctx, profile, password);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = mapi_profile_modify_string_attr(mapi_ctx, profile, "password", password);
-       
-       talloc_free(mem_ctx);
-       return retval;
-}
-
-/**
-   \details Copy a profile
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile_src the source profile to copy from
-   \param profile_dst the destination profile to copy to
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS CopyProfile(struct mapi_context *mapi_ctx,
-                                    const char *profile_src,
-                                    const char *profile_dst)
-{
-       TALLOC_CTX      *mem_ctx;
-       enum MAPISTATUS retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profile_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!profile_dst, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "CopyProfile");
-
-       retval = ldb_copy_profile(mem_ctx, mapi_ctx->ldb_ctx, profile_src, profile_dst);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mem_ctx);
-       return retval;
-}
-
-
-/**
-   \details Duplicate an existing profile.
-
-   The username specified in parameter is used to customize the new
-   profile. This function should only be used in environments where
-   users are within the same administrative group, storage group,
-   server etc. Otherwise this will create an invalid profile and may
-   cause unpredictable results.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profile_src the source profile to duplicate from
-   \param profile_dst the destination profile to duplicate to
-   \param username the username to replace within the destination
-   profile
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS DuplicateProfile(struct mapi_context *mapi_ctx,
-                                         const char *profile_src,
-                                         const char *profile_dst,
-                                         const char *username)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       char                    *username_src = NULL;
-       char                    *EmailAddress = NULL;
-       char                    *ProxyAddress = NULL;
-       struct mapi_profile     profile;
-       char                    **attr_tmp = NULL;
-       char                    *tmp = NULL;
-       char                    *attr;
-       uint32_t                count = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profile_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!profile_dst, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Copy the profile */
-       retval = CopyProfile(mapi_ctx, profile_src, profile_dst);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* retrieve username, EmailAddress and ProxyAddress */
-       retval = OpenProfile(mapi_ctx, &profile, profile_src, NULL);
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_NOT_FOUND, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "DuplicateProfile");
-
-       retval = GetProfileAttr(&profile, "username", &count, &attr_tmp);
-       OPENCHANGE_RETVAL_IF(retval || !count, MAPI_E_NOT_FOUND, mem_ctx);
-       username_src = talloc_strdup(mem_ctx, attr_tmp[0]);
-       talloc_free(attr_tmp[0]);
-
-       retval = GetProfileAttr(&profile, "EmailAddress", &count, &attr_tmp);
-       OPENCHANGE_RETVAL_IF(retval || !count, MAPI_E_NOT_FOUND, mem_ctx);
-       EmailAddress = talloc_strdup(mem_ctx, attr_tmp[0]);
-       talloc_free(attr_tmp[0]);
-
-       retval = GetProfileAttr(&profile, "ProxyAddress", &count, &attr_tmp);
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_NOT_FOUND, mem_ctx);
-       ProxyAddress = talloc_strdup(mem_ctx, attr_tmp[0]);
-       talloc_free(attr_tmp[0]);
-
-       /* Change EmailAddress */
-       {
-               int     i;
-
-               tmp = NULL;
-               for (i = strlen(EmailAddress); i > 0; i--) {
-                       if (EmailAddress[i] == '=') {
-                               tmp = talloc_strndup(mem_ctx, EmailAddress, i + 1);
-                               break;
-                       }
-               }
-               OPENCHANGE_RETVAL_IF(!tmp, MAPI_E_INVALID_PARAMETER, mem_ctx);
-
-               attr = talloc_asprintf(mem_ctx, "%s%s", tmp, username);
-               talloc_free(tmp);
-               mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "EmailAddress", attr);
-               talloc_free(attr);
-       }
-
-       /* Change ProxyAddress */
-       {
-               tmp = strstr(ProxyAddress, username_src);
-               attr = talloc_strndup(mem_ctx, ProxyAddress, strlen(ProxyAddress) - strlen(tmp));
-               tmp += strlen(username_src);
-               attr = talloc_asprintf_append(attr, "%s%s", username, tmp);
-               mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "ProxyAddress", attr);
-               talloc_free(attr);
-       }
-
-       /* Step 2. Change parameters but cn (already changed) */
-       mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "name", profile_dst);
-       mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "username", username);
-       mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "DisplayName", username);
-       mapi_profile_modify_string_attr(mapi_ctx, profile_dst, "Account", username);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Rename a profile
-
-   \param mapi_ctx pointer to the MAPI context
-   \param old_profile old profile name
-   \param profile new profile name
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS RenameProfile(struct mapi_context *mapi_ctx,
-                                      const char *old_profile, 
-                                      const char *profile)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct SRowSet          proftable;
-       struct SPropValue       *lpProp;
-       struct ldb_message      *msg = NULL;
-       bool                    found = false;
-       char                    *dn = NULL;
-       int                     ret;
-       uint32_t                i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!old_profile, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = mapi_ctx->mem_ctx;
-
-       retval = GetProfileTable(mapi_ctx, &proftable);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 1. Check if old profile exists */
-       for (found = false, i = 0; i < proftable.cRows; i++) {
-               lpProp = get_SPropValue_SRow(&(proftable.aRow[i]), PR_DISPLAY_NAME);
-               if (lpProp && !strcmp(lpProp->value.lpszA, old_profile)) {
-                       found = true;
-               }
-       }
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_NOT_FOUND, proftable.aRow);
-
-       /* Step 2. Check if new profile already exists */
-       for (found = false, i = 0; i < proftable.cRows; i++) {
-               lpProp = get_SPropValue_SRow(&(proftable.aRow[i]), PR_DISPLAY_NAME);
-               if (lpProp && !strcmp(lpProp->value.lpszA, profile)) {
-                       found = true;
-               }
-       }
-       talloc_free(proftable.aRow);
-       OPENCHANGE_RETVAL_IF(found == true, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 3. Rename the profile */
-       retval = ldb_rename_profile(mapi_ctx, mem_ctx, old_profile, profile);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 4. Change name and cn */
-       msg = ldb_msg_new(mem_ctx);
-       dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Profiles", profile);
-       msg->dn = ldb_dn_new(mem_ctx, mapi_ctx->ldb_ctx, dn);
-       talloc_free(dn);
-
-       ret = ldb_msg_add_string(msg, "cn", profile);
-       ret = ldb_msg_add_string(msg, "name", profile);
-       for (i = 0; i < msg->num_elements; i++) {
-               msg->elements[i].flags = LDB_FLAG_MOD_REPLACE;
-       }
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_CORRUPT_STORE, NULL);
-       ret = ldb_modify(mapi_ctx->ldb_ctx, msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_CORRUPT_STORE, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set a default profile for the database
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profname the name of the profile to make the default profile
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The profile parameter was not set
-     properly.
-   - MAPI_E_NOT_FOUND: The profile was not found in the database
-
-   \sa GetDefaultProfile, GetProfileTable, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS SetDefaultProfile(struct mapi_context *mapi_ctx,
-                                          const char *profname)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_profile     profile;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!profname, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "SetDefaultProfile");
-
-       /* open profile */
-       retval = ldb_load_profile(mem_ctx, mapi_ctx->ldb_ctx, &profile, profname, NULL);
-       OPENCHANGE_RETVAL_IF(retval && retval != MAPI_E_INVALID_PARAMETER, retval, mem_ctx);
-
-       /* search any previous default profile and unset it */
-       retval = ldb_clear_default_profile(mapi_ctx, mem_ctx);
-
-       /* set profname as the default profile */
-       retval = mapi_profile_modify_string_attr(mapi_ctx, profname, "PR_DEFAULT_PROFILE", "1");
-
-       talloc_free(mem_ctx);
-
-       return retval;
-}
-
-
-/**
-   \details Get the default profile from the database
-
-   \param mapi_ctx pointer to the MAPI context
-   \param profname the result of the function (name of the default
-   profile)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_NOT_FOUND: The profile was not found in the database
-
-   \note On success GetDefaultProfile profname string is allocated. It
-   is up to the developer to free it when not needed anymore.
-
-   \sa SetDefaultProfile, GetProfileTable, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetDefaultProfile(struct mapi_context *mapi_ctx,
-                                          char **profname)
-{
-       enum MAPISTATUS         retval;
-       struct SRowSet          proftable;
-       struct SPropValue       *lpProp;
-       uint32_t                i;
-       
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       
-       retval = GetProfileTable(mapi_ctx, &proftable);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       for (i = 0; i < proftable.cRows; i++) {
-               lpProp = get_SPropValue_SRow(&(proftable.aRow[i]), PR_DEFAULT_PROFILE);
-               if (lpProp && (lpProp->value.l == 1)) {
-                       lpProp = get_SPropValue_SRow(&(proftable.aRow[i]), PR_DISPLAY_NAME);
-                       if (lpProp) {
-                         *profname = talloc_strdup(mapi_ctx->mem_ctx, lpProp->value.lpszA);
-                               talloc_free(proftable.aRow);
-                               return MAPI_E_SUCCESS;
-                       }
-               }
-       }
-       
-       OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, proftable.aRow);
-}
-
-
-/**
-   \details Retrieve the profile table
-
-   This function retrieves the profile table. Two fields are returned:
-   - PR_DISPLAY_NAME: The profile name stored as a UTF8 string
-   - PR_DEFAULT_PROFILE: Whether the profile is the default one(1) or
-     not(0), stored as an integer
-
-   \param mapi_ctx pointer to the MAPI context  
-   \param proftable the result of the call
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_NOT_FOUND: The profile was not found in the database
-
-   \sa SetDefaultProfile, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS GetProfileTable(struct mapi_context *mapi_ctx,
-                                        struct SRowSet *proftable)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_result               *res;
-       struct ldb_message              *msg;
-       struct ldb_dn                   *basedn;
-       const char                      *attrs[] = {"cn", "PR_DEFAULT_PROFILE", NULL};
-       int                             ret;
-       uint32_t                        count;
-
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       ldb_ctx = mapi_ctx->ldb_ctx;
-       mem_ctx = talloc_autofree_context();
-
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, "CN=Profiles");
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, basedn, scope, attrs, "(cn=*)");
-       talloc_free(basedn);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, NULL);
-
-       /* Allocate Arow */
-       proftable->cRows = res->count;
-       proftable->aRow = talloc_array(mapi_ctx->mem_ctx, struct SRow, res->count);
-
-       /* Build Arow array */
-       for (count = 0; count < res->count; count++) {
-               msg = res->msgs[count];
-               
-               proftable->aRow[count].lpProps = talloc_array((TALLOC_CTX *)proftable->aRow, struct SPropValue, 2);
-               proftable->aRow[count].cValues = 2;
-
-               proftable->aRow[count].lpProps[0].ulPropTag = PR_DISPLAY_NAME;
-               proftable->aRow[count].lpProps[0].value.lpszA = talloc_strdup((TALLOC_CTX *)proftable->aRow, 
-                                                                             ldb_msg_find_attr_as_string(msg, "cn", NULL));
-                                                                             
-               proftable->aRow[count].lpProps[1].ulPropTag = PR_DEFAULT_PROFILE;
-               proftable->aRow[count].lpProps[1].value.l = ldb_msg_find_attr_as_int(msg, "PR_DEFAULT_PROFILE", 0);
-       }
-
-       talloc_free(res);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve attribute values from a profile
-
-   This function retrieves all the attribute values from the given
-   profile.  The number of results is stored in \a count and values
-   are stored in an allocated string array in the \a value parameter
-   that needs to be free'd using MAPIFreeBuffer().
-   
-   \param profile the name of the profile to retrieve attributes from
-   \param attribute the attribute(s) to search for
-   \param count the number of results
-   \param value the resulting values
-   
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: Either profile or attribute was not set
-     properly
-   - MAPI_E_NOT_FOUND: The profile was not found in the database
-
-   \sa SetDefaultProfile, GetDefaultProfile, MAPIFreeBuffer,
-   GetProfileTable, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetProfileAttr(struct mapi_profile *profile, 
-                                       const char *attribute, 
-                                       unsigned int *count,
-                                       char ***value)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_context             *mapi_ctx;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_result               *res;
-       struct ldb_message              *msg;
-       struct ldb_message_element      *ldb_element;
-       struct ldb_dn                   *basedn;
-       const char                      *attrs[] = {"*", NULL};
-       int                             ret;
-       uint32_t                        i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!attribute, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = profile->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = (TALLOC_CTX *)mapi_ctx->ldb_ctx;
-       ldb_ctx = mapi_ctx->ldb_ctx;
-
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, "CN=Profiles");
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, basedn, LDB_SCOPE_SUBTREE, attrs, "(cn=%s)", profile->profname);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, NULL);
-
-       msg = res->msgs[0];
-       ldb_element = ldb_msg_find_element(msg, attribute);
-       if (!ldb_element) {
-               DEBUG(3, ("ldb_msg_find_element: NULL\n"));
-               return MAPI_E_NOT_FOUND;
-       }
-
-       *count = ldb_element[0].num_values;
-       value[0] = talloc_array(mem_ctx, char *, *count);
-
-       if (*count == 1) {
-               value[0][0] = talloc_strdup(value[0], 
-                                               ldb_msg_find_attr_as_string(msg, attribute, NULL));
-       } else {
-               for (i = 0; i < *count; i++) {
-                       value[0][i] = talloc_strdup(mem_ctx, (char *)ldb_element->values[i].data);
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Search the value of an attribute within a given profile
-
-   \param profile pointer to the MAPI profile
-   \param attribute pointer to the attribute name
-   \param value pointer to the attribute value
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS FindProfileAttr(struct mapi_profile *profile, 
-                                        const char *attribute, 
-                                        const char *value)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_context             *mapi_ctx;
-       struct ldb_context              *ldb_ctx;
-       struct ldb_result               *res;
-       struct ldb_message              *msg;
-       struct ldb_message_element      *ldb_element;
-       struct ldb_val                  val;
-       struct ldb_dn                   *basedn;
-       const char                      *attrs[] = {"*", NULL};
-       int                             ret;
-
-       OPENCHANGE_RETVAL_IF(!profile, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!attribute, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!value, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = profile->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx->ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = (TALLOC_CTX *)mapi_ctx->ldb_ctx;
-       ldb_ctx = mapi_ctx->ldb_ctx;
-
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, "CN=Profiles");
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, basedn, LDB_SCOPE_SUBTREE, attrs, "(CN=%s)", profile->profname);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, NULL);
-       OPENCHANGE_RETVAL_IF(!res->count, MAPI_E_NOT_FOUND, NULL);
-
-       msg = res->msgs[0];
-       ldb_element = ldb_msg_find_element(msg, attribute);
-       OPENCHANGE_RETVAL_IF(!ldb_element, MAPI_E_NOT_FOUND, NULL);
-
-       val.data = (uint8_t *)talloc_strdup(mem_ctx, value);
-       val.length = strlen(value);
-       OPENCHANGE_RETVAL_IF(!ldb_msg_find_val(ldb_element, &val), MAPI_E_NOT_FOUND, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   Create the profile 
- */
-
-static bool set_profile_attribute(struct mapi_context *mapi_ctx,
-                                 const char *profname, 
-                                 struct SRowSet rowset, 
-                                 uint32_t index, 
-                                 uint32_t property, 
-                                 const char *attr)
-{
-       struct SPropValue       *lpProp;
-       enum MAPISTATUS         ret;
-
-       lpProp = get_SPropValue_SRow(&(rowset.aRow[index]), property);
-
-       if (!lpProp) {
-               DEBUG(3, ("MAPI Property %s not set\n", attr));
-               return true;
-       }
-
-       ret = mapi_profile_add_string_attr(mapi_ctx, profname, attr, lpProp->value.lpszA);
-
-       if (ret != MAPI_E_SUCCESS) {
-               DEBUG(3, ("Problem adding attribute %s in profile %s\n", attr, profname));
-               return false;
-       }
-       return true;
-}
-
-static bool set_profile_mvstr_attribute(struct mapi_context *mapi_ctx,
-                                       const char *profname, 
-                                       struct SRowSet rowset,
-                                       uint32_t index, 
-                                       uint32_t property, 
-                                       const char *attr)
-{
-       struct SPropValue       *lpProp;
-       enum MAPISTATUS         ret;
-       uint32_t                i;
-
-       lpProp = get_SPropValue_SRow(&(rowset.aRow[index]), property);
-
-       if (!lpProp) {
-               DEBUG(3, ("MAPI Property %s not set\n", attr));
-               return true;
-       }
-
-       for (i = 0; i < lpProp->value.MVszA.cValues; i++) {
-               ret = mapi_profile_add_string_attr(mapi_ctx, profname, attr, lpProp->value.MVszA.lppszA[i]);
-               if (ret != MAPI_E_SUCCESS) {
-                       DEBUG(3, ("Problem adding attribute %s in profile %s\n", attr, profname));
-                       return false;
-               }
-       }
-       return true;
-}
-
-
-/**
-   \details Process a full and automated MAPI profile creation
-
-   This function process a full and automated MAPI profile creation
-   using the \a username pattern passed as a parameter. The functions
-   takes a callback parameter which will be called when the username
-   checked matches several usernames. Private data needed by the
-   callback can be supplied using the private_data pointer.
-
-   \code
-   typedef int (*mapi_callback_t) callback(struct SRowSet *, void *private_data);
-   \endcode
-   
-   The callback returns the SRow element index within the SRowSet
-   structure.  If the user cancels the operation the callback return
-   value should be SRowSet->cRows or more.
-
-   \param session the session context
-   \param username the username for the network profile
-   \param callback function pointer callback function
-   \param private_data context data that will be provided to the callback
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been
-     initialized. The MAPI subsystem must be initialized (using
-     MAPIInitialize) prior to creating a profile.
-   - MAPI_E_END_OF_SESSION: The NSPI session has not been initialized
-   - MAPI_E_CANCEL_USER: The user has aborted the operation
-   - MAPI_E_INVALID_PARAMETER: The profile parameter was not set
-     properly.
-   - MAPI_E_NOT_FOUND: One of the mandatory field was not found during
-     the profile creation process.
-
-   \sa OpenProfileStore, MAPILogonProvider, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *session, 
-                                              const char *username,
-                                              mapi_profile_callback_t callback, 
-                                              const void *private_data)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct nspi_context     *nspi;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct Restriction_r    Filter;
-       struct SRowSet          *SRowSet;
-       struct SPropValue       *lpProp = NULL;
-       struct SPropTagArray    *MIds = NULL;
-       struct SPropTagArray    MIds2;
-       struct SPropTagArray    *MId_server = NULL;
-       struct StringsArray_r   pNames;
-       const char              *profname;
-       uint32_t                instance_key = 0;
-       uint32_t                index = 0;
-
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_END_OF_SESSION, NULL);
-       OPENCHANGE_RETVAL_IF(!session->mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-
-       mem_ctx = talloc_named(NULL, 0, "ProcessNetworkProfile");
-       nspi = (struct nspi_context *) session->nspi->ctx;
-       profname = session->profile->profname;
-       index = 0;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_GetSpecialTable(nspi, mem_ctx, 0x0, &SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xc,
-                                         PR_DISPLAY_NAME,
-                                         PR_OFFICE_TELEPHONE_NUMBER,
-                                         PR_OFFICE_LOCATION,
-                                         PR_TITLE,
-                                         PR_COMPANY_NAME,
-                                         PR_ACCOUNT,
-                                         PR_ADDRTYPE,
-                                         PR_ENTRYID,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_INSTANCE_KEY,
-                                         PR_EMAIL_ADDRESS
-                                         );
-
-       /* Retrieve the username to match */
-       if (!username) {
-               username = cli_credentials_get_username(nspi->cred);
-               OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, mem_ctx);
-       }
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_ANR_UNICODE;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.lpszW = username;
-
-       Filter.rt = (enum RestrictionType_r)RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_ANR_UNICODE;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(lpProp);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(SRowSet);
-               talloc_free(mem_ctx);
-               return retval;
-       }
-
-       /* if there's no match */
-       OPENCHANGE_RETVAL_IF(!SRowSet, MAPI_E_NOT_FOUND, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!SRowSet->cRows, MAPI_E_NOT_FOUND, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!MIds, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* if SRowSet count is superior than 1 an callback is specified, call it */
-       if (SRowSet->cRows > 1 && callback) {
-               index = callback(SRowSet, private_data);
-               OPENCHANGE_RETVAL_IF((index >= SRowSet->cRows), MAPI_E_USER_CANCEL, mem_ctx);
-               instance_key = MIds->aulPropTag[index];
-       } else {
-               instance_key = MIds->aulPropTag[0];
-       }
-       MAPIFreeBuffer(MIds);
-       
-       MIds2.cValues = 0x1;
-       MIds2.aulPropTag = (enum MAPITAGS *) &instance_key;
-
-       set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_EMAIL_ADDRESS, "EmailAddress");
-       set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_DISPLAY_NAME, "DisplayName");
-       set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_ACCOUNT, "Account");
-       set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_ADDRTYPE, "AddrType");
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x7,
-                                         PR_DISPLAY_NAME,
-                                         PR_EMAIL_ADDRESS,
-                                         PR_DISPLAY_TYPE,
-                                         PR_EMS_AB_HOME_MDB,
-                                         PR_ATTACH_NUM,
-                                         PR_PROFILE_HOME_SERVER_ADDRS,
-                                         PR_EMS_AB_PROXY_ADDRESSES
-                                         );
-
-       nspi->pStat->CurrentRec = 0x0;
-       nspi->pStat->Delta = 0x0;
-       nspi->pStat->NumPos = 0x0;
-       nspi->pStat->TotalRecs = 0x1;
-
-       MAPIFreeBuffer(SRowSet);
-       SRowSet = talloc(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi, mem_ctx, SPropTagArray, &MIds2, 1, &SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       lpProp = get_SPropValue_SRowSet(SRowSet, PR_EMS_AB_HOME_MDB);
-       OPENCHANGE_RETVAL_IF(!lpProp, MAPI_E_NOT_FOUND, mem_ctx);
-
-       nspi->org = x500_get_dn_element(mem_ctx, lpProp->value.lpszA, ORG);
-       nspi->org_unit = x500_get_dn_element(mem_ctx, lpProp->value.lpszA, ORG_UNIT);
-       
-       OPENCHANGE_RETVAL_IF(!nspi->org_unit, MAPI_E_INVALID_PARAMETER, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!nspi->org, MAPI_E_INVALID_PARAMETER, mem_ctx);
-
-       retval = mapi_profile_add_string_attr(mapi_ctx, profname, "Organization", nspi->org);
-       retval = mapi_profile_add_string_attr(mapi_ctx, profname, "OrganizationUnit", nspi->org_unit);
-
-       nspi->servername = x500_get_servername(lpProp->value.lpszA);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "ServerName", nspi->servername);
-       set_profile_attribute(mapi_ctx, profname, *SRowSet, 0, PR_EMS_AB_HOME_MDB, "HomeMDB");
-       set_profile_mvstr_attribute(mapi_ctx, profname, *SRowSet, 0, PR_EMS_AB_PROXY_ADDRESSES, "ProxyAddress");
-
-       pNames.Count = 0x1;
-       pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-       pNames.Strings[0] = (const char *) talloc_asprintf(mem_ctx, SERVER_DN, 
-                                                          nspi->org, nspi->org_unit, 
-                                                          nspi->servername);
-       MId_server = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_server);
-       MAPIFreeBuffer((char *)pNames.Strings[0]);
-       MAPIFreeBuffer((char **)pNames.Strings);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       MAPIFreeBuffer(SRowSet);
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_EMS_AB_NETWORK_ADDRESS);
-       retval = nspi_GetProps(nspi, mem_ctx, SPropTagArray, MId_server, &SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(MId_server);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       set_profile_mvstr_attribute(mapi_ctx, profname, *SRowSet, 0, PR_EMS_AB_NETWORK_ADDRESS, "NetworkAddress");
-       MAPIFreeBuffer(SRowSet);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IStoreFolder.c b/branches/plugfest/libmapi/IStoreFolder.c
deleted file mode 100644 (file)
index 7870524..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IStoreFolder.c
-   \brief Open messages
-*/
-
-
-/**
-   \details Opens a specific message and retrieves a MAPI object that
-   can be used to get or set message properties.
-
-   This function opens a specific message defined by a combination of
-   object store, folder ID, and message ID and which read/write access
-   is defined by ulFlags.
-
-   \param obj_store the store to read from
-   \param id_folder the folder ID
-   \param id_message the message ID
-   \param obj_message the resulting message object
-   \param ulFlags
-
-   Possible ulFlags values:
-   - 0x0: read only access
-   - 0x1: ReadWrite
-   - 0x3: Create
-   - 0x4: OpenSoftDeleted
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa MAPIInitialize, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS OpenMessage(mapi_object_t *obj_store, 
-                                    mapi_id_t id_folder, 
-                                    mapi_id_t id_message, 
-                                    mapi_object_t *obj_message,
-                                    uint8_t ulFlags)
-{
-       struct mapi_context             *mapi_ctx;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct OpenMessage_req          request;
-       struct OpenMessage_repl         *reply;
-       struct mapi_session             *session;
-       mapi_object_message_t           *message;
-       struct SPropValue               lpProp;
-       const char                      *tstring;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        i = 0;
-       uint8_t                         logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenMessage");
-
-       /* Fill the OpenMessage operation */
-       request.handle_idx = 0x1;
-       request.CodePageId = 0xfff;
-       request.FolderId = id_folder;
-       request.OpenModeFlags = (enum OpenMessage_OpenModeFlags)ulFlags;
-       request.MessageId = id_message;
-       size = sizeof (uint8_t) + sizeof(uint16_t) + sizeof(mapi_id_t) + sizeof(uint8_t) + sizeof(mapi_id_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_message, session);
-       mapi_object_set_handle(obj_message, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_message, logon_id);
-
-       /* Store OpenMessage reply data */
-       reply = &mapi_response->mapi_repl->u.mapi_OpenMessage;
-
-       message = talloc_zero((TALLOC_CTX *)session, mapi_object_message_t);
-
-       tstring = get_TypedString(&reply->SubjectPrefix);
-       if (tstring) {
-               message->SubjectPrefix = talloc_strdup((TALLOC_CTX *)message, tstring);
-       }
-
-       tstring = get_TypedString(&reply->NormalizedSubject);
-       if (tstring) {
-               message->NormalizedSubject = talloc_strdup((TALLOC_CTX *)message, tstring);
-       }
-       
-
-       message->cValues = reply->RecipientColumns.cValues;
-       message->SRowSet.cRows = reply->RowCount;
-       message->SRowSet.aRow = talloc_array((TALLOC_CTX *)message, struct SRow, reply->RowCount + 1);
-
-       message->SPropTagArray.cValues = reply->RecipientColumns.cValues;
-       message->SPropTagArray.aulPropTag = talloc_steal(message, reply->RecipientColumns.aulPropTag);
-
-       for (i = 0; i < reply->RowCount; i++) {
-               emsmdb_get_SRow((TALLOC_CTX *)message, mapi_ctx->lp_ctx,
-                               &(message->SRowSet.aRow[i]), &message->SPropTagArray, 
-                               reply->recipients[i].RecipientRow.prop_count,
-                               &reply->recipients[i].RecipientRow.prop_values,
-                               reply->recipients[i].RecipientRow.layout, 1);
-
-               lpProp.ulPropTag = PR_RECIPIENT_TYPE;
-               lpProp.value.l = reply->recipients[i].RecipClass;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-
-               lpProp.ulPropTag = PR_INTERNET_CPID;
-               lpProp.value.l = reply->recipients[i].codepage;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-       }
-
-       /* add SPropTagArray elements we automatically append to SRow */
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_RECIPIENT_TYPE);
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_INTERNET_CPID);
-
-       obj_message->private_data = (void *) message;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve the message properties for an already open message.
-
-   This function is very similar to OpenMessage, but works on an already
-   open message object.
-
-   \param obj_message the message object to retrieve the properties for.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa OpenMessage
-*/
-_PUBLIC_ enum MAPISTATUS ReloadCachedInformation(mapi_object_t *obj_message)
-{
-       struct mapi_context                     *mapi_ctx;
-       struct mapi_request                     *mapi_request;
-       struct mapi_response                    *mapi_response;
-       struct EcDoRpc_MAPI_REQ                 *mapi_req;
-       struct ReloadCachedInformation_req      request;
-       struct ReloadCachedInformation_repl     *reply;
-       struct mapi_session                     *session;
-       mapi_object_message_t                   *message;
-       struct SPropValue                       lpProp;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       uint32_t                                size = 0;
-       TALLOC_CTX                              *mem_ctx;
-       uint32_t                                i = 0;
-       uint8_t                                 logon_id;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_message);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ReloadCachedInformation");
-
-       /* Fill the ReloadCachedInformation operation */
-       request.Reserved = 0x0000;
-       size += sizeof (uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ReloadCachedInformation;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_ReloadCachedInformation = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_message);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Store ReloadCachedInformation reply data */
-       reply = &mapi_response->mapi_repl->u.mapi_ReloadCachedInformation;
-
-       message = talloc_zero((TALLOC_CTX *)session, mapi_object_message_t);
-       message->cValues = reply->RecipientColumns.cValues;
-       message->SRowSet.cRows = reply->RowCount;
-       message->SRowSet.aRow = talloc_array((TALLOC_CTX *)message, struct SRow, reply->RowCount + 1);
-
-       message->SPropTagArray.cValues = reply->RecipientColumns.cValues;
-       message->SPropTagArray.aulPropTag = talloc_steal(message, reply->RecipientColumns.aulPropTag);
-
-       for (i = 0; i < reply->RowCount; i++) {
-               emsmdb_get_SRow((TALLOC_CTX *)message, mapi_ctx->lp_ctx,
-                               &(message->SRowSet.aRow[i]), &message->SPropTagArray, 
-                               reply->RecipientRows[i].RecipientRow.prop_count,
-                               &reply->RecipientRows[i].RecipientRow.prop_values,
-                               reply->RecipientRows[i].RecipientRow.layout, 1);
-
-               lpProp.ulPropTag = PR_RECIPIENT_TYPE;
-               lpProp.value.l = reply->RecipientRows[i].RecipientType;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-
-               lpProp.ulPropTag = PR_INTERNET_CPID;
-               lpProp.value.l = reply->RecipientRows[i].CodePageId;
-               SRow_addprop(&(message->SRowSet.aRow[i]), lpProp);
-       }
-
-       /* add SPropTagArray elements we automatically append to SRow */
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_RECIPIENT_TYPE);
-       SPropTagArray_add((TALLOC_CTX *)message, &message->SPropTagArray, PR_INTERNET_CPID);
-
-       talloc_free(obj_message->private_data);
-       obj_message->private_data = (void *) message;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IStream.c b/branches/plugfest/libmapi/IStream.c
deleted file mode 100644 (file)
index b3d0d9e..0000000
+++ /dev/null
@@ -1,1085 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IStream.c
-
-   \brief Functions for operating on Streams on MAPI objects
- */
-
-
-/**
-   \details Open a stream
-
-   This function opens a stream on the property \a prop set in \a
-   obj_related with access flags set to \a access_flags and returns an
-   object \a obj_stream.
-
-   \param obj_related the object to open.
-   \param PropertyTag the property name for the object to create a stream
-   for.
-   \param OpenModeFlags sets the access mode for the stream and is one
-   of the following values:
-   * 0x0: ReadOnly
-   * 0x1: ReadWrite
-   * 0x2: Create
-   * 0x3: BestAccess
-   \param obj_stream the resulting stream object.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. Possible MAPI
-   error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: A problem occurred obtaining the session context
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. 
-
-   \sa ReadStream, WriteStream, GetLastError
- */
-
-_PUBLIC_ enum MAPISTATUS OpenStream(mapi_object_t *obj_related, enum MAPITAGS PropertyTag,
-                                   enum OpenStream_OpenModeFlags OpenModeFlags,
-                                   mapi_object_t *obj_stream)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct OpenStream_req   request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id;
-
-       /* Sanity checks */
-       session = mapi_object_get_session(obj_related);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_related, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "OpenStream");
-
-       size = 0;
-
-       /* Fill the OpenStream operation */
-       request.handle_idx = 0x1;
-       request.PropertyTag = PropertyTag;
-
-       /* STGM_XXX (obj_base.h windows header) */
-       request.OpenModeFlags = OpenModeFlags;
-       size += sizeof(uint8_t) + sizeof(uint32_t) + sizeof(uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OpenStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OpenStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_related);
-       mapi_request->handles[1] = 0xffffffff;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Set object session and handle */
-       mapi_object_set_session(obj_stream, session);
-       mapi_object_set_handle(obj_stream, mapi_response->handles[1]);
-       mapi_object_set_logon_id(obj_stream, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Read buffer from a stream
-
-   This function reads from an open data stream. It will read up to
-   ByteCount bytes from the stream, and return the data in data_buf.
-   ByteRead is set to the number of bytes actually read.
-
-   \param obj_stream the opened stream object
-   \param buf_data the buffer where data read from the stream will be
-   stored
-   \param ByteCount the number of bytes requested to be read from the
-   stream
-   \param ByteRead the number of bytes read from the stream
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. Possible MAPI
-   error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: A problem occurred obtaining the session context
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. 
-
-   \note The data size intended to be read from the stream shouldn't
-   extend a maximum size each time you call ReadStream. This size
-   depends on Exchange server version. However 0x1000 is known to be a
-   reliable read size value.
-
-   \sa OpenStream, WriteStream, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS ReadStream(mapi_object_t *obj_stream, unsigned char *buf_data, 
-                                   uint16_t ByteCount, uint16_t *ByteRead)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct ReadStream_req   request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "ReadStream");
-
-       *ByteRead = 0;
-       size = 0;
-
-       /* Fill the ReadStream operation */
-       request.ByteCount = ByteCount;
-       size += sizeof(uint16_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_ReadStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_ReadStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 1;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* copy no more than sz_data into buffer */
-       *ByteRead = mapi_response->mapi_repl->u.mapi_ReadStream.data.length;
-       if (*ByteRead > 0) {
-               if (*ByteRead > ByteCount) {
-                       *ByteRead = ByteCount;
-               }
-               memcpy(buf_data, mapi_response->mapi_repl->u.mapi_ReadStream.data.data, *ByteRead);
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Write buffer to the stream
-
-   This function writes the stream specified as a DATA_BLOB in data to
-   the stream obj_stream.
-
-   \param obj_stream the opened stream object
-   \param blob the DATA_BLOB to write to the stream
-   \param WrittenSize the actual number of bytes written to the
-   stream
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. 
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: A problem occurred obtaining the session
-     context, or blob was null.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-   - MAPI_E_TOO_BIG: the data blob was too large to process
-
-   \note The data size intended to be written to the stream should not
-   exceed a maximum size each time you call WriteStream. This size
-   depends on Exchange server version. However 0x1000 is known to be a
-   reliable write size value.
-
-   \sa OpenStream, ReadStream, GetLastError
-  */
-_PUBLIC_ enum MAPISTATUS WriteStream(mapi_object_t *obj_stream, DATA_BLOB *blob, uint16_t *WrittenSize)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct WriteStream_req  request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity Checks */
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!blob, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(blob->length > 0x7000, MAPI_E_TOO_BIG, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "WriteStream");
-
-       size = 0;
-
-       /* Fill the WriteStream operation */
-       request.data = *blob;
-       size +=  blob->length;
-       /* size for subcontext(2) */
-       size += 2;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_WriteStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_WriteStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *WrittenSize = mapi_response->mapi_repl->u.mapi_WriteStream.WrittenSize;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Commits stream operations
-
-   \param obj_stream the stream object to commit
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: Either the network stream or session
-   context are not valid.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream, ReadStream, WriteStream
- */
-_PUBLIC_ enum MAPISTATUS CommitStream(mapi_object_t *obj_stream)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CommitStream");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CommitStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Gets the size of a stream
-
-   \param obj_stream the stream object we retrieve size from
-   \param StreamSize pointer on the stream size
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not initialized, or there
-     was a problem obtaining the session context
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream, ReadStream
- */
-_PUBLIC_ enum MAPISTATUS GetStreamSize(mapi_object_t *obj_stream, uint32_t *StreamSize)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "GetStreamSize");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_GetStreamSize;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *StreamSize = mapi_response->mapi_repl->u.mapi_GetStreamSize.StreamSize;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Seek a specific position within the stream
-
-   \param obj_stream the stream object
-   \param Origin origin location for the seek operation
-   \param Offset the seek offset
-   \param NewPosition pointer on the new position after the operation
-
-   Origin can either take one of the following values:
-
-   * 0x0 The new seek pointer is an offset relative to the beginning
-   of the stream.
-   * 0x1 The new seek pointer is an offset relative to the current
-   seek pointer location.
-   * 0x2 The new seek pointer is an offset relative to the end of the
-   stream.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not valid, Origin is out
-   of limits, or NewPosition is null.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream, ReadStream 
- */
-_PUBLIC_ enum MAPISTATUS SeekStream(mapi_object_t *obj_stream, uint8_t Origin, uint64_t Offset, 
-                                   uint64_t *NewPosition)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct SeekStream_req   request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF((Origin > 2), MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!NewPosition, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SeekStream");
-       size = 0;
-
-       /* Fill the SeekStream operation */
-       request.Origin = Origin;
-       size += sizeof (uint8_t);
-
-       request.Offset = Offset;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SeekStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SeekStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *NewPosition = mapi_response->mapi_repl->u.mapi_SeekStream.NewPosition;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the stream size
-
-   \param obj_stream the stream object
-   \param SizeStream the size of the stream
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream, GetStreamSize
- */
-_PUBLIC_ enum MAPISTATUS SetStreamSize(mapi_object_t *obj_stream, uint64_t SizeStream)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SetStreamSize_req        request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetStreamSize");
-       size = 0;
-
-       /* Fill the SetStreamSize operation */
-       request.SizeStream = SizeStream;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetStreamSize;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SetStreamSize = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy a number of bytes from a source stream to another
-   stream
-
-   \param obj_src the source stream object
-   \param obj_dst the destination stream object
-   \param ByteCount the number of bytes to copy
-   \param ReadByteCount pointer on the number of bytes read from the
-   source object
-   \param WrittenByteCount pointer on the number of bytes written to
-   the destination object
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_BOOKMARK: the bookmark specified is invalid or
-     beyond the last row requested.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream
-*/
-_PUBLIC_ enum MAPISTATUS CopyToStream(mapi_object_t *obj_src, mapi_object_t *obj_dst,
-                                     uint64_t ByteCount, uint64_t *ReadByteCount,
-                                     uint64_t *WrittenByteCount)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CopyToStream_req request;
-       struct mapi_session     *session[2];
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity Check */
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session[0] = mapi_object_get_session(obj_src);
-       session[1] = mapi_object_get_session(obj_dst);
-
-       OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
-
-       OPENCHANGE_RETVAL_IF(!ByteCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReadByteCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!WrittenByteCount, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_src, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CopyToStream");
-       size = 0;
-
-       /* Fill the CopyToStream operation */
-       request.handle_idx = 0x1;
-       size += sizeof (uint8_t);
-
-       request.ByteCount = ByteCount;
-       size += sizeof (uint64_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CopyToStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CopyToStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = mapi_object_get_handle(obj_dst);
-
-       status = emsmdb_transaction_wrapper(session[0], mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session[0], mapi_response);
-
-       *ReadByteCount = mapi_response->mapi_repl->u.mapi_CopyToStream.ReadByteCount;
-       *WrittenByteCount = mapi_response->mapi_repl->u.mapi_CopyToStream.WrittenByteCount;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Lock a range of bytes within the stream
-
-   \param obj_stream the stream object
-   \param RegionOffset starting point for the range
-   \param RegionSize length of the range
-   \param LockFlags type of locking to apply
-
-   Setting LockFlags to 0x00000001 will provide a write lock (i.e. one
-   writer, any number of readers). Setting LockFlags to any other value
-   will provide a read-write lock (one reader/writer, no other readers
-   or writers).
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa UnlockRegionStream 
- */
-_PUBLIC_ enum MAPISTATUS LockRegionStream(mapi_object_t *obj_stream, uint64_t RegionOffset, 
-                                         uint64_t RegionSize, uint32_t LockFlags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct LockRegionStream_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "LockRegionStream");
-       size = 0;
-
-       /* Fill the LockRegionStream operation */
-       request.RegionOffset = RegionOffset;
-       size += sizeof (uint64_t);
-       request.RegionSize = RegionSize;
-       size += sizeof (uint64_t);
-       request.LockFlags = LockFlags;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_LockRegionStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_LockRegionStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Unlock a range of bytes within the stream
-
-   \param obj_stream the stream object
-   \param RegionOffset starting point for the range
-   \param RegionSize length of the range
-   \param LockFlags type of locking
-
-   LockFlags used in unlocking must match the LockFlags used in locking.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not valid
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa UnlockRegionStream 
- */
-_PUBLIC_ enum MAPISTATUS UnlockRegionStream(mapi_object_t *obj_stream, uint64_t RegionOffset, 
-                                           uint64_t RegionSize, uint32_t LockFlags)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct UnlockRegionStream_req   request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "UnlockRegionStream");
-       size = 0;
-
-       /* Fill the LockRegionStream operation */
-       request.RegionOffset = RegionOffset;
-       size += sizeof (uint64_t);
-       request.RegionSize = RegionSize;
-       size += sizeof (uint64_t);
-       request.LockFlags = LockFlags;
-       size += sizeof (uint32_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_UnlockRegionStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_UnlockRegionStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Clone a source stream to another stream
-
-   \param obj_src the source stream object
-   \param obj_dst the destination stream object
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: source or destination streams are not valid.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-   
-   \sa OpenStream
-*/
-_PUBLIC_ enum MAPISTATUS CloneStream(mapi_object_t *obj_src, mapi_object_t *obj_dst)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct CloneStream_req  request;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size;
-       uint8_t                 logon_id;
-
-       /* Sanity Check */
-       OPENCHANGE_RETVAL_IF(!obj_src, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_dst, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_src);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_src, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "CloneStream");
-       size = 0;
-
-       /* Fill the CloneStream operation */
-       request.handle_idx = 0x1; /* destionation */
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_CloneStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_CloneStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t) * 2;
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 2);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_src);
-       mapi_request->handles[1] = 0xFFFFFFFF;
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       mapi_object_set_handle(obj_dst, mapi_response->handles[1]);
-       mapi_object_set_session(obj_dst, session);
-       mapi_object_set_logon_id(obj_dst, logon_id);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Write and commit a buffer to the stream
-
-   This function writes and commits the contents of a DATA_BLOB to
-   the stream obj_stream.
-
-   \param obj_stream the opened stream object
-   \param blob the DATA_BLOB to write to the stream
-   \param WrittenSize the actual number of bytes written to the
-   stream
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. 
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: A problem occurred obtaining the session
-     context, or the stream or blob were null.
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-   - MAPI_E_TOO_BIG: the data blob was too large to process
-
-   \note The data size intended to be written to the stream should not
-   exceed a maximum size each time you call WriteStream. This size
-   depends on Exchange server version. However 0x1000 is known to be a
-   reliable write size value.
-
-   \sa WriteStream, CommitStream
-  */
-_PUBLIC_ enum MAPISTATUS WriteAndCommitStream(mapi_object_t *obj_stream, DATA_BLOB *blob, uint16_t *WrittenSize)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct WriteAndCommitStream_req request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!blob, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(blob->length > 0x7000, MAPI_E_TOO_BIG, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "WriteAndCommitStream");
-
-       size = 0;
-
-       /* Fill the WriteStream operation */
-       request.data = *blob;
-       size +=  blob->length;
-       /* size for subcontext(2) */
-       size += 2;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_WriteAndCommitStream;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_WriteAndCommitStream = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_stream);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       *WrittenSize = mapi_response->mapi_repl->u.mapi_WriteAndCommitStream.WrittenSize;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
diff --git a/branches/plugfest/libmapi/IUnknown.c b/branches/plugfest/libmapi/IUnknown.c
deleted file mode 100644 (file)
index b09d77e..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IUnknown.c
-
-   \brief Various miscellaneous (ungrouped) functions
- */
-
-
-/**
-   \details Allocate memory using the MAPI memory context
-   
-   \param mapi_ctx pointer to the MAPI context
-   \param size the number of bytes to allocate
-   \param ptr pointer to the allocated byte region
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_SESSION_LIMIT: No session has been opened on the provider
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   - MAPI_E_INVALID_PARAMER: size is not set properly.
-
-   \sa MAPIFreeBuffer, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS MAPIAllocateBuffer(struct mapi_context *mapi_ctx, uint32_t size, void **ptr)
-{
-       TALLOC_CTX      *mem_ctx;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = (TALLOC_CTX *) mapi_ctx->mem_ctx;
-
-       *ptr = talloc_size(mem_ctx, size);
-       OPENCHANGE_RETVAL_IF(!ptr, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Free allocated memory
-
-   This function frees memory previously allocated with
-   MAPIAllocateBuffer.
-
-   \param ptr memory region to free
-       
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMER: ptr is not set properly.
-
-   \sa MAPIAllocateBuffer, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS MAPIFreeBuffer(void *ptr)
-{
-       int             ret;
-
-       OPENCHANGE_RETVAL_IF(!ptr, MAPI_E_INVALID_PARAMETER, NULL);
-
-       ret = talloc_free(ptr);
-       OPENCHANGE_RETVAL_IF(ret == -1, MAPI_E_INVALID_PARAMETER, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Release an object on the server
-
-   The function releases the object \a obj on the server.
-
-   \param obj the object to release
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS Release(mapi_object_t *obj)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                size = 0;
-       enum MAPISTATUS         retval;
-       uint8_t                 logon_id = 0;
-
-       /* Sanity checks */
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "Release");
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_Release;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-
-       if (mapi_response->mapi_repl) {
-               OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns the latest error code.
-
-   This function returns the error code set by a previous function
-   call.
-
-   \note Calls to this function may not work reliably in multi-threaded or
-   multisession code. We suggest you capture the return value of the call,
-   and check that instead.
-*/
-_PUBLIC_ enum MAPISTATUS GetLastError(void)
-{
-  return (enum MAPISTATUS)errno;
-}
-
-
-/**
-   \details Convert an ID to a Long Term Id
-
-   The function looks up the Long Term Id for a specified ID value.
-
-   \param obj the object to look up on
-   \param id the id to look up
-   \param long_term_id the long term ID returned from the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj is null
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetIdFromLongTermId
-*/
-_PUBLIC_ enum MAPISTATUS GetLongTermIdFromId(mapi_object_t *obj, mapi_id_t id,
-                                            struct LongTermId *long_term_id)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct LongTermIdFromId_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size = 0;
-       enum MAPISTATUS                 retval;
-       int                             i;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "LongTermIdFromId");
-
-       /* Fill the LongTermIdFromId operation */
-       request.Id = id;
-       size += sizeof(mapi_id_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_LongTermIdFromId;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_LongTermIdFromId = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       long_term_id->DatabaseGuid = mapi_response->mapi_repl->u.mapi_LongTermIdFromId.LongTermId.DatabaseGuid;
-       for (i = 0; i < 6; ++i) {
-               long_term_id->GlobalCounter[i] = mapi_response->mapi_repl->u.mapi_LongTermIdFromId.LongTermId.GlobalCounter[i];
-       }
-       long_term_id->padding = 0x0;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Convert an Long Term Id into an Id
-
-   The function looks up the Id for a specified Long Term Id value.
-
-   \param obj the object to look up on
-   \param long_term_id the id to look up
-   \param id the id returned by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj is null
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetLongTermIdFromId
-*/
-_PUBLIC_ enum MAPISTATUS GetIdFromLongTermId(mapi_object_t *obj, struct LongTermId long_term_id,
-                                            mapi_id_t *id)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct IdFromLongTermId_req     request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size = 0;
-       enum MAPISTATUS                 retval;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       session = mapi_object_get_session(obj);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "IdFromLongTermId");
-       size = 0;
-
-       /* Fill the IdFromLongTermId operation */
-       request.LongTermId = long_term_id;
-       size += sizeof(struct LongTermId);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_IdFromLongTermId;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_IdFromLongTermId = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = (uint16_t)size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       *id = mapi_response->mapi_repl->u.mapi_IdFromLongTermId.Id;
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/IXPLogon.c b/branches/plugfest/libmapi/IXPLogon.c
deleted file mode 100644 (file)
index 26f6810..0000000
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file IXPLogon.c
-
-   \brief Transport provider status information
-*/
-
-
-/**
-   \details Returns the types of recipients that the transport
-   provider handles.
-
-   \param obj_store the object to get recipients types from
-   \param lpcAdrType the count of recipients types returned
-   \param lpAdrTypeArray pointer on pointer of returned transport
-   provider types
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is not initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
- */
-_PUBLIC_ enum MAPISTATUS AddressTypes(mapi_object_t *obj_store,
-                                     uint16_t *lpcAdrType,
-                                     struct mapi_LPSTR **lpAdrTypeArray)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct AddressTypes_repl        *response;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "AddressTypes");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_AddressTypes;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       /* Retrieve Address Types */
-       response = &mapi_response->mapi_repl->u.mapi_AddressTypes;
-       *lpcAdrType = response->cValues;
-       *lpAdrTypeArray = talloc_steal((TALLOC_CTX *)session, response->transport);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Informs the server that the client intends to act as a
-   mail spooler.
-
-   \param obj_store: the object server store object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is not initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction 
-
-   \sa SpoolerLockMessage
- */
-_PUBLIC_ enum MAPISTATUS SetSpooler(mapi_object_t *obj_store)
-{
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mapi_session     *session;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                size = 0;
-       TALLOC_CTX              *mem_ctx;
-       uint8_t                 logon_id = 0;
-       
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SetSpooler");
-       size = 0;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SetSpooler;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Locks the specified message for spooling.
-
-   \param obj_store the store object
-   \param obj_message the message object we want to lock
-   \param lockstate the lock state
-
-   Possible values for the lock state:
-   -# LockState_1stLock (0x0): Mark the message as locked
-   -# LockState_1stUnlock (0x1): Mark the message as unlocked
-   -# LockState_1stFinished (0x2): Mark the message as ready for
-      processing by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is not initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction 
-
-     \sa SetSPooler
- */
-_PUBLIC_ enum MAPISTATUS SpoolerLockMessage(mapi_object_t *obj_store,
-                                           mapi_object_t *obj_message, 
-                                           enum LockState lockstate)
-{
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct SpoolerLockMessage_req   request;
-       struct mapi_session             *session;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        size = 0;
-       TALLOC_CTX                      *mem_ctx;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(lockstate > 2, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "SpoolerLockMessage");
-       size = 0;
-
-       /* Fill the SpoolerLockMessage operation */
-       request.MessageId = mapi_object_get_id(obj_message);
-       size += sizeof (uint64_t);
-
-       request.LockState = lockstate;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_SpoolerLockMessage;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_SpoolerLockMessage = request;
-       size += 5;
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;  
-}
-
-/**
-   \details Returns options information for the types of recipients
-      that the transport provider handles.
-
-   \param [in] obj_store the object to get recipients types from
-   \param [in] addrtype string name of the address type to get options for
-   \param [out] OptionsData the options data for this addrtype
-   \param [out] OptionsLength length of the OptionsData array
-   \param [out] HelpFile the help file data for this addrtype (often empty)
-   \param [out] HelpFileLength length of the HelpFile array
-   \param [out] HelpFileName the name of the help file (often null)
-
-   The caller is responsible for talloc_free()ing the OptionsData array.
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_store is not initialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
- */
-_PUBLIC_ enum MAPISTATUS OptionsData(mapi_object_t *obj_store, const char *addrtype,
-                                    uint8_t **OptionsData, uint16_t *OptionsLength,
-                                    uint8_t **HelpFile, uint16_t *HelpFileLength,
-                                    const char** HelpFileName)
-{
-       struct mapi_session             *session;
-       TALLOC_CTX                      *mem_ctx;
-       uint32_t                        size;
-       struct OptionsData_req          request;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       struct OptionsData_repl         *response;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint8_t                         logon_id = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!addrtype, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
-
-       if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
-               return retval;
-
-       mem_ctx = talloc_named(NULL, 0, "RecipientOptions");
-       size = 0;
-
-       /* Build the OptionsData request */
-       request.AddressType = addrtype;
-       size += strlen(addrtype) + 1;
-       request.WantWin32 = 0x1;
-       size += sizeof (uint8_t);
-
-       /* Fill the MAPI_REQ request */
-       mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       mapi_req->opnum = op_MAPI_OptionsData;
-       mapi_req->logon_id = logon_id;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_OptionsData = request;
-       size += 5;
-
-
-       /* Fill the mapi_request structure */
-       mapi_request = talloc_zero(mem_ctx, struct mapi_request);
-       mapi_request->mapi_len = size + sizeof (uint32_t);
-       mapi_request->length = size;
-       mapi_request->mapi_req = mapi_req;
-       mapi_request->handles = talloc_array(mem_ctx, uint32_t, 1);
-       mapi_request->handles[0] = mapi_object_get_handle(obj_store);
-
-       status = emsmdb_transaction_wrapper(session, mem_ctx, mapi_request, &mapi_response);
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!mapi_response->mapi_repl, MAPI_E_CALL_FAILED, mem_ctx);
-       retval = mapi_response->mapi_repl->error_code;
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Retrieve the Options Data */
-       response = &mapi_response->mapi_repl->u.mapi_OptionsData;
-
-       *OptionsLength = response->OptionsInfo.cb;
-       *OptionsData = talloc_steal((TALLOC_CTX *)session, response->OptionsInfo.lpb);
-       *HelpFileLength = response->HelpFileSize;
-       *HelpFile = talloc_steal((TALLOC_CTX *)session, response->HelpFile);
-       if (*HelpFileLength != 0) {
-               *HelpFileName = talloc_steal((TALLOC_CTX *)session, response->HelpFileName.HelpFileName);
-       } else {
-               *HelpFileName = 0;
-       }
-
-       talloc_free(mapi_response);
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/async_emsmdb.c b/branches/plugfest/libmapi/async_emsmdb.c
deleted file mode 100644 (file)
index ea68d8e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010.
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange.h"
-#include "gen_ndr/ndr_exchange_c.h"
-
-/**
-   \file async_emsmdb.c
-
-   \brief Async_EMSMDB stack functions
- */
-
-/**
-   \details Create an asynchronous wait call
-
-   This basically "parks" a call on the AsyncEMSMDB interface to allow
-   asynchronous notification to the client of changes on the server.
-   This call (probably) won't return immediately, but will return when
-   the server makes a change, or 300 seconds (5 minutes) elapses. This
-   call will then need to be re-queued if further change notifications
-   are wanted.
-
-   \param emsmdb_ctx pointer to the EMSMDB context
-   \param flagsIn input flags (currently must be 0x00000000)
-   \param flagsOut output flags (zero for a call completion with no changes, non-zero if there are changes)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-enum MAPISTATUS emsmdb_async_waitex(struct emsmdb_context *emsmdb_ctx, uint32_t flagsIn, uint32_t *flagsOut)
-{
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct EcDoAsyncWaitEx          r;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!emsmdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!(emsmdb_ctx->mem_ctx), MAPI_E_NOT_INITIALIZED, NULL);
-
-       r.in.async_handle = &(emsmdb_ctx->async_handle);
-       r.in.ulFlagsIn = flagsIn;
-       r.out.pulFlagsOut = flagsOut;
-       dcerpc_binding_handle_set_timeout(emsmdb_ctx->async_rpc_connection->binding_handle, 400);
-       status = dcerpc_EcDoAsyncWaitEx_r(emsmdb_ctx->async_rpc_connection->binding_handle, emsmdb_ctx->mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/cdo_mapi.c b/branches/plugfest/libmapi/cdo_mapi.c
deleted file mode 100644 (file)
index 5492d3b..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2010.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <param.h>
-#include <ldb.h>
-
-/**
-   \file cdo_mapi.c
-
-   \brief MAPI subsystem related operations
-*/
-
-
-/**
-   \details Create a full MAPI session
-   Open providers stored in the profile and return a pointer on a
-   IMAPISession object.
-
-   \param mapi_ctx pointer to the MAPI context
-   \param session pointer to a pointer to a MAPI session object
-   \param profname profile name to use
-   \param password password to use for the profile
-
-   password should be set to NULL if the password has been stored in
-   the profile.
-
-   \return MAPI_E_SUCCESS on success otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa MAPIInitialize, OpenProfile, MapiLogonProvider
-*/
-_PUBLIC_ enum MAPISTATUS MapiLogonEx(struct mapi_context *mapi_ctx,
-                                    struct mapi_session **session, 
-                                    const char *profname, 
-                                    const char *password)
-{
-       struct mapi_session     *tmp_session = NULL;
-       enum MAPISTATUS         retval;
-
-       retval = MapiLogonProvider(mapi_ctx, &tmp_session, profname, password, PROVIDER_ID_NSPI);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       retval = MapiLogonProvider(mapi_ctx, &tmp_session, profname, password, PROVIDER_ID_EMSMDB);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       *session = tmp_session;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Initialize a session on the specified provider
-
-   \param mapi_ctx pointer to the MAPI context
-   \param session pointer to a pointer to a MAPI session object
-   \param profname profile name
-   \param password profile password
-   \param provider provider we want to establish a connection on
-
-   password should be set to NULL if the password has been stored in
-   the profile.
-
-   Supported providers are:
-   - PROVIDER_ID_NSPI: Address Book provider
-   - PROVIDER_ID_EMSMDB: MAPI Store provider
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa MapiLogonEx, OpenProfile, LoadProfile
-*/
-_PUBLIC_ enum MAPISTATUS MapiLogonProvider(struct mapi_context *mapi_ctx,
-                                          struct mapi_session **session,
-                                          const char *profname, 
-                                          const char *password,
-                                          enum PROVIDER_ID provider)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_provider    *provider_emsmdb;
-       struct mapi_provider    *provider_nspi;
-       struct mapi_profile     *profile;
-       struct mapi_session     *el;
-       bool                    found = false;
-       bool                    exist = false;
-
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* If no MAPI session has already been created */
-       if (!mapi_ctx->session) {
-               mapi_ctx->session = talloc_zero(mapi_ctx->mem_ctx, struct mapi_session);
-       }
-       
-       /* If the session doesn't exist, create a new one */
-       if (!*session) {
-               el = talloc_zero((TALLOC_CTX *)mapi_ctx->session, struct mapi_session);
-               memset(el->logon_ids, 0, 255);
-               el->mapi_ctx = mapi_ctx;
-               OPENCHANGE_RETVAL_IF(!el, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-       } else {
-               /* Lookup the session within the chained list */
-               for (el = mapi_ctx->session; el; el = el->next) {
-                       if (*session == el) {
-                               found = true;
-                               break;
-                       }
-               }
-               OPENCHANGE_RETVAL_IF(found == false, MAPI_E_NOT_FOUND, NULL);
-               exist = true;
-       }
-
-       mem_ctx = (TALLOC_CTX *) el;
-
-       /* Open the profile */
-       if (!el->profile) {
-               profile = talloc_zero(mem_ctx, struct mapi_profile);
-               OPENCHANGE_RETVAL_IF(!profile, MAPI_E_NOT_ENOUGH_RESOURCES, el);
-
-               retval = OpenProfile(mapi_ctx, profile, profname, password);
-               OPENCHANGE_RETVAL_IF(retval, retval, el);
-               
-               retval = LoadProfile(mapi_ctx, profile);
-               OPENCHANGE_RETVAL_IF(retval, retval, el);
-
-               el->profile = profile;
-       }
-
-       switch (provider) {
-       case PROVIDER_ID_EMSMDB:
-               provider_emsmdb = talloc_zero(mem_ctx, struct mapi_provider);
-               OPENCHANGE_RETVAL_IF(!provider_emsmdb, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-               talloc_set_destructor((void *)provider_emsmdb, (int (*)(void *))emsmdb_disconnect_dtor);
-               retval = Logon(el, provider_emsmdb, PROVIDER_ID_EMSMDB);
-               if (retval) return retval;
-               el->emsmdb = provider_emsmdb;
-               break;
-       case PROVIDER_ID_NSPI:
-               provider_nspi = talloc_zero(mem_ctx, struct mapi_provider);
-               OPENCHANGE_RETVAL_IF(!provider_nspi, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-               talloc_set_destructor((void *)provider_nspi, (int (*)(void *))nspi_disconnect_dtor);
-               retval = Logon(el, provider_nspi, PROVIDER_ID_NSPI);
-               if (retval) return retval;
-               el->nspi = provider_nspi;
-               break;
-       default:
-               OPENCHANGE_RETVAL_IF(1, MAPI_E_NO_SUPPORT, el);
-               break;
-       }
-
-       /* Add the element to the session list */
-       if (exist == false) {
-               DLIST_ADD(mapi_ctx->session, el);
-               *session = el;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Initialize mapi context structure
-
-   This function inititalizes the MAPI subsystem and open the profile
-   database pointed by profiledb .
-
-   \param _mapi_ctx pointer to the MAPI context
-   \param profiledb profile database path
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate
-     the necessary resources to operate properly
-   - MAPI_E_NOT_FOUND: No suitable profile database was found in the
-     path pointed by profiledb
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \sa MAPIUninitialize
-*/
-_PUBLIC_ enum MAPISTATUS MAPIInitialize(struct mapi_context **_mapi_ctx, const char *profiledb)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       TALLOC_CTX              *mem_ctx;
-
-       /* Set the initial errno value for GetLastError */
-       errno = 0;
-
-       OPENCHANGE_RETVAL_IF(!_mapi_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!profiledb, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "MAPIInitialize");
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-
-       mapi_ctx = talloc_zero(mem_ctx, struct mapi_context);
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-       mapi_ctx->mem_ctx = mem_ctx;
-       mapi_ctx->dumpdata = false;
-       mapi_ctx->session = NULL;
-       mapi_ctx->lp_ctx = loadparm_init(mapi_ctx->mem_ctx);
-       lpcfg_load_default(mapi_ctx->lp_ctx);
-
-       /* Enable logging on stdout */
-       setup_logging(NULL, DEBUG_STDOUT);
-
-       /* profile store */
-       retval = OpenProfileStore(mapi_ctx, &mapi_ctx->ldb_ctx, profiledb);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Initialize dcerpc subsystem */
-       dcerpc_init(mapi_ctx->lp_ctx);
-
-       errno = 0;
-       
-       *_mapi_ctx = mapi_ctx;
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-
-/**
-   \details Uninitialize MAPI subsystem
-
-   \param mapi_ctx pointer to the MAPI context
-
-   This function uninitializes the MAPI context and destroy
-   recursively the whole mapi session and associated objects hierarchy
-
-   \sa MAPIInitialize, GetLastError
- */
-_PUBLIC_ void MAPIUninitialize(struct mapi_context *mapi_ctx)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_session     *session;
-
-       if (!mapi_ctx) return;
-
-       session = mapi_ctx->session;
-       if (session && session->notify_ctx && session->notify_ctx->fd != -1) {
-               DEBUG(3, ("emsmdb_disconnect_dtor: unbind udp\n"));
-               shutdown(session->notify_ctx->fd, SHUT_RDWR);
-               close(session->notify_ctx->fd);
-       }
-       
-       mem_ctx = mapi_ctx->mem_ctx;
-       talloc_free(mem_ctx);
-       mapi_ctx = NULL;
-}
-
-
-/**
-   \details Enable MAPI network trace output
-
-   \param mapi_ctx pointer to the MAPI context
-   \param status the status
-
-   possible status values/behavior:
-   -# true:  Network traces are displayed on stdout
-   -# false: Network traces are not displayed on stdout
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_INITIALIZED
- */
-_PUBLIC_ enum MAPISTATUS SetMAPIDumpData(struct mapi_context *mapi_ctx, bool status)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       
-       mapi_ctx->dumpdata = status;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set MAPI debug level
-
-   \param mapi_ctx pointer to the MAPI context
-   \param level the debug level to set
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: the function parameter is invalid
- */
-_PUBLIC_ enum MAPISTATUS SetMAPIDebugLevel(struct mapi_context *mapi_ctx, uint32_t level)
-{
-       char    *debuglevel;
-       bool    ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       debuglevel = talloc_asprintf(talloc_autofree_context(), "%u", level);
-       ret = lpcfg_set_cmdline(mapi_ctx->lp_ctx, "log level", debuglevel);
-       talloc_free(debuglevel);
-
-       return (ret == true) ? MAPI_E_SUCCESS : MAPI_E_INVALID_PARAMETER;
-}
-
-
-/**
-   \details Retrieve the MAPI loadparm context for specified MAPI
-   context
-
-   \param mapi_ctx pointer to the MAPI context
-   \param lp_ctx pointer to a pointer to the loadparm context that the
-   function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_INITIALIZED
-   or MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS GetLoadparmContext(struct mapi_context *mapi_ctx, 
-                                           struct loadparm_context **lp_ctx)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!lp_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       *lp_ctx = mapi_ctx->lp_ctx;
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/conf/build.sh b/branches/plugfest/libmapi/conf/build.sh
deleted file mode 100755 (executable)
index ab2a69d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-./libmapi/conf/mparse.pl --parser=mapitags --outputdir=libmapi/ libmapi/conf/mapi-properties
-./libmapi/conf/mparse.pl --parser=mapicodes --outputdir=libmapi/ libmapi/conf/mapi-codes
-./libmapi/conf/mparse.pl --parser=mapi_nameid --outputdir=libmapi/ libmapi/conf/mapi-named-properties
-./libmapi/conf/mparse.pl --parser=codepage_lcid --outputdir=libmapi/ libmapi/conf/codepage-lcid
-./libmapi/conf/mparse.pl --parser=mapistore_namedprops --outputdir=setup/mapistore/ libmapi/conf/mapi-named-properties
-./libmapi/conf/mparse.pl --parser=pymapi_properties --outputdir=pyopenchange/ libmapi/conf/mapi-properties
\ No newline at end of file
diff --git a/branches/plugfest/libmapi/conf/codepage-lcid b/branches/plugfest/libmapi/conf/codepage-lcid
deleted file mode 100644 (file)
index 9112657..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-
-#   OpenChange MAPI implementation.
-#
-#   Copyright (C) Julien Kerihuel 2010.
-#
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 3 of the License, or
-#   (at your option) any later version.
-#   
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#   
-#   You should have received a copy of the GNU General Public License
-#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# Lines starting with # are commented and not processed.
-# Locale using '_' underscore characters will automatically be
-# replaced by space once processed.
-
-#
-# Defines for Language group
-#
-DEFINE CP_UNICODE_ONLY                 0
-DEFINE CP_WESTERN_EUROPE_AND_US        1
-DEFINE CP_CENTRAL_EUROPE               2
-DEFINE CP_BALTIC                       3
-DEFINE CP_GREEK                        4
-DEFINE CP_CYRILLIC                     5
-DEFINE CP_TURKIC                       6
-DEFINE CP_JAPANESE                     7
-DEFINE CP_KOREAN                       8
-DEFINE CP_TRADITIONAL_CHINESE          9
-DEFINE CP_SIMPLIFIED_CHINESE           10
-DEFINE CP_THAI                         11
-DEFINE CP_HEBREW                       12
-DEFINE CP_ARABIC                       13
-DEFINE CP_VIETNAMESE                   14
-DEFINE CP_INDIC                        15
-DEFINE CP_GEORGIAN                     16
-DEFINE CP_ARMENIAN                     17
-
-#Language           Locale             Language Tag    LCID (hex)      CodePage (dec)  Language Group                  Country Code
-
-Afrikaans                    NULL               af_ZA            0x0436            1252        CP_WESTERN_EUROPE_AND_US        ZAF
-Albanian             NULL               sq_AL            0x041c            1250        CP_CENTRAL_EUROPE               ALB
-Amharic              Ethiopia           am_ET            0x045e            0           CP_UNICODE_ONLY                 ETH
-Arabic               Algeria            ar_DZ            0x1401            1256        CP_ARABIC                       DZA
-Arabic               Bahrain            ar_BH            0x3c01            1256        CP_ARABIC                       BHR
-Arabic               Egypt              ar_EG            0x0c01            1256        CP_ARABIC                       EGY
-Arabic               Iraq               ar_SA            0x0801            1256        CP_ARABIC                       IRQ
-Arabic               Jordan             ar_JO            0x2c01            1256        CP_ARABIC                       JOR
-Arabic               Kuwait             ar_KW            0x3401            1256        CP_ARABIC                       KWT
-Arabic               Lebanon            ar_LB            0x3001            1256        CP_ARABIC                       LBN
-Arabic               Libya              ar_LY            0x1001            1256        CP_ARABIC                       LBY
-Arabic               Morocco            ar_MA            0x1801            1256        CP_ARABIC                       MAR
-Arabic               Oman               ar_OM            0x2001            1256        CP_ARABIC                       OMN
-Arabic               Qatar              ar_QA            0x4001            1256        CP_ARABIC                       QAT
-Arabic               Saudi_Arabia       ar_SA            0x0401            1256        CP_ARABIC                       SAU
-Arabic               Syria              ar_SY            0x2801            1256        CP_ARABIC                       SYR
-Arabic               Tunisia            ar_TN            0x1c01            1256        CP_ARABIC                       TUN
-Arabic               U.A.E.             ar_AE            0x3801            1256        CP_ARABIC                       ARE
-Arabic               Yemen              ar_YE            0x2401            1256        CP_ARABIC                       YEM
-Armenian             NULL               hy_AM            0x042b            0           CP_ARMENIAN                     ARM
-Assamese             NULL               as_IN            0x044d            0           CP_INDIC                        NULL
-Azeri                Cyrillic           az_Cyrl_AZ       0x082c            1251        CP_CYRILLIC                     AZE
-Azeri                Latin              az_Latn_AZ       0x042c            1254        CP_TURKIC                       AZE
-Basque               NULL               eu_ES            0x042d            1252        CP_WESTERN_EUROPE_AND_US        ESP
-Belarusian           NULL               be_BY            0x0423            1251        CP_CYRILLIC                     BLR
-Bengali              India              bn_IN            0x0445            0           CP_INDIC                        BGD
-Bosnian              Bosnia/Herzegovina bs_Latn_BA       0x141A            1250        CP_CENTRAL_EUROPE               BIH
-Breton               France             br_FR            0x047e            1252        CP_WESTERN_EUROPE_AND_US        BRE
-Bulgarian            NULL               bg_BG            0x0402            1251        CP_CYRILLIC                     BGR
-Catalan                      NULL               ca_ES            0x0403            1252        CP_WESTERN_EUROPE_AND_US        ESP
-Chinese                      Hong_Kong_S.A.R.   zh_HK            0x0c04            950         CP_TRADITIONAL_CHINESE          HKG
-Chinese                      Macau_S.A.R.       zh_MO            0x1404            950         CP_TRADITIONAL_CHINESE          MCO
-Chinese                      PRC                zh_CN            0x0804            936         CP_SIMPLIFIED_CHINESE           CHN
-Chinese                      Singapore          zh_SG            0x1004            936         CP_SIMPLIFIED_CHINESE           SGP
-Chinese                      Taiwan             zh_TW            0x0404            950         CP_TRADITIONAL_CHINESE          TWN
-Croatian             NULL               hr_HR            0x041a            1250        CP_CENTRAL_EUROPE               HRV
-Croatian             Bosnia/Herzegovina hr_BA            0x101a            1250        CP_CENTRAL_EUROPE               BIH
-Czech                NULL               cz_CZ            0x0405            1250        CP_CENTRAL_EUROPE               CZE
-Danish               NULL               da_DK            0x0406            1252        CP_WESTERN_EUROPE_AND_US        DNK
-Dari                 Afghanistan        gbz_AF           0x048c            1256        CP_ARABIC                       AFG
-Divehi               NULL               dv_MV            0x0465            0           CP_UNICODE_ONLY                 MDV
-Dutch                Belgium            nl_BE            0x0813            1252        CP_WESTERN_EUROPE_AND_US        BEL
-Dutch                Netherlands        nl_NL            0x0413            1252        CP_WESTERN_EUROPE_AND_US        NLD
-English                      Australia          en_AU            0x0c09            1252        CP_WESTERN_EUROPE_AND_US        AUS
-English                      Belize             en_BZ            0x2809            1252        CP_WESTERN_EUROPE_AND_US        BLZ
-English                      Canada             en_CA            0x1009            1252        CP_WESTERN_EUROPE_AND_US        CAN
-English                      Caribbean          en_CB            0x2409            1252        CP_WESTERN_EUROPE_AND_US        CAR
-English              India              en_IN            0x4009            1252        CP_WESTERN_EUROPE_AND_US        IND
-English                      Ireland            en_IE            0x1809            1252        CP_WESTERN_EUROPE_AND_US        IRL
-English                      Jamaica            en_JM            0x2009            1252        CP_WESTERN_EUROPE_AND_US        JAM
-English                      New_Zealand        en_NZ            0x1409            1252        CP_WESTERN_EUROPE_AND_US        NZL
-English                      Philippines        en_PH            0x3409            1252        CP_WESTERN_EUROPE_AND_US        PHL
-English                      South_Africa       en_ZA            0x1c09            1252        CP_WESTERN_EUROPE_AND_US        ZAF
-English                      Trinidad           en_TT            0x2c09            1252        CP_WESTERN_EUROPE_AND_US        TTO
-English                      United_Kingdom     en_GB            0x0809            1252        CP_WESTERN_EUROPE_AND_US        GBR
-English                      United_States      en_US            0x0409            1252        CP_WESTERN_EUROPE_AND_US        USA
-English                      Zimbabwe           en_ZW            0x3009            1252        CP_WESTERN_EUROPE_AND_US        ZWE
-Estonian             NULL               et_EE            0x0425            1257        CP_BALTIC                       EST
-Faroese                      NULL               fo_FO            0x0438            1252        CP_WESTERN_EUROPE_AND_US        FRO
-Farsi                NULL               fa_IR            0x0429            1256        CP_ARABIC                       IRN
-Filipino             NULL               fil_PH           0x0464            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Finnish                      NULL               fi_FI            0x040b            1252        CP_WESTERN_EUROPE_AND_US        FIN
-French               Belgium            fr_BE            0x080c            1252        CP_WESTERN_EUROPE_AND_US        BEL
-French               Cameroon           fr_CM            0x2c0c            1252        CP_WESTERN_EUROPE_AND_US        NULL
-French               Canada             fr_CA            0x0c0c            1252        CP_WESTERN_EUROPE_AND_US        CAN
-French               Congo,DRC          fr_CG            0x240c            1252        CP_WESTERN_EUROPE_AND_US        COD
-French               Cote_d'Ivoire      fr_CI            0x300c            1252        CP_WESTERN_EUROPE_AND_US        CIV
-French               France             fr_FR            0x040c            1252        CP_WESTERN_EUROPE_AND_US        FRA
-French               Luxembourg         fr_LU            0x140c            1252        CP_WESTERN_EUROPE_AND_US        LUX
-French               Mali               fr_ML            0x340c            1252        CP_WESTERN_EUROPE_AND_US        MLI
-French               Monaco             fr_MC            0x180c            1252        CP_WESTERN_EUROPE_AND_US        MCO
-French               Morocco            fr_MA            0x380c            1252        CP_WESTERN_EUROPE_AND_US        MAR
-French               Senegal            fr_SN            0x280c            1252        CP_WESTERN_EUROPE_AND_US        SEN
-French               Switzerland        fr_CH            0x100c            1252        CP_WESTERN_EUROPE_AND_US        CHE
-French               West_Indies        fr_West_Indies   0x1c0c            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Frisian              Netherlands        fy_NL            0x0462            1252        CP_WESTERN_EUROPE_AND_US        NULL
-FYRO_Macedonian              NULL               mk_MK            0x042f            1251        CP_CYRILLIC                     MKD
-Gaelic_Ireland       NULL               ga_IE            0x083c            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Galician             Spain              gl_ES            0x0456            1252        CP_WESTERN_EUROPE_AND_US        ESP
-Georgian             NULL               ka_GE            0x0437            0           CP_GEORGIAN                     GEO
-German               Austria            de_AT            0x0c07            1252        CP_WESTERN_EUROPE_AND_US        AUT
-German               Germany            de_DE            0x0407            1252        CP_WESTERN_EUROPE_AND_US        DEU
-German               Liechtenstein      de_LI            0x1407            1252        CP_WESTERN_EUROPE_AND_US        LIE
-German               Luxembourg         de_LU            0x1007            1252        CP_WESTERN_EUROPE_AND_US        LUX
-German               Switzerland        de_CH            0x0807            1252        CP_WESTERN_EUROPE_AND_US        CHE
-Greek                NULL               el_GR            0x0408            1253        CP_GREEK                        GRC
-Gujarati             NULL               gu_IN            0x0447            0           CP_INDIC                        IND
-Hebrew               NULL               he_IL            0x040d            1255        CP_HEBREW                       ISR
-Hindi                NULL               hi_IN            0x0439            0           CP_INDIC                        IND
-Hungarian            NULL               hu_HU            0x040e            1250        CP_CENTRAL_EUROPE               HUNG
-Icelandic            NULL               is_IS            0x040f            1252        CP_WESTERN_EUROPE_AND_US        ISL
-Igbo                 Nigeria            ig_NG            0x0470            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Indonesian           NULL               id_ID            0x0421            1252        CP_WESTERN_EUROPE_AND_US        IDN
-Italian                      Italy              it_IT            0x0410            1252        CP_WESTERN_EUROPE_AND_US        ITA
-Italian                      Switzerland        it_CH            0x0810            1252        CP_WESTERN_EUROPE_AND_US        CHE
-Japanese             NULL               ja_JP            0x0411            932         CP_JAPANESE                     JPN
-Kannada                      NULL               kn_IN            0x044b            0           CP_UNICODE_ONLY                 IDN
-Kazakh               NULL               kk_KZ            0x043f            1251        CP_CYRILLIC                     KAZ
-Khmer                NULL               km_KH            0x0453            0           CP_UNICODE_ONLY                 NULL
-Konkani                      NULL               kok_IN           0x0457            0           CP_INDIC                        IND
-Korean               NULL               ko_KR            0x0412            949         CP_KOREAN                       KOR
-Kyrgyz               Cyrillic           ky_KG            0x0440            1251        CP_CYRILLIC                     KGZ
-Lao                  NULL               lo_LA            0x0454            0           CP_UNICODE_ONLY                 NULL
-Latvian                      NULL               lv_LV            0x0426            1257        CP_BALTIC                       LVA
-Lithuanian           NULL               lt_LT            0x0427            1257        CP_BALTIC                       LTU
-Macedonian           NULL               mk_MK            0x042f            1251        CP_CYRILLIC                     MKD
-Malay                Brunei_Darussalam  ms_BN            0x083e            1252        CP_WESTERN_EUROPE_AND_US        BRN
-Malay                Malaysia           ms_MY            0x043e            1252        CP_WESTERN_EUROPE_AND_US        MYS
-Malayalam            NULL               ml_IN            0x044c            0           CP_UNICODE_ONLY                 NULL
-Maltese                      NULL               mt_MT            0x043a            1252        CP_WESTERN_EUROPE_AND_US        MLT
-Maori                New_Zealand        mi_NZ            0x0481            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Marathi                      NULL               ms_IN            0x044e            0           CP_INDIC                        IND
-Mongolian            Cyrillic           mn_MN            0x0450            1251        CP_CYRILLIC                     MNG
-Mongolian            Mongolia           mn_Mong_CN       0x0850            0           CP_UNICODE_ONLY                 MNG
-Nepali               NULL               ne_NP            0x0461            0           CP_UNICODE_ONLY                 NPL
-Norwegian            Bokmal             nb_NO            0x0414            1252        CP_WESTERN_EUROPE_AND_US        NOR
-Norwegian            Nynorsk            nn_NO            0x0814            1252        CP_WESTERN_EUROPE_AND_US        NOR
-Oriya                NULL               or_IN            0x0448            0           CP_INDIC                        NULL
-Polish               NULL               pl_PL            0x0415            1250        CP_CENTRAL_EUROPE               POL
-Portuguese           Brazil             pt_BR            0x0416            1252        CP_WESTERN_EUROPE_AND_US        BRA
-Portuguese           Portugal           pt_PT            0x0816            1252        CP_WESTERN_EUROPE_AND_US        PLT
-Punjabi                      NULL               pa_IN            0x0446            0           CP_INDIC                        IND
-Rhaeto-Romanic       NULL               rm_CH            0x0417            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Romanian             NULL               ro_RM            0x0418            1250        CP_CENTRAL_EUROPE               ROM
-Romanian             Moldova            ro_MO            0x0818            819         CP_CENTRAL_EUROPE               NULL
-Russian                      NULL               ru_RU            0x0419            1251        CP_CYRILLIC                     RUS
-Sami_Lappish         NULL               se_NO            0x043b            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Sanskrit             NULL               sa_IN            0x044f            0           CP_INDIC                        IND
-Serbian                      Cyrillic           sr_Cyrl_CS       0x0c1a            1251        CP_CYRILLIC                     SPB
-Serbian                      Latin              sr_Latn_CS       0x081a            1250        CP_CENTRAL_EUROPE               SPB
-Sindhi               NULL               sd_IN            0x0459            0           CP_INDIC                        NULL
-Sinhalese            Sri_Lanka          si_LK            0x045b            0           CP_UNICODE_ONLY                 NULL
-Slovak               NULL               sk_SK            0x041b            1250        CP_CENTRAL_EUROPE               SVK
-Slovenian            NULL               sl_SI            0x0424            1250        CP_CENTRAL_EUROPE               SVN
-Spanish                      Argentina          es_AR            0x2c0a            1252        CP_WESTERN_EUROPE_AND_US        ARG
-Spanish                      Bolivia            es_BO            0x400a            1252        CP_WESTERN_EUROPE_AND_US        BOL
-Spanish                      Chile              es_CL            0x340a            1252        CP_WESTERN_EUROPE_AND_US        CHL
-Spanish                      Colombia           es_CO            0x240a            1252        CP_WESTERN_EUROPE_AND_US        COL
-Spanish                      Costa_Rica         es_CR            0x140a            1252        CP_WESTERN_EUROPE_AND_US        CRI
-Spanish                      Dominican_Republic es_DO            0x1c0a            1252        CP_WESTERN_EUROPE_AND_US        DOM
-Spanish                      Ecuador            es_EC            0x300a            1252        CP_WESTERN_EUROPE_AND_US        ECU
-Spanish                      El_Salvador        es_SV            0x440a            1252        CP_WESTERN_EUROPE_AND_US        SLV
-Spanish                      Guatemala          es_GT            0x100a            1252        CP_WESTERN_EUROPE_AND_US        GTM
-Spanish                      Honduras           es_HN            0x480a            1252        CP_WESTERN_EUROPE_AND_US        HND
-Spanish                      International_Sort es_ES            0x0c0a            1252        CP_WESTERN_EUROPE_AND_US        ESP
-Spanish                      Mexico             es_MX            0x080a            1252        CP_WESTERN_EUROPE_AND_US        MEX
-Spanish                      Nicaragua          es_NI            0x4c0a            1252        CP_WESTERN_EUROPE_AND_US        NIC
-Spanish                      Panama             es_PA            0x180a            1252        CP_WESTERN_EUROPE_AND_US        PAN
-Spanish                      Paraguay           es_PY            0x3c0a            1252        CP_WESTERN_EUROPE_AND_US        PRY
-Spanish                      Peru               es_PE            0x280a            1252        CP_WESTERN_EUROPE_AND_US        PER
-Spanish                      Puerto_Rico        es_PR            0x500a            1252        CP_WESTERN_EUROPE_AND_US        PRI
-Spanish                      Traditional_Sort   es_ES_tradnl     0x040a            1252        CP_WESTERN_EUROPE_AND_US        ESP
-Spanish                      Uruguay            es_UY            0x380a            1252        CP_WESTERN_EUROPE_AND_US        URY
-Spanish                      Venezuela          es_VE            0x200a            1252        CP_WESTERN_EUROPE_AND_US        VEN
-Swahili                      NULL               sw_KE            0x0441            1252        CP_WESTERN_EUROPE_AND_US        KEN
-Swedish                      NULL               sv_SE            0x041d            1252        CP_WESTERN_EUROPE_AND_US        SWE
-Swedish                      Finland            sv_FI            0x081d            1252        CP_WESTERN_EUROPE_AND_US        FIN
-Tajik                NULL               tg_Cyrl_TJ       0x0428            1251        CP_CYRILLIC                     NULL
-Tamil                NULL               ta_IN            0x0449            0           CP_INDIC                        IND
-Tatar                NULL               tt_RU            0x0444            1251        CP_CYRILLIC                     RUS
-Telegu               NULL               te_IN            0x044a            0           CP_INDIC                        IND
-Thai                 NULL               th_TH            0x041e            874         CP_THAI                         THA
-Tibetan                      NULL               bo_CN            0x0451            0           CP_UNICODE_ONLY                 NULL
-Tsonga               NULL               ts_ZA            0x0431            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Twana                NULL               tn_ZA            0x0432            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Turkish                      NULL               tr_TR            0x041f            1254        CP_TURKIC                       TUR
-Turkmen                      NULL               tk_TM            0x0442            1251        CP_CYRILLIC                     NULL
-Ukrainian            NULL               uk_UA            0x0422            1251        CP_CYRILLIC                     UKR
-Urdu                 NULL               ur_PK            0x0420            1256        CP_ARABIC                       PAK
-Uzbek                Cyrillic           uz_Cyrl_UZ       0x0843            1251        CP_CYRILLIC                     UZB
-Uzbek                Latin              uz_Latn_UZ       0x0443            1254        CP_TURKIC                       UZB
-Venda                NULL               ven_ZA           0x0433            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Vietnamese           NULL               vi_VN            0x042a            1258        CP_VIETNAMESE                   VNM
-Welsh                NULL               cy_GB            0x0452            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Wolof                Senegal            wo_SN            0x0488            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Xhosa                NULL               xh_ZA            0x0434            1252        CP_WESTERN_EUROPE_AND_US        NULL
-Zulu                 NULL               zu_ZA            0x0435            1252        CP_WESTERN_EUROPE_AND_US        NULL
diff --git a/branches/plugfest/libmapi/conf/mapi-codes b/branches/plugfest/libmapi/conf/mapi-codes
deleted file mode 100644 (file)
index 86f7e07..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-#
-# OpenChange MAPI implementation.
-# MAPI error codes
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-0x00000000  MAPI_E_SUCCESS
-0x80004002  MAPI_E_INTERFACE_NO_SUPPORT
-0x80004005  MAPI_E_CALL_FAILED
-0x80040102  MAPI_E_NO_SUPPORT
-0x80040103  MAPI_E_BAD_CHARWIDTH
-0x80040105  MAPI_E_STRING_TOO_LONG
-0x80040106  MAPI_E_UNKNOWN_FLAGS
-0x80040107  MAPI_E_INVALID_ENTRYID
-0x80040108  MAPI_E_INVALID_OBJECT
-0x80040109  MAPI_E_OBJECT_CHANGED
-0x8004010A  MAPI_E_OBJECT_DELETED
-0x8004010B  MAPI_E_BUSY
-0x8004010D  MAPI_E_NOT_ENOUGH_DISK
-0x8004010E  MAPI_E_NOT_ENOUGH_RESOURCES
-0x8004010F  MAPI_E_NOT_FOUND
-0x80040110  MAPI_E_VERSION
-0x80040111  MAPI_E_LOGON_FAILED
-0x80040112  MAPI_E_SESSION_LIMIT
-0x80040113  MAPI_E_USER_CANCEL
-0x80040114  MAPI_E_UNABLE_TO_ABORT
-0x80040115  MAPI_E_NETWORK_ERROR
-0x80040116  MAPI_E_DISK_ERROR
-0x80040117  MAPI_E_TOO_COMPLEX
-0x80040118  MAPI_E_BAD_COLUMN
-0x80040119  MAPI_E_EXTENDED_ERROR
-0x8004011A  MAPI_E_COMPUTED
-0x8004011B  MAPI_E_CORRUPT_DATA
-0x8004011C  MAPI_E_UNCONFIGURED
-0x8004011D  MAPI_E_FAILONEPROVIDER
-0x8004011E  MAPI_E_UNKNOWN_CPID
-0x8004011F  MAPI_E_UNKNOWN_LCID
-0x80040120  MAPI_E_PASSWORD_CHANGE_REQUIRED
-0x80040121  MAPI_E_PASSWORD_EXPIRED
-0x80040122  MAPI_E_INVALID_WORKSTATION_ACCOUNT
-0x80040123  MAPI_E_INVALID_ACCESS_TIME
-0x80040124  MAPI_E_ACCOUNT_DISABLED
-0x80040200  MAPI_E_END_OF_SESSION
-0x80040201  MAPI_E_UNKNOWN_ENTRYID
-0x80040202  MAPI_E_MISSING_REQUIRED_COLUMN
-0x00040203  MAPI_W_NO_SERVICE
-0x80040301  MAPI_E_BAD_VALUE
-0x80040302  MAPI_E_INVALID_TYPE
-0x80040303  MAPI_E_TYPE_NO_SUPPORT
-0x80040304  MAPI_E_UNEXPECTED_TYPE
-0x80040305  MAPI_E_TOO_BIG
-0x80040306  MAPI_E_DECLINE_COPY
-0x80040307  MAPI_E_UNEXPECTED_ID
-0x00040380  MAPI_W_ERRORS_RETURNED
-0x80040400  MAPI_E_UNABLE_TO_COMPLETE
-0x80040401  MAPI_E_TIMEOUT
-0x80040402  MAPI_E_TABLE_EMPTY
-0x80040403  MAPI_E_TABLE_TOO_BIG
-0x80040405  MAPI_E_INVALID_BOOKMARK
-0x00040481  MAPI_W_POSITION_CHANGED
-0x00040482  MAPI_W_APPROX_COUNT
-0x80040500  MAPI_E_WAIT
-0x80040501  MAPI_E_CANCEL
-0x80040502  MAPI_E_NOT_ME
-0x00040580  MAPI_W_CANCEL_MESSAGE
-0x80040600  MAPI_E_CORRUPT_STORE
-0x80040601  MAPI_E_NOT_IN_QUEUE
-0x80040602  MAPI_E_NO_SUPPRESS
-0x80040604  MAPI_E_COLLISION
-0x80040605  MAPI_E_NOT_INITIALIZED
-0x80040606  MAPI_E_NON_STANDARD
-0x80040607  MAPI_E_NO_RECIPIENTS
-0x80040608  MAPI_E_SUBMITTED
-0x80040609  MAPI_E_HAS_FOLDERS
-0x8004060A  MAPI_E_HAS_MESAGES
-0x8004060B  MAPI_E_FOLDER_CYCLE
-0x8004060D  MAPI_E_LOCKID_LIMIT
-0x00040680  MAPI_W_PARTIAL_COMPLETION
-0x80040700  MAPI_E_AMBIGUOUS_RECIP
-0x80040800  SYNC_E_OBJECT_DELETED
-0x80040801  SYNC_E_IGNORE
-0x80040802  SYNC_E_CONFLICT
-0x80040803  SYNC_E_NO_PARENT
-0x80040804  SYNC_E_CYCLE_DETECTED
-0x80040805  SYNC_E_UNSYNCHRONIZED
-0x00040820  SYNC_W_PROGRESS
-0x00040821  SYNC_W_CLIENT_CHANGE_NEWER
-0x80040900  MAPI_E_NAMED_PROP_QUOTA_EXCEEDED
-0x80040FFF  MAPI_E_NOT_IMPLEMENTED
-0x80070005  MAPI_E_NO_ACCESS
-0x8007000E  MAPI_E_NOT_ENOUGH_MEMORY
-0x80070057  MAPI_E_INVALID_PARAMETER
-
-#
-# Additional Error Codes
-#
-
-0x000003EA  ecJetError
-0x000003EB  ecUnknownUser
-0x000003ED  ecExiting
-0x000003EE  ecBadConfig
-0x000003EF  ecUnknownCodePage
-0x000003F0  ecMemory
-0x000003F2  ecLoginPerm
-0x000003F3  ecDatabaseRolledBack
-0x000003F4  ecDatabaseCopiedError
-0x000003F5  ecAuditNotAllowed
-0x000003F6  ecZombieUser
-0x000003F7  ecUnconvertableACL
-0x0000044C  ecNoFreeJses
-0x0000044D  ecDifferentJses
-0x0000044F  ecFileRemove
-0x00000450  ecParameterOverflow
-0x00000451  ecBadVersion
-0x00000452  ecTooManyCols
-0x00000453  ecHaveMore
-0x00000454  ecDatabaseError
-0x00000455  ecIndexNameTooBig
-0x00000456  ecUnsupportedProp
-0x00000457  ecMsgNotSaved
-0x00000459  ecUnpubNotif
-0x0000045B  ecDifferentRoot
-0x0000045C  ecBadFolderName
-0x0000045D  ecAttachOpen
-0x0000045E  ecInvClpsState
-0x0000045F  ecSkipMyChildren
-0x00000460  ecSearchFolder
-0x00000461  ecNotSearchFolder
-0x00000462  ecFolderSetReceive
-0x00000463  ecNoReceiveFolder
-0x00000465  ecNoDelSubmitMsg
-0x00000467  ecInvalidRecips
-0x00000468  ecNoReplicaHere
-0x00000469  ecNoReplicaAvailable
-0x0000046A  ecPublicMDB
-0x0000046B  ecNotPublicMDB
-0x0000046C  ecRecordNotFound
-0x0000046D  ecReplConflict
-0x00000470  ecFxBufferOverrun
-0x00000471  ecFxBufferEmpty
-0x00000472  ecFxPartialValue
-0x00000473  ecFxNoRoom
-0x00000474  ecMaxTimeExpired
-0x00000475  ecDstError
-0x00000476  ecMDBNotInit
-0x00000478  ecWrongServer
-0x0000047D  ecBufferTooSmall
-0x0000047E  ecRequiresRefResolve
-0x0000047F  ecServerPaused
-0x00000480  ecServerBusy
-0x00000481  ecNoSuchLogon
-0x00000482  ecLoadLibFailed
-0x00000483  ecObjAlreadyConfig
-0x00000484  ecObjNotConfig
-0x00000485  ecDataLoss
-0x00000488  ecMaxSendThreadExceeded
-0x00000489  ecFxErrorMarker
-0x0000048A  ecNoFreeJtabs
-0x0000048B  ecNotPrivateMDB
-0x0000048C  ecIsintegMDB
-0x0000048D  ecRecoveryMDBMismatch
-0x0000048E  ecTableMayNotBeDeleted
-0x000004B1  ecRpcRegisterIf
-0x000004B2  ecRpcListen
-0x000004B6  ecRpcFormat
-0x000004B7  ecNoCopyTo
-0x000004B9  ecNullObject
-0x000004BC  ecRpcAuthentication
-0x000004BD  ecRpcBadAuthenticationLevel
-0x000004BE  ecNullCommentRestriction
-0x000004CC  ecRulesLoadError
-0x000004CD  ecRulesDelivErr
-0x000004CE  ecRulesParsingErr
-0x000004CF  ecRulesCreateDaeErr
-0x000004D0  ecRulesCreateDamErr
-0x000004D1  ecRulesNoMoveCopyFolder
-0x000004D2  ecRulesNoFolderRights
-0x000004D4  ecMessageTooBig
-0x000004D5  ecFormNotValid
-0x000004D6  ecNotAuthorized
-0x000004D7  ecDeleteMessage
-0x000004D8  ecBounceMessage
-0x000004D9  ecQuotaExceeded
-0x000004DA  ecMaxSubmissionExceeded
-0x000004DB  ecMaxAttachmentExceeded
-0x000004DC  ecSendAsDenied
-0x000004DD  ecShutoffQuotaExceeded
-0x000004DE  ecMaxObjsExceeded
-0x000004DF  ecClientVerDisallowed
-0x000004E0  ecRpcHttpDisallowed
-0x000004E1  ecCachedModeRequired
-0x000004E3  ecFolderNotCleanedUp
-0x000004ED  ecFmtError
-0x000004F7  ecNotExpanded
-0x000004F8  ecNotCollapsed
-0x000004F9  ecLeaf
-0x000004FA  ecUnregisteredNamedProp
-0x000004FB  ecFolderDisabled
-0x000004FC  ecDomainError
-0x000004FF  ecNoCreateRight
-0x00000500  ecPublicRoot
-0x00000501  ecNoReadRight
-0x00000502  ecNoCreateSubfolderRight
-0x00000503  ecDstNullObject
-0x00000504  ecMsgCycle
-0x00000505  ecTooManyRecips
-0x0000050A  ecVirusScanInProgress
-0x0000050B  ecVirusDetected
-0x0000050C  ecMailboxInTransit
-0x0000050D  ecBackupInProgress
-0x0000050E  ecVirusMessageDeleted
-0x0000050F  ecInvalidBackupSequence
-0x00000510  ecInvalidBackupSize
-0x00000511  ecTooManyBackupsInProgress
-0x00000512  ecRestoreInProgress
-0x00000579  ecDuplicateObject
-0x0000057A  ecObjectNotFound
-0x0000057B  ecFixupReplyRule
-0x0000057C  ecTemplateNotFound
-0x0000057D  ecRuleException
-0x0000057E  ecDSNoSuchObject
-0x0000057F  ecMessageAlreadyTombstoned
-0x00000596  ecRequiresRWTransaction
-0x0000060E  ecPaused
-0x00000648  ecWrongMailbox
-0x0000064C  ecChgPassword
-0x0000064D  ecPwdExpired
-0x0000064E  ecInvWkstn
-0x0000064F  ecInvLogonHrs
-0x00000650  ecAcctDisabled
-0x000006A4  ecRuleVersion
-0x000006A5  ecRuleFormat
-0x000006A6  ecRuleSendAsDenied
-0x000006B9  ecNoServerSupport
-0x000006BA  ecLockTimedOut
-0x000006BB  ecObjectLocked
-0x000006BD  ecInvalidLockNamespace
-0x000007D6  ecMessageDeleted
-0x000007D8  ecProtocolDisabled
-0x000007D9  ecClearTextLogonDisabled
-0x000007EE  ecRejected
-0x0000089A  ecAmbiguousAlias
-0x0000089B  ecUnknownMailbox
-0x000008FC  ecExpReserved
-0x000008FD  ecExpParseDepth
-0x000008FE  ecExpFuncArgType
-0x000008FF  ecExpSyntax
-0x00000900  ecExpBadStrToken
-0x00000901  ecExpBadColToken
-0x00000902  ecExpTypeMismatch
-0x00000903  ecExpOpNotSupported
-0x00000904  ecExpDivByZero
-0x00000905  ecExpUnaryArgType
-0x00000960  ecNotLocked
-0x00000961  ecClientEvent
-0x00000965  ecCorruptEvent
-0x00000966  ecCorruptWatermark
-0x00000967  ecEventError
-0x00000968  ecWatermarkError
-0x00000969  ecNonCanonicalACL
-0x0000096C  ecMailboxDisabled
-0x0000096D  ecRulesFolderOverQuota
-0x0000096E  ecADUnavailable
-0x0000096F  ecADError
-0x00000971  ecADNotFound
-0x00000972  ecADPropertyError
-0x00000970  ecNotEncrypted
-0x00000973  ecRpcServerTooBusy
-0x00000974  ecRpcOutOfMemory
-0x00000975  ecRpcServerOutOfMemory
-0x00000976  ecRpcOutOfResources
-0x00000977  ecRpcServerUnavailable
-0x0000097A  ecSecureSubmitError
-0x0000097C  ecEventsDeleted
-0x0000097D  ecSubsystemStopping
-0x0000097E  ecSAUnavailable
-0x00000A28  ecCIStopping
-0x00000A29  ecFxInvalidState
-0x00000A2A  ecFxUnexpectedMarker
-0x00000A2B  ecDuplicateDelivery
-0x00000A2C  ecConditionViolation
diff --git a/branches/plugfest/libmapi/conf/mapi-named-properties b/branches/plugfest/libmapi/conf/mapi-named-properties
deleted file mode 100644 (file)
index 5bb871d..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-#
-#   OpenChange MAPI implementation.
-#
-#   Copyright (C) Julien Kerihuel 2007-2010.
-#
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 3 of the License, or
-#   (at your option) any later version.
-#   
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#   
-#   You should have received a copy of the GNU General Public License
-#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# Mapped Property ID is used by mapistore only to generate a named
-# prop ldb database on purpose. Values are extracted from an existing
-# Exchange server we are using for development references / test
-# behavior. It means the value is really arbitrary and provided for
-# convenience purposes.
-
-
-### Canonical name                                    OOM                           propID propName                      propType      Kind        OLEGUID                Mapped Property ID
-
-### Meeting Properties
-PidLidAttendeeCriticalChange                           LID_ATTENDEE_CRITICAL_CHANGE  0x0001 NULL                          PT_SYSTIME    MNID_ID     PSETID_Meeting         0x8192
-PidLidWhere                                            LID_WHERE                     0x0002 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x8208
-PidLidGlobalObjectId                                   LID_GLOBAL_OBJID              0x0003 NULL                          PT_BINARY     MNID_ID     PSETID_Meeting        0x81ca
-PidLidIsSilent                                         LID_IS_SILENT                 0x0004 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Meeting        0x81d0
-PidLidIsRecurring                                      LID_IS_RECURRING              0x0005 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Meeting        0x81cf
-PidLidRequiredAttendees                                LID_REQUIRED_ATTENDEES        0x0006 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x81f4
-PidLidOptionalAttendees                                LID_OPTIONAL_ATTENDEES        0x0007 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x81de
-PidLidResourceAttendees                                LID_RESOURCE_ATTENDEES        0x0008 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x81f5
-PidLidDelegateMail                                     LID_DELEGATE_MAIL             0x0009 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Meeting        0x81a4
-PidLidIsException                                      LID_IS_EXCEPTION              0x000A NULL                          PT_BOOLEAN    MNID_ID     PSETID_Meeting        0x81ce
-PidLidSingleInvite                                     LID_SINGLE_INVITE             0x000B NULL                          PT_BOOLEAN    MNID_ID     PSETID_Meeting        0x81f9
-PidLidTimeZone                                         LID_TIME_ZONE                 0x000C NULL                          PT_LONG       MNID_ID     PSETID_Meeting        0x8200
-PidLidStartRecurrenceDate                             LID_START_RECUR_DATE          0x000D NULL                          PT_LONG       MNID_ID     PSETID_Meeting         0x81fc
-PidLidStartRecurrenceTime                             LID_START_RECUR_TIME          0x000E NULL                          PT_LONG       MNID_ID     PSETID_Meeting         0x81fd
-PidLidEndRecurrenceDate                                       EndRecurrenceDate             0x000F NULL                          PT_LONG       MNID_ID     PSETID_Meeting         0x81be
-PidLidEndRecurrenceTime                                       EndRecurrenceTime             0x0010 NULL                          PT_LONG       MNID_ID     PSETID_Meeting         0x81bf
-PidLidDayInterval                                      LID_DAY_INTERVAL              0x0011 NULL                          PT_SHORT      MNID_ID     PSETID_Meeting        0x81a1
-PidLidWeekInterval                                     LID_WEEK_INTERVAL             0x0012 NULL                          PT_SHORT      MNID_ID     PSETID_Meeting        0x8206
-PidLidMonthInterval                                    LID_MONTH_INTERVAL            0x0013 NULL                          PT_SHORT      MNID_ID     PSETID_Meeting        0x81d4
-PidLidYearInterval                                     LID_YEAR_INTERVAL             0x0014 NULL                          PT_SHORT      MNID_ID     PSETID_Meeting        0x8209
-PidLidMonthOfYearMask                                 LID_MOY_MASK                  0x0017 NULL                          PT_LONG       MNID_ID     PSETID_Meeting         0x81d6
-PidLidOldRecurrenceType                                       OldRecurrenceType             0x0018 NULL                          PT_SHORT      MNID_ID     PSETID_Meeting         0x81e4
-PidLidOwnerCriticalChange                              LID_OWNER_CRITICAL_CHANGE     0x001A NULL                          PT_SYSTIME    MNID_ID     PSETID_Meeting        0x8102
-PidLidCalendarType                                     LID_CALENDAR_TYPE             0x001C NULL                          PT_LONG       MNID_ID     PSETID_Meeting        0x8194
-PidLidAllAttendeesList                                 LID_ALL_ATTENDEES_LIST        0x001D NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x8259
-PidLidCleanGlobalObjectId                              CleanGlobalObjId              0x0023 NULL                          PT_BINARY     MNID_ID     PSETID_Meeting        0x8195
-PidLidAppointmentMessageClass                          ApptMessageClass              0x0024 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x8258
-PidLidMeetingType                                      MeetingType                   0x0026 NULL                          PT_LONG       MNID_ID     PSETID_Meeting        0x8365
-PidLidOldLocation                                      OldLocation                   0x0028 NULL                          PT_UNICODE    MNID_ID     PSETID_Meeting        0x8367
-PidLidOldWhenStartWhole                                OldWhenStartWhole             0x0029 NULL                          PT_SYSTIME    MNID_ID     PSETID_Meeting        0x8450
-PidLidOldWhenEndWhole                                  OldWhenEndWhole               0x002A NULL                          PT_SYSTIME    MNID_ID     PSETID_Meeting        0x8451
-
-
-### Address Named Properties
-PidLidFileUnder                                        FileUnder                     0x8005 NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x81c2
-PidLidFileUnderId                                      FileUnderId                   0x8006 NULL                          PT_LONG       MNID_ID     PSETID_Address        0x81c3
-PidLidContactItemData                                  ContactItemData               0x8007 NULL                          PT_MV_LONG    MNID_ID     PSETID_Address        0x8302
-PidLidReferredBy                                       ReferredBy                    0x800E NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x80a2
-PidLidDepartment                                       Department                    0x8010 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8301
-PidLidHasPicture                                       HasPicture                    0x8015 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Address        0x833c
-PidLidHomeAddress                                      HomeAddress                   0x801A NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8095
-PidLidWorkAddress                                      WorkAddress                   0x801B NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x80a7
-PidLidOtherAddress                                     OtherAddress                  0x801C NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x809c
-PidLidPostalAddressId                                  PostalAddressId               0x8022 NULL                          PT_LONG       MNID_ID     PSETID_Address        0x8098
-PidLidContactCharacterSet                              ContactCharSet                0x8023 NULL                          PT_LONG       MNID_ID     PSETID_Address        0x830a
-PidLidAutoLog                                          AutoLog                       0x8025 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Address        0x8304
-PidLidFileUnderList                                    FileUnderList                 0x8026 NULL                          PT_MV_LONG    MNID_ID     PSETID_Address        0x82ff
-PidLidEmailList                                        EmailList                     0x8027 NULL                          PT_MV_LONG    MNID_ID     PSETID_Address        0x8300
-PidLidAddressBookProviderEmailList                     ABPEmailList                  0x8028 NULL                          PT_MV_LONG    MNID_ID     PSETID_Address        0x81bc
-PidLidAddressBookProviderArrayType                     ABPArrayType                  0x8029 NULL                          PT_LONG       MNID_ID     PSETID_Address        0x81bd
-PidLidHtml                                             HTML                          0x802B NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x830d
-PidLidYomiFirstName                                    YomiFirstName                 0x802C NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8151
-PidLidYomiLastName                                     YomiLastName                  0x802D NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8152
-PidLidYomiCompanyName                                 YomiCompanyName               0x802E NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x8153
-PidLidBusinessCardDisplayDefinition                    BCDisplayDefinition           0x8040 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x833d
-PidLidBusinessCardCardPicture                          BCCardPicture                 0x8041 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x833e
-PidLidWorkAddressStreet                                WorkAddressStreet             0x8045 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x80a6
-PidLidWorkAddressCity                                  WorkAddressCity               0x8046 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8097
-PidLidWorkAddressState                                 WorkAddressState              0x8047 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x80a5
-PidLidWorkAddressPostalCode                            WorkAddressPostalCode         0x8048 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x809e
-PidLidWorkAddressCountry                               WorkAddressCountry            0x8049 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x808d
-PidLidWorkAddressPostOfficeBox                         WorkAddressPostOfficeBox      0x804A NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x809f
-PidLidDistributionListChecksum                         DLChecksum                    0x804C NULL                          PT_LONG       MNID_ID     PSETID_Address        0x81a6
-PidLidBirthdayEventEntryId                             BirthdayEventEID              0x804D NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x8422
-PidLidAnniversaryEventEntryId                          AnniversaryEventEID           0x804E NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x8423
-PidLidContactUserField1                                ContactUserField1             0x804F NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x813c
-PidLidContactUserField2                                       ContactUserField2             0x8050 NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x813d
-PidLidContactUserField3                                       ContactUserField3             0x8051 NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x813e
-PidLidContactUserField4                                       ContactUserField4             0x8052 NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x813f
-PidLidDistributionListName                             DLName                        0x8053 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81a8
-PidLidDistributionListOneOffMembers                    DLOneOffMembers               0x8054 NULL                          PT_MV_BINARY  MNID_ID     PSETID_Address        0x81a9
-PidLidDistributionListMembers                          DLMembers                     0x8055 NULL                          PT_MV_BINARY  MNID_ID     PSETID_Address        0x81a7
-PidLidInstantMessagingAddress                          InstMsg                       0x8062 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x82a6
-PidLidDistributionListStream                          DLStream                      0x8064 NULL                          PT_LONG       MNID_ID     PSETID_Address         0x8421
-PidLidEmail1DisplayName                                Email1DisplayName             0x8080 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81af
-PidLidEmail1AddressType                                Email1AddrType                0x8082 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81ad
-PidLidEmail1EmailAddress                               Email1EmailAddress            0x8083 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81ae
-PidLidEmail1OriginalDisplayName                        Email1OriginalDisplayName     0x8084 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b0
-PidLidEmail1OriginalEntryId                            Email1OriginalEntryID         0x8085 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x81b1
-PidLidEmail1RichTextFormat                            Email1RichTextFormat          0x8086 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Address         0x829c
-PidLidEmail1EmailType                                  Email1EmailType               0x8087 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8325
-PidLidEmail2DisplayName                                Email2DisplayName             0x8090 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b4
-PidLidEmail2EntryId                                    Email2EntryID                 0x8091 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x8326
-PidLidEmail2AddressType                                Email2AddrType                0x8092 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b2
-PidLidEmail2EmailAddress                               Email2EmailAddress            0x8093 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b3
-PidLidEmail2OriginalDisplayName                        Email2OriginalDisplayName     0x8094 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b5
-PidLidEmail2OriginalEntryId                            Email2OriginalEntryID         0x8095 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x81b6
-PidLidEmail2RichTextFormat                            Email2RichTextFormat          0x8096 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Address         0x829d
-PidLidEmail3DisplayName                                Email3DisplayName             0x80A0 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b9
-PidLidEmail3EntryId                                    Email3EntryID                 0x80A1 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x8328
-PidLidEmail3AddressType                                Email3AddrType                0x80A2 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b7
-PidLidEmail3EmailAddress                               Email3EmailAddress            0x80A3 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81b8
-PidLidEmail3OriginalDisplayName                        Email3OriginalDisplayName     0x80A4 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x81ba
-PidLidEmail3OriginalEntryId                            Email3OriginalEntryID         0x80A5 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x81bb
-PidLidEmail3RichTextFormat                            Email3RichTextFormat          0x80A6 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Address         0x829e
-PidLidFax1AddressType                                  Fax1AddrType                  0x80B2 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8295
-PidLidFax1EmailAddress                                 Fax1EmailAddress              0x80B3 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8292
-PidLidFax1OriginalDisplayName                          Fax1OriginalDisplayName       0x80B4 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8298
-PidLidFax1OriginalEntryId                              Fax1OriginalEntryID           0x80B5 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x829b
-PidLidFax2AddressType                                  Fax2AddrType                  0x80C2 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8293
-PidLidFax2EmailAddress                                 Fax2EmailAddress              0x80C3 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8290
-PidLidFax2OriginalDisplayName                          Fax2OriginalDisplayName       0x80C4 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8296
-PidLidFax2OriginalEntryId                              Fax2OriginalEntryID           0x80C5 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x8299
-PidLidFax3AddressType                                  Fax3AddrType                  0x80D2 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8294
-PidLidFax3EmailAddress                                 Fax3EmailAddress              0x80D3 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8291
-PidLidFax3OriginalDisplayName                          Fax3OriginalDisplayName       0x80D4 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8297
-PidLidFax3OriginalEntryId                              Fax3OriginalEntryID           0x80D5 NULL                          PT_BINARY     MNID_ID     PSETID_Address        0x829a
-PidLidFreeBusyLocation                                 FreeBusyLocation              0x80D8 NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8106
-PidLidHomeAddressCountryCode                           HomeAddressCountryCode        0x80DA NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8307
-PidLidWorkAddressCountryCode                           WorkAddressCountryCode        0x80DB NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8306
-PidLidOtherAddressCountryCode                          OtherAddressCountryCode       0x80DC NULL                          PT_UNICODE    MNID_ID     PSETID_Address        0x8308
-PidLidBirthdayLocal                                   BirthdayLocal                 0x80DE NULL                          PT_SYSTIME    MNID_ID     PSETID_Address
-PidLidAddressCountryCode                               AddressCountryCode            0x80DD NULL                          PT_UNICODE    MNID_ID     PSETID_Address         0x8309
-PidLidWeddingAnniversaryLocal                         ApptAnniversaryLocal          0x80DF NULL                          PT_SYSTIME    MNID_ID     PSETID_Address
-
-
-
-### Task Named Properties
-PidLidTaskStatus                                       TaskStatus                    0x8101 NULL                          PT_LONG       MNID_ID     PSETID_Task            0x8120
-PidLidPercentComplete                                  PercentComplete               0x8102 NULL                          PT_DOUBLE     MNID_ID     PSETID_Task                   0x8121
-PidLidTeamTask                                         TeamTask                      0x8103 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8135
-PidLidTaskStartDate                                    TaskStartDate                 0x8104 NULL                          PT_SYSTIME    MNID_ID     PSETID_Task                   0x811e
-PidLidTaskDueDate                                      TaskDueDate                   0x8105 NULL                          PT_SYSTIME    MNID_ID     PSETID_Task                   0x811f
-PidLidTaskResetReminder                                TaskResetReminder             0x8107 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8137
-PidLidTaskAccepted                                     TaskAccepted                  0x8108 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8344
-PidLidTaskDeadOccurrence                               TaskDeadOccur                 0x8109 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8127
-PidLidTaskDateCompleted                                TaskDateCompleted             0x810F NULL                          PT_SYSTIME    MNID_ID     PSETID_Task                   0x8125
-PidLidTaskActualEffort                                 TaskActualEffort              0x8110 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x8128
-PidLidTaskEstimatedEffort                              TaskEstimatedEffort           0x8111 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x8129
-PidLidTaskVersion                                      TaskVersion                   0x8112 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x8133
-PidLidTaskState                                        TaskState                     0x8113 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x8123
-PidLidTaskLastUpdate                                   TaskLastUpdate                0x8115 NULL                          PT_SYSTIME    MNID_ID     PSETID_Task                   0x812e
-PidLidTaskRecurrence                                   TaskRecur                     0x8116 NULL                          PT_BINARY     MNID_ID     PSETID_Task                   0x8136
-PidLidTaskAssigners                                    TaskMyDelegators              0x8117 NULL                          PT_BINARY     MNID_ID     PSETID_Task                   0x834a
-PidLidTaskStatusOnComplete                             TaskSOC                       0x8119 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8346
-PidLidTaskHistory                                      TaskHistory                   0x811A NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x812b
-PidLidTaskUpdates                                      TaskUpdates                   0x811B NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8345
-PidLidTaskComplete                                     TaskComplete                  0x811C NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8124
-PidLidTaskFCreator                                     TaskFCreator                  0x811E NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x834c
-PidLidTaskOwner                                        TaskOwner                     0x811F NULL                          PT_UNICODE    MNID_ID     PSETID_Task                   0x8122
-PidLidTaskMultipleRecipients                           TaskMultRecips                0x8120 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x812a
-PidLidTaskAssigner                                     TaskDelegator                 0x8121 NULL                          PT_UNICODE    MNID_ID     PSETID_Task                   0x8134
-PidLidTaskLastUser                                     TaskLastUser                  0x8122 NULL                          PT_UNICODE    MNID_ID     PSETID_Task                   0x812d
-PidLidTaskOrdinal                                      TaskOrdinal                   0x8123 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x8138
-PidLidTaskNoCompute                                    TaskNoCompute                 0x8124 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8130
-PidLidTaskLastDelegate                                 TaskLastDelegate              0x8125 NULL                          PT_UNICODE    MNID_ID     PSETID_Task                   0x8347
-PidLidTaskFRecurring                                   TaskFRecur                    0x8126 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8126
-PidLidTaskRole                                         TaskRole                      0x8127 NULL                          PT_UNICODE    MNID_ID     PSETID_Task                   0x8132
-PidLidTaskOwnership                                    TaskOwnership                 0x8129 NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x812f
-PidLidAcceptanceState                                  TaskDelegValue                0x812A NULL                          PT_LONG       MNID_ID     PSETID_Task                   0x812c
-PidLidTaskFFixOffline                                  TaskFFixOffline               0x812C NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task                   0x8131
-PidLidTaskCustomFlags                                 TaskActualEffort              0x8139 NULL                          PT_LONG       MNID_ID     PSETID_Task            0x8428
-PidLidTrustRecipientHighlights                        TrustRecipHighlights          0x823E NULL                          PT_BOOLEAN    MNID_ID     PSETID_Task            
-
-### Appointment Named Properties
-PidLidSendMeetingAsIcal                                SendMtgAsICAL                 0x8200 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment     0x8252
-PidLidAppointmentSequence                              ApptSequence                  0x8201 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8253
-PidLidAppointmentSequenceTime                          ApptSeqTime                   0x8202 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8254
-PidLidAppointmentLastSequence                          ApptLastSequence              0x8203 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8256
-PidLidChangeHighlight                                  ChangeHighlight               0x8204 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8354
-PidLidBusyStatus                                       BusyStatus                    0x8205 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8193
-PidLidFExceptionalBody                                 FExceptionalBody              0x8206 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x824b
-PidLidAppointmentAuxiliaryFlags                        ApptAuxFlags                  0x8207 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8245
-PidLidLocation                                         Location                      0x8208 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x810c
-PidLidMeetingWorkspaceUrl                              MWSURL                        0x8209 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x81d1
-PidLidForwardInstance                                  FwrdInstance                  0x820A NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x8257
-PidLidLinkedTaskItems                                  LinkedTaskItems               0x820C NULL                          PT_MV_BINARY  MNID_ID     PSETID_Appointment    0x8430
-PidLidAppointmentStartWhole                            ApptStartWhole                0x820D NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x818f
-PidLidAppointmentEndWhole                              ApptEndWhole                  0x820E NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x818a
-PidLidAppointmentStartTime                             ApptStartTime                 0x820F NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x818e
-PidLidAppointmentEndTime                               ApptEndTime                   0x8210 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8189
-PidLidAppointmentEndDate                               ApptEndDate                   0x8211 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8188
-PidLidAppointmentStartDate                             ApptStartDate                 0x8212 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x818d
-PidLidAppointmentDuration                              ApptDuration                  0x8213 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8187
-PidLidAppointmentColor                                 ApptColor                     0x8214 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8241
-PidLidAppointmentSubType                               ApptSubType                   0x8215 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x80fa
-PidLidAppointmentRecur                                 ApptRecur                     0x8216 NULL                          PT_BINARY     MNID_ID     PSETID_Appointment    0x818b
-PidLidAppointmentStateFlags                            ApptStateFlags                0x8217 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8190
-PidLidResponseStatus                                   ResponseStatus                0x8218 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x80fc
-PidLidAppointmentReplyTime                             ApptReplyTime                 0x8220 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8114
-PidLidRecurring                                        Recurring                     0x8223 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x81e7
-PidLidIntendedBusyStatus                               IntendedBusyStatus            0x8224 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x81cc
-PidLidAppointmentUpdateTime                           ApptUpdateTime                0x8226 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment     0x8191
-PidLidExceptionReplaceTime                             ExceptionReplaceTime          0x8228 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8249
-PidLidFInvited                                         FInvited                      0x8229 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x81c4
-PidLidFExceptionalAttendees                            FExceptionalAttendees         0x822B NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x824a
-PidLidOwnerName                                               OwnerName                     0x822E NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment     0x81e0
-PidLidFOthersAppointment                              FOthersAppt                   0x822F NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment     0x81c8
-PidLidAppointmentReplyName                             ApptReplyName                 0x8230 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x818c
-PidLidRecurrenceType                                   RecurType                     0x8231 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x81e8
-PidLidRecurrencePattern                                RecurPattern                  0x8232 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x81e6
-PidLidTimeZoneStruct                                   TimeZoneStruct                0x8233 NULL                          PT_BINARY     MNID_ID     PSETID_Appointment    0x8202
-PidLidTimeZoneDescription                              TimeZoneDesc                  0x8234 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x8201
-PidLidClipStart                                        ClipStart                     0x8235 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8197
-PidLidClipEnd                                          ClipEnd                       0x8236 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8196
-PidLidOriginalStoreEntryId                             OrigStoreEid                  0x8237 NULL                          PT_BINARY     MNID_ID     PSETID_Appointment    0x81df
-PidLidAllAttendeesString                               AllAttendeesString            0x8238 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x8186
-PidLidAutoFillLocation                                 AutoFillLocation              0x823A NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x8255
-PidLidToAttendeesString                                ToAttendeesString             0x823B NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x824c
-PidLidCcAttendeesString                                CcAttendeesString             0x823C NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x824d
-PidLidConferencingCheck                                ConfCheck                     0x8240 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x823a
-PidLidConferencingType                                 ConfType                      0x8241 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x823b
-PidLidDirectory                                        Directory                     0x8242 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x823d
-PidLidOrganizerAlias                                   OrgAlias                      0x8243 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x823c
-PidLidAutoStartCheck                                   AutoStartCheck                0x8244 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x823e
-PidLidAutoStartWhen                                    AutoStartWhen                 0x8245 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x824f
-PidLidAllowExternalCheck                               AllowExternCheck              0x8246 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x8250
-PidLidCollaborateDoc                                   CollaborateDoc                0x8247 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x823f
-PidLidNetShowUrl                                       NetShowURL                    0x8248 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x8240
-PidLidOnlinePassword                                   OnlinePassword                0x8249 NULL                          PT_UNICODE    MNID_ID     PSETID_Appointment    0x8251
-PidLidAppointmentProposedStartWhole                    ApptProposedStartWhole        0x8250 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8242
-PidLidAppointmentProposedEndWhole                      ApptProposedEndWhole          0x8251 NULL                          PT_SYSTIME    MNID_ID     PSETID_Appointment    0x8243
-PidLidAPpointmentProposedDuration                      ApptProposedDuration          0x8256 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8244
-PidLidAppointmentCounterProposal                       ApptCounterProposal           0x8257 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x8246
-PidLidAppointmentProposalNumber                        ApptProposalNum               0x8259 NULL                          PT_LONG       MNID_ID     PSETID_Appointment    0x8247
-PidLidAppointmentNotAllowPropose                       ApptNotAllowPropose           0x825A NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment    0x8248
-PidLidAppointmentUnsendableRecipients                 ApptUnsendableRecipients      0x825D NULL                          PT_BINARY     MNID_ID     PSETID_Appointment     0x842f
-PidLidAppointmentTimeZoneDefinitionStartDisplay               ApptTZDefStartDisplay         0x825E NULL                          PT_BINARY     MNID_ID     PSETID_Appointment     0x842c
-PidLidAppointmentTimeZoneDefinitionEndDisplay          ApptTZDefEndDisplay           0x825F NULL                          PT_BINARY     MNID_ID     PSETID_Appointment    0x842d
-PidLidAppointmentTimeZoneDefinitionRecur               ApptTZDefRecur                0x8260 NULL                          PT_BINARY     MNID_ID     PSETID_Appointment    0x842e
-PidLidForwardNotificationRecipients                   ForwardNotificationRecipients 0x8261 NULL                          PT_BINARY     MNID_ID     PSETID_Appointment
-PidLidInboundICalStream                                       InboundICalStream             0x827A NULL                          PT_BINARY     MNID_ID     PSETID_Appointment
-PidLidSingleBodyIcal                                  IsSingleBodyIcal              0x827B NULL                          PT_BOOLEAN    MNID_ID     PSETID_Appointment
-
-### Common Named properties
-PidLidDayOfMonth                                      DayOfMonth                           0x1000 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81a2
-PidLidICalendarDayOfWeekMask                          ICalendarDayOfWeekMask               0x1001 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81a3
-PidLidOccurrences                                     Occurrences                          0x1005 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81dd
-PidLidMonthOfYear                                     MonthOfYear                          0x1006 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81d5
-PidLidNoEndDateFlag                                   NoEndDateFlag                        0x100B NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x81c5
-PidLidRecurrenceDuration                              RecurrenceDuration                   0x100D NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81e5
-PidLidReminderDelta                                    ReminderDelta                       0x8501 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81e9
-PidLidReminderTime                                     ReminderTime                        0x8502 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x81ef
-PidLidReminderSet                                      ReminderSet                         0x8503 NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x81ee
-PidLidReminderTimeTime                                ReminderTimeTime                     0x8504 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x81f1
-PidLidReminderTimeDate                                ReminderTimeDate                     0x8505 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x81f0
-PidLidPrivate                                          Private                             0x8506 NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x8224
-PidLidAgingDontAgeMe                                   AgingDontAgeMe                      0x850E NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x8185
-PidLidSideEffects                                      SideEffects                         0x8510 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81f8
-PidLidRemoteStatus                                    RemoteStatus                         0x8511 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81f3
-PidLidSmartNoAttach                                    SmartNoAttach                       0x8514 NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x81fa
-PidLidCommonStart                                      CommonStart                         0x8516 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x8199
-PidLidCommonEnd                                        CommonEnd                           0x8517 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x8198
-PidLidTaskMode                                         TaskMode                            0x8518 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81ff
-PidLidTaskGlobalId                                     TaskGlobalObjId                     0x8519 NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x81fe
-PidLidAutoProcessState                                 SniffState                          0x851A NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81fb
-PidLidReminderOverride                                 ReminderOverride                    0x851C NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x81ec
-PidLidReminderType                                     ReminderType                        0x851D NULL                   PT_LONG       MNID_ID     PSETID_Common          0x81f2
-PidLidReminderPlaySound                                ReminderPlaySound                   0x851E NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x81ed
-PidLidReminderFileParameter                            ReminderFileParam                   0x851F NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x81ea
-PidLidVerbStream                                       VerbStream                          0x8520 NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x8204
-PidLidVerbResponse                                     VerbResponse                        0x8524 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8203
-PidLidFlagRequest                                      Request                             0x8530 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8027
-PidLidMileage                                          MileAge                             0x8534 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x814a
-PidLidBillingInformation                               BillingInformation                  0x8535 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x808b
-PidLidNonSendtableTo                                   NonSendableTo                       0x8536 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x81d9
-PidLidNonSendableCc                                    NonSendableCC                       0x8537 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x81d8
-PidLidNonSendableBcc                                   NonSendableBCC                      0x8538 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x81d7
-PidLidCompanies                                        Companies                           0x8539 NULL                   PT_MV_STRING8 MNID_ID     PSETID_Common          0x813a
-PidLidContacts                                         Contacts                            0x853A NULL                   PT_MV_STRING8 MNID_ID     PSETID_Common          0x819b
-PidLidNonSendToTrackStatus                             NonSendToTrackStatus                0x8543 NULL                   PT_MV_LONG    MNID_ID     PSETID_Common          0x81dc
-PidLidNonSendCcTrackStatus                             NonSendCcTrackStatus                0x8544 NULL                   PT_MV_LONG    MNID_ID     PSETID_Common          0x81db
-PidLidNonSendBccTrackStatus                            NonSendBccTrackStatus               0x8545 NULL                   PT_MV_LONG    MNID_ID     PSETID_Common          0x81da
-PidLidCurrentVersion                                   CurrentVersion                      0x8552 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x819d
-PidLidCurrentVersionName                               CurrentVersionName                  0x8554 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x819e
-PidLidReminderSignalTime                               ReminderNextTime                    0x8560 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x81eb
-PidLidInternetAccountName                              InetAcctName                        0x8580 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8225
-PidLidInternetAccountStamp                             InetAcctStamp                       0x8581 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8226
-PidLidUseTnef                                          UseTNEF                             0x8582 NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x8227
-PidLidContactLinkSearchKey                             ContactLinkSearchKey                0x8584 NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x822b
-PidLidContactLinkEntry                                 ContactLinkEntry                    0x8585 NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x822a
-PidLidContactLinkName                                  ContactLinkName                     0x8586 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8229
-PidLidSpamOriginalFolder                               SpamOriginalFolder                  0x859C NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x8237
-PidLidToDoOrdinalDate                                  ToDoOrdinalDate                     0x85A0 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x835f
-PidLidToDoSubOrdinal                                   ToDoSubOrdinal                      0x85A1 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8360
-PidLidToDoTitle                                        ToDoTitle                           0x85A4 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8361
-PidLidInfoPathFormName                                 InfoPathFormName                    0x85B1 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x8433
-PidLidClassified                                       Classified                          0x85B5 NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x8439
-PidLidClassification                                   Classification                      0x85B6 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x843a
-PidLidClassificationDescription                        ClassDesc                           0x85B7 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x843b
-PidLidClassificationGuid                               ClassGuid                           0x85B8 NULL                   PT_UNICODE    MNID_ID     PSETID_Common          0x843c
-PidLidClassificationKeep                               ClassKeep                           0x85BA NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common          0x843e
-PidLidReferenceEntryId                                 ReferenceEID                        0x85BD NULL                   PT_BINARY     MNID_ID     PSETID_Common          0x8440
-PidLidValidFlagStringProof                             ValidFlagStringProof                0x85BF NULL                   PT_SYSTIME    MNID_ID     PSETID_Common          0x8442
-PidLidFlagString                                       FlagStringEnum                      0x85C0 NULL                   PT_LONG       MNID_ID     PSETID_Common          0x8443
-PidLidConversationActionMoveFolderEid                 ConversationActionMoveFolderEid      0x85C6 NULL                   PT_BINARY     MNID_ID     PSETID_Common
-PidLidConversationActionMoveStoreEid                  ConversationActionMoveStoreEid       0x85C7 NULL                   PT_BINARY     MNID_ID     PSETID_Common
-PidLidConversationActionMaxDeliveryTime                       ConversationActionMaxDeliveryTime    0x85C8 NULL                   PT_SYSTIME    MNID_ID     PSETID_Common
-PidLidConversationProcessed                           ConversationProcessed                0x85C9 NULL                   PT_LONG       MNID_ID     PSETID_Common
-PidLidConversationActionLastAppliedTime                       ConversationActionLastAppliedTime    0x85CA NULL                   PT_SYSTIME    MNID_ID     PSETID_Common
-PidLidConversationActionVersion                               ConversationActionVersion            0x85CB NULL                   PT_LONG       MNID_ID     PSETID_Common
-PidLidServerProcessed                                 ExchangeProcessed                    0x85CC NULL                   PT_BOOLEAN    MNID_ID     PSETID_Common
-
-### Log Named Properties
-PidLidLogType                                          LogType                       0x8700 NULL                          PT_UNICODE    MNID_ID     PSETID_Log             0x82b6
-PidLidLogStart                                         LogStart                      0x8706 NULL                          PT_SYSTIME    MNID_ID     PSETID_Log            0x82b9
-PidLidLogDuration                                      LogDuration                   0x8707 NULL                          PT_LONG       MNID_ID     PSETID_Log            0x82bb
-PidLidLogEnd                                           LogEnd                        0x8708 NULL                          PT_SYSTIME    MNID_ID     PSETID_Log            0x82ba
-PidLidLogFlags                                         LogFlags                      0x870C NULL                          PT_LONG       MNID_ID     PSETID_Log            0x82bc
-PidLidDocumentPrinted                                  LogDocPrinted                 0x870E NULL                          PT_BOOLEAN    MNID_ID     PSETID_Log            0x82be
-PidLidDocumentSaved                                    LogDocSaved                   0x870F NULL                          PT_BOOLEAN    MNID_ID     PSETID_Log            0x82bf
-PidLidDocumentRouted                                   LogDocRouted                  0x8710 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Log            0x82c0
-PidLidDocumentPosted                                   LogDocPosted                  0x8711 NULL                          PT_BOOLEAN    MNID_ID     PSETID_Log            0x82c1
-PidLidLogTypeDesc                                      LogTypeDesc                   0x8712 NULL                          PT_UNICODE    MNID_ID     PSETID_Log            0x82b5
-
-
-### Post RSS Named Properties
-PidLidPostRssChannelLink                               PostRssChannelLink            0x8900 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss         0x82af
-PidLidPostRssItemLink                                  PostRssItemLink               0x8901 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss        0x82b0
-PidLidPostRssItemHash                                  PostRssItemHash               0x8902 NULL                          PT_LONG       MNID_ID     PSETID_PostRss        0x82b1
-PidLidPostRssItemGuid                                  PostRssItemGuid               0x8903 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss        0x82b2
-PidLidPostRssChannel                                   PostRssChannel                0x8904 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss        0x82b3
-PidLidPostRssItemXml                                   PostRssItemXml                0x8905 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss        0x82b4
-PidLidPostRssSubscription                              PostRssSubscription           0x8906 NULL                          PT_UNICODE    MNID_ID     PSETID_PostRss        0x8447
-
-
-### Sharing Named Properties
-PidLidSharingStatus                                    SharingStatus                 0x8A00 NULL                          PT_LONG       MNID_ID     PSETID_Sharing         0x82c4
-PidLidSharingProviderGuid                              SharingProviderGuid           0x8A01 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x82c9
-PidLidSharingProviderName                              SharingProviderName           0x8A02 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82ca
-PidLidSharingProviderUrl                               SharingProviderUrl            0x8A03 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82cb
-PidLidSharingRemotePath                                SharingRemotePath             0x8A04 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82cc
-PidLidSharingRemoteName                                SharingRemoteName             0x8A05 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82cd
-PidLidSharingRemoteUid                                 SharingRemoteUid              0x8A06 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82ce
-PidLidSharingInitiatorName                             SharingInitiatorName          0x8A07 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d0
-PidLidSharingInitiatorSmtp                             SharingInitiatorSmtp          0x8A08 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d1
-PidLidSharingInitiatorEntryId                          SharingInitiatorEid           0x8A09 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x82d2
-PidLidSharingFlags                                     SharingFlags                  0x8A0A NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8214
-PidLidSharingProviderExtension                         SharingProviderExtension      0x8A0B NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x844c
-PidLidSharingRemoteUser                                SharingRemoteUser             0x8A0C NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x84da
-PidLidSharingRemotePass                                SharingRemotePass             0x8A0D NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82db
-PidLidSharingLocalPath                                 SharingLocalPath              0x8A0E NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d6
-PidLidSharingLocalName                                 SharingLocalName              0x8A0F NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d7
-PidLidSharingLocalUid                                  SharingLocalUid               0x8A10 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d8
-PidLidSharingFilter                                    SharingFilter                 0x8A13 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x82d3
-PidLidSharingLocalType                                 SharingLocalType              0x8A14 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82d9
-PidLidSharingFolderEntryId                             SharingFolderEid              0x8A15 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x82e0
-PidLidSharingCapabilities                              SharingCaps                   0x8A17 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x82c2
-PidLidSharingFlavor                                    SharingFlavor                 0x8A18 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x82c3
-PidLidSharingAnonymity                                 SharingAnonymity              0x8A19 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x82c5
-PidLidSharingReciprocation                             SharingReciprocation          0x8A1A NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x82c6
-PidLidSharingPermissions                               SharingPermissions            0x8A1B NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x82c7
-PidLidSharingInstanceGuid                              SharingInstanceGuid           0x8A1C NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x82c8
-PidLidSharingRemoteType                                SharingRemoteType             0x8A1D NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82cf
-PidLidSharingParticipants                              SharingParticipants           0x8A1E NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82dc
-PidLidSharingLastSyncTime                              SharingLastSync               0x8A1F NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x82dd
-PidLidSharingExtensionXml                              SharingExtXml                 0x8A21 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82df
-PidLidSharingRemoteLastModificationTime                SharingRemoteLastMod          0x8A22 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x82e3
-PidLidSharingLocalLastModificationTime                 SharingLocalLastMod           0x8A23 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x82e2
-PidLidSharingConfigurationUrl                          SharingConfigUrl              0x8A24 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x82e4
-PidLidSharingStart                                     SharingStart                  0x8A25 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x8401
-PidLidSharingStop                                      SharingStop                   0x8A26 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x8402
-PidLidSharingResponseType                              SharingResponseType           0x8A27 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8449
-PidLidSharingResponseTime                              SharingResponseTime           0x8A28 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x844a
-PidLidSharingOriginalMessageEntryId                    SharingOriginalMessageEid     0x8A29 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x844b
-PidLidSharingSyncInterval                              SharingSyncInterval           0x8A2A NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8448
-PidLidSharingDetail                                    SharingDetail                 0x8A2B NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x83f9
-PidLidSharingTimeToLive                                SharingTimeToLive             0x8A2C NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8406
-PidLidSharingBindingEntryId                            SharingBindingEid             0x8A2D NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x8408
-PidLidSharingIndexEntryId                              SharingIndexEid               0x8A2E NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x8409
-PidLidSharingRemoteComment                             SharingRemoteComment          0x8A2F NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x83fe
-PidLidSharingWorkingHoursStart                         SharingWorkingHoursStart      0x8A40 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x840a
-PidLidSharingWorkingHoursEnd                           SharingWorkingHoursEnd        0x8A41 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x840b
-PidLidSharingWorkingHoursDay                           SharingWorkingHoursDays       0x8A42 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x840c
-PidLidSharingWorkingHoursTimeZone                      SharingWorkingHoursTZ         0x8A43 NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x840d
-PidLidSharingDataRangeStart                            SharingDataRangeStart         0x8A44 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x840e
-PidLidSharingDataRangeEnd                              SharingDataRangeEnd           0x8A45 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x840f
-PidLidSharingRangeStart                                SharingRangeStart             0x8A46 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8410
-PidLidSharingRangeEnd                                  SharingRangeEnd               0x8A47 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8411
-PidLidSharingRemoteStoreUid                            SharingRemoteStoreUid         0x8A48 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x83fb
-PidLidSharingLocalStoreUid                             SharingLocalStoreUid          0x8A49 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x8403
-PidLidSharingRemoteByteSize                            SharingRemoteByteSize         0x8A4B NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x83ff
-PidLidSharingRemoteCrc                                 SharingRemoteCrc              0x8A4C NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x83fd
-PidLidSharingLocalComment                              SharingLocalComment           0x8A4D NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x8404
-PidLidSharingRoamLog                                   SharingRoamLog                0x8A4E NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8412
-PidLidSharingRemoteMessageCount                        SharingRemoteMsgCount         0x8A4F NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8400
-PidLidSharingBrowseUrl                                 SharingBrowseUrl              0x8A51 NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x83fa
-PidLidSharingLastAutoSyncTime                          SharingLastAutoSync           0x8A55 NULL                          PT_SYSTIME    MNID_ID     PSETID_Sharing        0x8405
-PidLidSharingTimeToLiveAuto                            SharingTimeToLiveAuto         0x8A56 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x8407
-PidLidSharingRemoteVersion                             SharingRemoteVersion          0x8A5B NULL                          PT_UNICODE    MNID_ID     PSETID_Sharing        0x83fc
-PidLidSharingParentBindingEntryId                      SharingParentBindingEid       0x8A5C NULL                          PT_BINARY     MNID_ID     PSETID_Sharing        0x8313
-PidLidSharingSyncFlags                                 SharingSyncFlags              0x8A60 NULL                          PT_LONG       MNID_ID     PSETID_Sharing        0x841d
-
-### Note Named Properties
-PidLidNoteColor                                        NoteColor                     0x8B00 NULL                          PT_LONG       MNID_ID     PSETID_Note            0x84a9
-PidLidNoteWidth                                        NoteWidth                     0x8B02 NULL                          PT_LONG       MNID_ID     PSETID_Note                   0x82ab
-PidLidNoteHeight                                       NoteHeight                    0x8B03 NULL                          PT_LONG       MNID_ID     PSETID_Note                   0x82ac
-PidLidNoteX                                            NoteX                         0x8B04 NULL                          PT_LONG       MNID_ID     PSETID_Note                   0x82ad
-PidLidNoteY                                            NoteY                         0x8B05 NULL                          PT_LONG       MNID_ID     PSETID_Note                   0x82ae
-
-### PS_PUBLIC_STRINGS
-PidLidCategories                                       Categories                    0x9000 NULL                          PT_MV_STRING8 MNID_ID     PS_PUBLIC_STRINGS      0x83b7
-PidNameApplicationName                                 NULL                          0x0000 AppName                       PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS      0x80e8
-PidNameAuthor                                          NULL                          0x0000 Author                        PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80da
-PidNameByteCount                                       NULL                          0x0000 ByteCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80ec
-PidNameCalendarAttendeeRole                           NULL                          0x0000 CalendarAttendeeRole          PT_LONG       MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarBusyStatus                             NULL                          0x0000 CalendarBusyStatus            PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarContact                                NULL                          0x0000 CalendarContact               PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarContactUrl                             NULL                          0x0000 CalendarContactUrl            PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarCreated                                NULL                          0x0000 CalendarCreated               PT_SYSTIME    MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarDescriptionUrl                         NULL                          0x0000 CalendarDescriptionUrl        PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarDuration                                       NULL                          0x0000 CalendarDuration              PT_LONG       MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarExceptionDate                          NULL                          0x0000 CalendarExdate                PT_MV_SYSTIME MNID_STRING PS_PUBLIC_STRINGS
-PidNameCalendarExceptionRule                          NULL                          0x0000 CalendarExrule                PT_MV_UNICODE MNID_STRING PS_PUBLIC_STRINGS
-PidNameCategory                                        NULL                          0x0000 Category                      PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS      0x80ea
-PidNameCharacterCount                                  NULL                          0x0000 CharCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80e6
-PidNameComments                                        NULL                          0x0000 Comments                      PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80dc
-PidNameCompany                                         NULL                          0x0000 Company                       PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80f7
-PidNameCreateDateTimeReadOnly                          NULL                          0x0000 CreateDtmRo                   PT_SYSTIME    MNID_STRING PS_PUBLIC_STRINGS     0x80e2
-PidNameRightsManagementLicense                         NULL                          0x0000 DRMLicense                    PT_MV_BINARY  MNID_STRING PS_PUBLIC_STRINGS     0x8370
-PidNameEditTime                                        NULL                          0x0000 EditTime                      PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80e0
-PidNameJunkEmailMoveStamp                              NULL                          0x0000 http://schemas.microsoft.com/exchange/junkemailmovestamp PT_LONG     MNID_STRING PS_PUBLIC_STRINGS 0x817e
-PidNameHiddenCount                                     NULL                          0x0000 HiddenCount                   PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80f1
-PidNameKeywords                                        NULL                          0x0000 Keywords                      PT_MV_STRING8 MNID_STRING PS_PUBLIC_STRINGS     0x80db
-PidNameLastAuthor                                      NULL                          0x0000 LastAuthor                    PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80de
-PidNameLastPrinted                                     NULL                          0x0000 LastPrinted                   PT_SYSTIME    MNID_STRING PS_PUBLIC_STRINGS     0x80e1
-PidNameLastSaveDateTime                                NULL                          0x0000 LastSaveDtm                   PT_SYSTIME    MNID_STRING PS_PUBLIC_STRINGS     0x80e3
-PidNameLineCount                                       NULL                          0x0000 LineCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80ed
-PidNameManager                                         NULL                          0x0000 Manager                       PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80f6
-PidNameMultimediaClipCount                             NULL                          0x0000 MMClipCount                   PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80f2
-PidNameNoteCount                                       NULL                          0x0000 NoteCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80f0
-PidNameOMSAccountGuid                                  NULL                          0x0000 OMSAccountGuid                PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameOMSMobileModel                                  NULL                          0x0000 OMSMobileModel                PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-PidNameOMSGScheduleTime                                NULL                          0x0000 OMSScheduleTime               PT_SYSTIME    MNID_STRING PS_PUBLIC_STRINGS
-PidNameOMSServiceType                                  NULL                          0x0000 OMSServiceType                PT_LONG       MNID_STRING PS_PUBLIC_STRINGS
-PidNameOMSSourceType                                   NULL                          0x0000 OMSSourceType                 PT_LONG       MNID_STRING PS_PUBLIC_STRINGS
-PidNamePhishingStamp                                   NULL                          0x0000 http://schemas.microsoft.com/outlook/phishingstamp       PT_LONG       MNID_STRING PS_PUBLIC_STRINGS 0x836f
-PidNamePageCount                                       NULL                          0x0000 PageCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80e4
-PidNameParagraphCount                                  NULL                          0x0000 ParCount                      PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80ee
-PidNamePresentationFormat                              NULL                          0x0000 PresFormat                    PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80eb
-PidNameSecurity                                        NULL                          0x0000 Security                      PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80e9
-PidNameSlideCount                                      NULL                          0x0000 SlideCount                    PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80ef
-PidNameSubject                                         NULL                          0x0000 Subject                       PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80d9
-PidNameTemplate                                        NULL                          0x0000 Template                      PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80dd
-PidNameTitle                                           NULL                          0x0000 Title                         PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS     0x80d8
-PidNameWordCount                                       NULL                          0x0000 WordCount                     PT_LONG       MNID_STRING PS_PUBLIC_STRINGS     0x80e5
-NULL                                                   NULL                          0x0000 urn:schemas:contacts:fileas   PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-NULL                                                   NULL                          0x0000 urn:schemas:calendar:sequence PT_LONG       MNID_STRING PS_PUBLIC_STRINGS
-NULL                                                   NULL                          0x0000 urn:schemas:calendar:version  PT_UNICODE    MNID_STRING PS_PUBLIC_STRINGS
-NULL                   NULL                         0x0000 urn:schemas-microsoft-com:office:outlook#storetypeprivate             PT_BOOLEAN    MNID_STRING PS_PUBLIC_STRINGS 0x80e7
-NULL                   NULL                         0x0000 urn:schemas-microsoft-com:office:outlook#noaclui                      PT_BOOLEAN    MNID_STRING PS_PUBLIC_STRINGS 0x80e9
-
-### PS_INTERNET_HEADERS
-PidNameAcceptLanguage                                  AcceptLanguage                0x0000 Accept-Language               PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS
-PidNameApproved                                               Approved                      0x0000 Approved                      PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS    0x8056
-PidNameApprovalAllowedDescisionMakers                 NULL                          0x0000 X-MS-Exchange-Organization-Approval-Allowed-Decision-Makers PT_UNICODE MNID_STRING PS_INTERNET_HEADERS
-PidNameApprovalRequestor                              NULL                          0x0000 X-MS-Exchange-Organization-Approval-Requestor PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS
-PidNameAuthenticatedAs                                NULL                          0x0000 X-MS-Exchange-Organization-AuthAs PT_UNICODE        MNID_STRING PS_INTERNET_HEADERS
-PidNameAuthenticatedDomain                            NULL                          0x0000 X-MS-Exchange-Organization-AuthDomain PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS 0x80f7
-PidNameAuthenticatedMechanism                         NULL                          0x0000 X-MS-Exchange-Organization-AuthMechanism PT_UNICODE MNID_STRING PS_INTERNET_HEADERS 
-PidNameAuthenticatedSource                            NULL                          0x0000 X-MS-Exchange-Organization-AuthSource PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS
-PidNameBcc                                            NULL                          0x0000 Bcc                           PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x8057
-PidNameCc                                             NULL                          0x0000 Cc                            PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x8058
-PidNameContentBase                                     BodyContentBase               0x0000 Content-Base                  PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                
-PidNameContentClass                                    NULL                          0x0000 Content-Class                 PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8041
-PidNameContentDisposition                             NULL                          0x0000 Content-Disposition           PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x805b
-PidNameContentID                                      NULL                          0x0000 Content-ID                    PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x805c
-PidNameContentLanguage                                NULL                          0x0000 Content-Language              PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x805d
-PidNameContentLocation                                NULL                          0x0000 Content-Location              PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x805e
-PidNameContentTransferEncoding                         NULL                          0x0000 Content-Transfer-Encoding     PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x805f
-PidNameContentType                                     NULL                          0x0000 Content-Type                  PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x805a
-PidNameCrossReference                                  NULL                          0x0000 Xref                          PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8089
-PidNameXSharingBrowseUrl                               NULL                          0x0000 X-Sharing-Browse-Url          PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8463
-PidNameXSharingCapabilities                            NULL                          0x0000 X-Sharing-Capabilities        PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         0x8457
-PidNameXSharingConfigUrl                               NULL                          0x0000 X-Sharing-Config-Url          PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8462
-PidNameXSharingExtendedCaps                            NULL                          0x0000 X-Sharing-Extended-Caps       PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                
-PidNameXSharingFlavor                                  NULL                          0x0000 X-Sharing-Flavor              PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8458
-PidNameXSharingInstanceGuid                            NULL                          0x0000 X-Sharing-Instance-Guid       PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8459
-PidNameXSharingLocalType                               NULL                          0x0000 X-Sharing-Local-Type          PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8464
-PidNameXSharingProviderGuid                            NULL                          0x0000 X-Sharing-Provider-Guid       PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x845a
-PidNameXSharingProviderName                            NULL                          0x0000 X-Sharing-Provider-Name       PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x845b
-PidNameXSharingProviderUrl                             NULL                          0x0000 X-Sharing-Provider-Url        PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x845c
-PidNameXSharingRemoteName                              NULL                          0x0000 X-Sharing-Remote-Name         PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x845e
-PidNameXSharingRemotePath                              NULL                          0x0000 X-Sharing-Remote-Path         PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x845d
-PidNameXSharingRemoteStoreUid                          NULL                          0x0000 X-Sharing-Remote-Store-Uid    PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8460
-PidNameXSharingRemoteType                              NULL                          0x0000 X-Sharing-Remote-Type         PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS                0x8461
-PidNameXSharingRemoteUid                               NULL                          0x0000 X-Sharing-Remote-Uid          PT_UNICODE    MNID_STRING PS_INTERNET_HEADERS         8x845f
-
-
-### PSETID_CalendarAssistant
-#PidLidClientIntent                                   ClientIntent                  0x0015 ClientIntent                  PT_LONG       MNID_STRING PSETID_CalendarAssistant
-
-### PSETID_Attachment
-PidNameAttachmentMacContentType                        NULL                          0x0000 AttachmentMacContentType      PT_UNICODE    MNID_STRING PSETID_Attachment
-PidNameAttachmentMacInfo                               NULL                          0x0000 AttachmentMacInfo             PT_BINARY     MNID_STRING PSETID_Attachment
-
-
-### PSETID_UnifiedMessaging
-PidNameAudioNotes                                      UMAudioNotes                  0x0000 UMAudioNotes                  PT_UNICODE    MNID_STRING PSETID_UnifiedMessaging
-PidNameAutomaticSpeechRecognitionData                 NULL                          0x0000 AsrData                       PT_BINARY     MNID_STRING PSETID_UnifiedMessaging
-PidNameOutlookProtectionRuleTimestamp                 NULL                          0x0000 X-MS-Exchange-Organization-Outlook-Protection-Rule-Config-Timestamp PT_UNICODE MNID_STRING PSETID_UnifiedMessaging
-PidNameXUnifiedMessagingPartnerAssignedId             NULL                          0x0000 X-MS-Exchange-UM-PartnerAssignedID PT_UNICODE MNID_STRING PSETID_UnifiedMessaging
-PidNameXUnifiedMessagingPartnerContent                NULL                          0x0000 X-MS-Exchange-UM-PartnerContent    PT_UNICODE MNID_STRING PSETID_UnifiedMessaging
-PidNameXUnifiedMessagingPartnerContext                NULL                          0x0000 X-MS-Exchange-UM-PartnerContext    PT_UNICODE MNID_STRING PSETID_UnifiedMessaging
-PidNameXUnifiedMessagingPartnerStatus                 NULL                          0x0000 X-MS-Exchange-UM-PartnerStatus     PT_UNICODE MNID_STRING PSETID_UnifiedMessaging
-
-
-### PSETID_AirSync
-PidNameInstantMessagingAddress2                               NULL                          0x0000 IMAddress2                    PT_UNICODE    MNID_STRING PSETID_AirSync
-PidNameInstantMessagingAddress3                               NULL                          0x0000 IMAddress3                    PT_UNICODE    MNID_STRING PSETID_AirSync
-
-### PSETID_Messaging
-PidNameOriginalSpamConfidenceLevel                     NULL                          0x0000 OriginalScl                   PT_LONG       MNID_STRING PSETID_Messaging
diff --git a/branches/plugfest/libmapi/conf/mapi-properties b/branches/plugfest/libmapi/conf/mapi-properties
deleted file mode 100644 (file)
index ae1d101..0000000
+++ /dev/null
@@ -1,1553 +0,0 @@
-#
-# OpenChange MAPI implementation.
-# MAPI property tags
-#
-# This file was originally taken from the Gnome Evolution project.
-# evolution/evolution-exchange/docs/mapi-properties
-#
-# For the OpenChange project, UNICODE properties (1f) have been
-# replaced by PT_STRING8 ones (1e)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-0x00010003  PR_ACKNOWLEDGEMENT_MODE
-0x0002000b  PR_ALTERNATE_RECIPIENT_ALLOWED
-0x00030102  PR_AUTHORIZING_USERS
-0x0004001e  PR_AUTO_FORWARD_COMMENT
-0x0005000b  PR_AUTO_FORWARDED
-0x00060102  PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID
-0x00070102  PR_CONTENT_CORRELATOR
-0x0008001e  PR_CONTENT_IDENTIFIER
-0x00090003  PR_CONTENT_LENGTH
-0x000a000b  PR_CONTENT_RETURN_REQUESTED
-0x000b0102  PR_CONVERSATION_KEY
-0x000c0102  PR_CONVERSION_EITS
-0x000d000b  PR_CONVERSION_WITH_LOSS_PROHIBITED
-0x000e0102  PR_CONVERTED_EITS
-0x000f0040  PR_DEFERRED_DELIVERY_TIME
-0x00100040  PR_DELIVER_TIME
-0x00110003  PR_DISCARD_REASON
-0x0012000b  PR_DISCLOSURE_OF_RECIPIENTS
-0x00130102  PR_DL_EXPANSION_HISTORY
-0x0014000b  PR_DL_EXPANSION_PROHIBITED
-0x00150040  PR_EXPIRY_TIME
-0x0016000b  PR_IMPLICIT_CONVERSION_PROHIBITED
-0x00170003  PR_IMPORTANCE
-0x00180102  PR_IPM_ID
-0x00190040  PR_LATEST_DELIVERY_TIME
-0x001a001e  PR_MESSAGE_CLASS
-0x001b0102  PR_MESSAGE_DELIVERY_ID
-0x001e0102  PR_MESSAGE_SECURITY_LABEL
-0x001f0102  PR_OBSOLETED_IPMS
-0x00200102  PR_ORIGINALLY_INTENDED_RECIPIENT_NAME
-0x00210102  PR_ORIGINAL_EITS
-0x00220102  PR_ORIGINATOR_CERTIFICATE
-0x0023000b  PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED
-0x00240102  PR_ORIGINATOR_RETURN_ADDRESS
-0x00250102  PR_PARENT_KEY
-0x00260003  PR_PRIORITY
-0x00270102  PR_ORIGIN_CHECK
-0x0028000b  PR_PROOF_OF_SUBMISSION_REQUESTED
-0x0029000b  PR_READ_RECEIPT_REQUESTED
-0x002a0040  PR_RECEIPT_TIME
-0x002b000b  PR_RECIPIENT_REASSIGNMENT_PROHIBITED
-0x002c0102  PR_REDIRECTION_HISTORY
-0x002d0102  PR_RELATED_IPMS
-0x002e0003  PR_ORIGINAL_SENSITIVITY
-0x002f001e  PR_LANGUAGES
-0x00300040  PR_REPLY_TIME
-0x00310102  PR_REPORT_TAG
-0x00320040  PR_REPORT_TIME
-0x0033000b  PR_RETURNED_IPM
-0x00340003  PR_SECURITY
-0x0035000b  PR_INCOMPLETE_COPY
-0x00360003  PR_SENSITIVITY
-0x0037001e  PR_SUBJECT
-0x00380102  PR_SUBJECT_IPM
-0x00390040  PR_CLIENT_SUBMIT_TIME
-0x003a001e  PR_REPORT_NAME
-0x003b0102  PR_SENT_REPRESENTING_SEARCH_KEY
-0x003c0102  PR_X400_CONTENT_TYPE
-0x003d001e  PR_SUBJECT_PREFIX
-0x003e0003  PR_NON_RECEIPT_REASON
-0x003f0102  PR_RECEIVED_BY_ENTRYID
-0x0040001e  PR_RECEIVED_BY_NAME
-0x00410102  PR_SENT_REPRESENTING_ENTRYID
-0x0042001e  PR_SENT_REPRESENTING_NAME
-0x00430102  PR_RCVD_REPRESENTING_ENTRYID
-0x0044001e  PR_RCVD_REPRESENTING_NAME
-0x00450102  PR_REPORT_ENTRYID
-0x00460102  PR_READ_RECEIPT_ENTRYID
-0x00470102  PR_MESSAGE_SUBMISSION_ID
-0x00480040  PR_PROVIDER_SUBMIT_TIME
-0x0049001e  PR_ORIGINAL_SUBJECT
-0x004a000b  PR_DISC_VAL
-0x004b001e  PR_ORIG_MESSAGE_CLASS
-0x004c0102  PR_ORIGINAL_AUTHOR_ENTRYID
-0x004d001e  PR_ORIGINAL_AUTHOR_NAME
-0x004e0040  PR_ORIGINAL_SUBMIT_TIME
-0x004f0102  PR_REPLY_RECIPIENT_ENTRIES
-0x0050001e  PR_REPLY_RECIPIENT_NAMES
-0x00510102  PR_RECEIVED_BY_SEARCH_KEY
-0x00520102  PR_RCVD_REPRESENTING_SEARCH_KEY
-0x00530102  PR_READ_RECEIPT_SEARCH_KEY
-0x00540102  PR_REPORT_SEARCH_KEY
-0x00550040  PR_ORIGINAL_DELIVERY_TIME
-0x00560102  PR_ORIGINAL_AUTHOR_SEARCH_KEY
-0x0057000b  PR_MESSAGE_TO_ME
-0x0058000b  PR_MESSAGE_CC_ME
-0x0059000b  PR_MESSAGE_RECIP_ME
-0x005a001e  PR_ORIGINAL_SENDER_NAME
-0x005b0102  PR_ORIGINAL_SENDER_ENTRYID
-0x005c0102  PR_ORIGINAL_SENDER_SEARCH_KEY
-0x005d001e  PR_ORIGINAL_SENT_REPRESENTING_NAME
-0x005e0102  PR_ORIGINAL_SENT_REPRESENTING_ENTRYID
-0x005f0102  PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY
-0x00600040  PR_START_DATE
-0x00610040  PR_END_DATE
-0x00620003  PR_OWNER_APPT_ID
-0x0063000b  PR_RESPONSE_REQUESTED
-0x0064001e  PR_SENT_REPRESENTING_ADDRTYPE
-0x0065001e  PR_SENT_REPRESENTING_EMAIL_ADDRESS
-0x0066001e  PR_ORIGINAL_SENDER_ADDRTYPE
-0x0067001e  PR_ORIGINAL_SENDER_EMAIL_ADDRESS
-0x0068001e  PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE
-0x0069001e  PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS
-0x0070001e  PR_CONVERSATION_TOPIC
-0x00710102  PR_CONVERSATION_INDEX
-0x0072001e  PR_ORIGINAL_DISPLAY_BCC
-0x0073001e  PR_ORIGINAL_DISPLAY_CC
-0x0074001e  PR_ORIGINAL_DISPLAY_TO
-0x0075001e  PR_RECEIVED_BY_ADDRTYPE
-0x0076001e  PR_RECEIVED_BY_EMAIL_ADDRESS
-0x0077001e  PR_RCVD_REPRESENTING_ADDRTYPE
-0x0078001e  PR_RCVD_REPRESENTING_EMAIL_ADDRESS
-0x0079001e  PR_ORIGINAL_AUTHOR_ADDRTYPE
-0x007a001e  PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS
-0x007b001e  PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE
-0x007c001e  PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS
-0x007d001e  PR_TRANSPORT_MESSAGE_HEADERS               PidTagTransportMessageHeaders
-0x007e0102  PR_DELEGATION
-0x007f0102  PR_TNEF_CORRELATION_KEY
-0x0c000102  PR_CONTENT_INTEGRITY_CHECK
-0x0c010003  PR_EXPLICIT_CONVERSION
-0x0c02000b  PR_IPM_RETURN_REQUESTED
-0x0c030102  PR_MESSAGE_TOKEN
-0x0c040003  PR_NDR_REASON_CODE
-0x0c050003  PR_NDR_DIAG_CODE
-0x0c06000b  PR_NON_RECEIPT_NOTIFICATION_REQUESTED
-0x0c070003  PR_DELIVERY_POINT
-0x0c08000b  PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED
-0x0c090102  PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT
-0x0c0a000b  PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY
-0x0c0b0003  PR_PHYSICAL_DELIVERY_MODE
-0x0c0c0003  PR_PHYSICAL_DELIVERY_REPORT_REQUEST
-0x0c0d0102  PR_PHYSICAL_FORWARDING_ADDRESS
-0x0c0e000b  PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED
-0x0c0f000b  PR_PHYSICAL_FORWARDING_PROHIBITED
-0x0c100102  PR_PHYSICAL_RENDITION_ATTRIBUTES
-0x0c110102  PR_PROOF_OF_DELIVERY
-0x0c12000b  PR_PROOF_OF_DELIVERY_REQUESTED
-0x0c130102  PR_RECIPIENT_CERTIFICATE
-0x0c14001e  PR_RECIPIENT_NUMBER_FOR_ADVICE
-0x0c150003  PR_RECIPIENT_TYPE                                          PidTagRecipientType
-0x0c160003  PR_REGISTERED_MAIL_TYPE
-0x0c17000b  PR_REPLY_REQUESTED
-0x0c180003  PR_REQUESTED_DELIVERY_METHOD
-0x0c190102  PR_SENDER_ENTRYID
-0x0c1a001e  PR_SENDER_NAME
-0x0c1b001e  PR_SUPPLEMENTARY_INFO
-0x0c1c0003  PR_TYPE_OF_MTS_USER
-0x0c1d0102  PR_SENDER_SEARCH_KEY
-0x0c1e001e  PR_SENDER_ADDRTYPE
-0x0c1f001e  PR_SENDER_EMAIL_ADDRESS
-0x0c200003  PR_NDR_STATUS_CODE
-0x0e000014  PR_CURRENT_VERSION
-0x0e01000b  PR_DELETE_AFTER_SUBMIT
-0x0e02001e  PR_DISPLAY_BCC
-0x0e03001e  PR_DISPLAY_CC
-0x0e04001e  PR_DISPLAY_TO
-0x0e05001e  PR_PARENT_DISPLAY
-0x0e060040  PR_MESSAGE_DELIVERY_TIME
-0x0e070003  PR_MESSAGE_FLAGS
-0x0e080003  PR_MESSAGE_SIZE
-0x0e080014  PR_MESSAGE_SIZE_EXTENDED
-0x0e090102  PR_PARENT_ENTRYID
-0x0e0a0102  PR_SENTMAIL_ENTRYID
-0x0e0c000b  PR_CORRELATE
-0x0e0d0102  PR_CORRELATE_MTSID
-0x0e0e000b  PR_DISCRETE_VALUES
-0x0e0f000b  PR_RESPONSIBILITY
-0x0e100003  PR_SPOOLER_STATUS
-0x0e110003  PR_TRANSPORT_STATUS
-0x0e12000d  PR_MESSAGE_RECIPIENTS
-0x0e13000d  PR_MESSAGE_ATTACHMENTS
-0x0e140003  PR_SUBMIT_FLAGS
-0x0e150003  PR_RECIPIENT_STATUS
-0x0e160003  PR_TRANSPORT_KEY
-0x0e170003  PR_MSG_STATUS
-0x0e180003  PR_MESSAGE_DOWNLOAD_TIME
-0x0e190014  PR_CREATION_VERSION
-0x0e1a0014  PR_MODIFY_VERSION
-0x0e1b000b  PR_HASATTACH
-0x0e1c0003  PR_BODY_CRC
-0x0e1d001e  PR_NORMALIZED_SUBJECT
-0x0e1f000b  PR_RTF_IN_SYNC
-0x0e200003  PR_ATTACH_SIZE
-0x0e210003  PR_ATTACH_NUM
-0x0e22000b  PR_PREPROCESS
-0x0e230003  PR_INTERNET_ARTICLE_NUMBER
-0x0e24001e  PR_NEWSGROUP_NAME
-0x0e250102  PR_ORIGINATING_MTA_CERTIFICATE
-0x0e260102  PR_PROOF_OF_SUBMISSION
-0x0e270102  PR_NT_SECURITY_DESCRIPTOR
-0x0e580102  PR_CREATOR_SID
-0x0e590102  PR_LAST_MODIFIER_SID
-0x0e5e0048  PR_MIME_HANDLER_CLASSIDS
-0x0e610003  PR_URL_COMP_NAME_POSTFIX
-0x0e62000b  PR_URL_COMP_NAME_SET
-0x0e630003  PR_SUBFOLDER_CT
-0x0e640003  PR_DELETED_SUBFOLDER_CT
-0x0e660040  PR_DELETE_TIME
-0x0e670102  PR_AGE_LIMIT
-0x0e790003  PR_TRUST_SENDER
-0x0e960102  PR_ATTACH_VIRUS_SCAN_INFO
-0x0e9b0003  PR_EXTENDED_RULE_SIZE_LIMIT
-0x0ff40003  PR_ACCESS                                          PidTagAccess
-0x0ff50003  PR_ROW_TYPE
-0x0ff60102  PR_INSTANCE_KEY                                    PidTagInstanceKey
-0x0ff70003  PR_ACCESS_LEVEL
-0x0ff80102  PR_MAPPING_SIGNATURE
-0x0ff90102  PR_RECORD_KEY
-0x0ffa0102  PR_STORE_RECORD_KEY
-0x0ffb0102  PR_STORE_ENTRYID
-0x0ffc0102  PR_MINI_ICON
-0x0ffd0102  PR_ICON
-0x0ffe0003  PR_OBJECT_TYPE
-0x0fff0102  PR_ENTRYID                                         PidTagEntryId
-0x1000001e  PR_BODY
-0x1001001e  PR_REPORT_TEXT
-0x10020102  PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY
-0x10030102  PR_REPORTING_DL_NAME
-0x10040102  PR_REPORTING_MTA_CERTIFICATE
-0x10060003  PR_RTF_SYNC_BODY_CRC
-0x10070003  PR_RTF_SYNC_BODY_COUNT
-0x1008001e  PR_RTF_SYNC_BODY_TAG
-0x10090102  PR_RTF_COMPRESSED
-0x10100003  PR_RTF_SYNC_PREFIX_COUNT
-0x10110003  PR_RTF_SYNC_TRAILING_COUNT
-0x10120102  PR_ORIGINALLY_INTENDED_RECIP_ENTRYID
-0x1013001e  PR_BODY_HTML
-0x10130102  PR_HTML
-0x1030001e  PR_INTERNET_APPROVED
-0x1031001e  PR_INTERNET_CONTROL
-0x1032001e  PR_INTERNET_DISTRIBUTION
-0x1033001e  PR_INTERNET_FOLLOWUP_TO
-0x10340003  PR_INTERNET_LINES
-0x1035001e  PR_INTERNET_MESSAGE_ID
-0x1036001e  PR_INTERNET_NEWSGROUPS
-0x1037001e  PR_INTERNET_ORGANIZATION
-0x1038001e  PR_INTERNET_NNTP_PATH
-0x1039001e  PR_INTERNET_REFERENCES
-0x103a001e  PR_SUPERSEDES
-0x103b0102  PR_POST_FOLDER_ENTRIES
-0x103c001e  PR_POST_FOLDER_NAMES
-0x103d0102  PR_POST_REPLY_FOLDER_ENTRIES
-0x103e001e  PR_POST_REPLY_FOLDER_NAMES
-0x103f0102  PR_POST_REPLY_DENIED
-0x1040001e  PR_NNTP_XREF
-0x1041001e  PR_INTERNET_PRECEDENCE
-0x1042001e  PR_IN_REPLY_TO_ID
-0x1043001e  PR_LIST_HELP
-0x1044001e  PR_LIST_SUBSCRIBE
-0x1045001e  PR_LIST_UNSUBSCRIBE
-0x10800003  PR_ICON_INDEX
-0x10810003  PR_ACTION_FLAG
-0x10820040  PR_ACTION_DATE
-0x10900003  PR_FLAG_STATUS
-0x10910040  PR_FLAG_COMPLETE
-0x10950003  PR_FOLLOWUP_ICON                           PidTagFollowupIcon
-0x10970003  PR_ITEM_TEMPORARY_FLAGS                    PidTagItemTemporaryflags
-0x10c00102  PR_SMTP_TEMP_TBL_DATA
-0x10c10003  PR_SMTP_TEMP_TBL_DATA_2
-0x10c20102  PR_SMTP_TEMP_TBL_DATA_3
-0x10c30040  PR_CAL_START_TIME
-0x10c40040  PR_CAL_END_TIME
-0x10c50040  PR_CAL_RECURRING_ID
-0x10c6001e  PR_DAV_SUBMIT_DATA
-0x10c70003  PR_CDO_EXPANSION_INDEX
-0x10c80102  PR_IFS_INTERNAL_DATA
-0x10ca0040  PR_CAL_REMINDER_NEXT_TIME
-0x10f1001e  PR_OWA_URL
-0x10f2000b  PR_DISABLE_FULL_FIDELITY
-0x10f3001e  PR_URL_COMP_NAME
-0x10f4000b  PR_ATTR_HIDDEN                             PidTagAttrHidden
-0x10f5000b  PR_ATTR_SYSTEM
-0x10f6000b  PR_ATTR_READONLY
-0x11000102  PR_P1_CONTENT
-0x11010102  PR_P1_CONTENT_TYPE
-0x30000003  PR_ROWID
-0x3001001e  PR_DISPLAY_NAME                            PidTagDisplayName
-0x3002001e  PR_ADDRTYPE                                        PidTagAddressType
-0x3003001e  PR_EMAIL_ADDRESS                           PidTagEmailAddress
-0x3004001e  PR_COMMENT                                 PidTagComment
-0x30050003  PR_DEPTH                                   PidTagDepth
-0x3006001e  PR_PROVIDER_DISPLAY
-0x30070040  PR_CREATION_TIME
-0x30080040  PR_LAST_MODIFICATION_TIME
-0x30090003  PR_RESOURCE_FLAGS
-0x300a001e  PR_PROVIDER_DLL_NAME
-0x300b0102  PR_SEARCH_KEY                              PidTagSearchKey
-0x300c0102  PR_PROVIDER_UID
-0x300d0003  PR_PROVIDER_ORDINAL
-0x3301001e  PR_FORM_VERSION
-0x33020048  PR_FORM_CLSID
-0x3303001e  PR_FORM_CONTACT_NAME
-0x3304001e  PR_FORM_CATEGORY
-0x3305001e  PR_FORM_CATEGORY_SUB
-0x33061003  PR_FORM_HOST_MAP
-0x3307000b  PR_FORM_HIDDEN
-0x3308001e  PR_FORM_DESIGNER_NAME
-0x33090048  PR_FORM_DESIGNER_GUID
-0x330a0003  PR_FORM_MESSAGE_BEHAVIOR
-0x3400000b  PR_DEFAULT_STORE
-0x340d0003  PR_STORE_SUPPORT_MASK
-0x340e0003  PR_STORE_STATE
-0x34100102  PR_IPM_SUBTREE_SEARCH_KEY
-0x34110102  PR_IPM_OUTBOX_SEARCH_KEY
-0x34120102  PR_IPM_WASTEBASKET_SEARCH_KEY
-0x34130102  PR_IPM_SENTMAIL_SEARCH_KEY
-0x34140102  PR_MDB_PROVIDER
-0x3415000d  PR_RECEIVE_FOLDER_SETTINGS
-0x35df0003  PR_VALID_FOLDER_MASK
-0x35e00102  PR_IPM_SUBTREE_ENTRYID
-0x35e20102  PR_IPM_OUTBOX_ENTRYID
-0x35e30102  PR_IPM_WASTEBASKET_ENTRYID
-0x35e40102  PR_IPM_SENTMAIL_ENTRYID
-0x35e50102  PR_VIEWS_ENTRYID
-0x35e60102  PR_COMMON_VIEWS_ENTRYID
-0x35e70102  PR_FINDER_ENTRYID
-0x36000003  PR_CONTAINER_FLAGS
-0x36010003  PR_FOLDER_TYPE                             PidTagFolderType
-0x36020003  PR_CONTENT_COUNT                           PidTagContentCount
-0x36030003  PR_CONTENT_UNREAD                          PidTagContentUnreadCount
-0x3604000d  PR_CREATE_TEMPLATES
-0x3605000d  PR_DETAILS_TABLE
-0x3607000d  PR_SEARCH
-0x3609000b  PR_SELECTABLE
-0x360a000b  PR_SUBFOLDERS                              PidTagSubFolders
-0x360b0003  PR_STATUS
-0x360c001e  PR_ANR
-0x360d1003  PR_CONTENTS_SORT_ORDER
-0x360e000d  PR_CONTAINER_HIERARCHY
-0x360f000d  PR_CONTAINER_CONTENTS
-0x3610000d  PR_FOLDER_ASSOCIATED_CONTENTS
-0x36110102  PR_DEF_CREATE_DL
-0x36120102  PR_DEF_CREATE_MAILUSER
-0x3613001e  PR_CONTAINER_CLASS                         PidTagContainerClass
-0x36140014  PR_CONTAINER_MODIFY_VERSION
-0x36150102  PR_AB_PROVIDER_ID
-0x36160102  PR_DEFAULT_VIEW_ENTRYID
-0x36170003  PR_ASSOC_CONTENT_COUNT
-0x361c0102  PR_PACKED_NAME_PROPS
-0x36d00102  PR_IPM_APPOINTMENT_ENTRYID                 PidTagIpmAppointmentEntryId
-0x36d10102  PR_IPM_CONTACT_ENTRYID                     PidTagIpmContactEntryId
-0x36d20102  PR_IPM_JOURNAL_ENTRYID                     PidTagIpmJournalEntryId
-0x36d30102  PR_IPM_NOTE_ENTRYID                                PidTagIpmNoteEntryId
-0x36d40102  PR_IPM_TASK_ENTRYID                                PidTagIpmTaskEntryId
-0x36d50102  PR_REMINDERS_ONLINE_ENTRYID                        PidTagRemindersOnlineEntryId
-0x36d60102  PR_REMINDERS_OFFLINE_ENTRYID
-0x36d70102  PR_IPM_DRAFTS_ENTRYID                      PidTagIpmDraftsEntryId
-0x36d81102  PR_OUTLOOK_2003_ENTRYIDS
-0x36da0102  PR_EXTENDED_FOLDER_FLAGS                   PidTagExtendedFolderFlags
-0x36df0102  PR_FOLDER_WEBVIEWINFO
-0x36e00102  PR_FOLDER_XVIEWINFO_E                      PidTagXViewInfoE
-0x36e10003  PR_FOLDER_VIEWS_ONLY
-0x36e41102  PR_FREEBUSY_ENTRYIDS
-0x36e5001e  PR_DEF_MSG_CLASS
-0x36e6001e  PR_DEF_FORM_NAME
-0x36e9000b  PR_GENERATE_EXCHANGE_VIEWS
-0x36eb0102  PR_FOLDER_VIEWLIST
-0x36ec0003  PR_AGING_PERIOD
-0x36ee0003  PR_AGING_GRANULARITY
-0x37000102  PR_ATTACHMENT_X400_PARAMETERS
-0x3701000d  PR_ATTACH_DATA_OBJ
-0x37010102  PR_ATTACH_DATA_BIN
-0x37020102  PR_ATTACH_ENCODING
-0x3703001e  PR_ATTACH_EXTENSION
-0x3704001e  PR_ATTACH_FILENAME
-0x37050003  PR_ATTACH_METHOD
-0x3707001e  PR_ATTACH_LONG_FILENAME
-0x3708001e  PR_ATTACH_PATHNAME
-0x37090102  PR_ATTACH_RENDERING
-0x370a0102  PR_ATTACH_TAG
-0x370b0003  PR_RENDERING_POSITION
-0x370c001e  PR_ATTACH_TRANSPORT_NAME
-0x370d001e  PR_ATTACH_LONG_PATHNAME
-0x370e001e  PR_ATTACH_MIME_TAG
-0x370f0102  PR_ATTACH_ADDITIONAL_INFO
-0x3712001e  PR_ATTACH_CONTENT_ID
-0x3713001e  PR_ATTACH_CONTENT_LOCATION
-0x37140003  PR_ATTACH_FLAGS
-0x3716001e  PR_ATTACH_CONTENT_DISPOSITION
-0x38800102  PR_SYNCEVENT_SUPPRESS_GUID
-0x39000003  PR_DISPLAY_TYPE
-0x39020102  PR_TEMPLATEID
-0x39040102  PR_PRIMARY_CAPABILITY
-0x39fe001e  PR_SMTP_ADDRESS
-0x39ff001e  PR_7BIT_DISPLAY_NAME                       PidTagAddressBookDisplayNamePrintable
-0x3a00001e  PR_ACCOUNT
-0x3a010102  PR_ALTERNATE_RECIPIENT
-0x3a02001e  PR_CALLBACK_TELEPHONE_NUMBER
-0x3a03000b  PR_CONVERSION_PROHIBITED
-0x3a04000b  PR_DISCLOSE_RECIPIENTS
-0x3a05001e  PR_GENERATION
-0x3a06001e  PR_GIVEN_NAME
-0x3a07001e  PR_GOVERNMENT_ID_NUMBER
-0x3a08001e  PR_OFFICE_TELEPHONE_NUMBER
-0x3a09001e  PR_HOME_TELEPHONE_NUMBER
-0x3a0a001e  PR_INITIALS
-0x3a0b001e  PR_KEYWORD
-0x3a0c001e  PR_LANGUAGE
-0x3a0d001e  PR_LOCATION
-0x3a0e000b  PR_MAIL_PERMISSION
-0x3a0f001e  PR_MHS_COMMON_NAME
-0x3a10001e  PR_ORGANIZATIONAL_ID_NUMBER
-0x3a11001e  PR_SURNAME
-0x3a120102  PR_ORIGINAL_ENTRYID
-0x3a13001e  PR_ORIGINAL_DISPLAY_NAME
-0x3a140102  PR_ORIGINAL_SEARCH_KEY
-0x3a15001e  PR_POSTAL_ADDRESS
-0x3a16001e  PR_COMPANY_NAME
-0x3a17001e  PR_TITLE
-0x3a18001e  PR_DEPARTMENT_NAME
-0x3a19001e  PR_OFFICE_LOCATION
-0x3a1a001e  PR_PRIMARY_TELEPHONE_NUMBER
-0x3a1b001e  PR_OFFICE2_TELEPHONE_NUMBER
-0x3a1c001e  PR_MOBILE_TELEPHONE_NUMBER
-0x3a1d001e  PR_RADIO_TELEPHONE_NUMBER
-0x3a1e001e  PR_CAR_TELEPHONE_NUMBER
-0x3a1f001e  PR_OTHER_TELEPHONE_NUMBER
-0x3a20001e  PR_TRANSMITTABLE_DISPLAY_NAME              PidTagTransmittableDisplayName
-0x3a21001e  PR_PAGER_TELEPHONE_NUMBER
-0x3a220102  PR_USER_CERTIFICATE
-0x3a23001e  PR_PRIMARY_FAX_NUMBER
-0x3a24001e  PR_BUSINESS_FAX_NUMBER
-0x3a25001e  PR_HOME_FAX_NUMBER
-0x3a26001e  PR_COUNTRY
-0x3a27001e  PR_LOCALITY
-0x3a28001e  PR_STATE_OR_PROVINCE
-0x3a29001e  PR_STREET_ADDRESS
-0x3a2a001e  PR_POSTAL_CODE
-0x3a2b001e  PR_POST_OFFICE_BOX
-0x3a2c001e  PR_TELEX_NUMBER
-0x3a2d001e  PR_ISDN_NUMBER
-0x3a2e001e  PR_ASSISTANT_TELEPHONE_NUMBER
-0x3a2f001e  PR_HOME2_TELEPHONE_NUMBER
-0x3a30001e  PR_ASSISTANT
-0x3a40000b  PR_SEND_RICH_INFO                          PidTagSendRichInfo
-0x3a410040  PR_WEDDING_ANNIVERSARY
-0x3a420040  PR_BIRTHDAY
-0x3a43001e  PR_HOBBIES
-0x3a44001e  PR_MIDDLE_NAME
-0x3a45001e  PR_DISPLAY_NAME_PREFIX
-0x3a46001e  PR_PROFESSION
-0x3a47001e  PR_PREFERRED_BY_NAME
-0x3a48001e  PR_SPOUSE_NAME
-0x3a49001e  PR_COMPUTER_NETWORK_NAME
-0x3a4a001e  PR_CUSTOMER_ID
-0x3a4b001e  PR_TTYTDD_PHONE_NUMBER
-0x3a4c001e  PR_FTP_SITE
-0x3a4d0002  PR_GENDER
-0x3a4e001e  PR_MANAGER_NAME
-0x3a4f001e  PR_NICKNAME
-0x3a50001e  PR_PERSONAL_HOME_PAGE
-0x3a51001e  PR_BUSINESS_HOME_PAGE
-0x3a520048  PR_CONTACT_VERSION
-0x3a531102  PR_CONTACT_ENTRYIDS
-0x3a54101e  PR_CONTACT_ADDRTYPES
-0x3a550003  PR_CONTACT_DEFAULT_ADDRESS_INDEX
-0x3a56101e  PR_CONTACT_EMAIL_ADDRESSES
-0x3a57001e  PR_COMPANY_MAIN_PHONE_NUMBER
-0x3a58101e  PR_CHILDRENS_NAMES
-0x3a59001e  PR_HOME_ADDRESS_CITY
-0x3a5a001e  PR_HOME_ADDRESS_COUNTRY
-0x3a5b001e  PR_HOME_ADDRESS_POSTAL_CODE
-0x3a5c001e  PR_HOME_ADDRESS_STATE_OR_PROVINCE
-0x3a5d001e  PR_HOME_ADDRESS_STREET
-0x3a5e001e  PR_HOME_ADDRESS_POST_OFFICE_BOX
-0x3a5f001e  PR_OTHER_ADDRESS_CITY
-0x3a60001e  PR_OTHER_ADDRESS_COUNTRY
-0x3a61001e  PR_OTHER_ADDRESS_POSTAL_CODE
-0x3a62001e  PR_OTHER_ADDRESS_STATE_OR_PROVINCE
-0x3a63001e  PR_OTHER_ADDRESS_STREET
-0x3a64001e  PR_OTHER_ADDRESS_POST_OFFICE_BOX
-0x3a701102  PR_USER_X509_CERTIFICATE
-0x3a710003  PR_SEND_INTERNET_ENCODING
-0x3d000102  PR_STORE_PROVIDERS
-0x3d010102  PR_AB_PROVIDERS
-0x3d020102  PR_TRANSPORT_PROVIDERS
-0x3d04000b  PR_DEFAULT_PROFILE
-0x3d051102  PR_AB_SEARCH_PATH
-0x3d060102  PR_AB_DEFAULT_DIR
-0x3d070102  PR_AB_DEFAULT_PAB
-0x3d080102  PR_FILTERING_HOOKS
-0x3d09001e  PR_SERVICE_NAME
-0x3d0a001e  PR_SERVICE_DLL_NAME
-0x3d0b001e  PR_SERVICE_ENTRY_NAME
-0x3d0c0102  PR_SERVICE_UID
-0x3d0d0102  PR_SERVICE_EXTRA_UIDS
-0x3d0e0102  PR_SERVICES
-0x3d0f101e  PR_SERVICE_SUPPORT_FILES
-0x3d10101e  PR_SERVICE_DELETE_FILES
-0x3d110102  PR_AB_SEARCH_PATH_UPDATE
-0x3d12001e  PR_PROFILE_NAME
-0x3d13001e  PR_SERVICE_INSTALL_ID
-0x3d210102  PR_ADMIN_SECURITY_DESCRIPTOR
-0x3e00001e  PR_IDENTITY_DISPLAY
-0x3e010102  PR_IDENTITY_ENTRYID
-0x3e020003  PR_RESOURCE_METHODS
-0x3e030003  PR_RESOURCE_TYPE
-0x3e040003  PR_STATUS_CODE
-0x3e050102  PR_IDENTITY_SEARCH_KEY
-0x3e060102  PR_OWN_STORE_ENTRYID
-0x3e07001e  PR_RESOURCE_PATH
-0x3e08001e  PR_STATUS_STRING
-0x3e09000b  PR_X400_DEFERRED_DELIVERY_CANCEL
-0x3e0a0102  PR_HEADER_FOLDER_ENTRYID
-0x3e0b0003  PR_REMOTE_PROGRESS
-0x3e0c001e  PR_REMOTE_PROGRESS_TEXT
-0x3e0d000b  PR_REMOTE_VALIDATE_OK
-0x3f000003  PR_CONTROL_FLAGS
-0x3f010102  PR_CONTROL_STRUCTURE
-0x3f020003  PR_CONTROL_TYPE
-0x3f030003  PR_DELTAX
-0x3f040003  PR_DELTAY
-0x3f050003  PR_XPOS
-0x3f060003  PR_YPOS
-0x3f070102  PR_CONTROL_ID
-0x3f080003  PR_INITIAL_DETAILS_PANE
-0x3f800014  PR_DID
-0x3f810014  PR_SEQID
-0x3f820014  PR_DRAFTID
-0x3f830040  PR_CHECK_IN_TIME
-0x3f84001e  PR_CHECK_IN_COMMENT
-0x3f850003  PR_VERSION_OP_CODE
-0x3f860102  PR_VERSION_OP_DATA
-0x3f870003  PR_VERSION_SEQUENCE_NUMBER
-0x3f880014  PR_ATTACH_ID
-0x3f8d001e  PR_PKM_DOC_STATUS
-0x3f8e101e  PR_MV_PKM_OPERATION_REQ
-0x3f8f001e  PR_PKM_DOC_INTERNAL_STATE
-0x3f900002  PR_VERSIONING_FLAGS
-0x3f910102  PR_PKM_LAST_UNAPPROVED_VID
-0x3f92101e  PR_MV_PKM_VERSION_LABELS
-0x3f93101e  PR_MV_PKM_VERSION_STATUS
-0x3f940102  PR_PKM_INTERNAL_DATA
-0x3fc90102  PR_LAST_CONFLICT
-0x3fca0102  PR_CONFLICT_MSG_KEY
-0x3fd00102  PR_REPL_HEADER
-0x3fd10102  PR_REPL_STATUS
-0x3fd20102  PR_REPL_CHANGES
-0x3fd30102  PR_REPL_RGM
-0x3fd40102  PR_RMI
-0x3fd50102  PR_INTERNAL_POST_REPLY
-0x3fd60040  PR_NTSD_MODIFICATION_TIME
-0x3fd8001e  PR_PREVIEW_UNREAD
-0x3fd9001e  PR_PREVIEW
-0x3fda001e  PR_ABSTRACT
-0x3fdb0003  PR_DL_REPORT_FLAGS
-0x3fdc0102  PR_BILATERAL_INFO
-0x3fdd0003  PR_MSG_BODY_ID
-0x3fde0003  PR_INTERNET_CPID           PidTagInternetCodepage
-0x3fdf0003  PR_AUTO_RESPONSE_SUPPRESS
-0x3fe0000d  PR_ACL_TABLE
-0x3fe00102  PR_ACL_DATA
-0x3fe1000d  PR_RULES_TABLE
-0x3fe10102  PR_RULES_DATA
-0x3fe20003  PR_FOLDER_DESIGN_FLAGS
-0x3fe3000b  PR_DELEGATED_BY_RULE
-0x3fe4000b  PR_DESIGN_IN_PROGRESS
-0x3fe5000b  PR_SECURE_ORIGINATION
-0x3fe6000b  PR_PUBLISH_IN_ADDRESS_BOOK
-0x3fe70003  PR_RESOLVE_METHOD
-0x3fe8001e  PR_ADDRESS_BOOK_DISPLAY_NAME
-0x3fe90003  PR_EFORMS_LOCALE_ID
-0x3fea000b  PR_HAS_DAMS
-0x3feb0003  PR_DEFERRED_SEND_NUMBER
-0x3fec0003  PR_DEFERRED_SEND_UNITS
-0x3fed0003  PR_EXPIRY_NUMBER
-0x3fee0003  PR_EXPIRY_UNITS
-0x3fef0040  PR_DEFERRED_SEND_TIME
-0x3ff00102  PR_CONFLICT_ENTRYID
-0x3ff10003  PR_MESSAGE_LOCALE_ID
-0x3ff20102  PR_RULE_TRIGGER_HISTORY
-0x3ff30102  PR_MOVE_TO_STORE_ENTRYID
-0x3ff40102  PR_MOVE_TO_FOLDER_ENTRYID
-0x3ff50003  PR_STORAGE_QUOTA_LIMIT
-0x3ff60003  PR_EXCESS_STORAGE_USED
-0x3ff7001e  PR_SVR_GENERATING_QUOTA_MSG
-0x3ff8001e  PR_CREATOR_NAME
-0x3ff90102  PR_CREATOR_ENTRYID
-0x3ffa001e  PR_LAST_MODIFIER_NAME
-0x3ffb0102  PR_LAST_MODIFIER_ENTRYID
-0x3ffc001e  PR_REPLY_RECIPIENT_SMTP_PROXIES
-0x3ffd0003  PR_MESSAGE_CODEPAGE                        PidTagMessageCodepage
-0x3ffe0102  PR_EXTENDED_ACL_DATA
-0x3fff000b  PR_FROM_I_HAVE
-0x40000003  PR_NEW_ATTACH
-0x40010003  PR_START_EMBED
-0x40020003  PR_END_EMBED
-0x40030003  PR_START_RECIP
-0x40040003  PR_END_RECIP
-0x40050003  PR_END_CC_RECIP
-0x40060003  PR_END_BCC_RECIP
-0x40070003  PR_END_P1_RECIP
-0x40090003  PR_START_TOP_FLD
-0x400a0003  PR_START_SUB_FLD
-0x400b0003  PR_END_FOLDER
-0x400c0003  PR_START_MESSAGE
-0x400d0003  PR_END_MESSAGE
-0x400e0003  PR_END_ATTACH
-0x400f0003  PR_EC_WARNING
-0x40100003  PR_START_FAI_MSG
-0x40110102  PR_NEW_FX_FOLDER
-0x40120003  PR_INCR_SYNC_CHG
-0x40130003  PR_INCR_SYNC_DEL
-0x40140003  PR_INCR_SYNC_END
-0x40150003  PR_INCR_SYNC_MSG
-0x40160003  PR_FX_DEL_PROP
-0x40170003  PR_IDSET_GIVEN
-0x40190003  PR_SENDER_FLAGS
-0x401a0003  PR_SENT_REPRESENTING_FLAGS
-0x401b0003  PR_RCVD_BY_FLAGS
-0x401c0003  PR_RCVD_REPRESENTING_FLAGS
-0x401d0003  PR_ORIGINAL_SENDER_FLAGS
-0x401e0003  PR_ORIGINAL_SENT_REPRESENTING_FLAGS
-0x401f0003  PR_REPORT_FLAGS
-0x40200003  PR_READ_RECEIPT_FLAGS
-0x4021000b  PR_SOFT_DELETES
-0x402c0102  PR_MESSAGE_SUBMISSION_ID_FROM_CLIENT
-0x4030001e  PR_SENDER_SIMPLE_DISP_NAME
-0x4031001e  PR_SENT_REPRESENTING_SIMPLE_DISP_NAME
-0x4038001e  PR_CREATOR_SIMPLE_DISP_NAME
-0x403d001e  PR_ORG_ADDR_TYPE
-0x403e001e  PR_ORG_EMAIL_ADDR
-0x40590003  PR_CREATOR_FLAGS
-0x405a0003  PR_MODIFIER_FLAGS
-0x405b0003  PR_ORIGINATOR_FLAGS
-0x405c0003  PR_REPORT_DESTINATION_FLAGS
-0x405d0003  PR_ORIGINAL_AUTHOR_FLAGS
-0x40610102  PR_ORIGINATOR_SEARCH_KEY
-0x40640102  PR_REPORT_DESTINATION_SEARCH_KEY
-0x40650003  PR_ER_FLAG
-0x40680102  PR_INTERNET_SUBJECT
-0x40690102  PR_INTERNET_SENT_REPRESENTING_NAME
-0x40760003  PR_CONTENT_FILTER_SCL
-0x59020003  PR_INET_MAIL_OVERRIDE_FORMAT
-0x59090003  PR_MSG_EDITOR_FORMAT
-0x5ff6001e  PR_RECIPIENT_DISPLAY_NAME
-0x5ff70102  PR_RECIPIENT_ENTRYID
-0x5ffb0040  PR_RECIPIENT_TRACKSTATUS_ME
-0x5ffd0003  PR_RECIPIENT_FLAGS
-0x5fff0003  PR_RECIPIENT_TRACKSTATUS
-0x60010003  PR_DOTSTUFF_STATE
-0x65a00014  PR_RULE_SERVER_RULE_ID
-0x65c20102  PR_REPLY_TEMPLATE_ID
-0x65e00102  PR_SOURCE_KEY
-0x65e10102  PR_PARENT_SOURCE_KEY
-0x65e20102  PR_CHANGE_KEY
-0x65e30102  PR_PREDECESSOR_CHANGE_LIST
-0x65e40003  PR_SYNCHRONIZE_FLAGS
-0x65e5000b  PR_AUTO_ADD_NEW_SUBS
-0x65e6000b  PR_NEW_SUBS_GET_AUTO_ADD
-0x65e7001e  PR_MESSAGE_SITE_NAME
-0x65e8000b  PR_MESSAGE_PROCESSED
-0x65e90003  PR_RULE_MSG_STATE
-0x65ea0003  PR_RULE_MSG_USER_FLAGS
-0x65eb001e  PR_RULE_MSG_PROVIDER
-0x65ec001e  PR_RULE_MSG_NAME
-0x65ed0003  PR_RULE_MSG_LEVEL
-0x65ee0102  PR_RULE_MSG_PROVIDER_DATA
-0x65ef0102  PR_RULE_MSG_ACTIONS
-0x65f00102  PR_RULE_MSG_CONDITION
-0x65f10003  PR_RULE_MSG_CONDITION_LCID
-0x65f20002  PR_RULE_MSG_VERSION
-0x65f30003  PR_RULE_MSG_SEQUENCE
-0x65f4000b  PR_PREVENT_MSG_CREATE
-0x65f50040  PR_IMAP_INTERNAL_DATE
-0x66000003  PR_PROFILE_VERSION
-0x66010003  PR_PROFILE_CONFIG_FLAGS
-0x6602001e  PR_PROFILE_HOME_SERVER
-0x6603001e  PR_PROFILE_USER
-0x66040003  PR_PROFILE_CONNECT_FLAGS
-0x66050003  PR_PROFILE_TRANSPORT_FLAGS
-0x66060003  PR_PROFILE_UI_STATE
-0x6607001e  PR_PROFILE_UNRESOLVED_NAME
-0x6608001e  PR_PROFILE_UNRESOLVED_SERVER
-0x66090003  PR_PROFILE_OPEN_FLAGS
-0x6609001e  PR_PROFILE_BINDING_ORDER
-0x660a0003  PR_PROFILE_TYPE
-0x660b001e  PR_PROFILE_MAILBOX
-0x660c001e  PR_PROFILE_SERVER
-0x660d0003  PR_PROFILE_MAX_RESTRICT
-0x660e001e  PR_PROFILE_AB_FILES_PATH
-0x660f001e  PR_PROFILE_FAVFLD_DISPLAY_NAME
-0x6610001e  PR_PROFILE_OFFLINE_STORE_PATH
-0x66110102  PR_PROFILE_OFFLINE_INFO
-0x6612001e  PR_PROFILE_HOME_SERVER_DN
-0x6613101e  PR_PROFILE_HOME_SERVER_ADDRS
-0x6614001e  PR_PROFILE_SERVER_DN
-0x6615001e  PR_PROFILE_FAVFLD_COMMENT
-0x6616001e  PR_PROFILE_ALLPUB_DISPLAY_NAME
-0x6617001e  PR_PROFILE_ALLPUB_COMMENT
-0x66180003  PR_DISABLE_WINSOCK
-0x6618000b  PR_IN_TRANSIT
-0x66190003  PR_PROFILE_AUTH_PACKAGE
-0x66190102  PR_USER_ENTRYID
-0x661a001e  PR_USER_NAME
-0x661b0102  PR_MAILBOX_OWNER_ENTRYID
-0x661c001e  PR_MAILBOX_OWNER_NAME
-0x661d000b  PR_OOF_STATE
-0x661e0102  PR_SCHEDULE_FOLDER_ENTRYID
-0x661f0102  PR_IPM_DAF_ENTRYID
-0x66200102  PR_NON_IPM_SUBTREE_ENTRYID
-0x66210102  PR_EFORMS_REGISTRY_ENTRYID
-0x66220102  PR_SPLUS_FREE_BUSY_ENTRYID
-0x6623001e  PR_HIERARCHY_SERVER
-0x66230102  PR_OFFLINE_ADDRBOOK_ENTRYID
-0x66240102  PR_EFORMS_FOR_LOCALE_ENTRYID
-0x66250102  PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID
-0x66260102  PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID
-0x66270102  PR_OFFLINE_MESSAGE_ENTRYID
-0x66280102  PR_GW_MTSIN_ENTRYID
-0x66290102  PR_GW_MTSOUT_ENTRYID
-0x662a000b  PR_TRANSFER_ENABLED
-0x662b0102  PR_TEST_LINE_SPEED
-0x662c000d  PR_HIERARCHY_SYNCHRONIZER
-0x662d000d  PR_CONTENTS_SYNCHRONIZER
-0x662e000d  PR_COLLECTOR
-0x662f000d  PR_FAST_TRANSFER
-0x66300102  PR_IPM_FAVORITES_ENTRYID
-0x66310102  PR_IPM_PUBLIC_FOLDERS_ENTRYID
-0x6632000b  PR_STORE_OFFLINE
-0x6634000d  PR_CHANGE_ADVISOR
-0x6635001e  PR_FAVORITES_DEFAULT_NAME
-0x66360102  PR_SYS_CONFIG_FOLDER_ENTRYID
-0x66370048  PR_CHANGE_NOTIFICATION_GUID
-0x66380003  PR_FOLDER_CHILD_COUNT              PidTagFolderChildCount
-0x66390003  PR_RIGHTS                          PidTagRights
-0x663a000b  PR_HAS_RULES
-0x663b0102  PR_ADDRESS_BOOK_ENTRYID
-0x663c0102  PR_PUBLIC_FOLDER_ENTRYID
-0x663d0003  PR_OFFLINE_FLAGS
-0x663e0003  PR_HIERARCHY_CHANGE_NUM
-0x663f000b  PR_HAS_MODERATOR_RULES
-0x66400003  PR_DELETED_MSG_COUNT
-0x66410003  PR_DELETED_FOLDER_COUNT
-0x66420040  PR_OLDEST_DELETED_ON
-0x66430003  PR_DELETED_ASSOC_MSG_COUNT
-0x6644001e  PR_REPLICA_SERVER
-0x66450102  PR_CLIENT_ACTIONS
-0x66460102  PR_DAM_ORIGINAL_ENTRYID
-0x6647000b  PR_DAM_BACK_PATCHED
-0x66480003  PR_RULE_ERROR
-0x66490003  PR_RULE_ACTION_TYPE
-0x664a000b  PR_HAS_NAMED_PROPERTIES
-0x664b0014  PR_REPLICA_VERSION
-0x66500003  PR_RULE_ACTION_NUMBER
-0x66510102  PR_RULE_FOLDER_ENTRYID
-0x66520102  PR_ACTIVE_USER_ENTRYID
-0x66530003  PR_0X400_ENVELOPE_TYPE
-0x66540040  PR_MSG_FOLD_TIME
-0x66550102  PR_ICS_CHANGE_KEY
-0x66580003  PR_GW_ADMIN_OPERATIONS
-0x66590102  PR_INTERNET_CONTENT
-0x665a000b  PR_HAS_ATTACH_FROM_IMAIL
-0x665b001e  PR_ORIGINATOR_NAME
-0x665c001e  PR_ORIGINATOR_ADDR
-0x665d001e  PR_ORIGINATOR_ADDRTYPE
-0x665e0102  PR_ORIGINATOR_ENTRYID
-0x665f0040  PR_ARRIVAL_TIME
-0x66600102  PR_TRACE_INFO
-0x66610102  PR_SUBJECT_TRACE_INFO
-0x66620003  PR_RECIPIENT_NUMBER
-0x66630102  PR_MTS_SUBJECT_ID
-0x6664001e  PR_REPORT_DESTINATION_NAME
-0x66650102  PR_REPORT_DESTINATION_ENTRYID
-0x66660102  PR_CONTENT_SEARCH_KEY
-0x66670102  PR_FOREIGN_ID
-0x66680102  PR_FOREIGN_REPORT_ID
-0x66690102  PR_FOREIGN_SUBJECT_ID
-0x666a0003  PR_PROHIBIT_RECEIVE_QUOTA
-0x666c000b  PR_IN_CONFLICT
-0x666d0003  PR_MAX_SUBMIT_MESSAGE_SIZE                         
-0x666e0003  PR_PROHIBIT_SEND_QUOTA
-0x66700102  PR_LONGTERM_ENTRYID_FROM_TABLE
-0x66710014  PR_MEMBER_ID
-0x6672001e  PR_MEMBER_NAME
-0x66730003  PR_MEMBER_RIGHTS
-0x66740014  PR_RULE_ID
-0x66750102  PR_RULE_IDS
-0x66760003  PR_RULE_SEQUENCE
-0x66770003  PR_RULE_STATE
-0x66780003  PR_RULE_USER_FLAGS
-0x667900fd  PR_RULE_CONDITION
-0x667b001e  PR_PROFILE_MOAB
-0x667c001e  PR_PROFILE_MOAB_GUID
-0x667d0003  PR_PROFILE_MOAB_SEQ
-0x667f1102  PR_IMPLIED_RESTRICTIONS
-0x668000fe  PR_RULE_ACTIONS
-0x6681001e  PR_RULE_PROVIDER
-0x6682001e  PR_RULE_NAME
-0x66830003  PR_RULE_LEVEL
-0x66840102  PR_RULE_PROVIDER_DATA
-0x66850040  PR_LAST_FULL_BACKUP
-0x66870102  PR_PROFILE_ADDR_INFO
-0x66890102  PR_PROFILE_OPTIONS_DATA
-0x668a0102  PR_EVENTS_ROOT_FOLDER_ENTRYID
-0x668d001e  PR_INBOUND_NEWSFEED_DN
-0x668e001e  PR_OUTBOUND_NEWSFEED_DN
-0x668f0040  PR_DELETED_ON
-0x66900003  PR_REPLICATION_STYLE
-0x66910102  PR_REPLICATION_SCHEDULE
-0x66920003  PR_REPLICATION_MESSAGE_PRIORITY
-0x66930003  PR_OVERALL_MSG_AGE_LIMIT
-0x66940003  PR_REPLICATION_ALWAYS_INTERVAL
-0x66950003  PR_REPLICATION_MSG_SIZE
-0x6696000b  PR_IS_NEWSGROUP_ANCHOR
-0x6697000b  PR_IS_NEWSGROUP
-0x66980102  PR_REPLICA_LIST
-0x66990003  PR_OVERALL_AGE_LIMIT
-0x669a001e  PR_INTERNET_CHARSET
-0x669b0014  PR_DELETED_MESSAGE_SIZE_EXTENDED
-0x669c0014  PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED
-0x669d0014  PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED
-0x669e000b  PR_SECURE_IN_SITE
-0x66a0001e  PR_NT_USER_NAME
-0x66a10003  PR_LOCALE_ID
-0x66a20040  PR_LAST_LOGON_TIME
-0x66a30040  PR_LAST_LOGOFF_TIME
-0x66a40003  PR_STORAGE_LIMIT_INFORMATION
-0x66a5001e  PR_NEWSGROUP_COMPONENT
-0x66a60102  PR_NEWSFEED_INFO
-0x66a7001e  PR_INTERNET_NEWSGROUP_NAME
-0x66a80003  PR_FOLDER_FLAGS
-0x66a90040  PR_LAST_ACCESS_TIME
-0x66aa0003  PR_RESTRICTION_COUNT
-0x66ab0003  PR_CATEG_COUNT
-0x66ac0003  PR_CACHED_COLUMN_COUNT
-0x66ad0003  PR_NORMAL_MSG_W_ATTACH_COUNT
-0x66ae0003  PR_ASSOC_MSG_W_ATTACH_COUNT
-0x66af0003  PR_RECIPIENT_ON_NORMAL_MSG_COUNT
-0x66b00003  PR_RECIPIENT_ON_ASSOC_MSG_COUNT
-0x66b10003  PR_ATTACH_ON_NORMAL_MSG_COUNT
-0x66b20003  PR_ATTACH_ON_ASSOC_MSG_COUNT
-0x66b30003  PR_NORMAL_MESSAGE_SIZE
-0x66b30014  PR_NORMAL_MESSAGE_SIZE_EXTENDED
-0x66b40003  PR_ASSOC_MESSAGE_SIZE
-0x66b40014  PR_ASSOC_MESSAGE_SIZE_EXTENDED
-0x66b5001e  PR_FOLDER_PATHNAME
-0x66b60003  PR_OWNER_COUNT
-0x66b70003  PR_CONTACT_COUNT
-0x66c30003  PR_CODE_PAGE_ID
-0x66c40003  PR_RETENTION_AGE_LIMIT
-0x66c5000b  PR_DISABLE_PERUSER_READ
-0x66c60102  PR_INTERNET_PARSE_STATE
-0x66c70102  PR_INTERNET_MESSAGE_INFO
-0x6700001e  PR_PST_PATH
-0x6701000b  PR_PST_REMEMBER_PW
-0x67020003  PR_OST_ENCRYPTION
-0x6703001e  PR_PST_PW_SZ_OLD
-0x6704001e  PR_PST_PW_SZ_NEW
-0x67050003  PR_SORT_LOCALE_ID
-0x6707001e  PR_URL_NAME
-0x67090040  PR_LOCAL_COMMIT_TIME
-0x670a0040  PR_LOCAL_COMMIT_TIME_MAX
-0x670b0003  PR_DELETED_COUNT_TOTAL
-0x670c0048  PR_AUTO_RESET
-0x67100003  PR_URL_COMP_NAME_HASH
-0x67110003  PR_MSG_FOLDER_TEMPLATE_RES_2
-0x67120003  PR_RANK
-0x6713000b  PR_MSG_FOLDER_TEMPLATE_RES_4
-0x6714000b  PR_MSG_FOLDER_TEMPLATE_RES_5
-0x6715000b  PR_MSG_FOLDER_TEMPLATE_RES_6
-0x67160102  PR_MSG_FOLDER_TEMPLATE_RES_7
-0x67170102  PR_MSG_FOLDER_TEMPLATE_RES_8
-0x67180102  PR_MSG_FOLDER_TEMPLATE_RES_9
-0x6719001e  PR_MSG_FOLDER_TEMPLATE_RES_10
-0x671a001e  PR_MSG_FOLDER_TEMPLATE_RES_11
-0x671b001e  PR_MSG_FOLDER_TEMPLATE_RES_12
-0x671e000b  PR_PF_PLATINUM_HOME_MDB
-0x671f000b  PR_PF_PROXY_REQUIRED
-0x67200102  PR_INTERNET_FREE_DOC_INFO
-0x67210003  PR_PF_OVER_HARD_QUOTA_LIMIT
-0x67220003  PR_PF_MSG_SIZE_LIMIT
-0x674000fb  PR_SENT_MAILSVR_EID                                PidTagSentMailSvrEID
-0x67430003  PR_CONNECTION_MODULUS
-0x6744001e  PR_DELIVER_TO_DN
-0x67460003  PR_MIME_SIZE
-0x67470014  PR_FILE_SIZE_EXTENDED
-0x67480014  PR_FID                                     PidTagFolderId
-0x67490014  PR_PARENT_FID                              PidTagParentFolderId
-0x674a0014  PR_MID
-0x674b0014  PR_CATEG_ID
-0x674c0014  PR_PARENT_CATEG_ID
-0x674d0014  PR_INST_ID
-0x674e0003  PR_INSTANCE_NUM
-0x674f0014  PR_ADDRBOOK_MID
-0x67500003  PR_ICS_NOTIF
-0x67510003  PR_ARTICLE_NUM_NEXT
-0x67520003  PR_IMAP_LAST_ARTICLE_ID
-0x6753000b  PR_NOT_822_RENDERABLE
-0x67580102  PR_LTID
-0x67590102  PR_CN_EXPORT
-0x675a0102  PR_PCL_EXPORT
-0x675b1102  PR_CN_MV_EXPORT
-0x67790003  PR_PF_QUOTA_STYLE
-0x677b0003  PR_PF_STORAGE_QUOTA
-0x67830003  PR_SEARCH_FLAGS
-0x67aa000b  PR_ASSOCIATED
-0x67f00102  PR_PROFILE_SECURE_MAILBOX
-0x6800001e  PR_OAB_NAME
-0x68010003  PR_OAB_SEQUENCE
-0x6802001e  PR_OAB_CONTAINER_GUID
-0x68030003  PR_OAB_MESSAGE_CLASS
-0x6804001e  PR_OAB_DN
-0x68051003  PR_OAB_TRUNCATED_PROPS
-0x68060102  PR_OAB_SHA_HASH
-0x68070003  PR_OAB_LANGID
-0x68080003  PR_OAB_FILETYPE
-0x68090003  PR_OAB_COMPRESSED_SIZE
-0x680A0003  PR_OAB_FILE_SIZE
-0x68340003  PR_VIEW_STYLE
-0x683A0003  PR_VIEW_MAJORVERSION
-0x6844101e  PR_DELEGATES_DISPLAY_NAMES
-0x68451102  PR_DELEGATES_ENTRYIDS
-0x68470003  PR_FREEBUSY_START_RANGE
-0x68480003  PR_FREEBUSY_END_RANGE
-0x6849001e  PR_FREEBUSY_EMAIL_ADDRESS
-0x684f1003  PR_FREEBUSY_ALL_MONTHS
-0x68501102  PR_FREEBUSY_ALL_EVENTS
-0x68511003  PR_FREEBUSY_TENTATIVE_MONTHS
-0x68521102  PR_FREEBUSY_TENTATIVE_EVENTS
-0x68531003  PR_FREEBUSY_BUSY_MONTHS
-0x68541102  PR_FREEBUSY_BUSY_EVENTS
-0x68551003  PR_FREEBUSY_OOF_MONTHS
-0x68561102  PR_FREEBUSY_OOF_EVENTS
-0x68680040  PR_FREEBUSY_LAST_MODIFIED
-0x68690003  PR_FREEBUSY_NUM_MONTHS
-0x686b1003  PR_DELEGATES_SEE_PRIVATE
-0x686c0102  PR_PERSONAL_FREEBUSY
-0x686d000b  PR_PROCESS_MEETING_REQUESTS
-0x686e000b  PR_DECLINE_RECURRING_MEETING_REQUESTS
-0x686f000b  PR_DECLINE_CONFLICTING_MEETING_REQUESTS
-0x70010102  PR_VD_BINARY
-0x7002001e  PR_VD_STRINGS
-0x70030003  PR_VD_FLAGS
-0x70040102  PR_VD_LINK_TO
-0x70050102  PR_VD_VIEW_FOLDER
-0x7006001e  PR_VD_NAME
-0x70070003  PR_VD_VERSION
-0x7c00001e  PR_FAV_DISPLAY_NAME_A
-0x7c020102  PR_FAV_PUBLIC_SOURCE_KEY
-0x7c040102  PR_OST_OSTID
-0x7c0a000b  PR_STORE_SLOWLINK
-0x7d010003  PR_FAV_AUTOSUBFOLDERS
-0x7d01000b  PR_PROCESSED
-0x7d020102  PR_FAV_PARENT_SOURCE_KEY
-0x7d030003  PR_FAV_LEVEL_MASK
-0x7d070003  PR_FAV_INHERIT_AUTO
-0x7d080102  PR_FAV_DEL_SUBS
-0x7ffa0003  PR_ATTACHMENT_LINKID
-0x7ffb0040  PR_EXCEPTION_STARTTIME
-0x7ffc0040  PR_EXCEPTION_ENDTIME
-0x7ffd0003  PR_ATTACHMENT_FLAGS
-0x7ffe000b  PR_ATTACHMENT_HIDDEN
-0x8001000b  PR_EMS_AB_DISPLAY_NAME_OVERRIDE
-0x80031102  PR_EMS_AB_CA_CERTIFICATE
-0x8004001e  PR_EMS_AB_FOLDER_PATHNAME
-0x8005000d  PR_EMS_AB_MANAGER
-0x8005001e  PR_EMS_AB_MANAGER_T
-0x8006000d  PR_EMS_AB_HOME_MDB_O
-0x8006001e  PR_EMS_AB_HOME_MDB
-0x8007000d  PR_EMS_AB_HOME_MTA_O
-0x8007001e  PR_EMS_AB_HOME_MTA
-0x8008000d  PR_EMS_AB_IS_MEMBER_OF_DL
-0x8008001e  PR_EMS_AB_IS_MEMBER_OF_DL_T
-0x8009000d  PR_EMS_AB_MEMBER
-0x8009001e  PR_EMS_AB_MEMBER_T
-0x800a001e  PR_EMS_AB_AUTOREPLY_MESSAGE
-0x800b000b  PR_EMS_AB_AUTOREPLY
-0x800c000d  PR_EMS_AB_OWNER_O
-0x800c001e  PR_EMS_AB_OWNER
-0x800d000d  PR_EMS_AB_KM_SERVER_O
-0x800d001e  PR_EMS_AB_KM_SERVER
-0x800e000d  PR_EMS_AB_REPORTS
-0x800f101e  PR_EMS_AB_PROXY_ADDRESSES
-0x80100102  PR_EMS_AB_HELP_DATA32
-0x8011001e  PR_EMS_AB_TARGET_ADDRESS
-0x8012101e  PR_EMS_AB_TELEPHONE_NUMBER
-0x80130102  PR_EMS_AB_NT_SECURITY_DESCRIPTOR
-0x8014000d  PR_EMS_AB_HOME_MDB_BL_O
-0x8014101e  PR_EMS_AB_HOME_MDB_BL
-0x8015000d  PR_EMS_AB_PUBLIC_DELEGATES
-0x8015001e  PR_EMS_AB_PUBLIC_DELEGATES_T
-0x80160102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST
-0x80170102  PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE
-0x80180102  PR_EMS_AB_ADDRESS_SYNTAX
-0x80230102  PR_EMS_AB_BUSINESS_ROLES
-0x8024000d  PR_EMS_AB_OWNER_BL_O
-0x8024101e  PR_EMS_AB_OWNER_BL
-0x80251102  PR_EMS_AB_CROSS_CERTIFICATE_PAIR
-0x80261102  PR_EMS_AB_AUTHORITY_REVOCATION_LIST
-0x80270102  PR_EMS_AB_ASSOC_NT_ACCOUNT
-0x80280040  PR_EMS_AB_EXPIRATION_TIME
-0x80290003  PR_EMS_AB_USN_CHANGED
-0x802d001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_1
-0x802e001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_2
-0x802f001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_3
-0x8030001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_4
-0x8031001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_5
-0x8032001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_6
-0x8033001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_7
-0x8034001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_8
-0x8035001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_9
-0x8036001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_10
-0x80371102  PR_EMS_AB_SECURITY_PROTOCOL
-0x8038000d  PR_EMS_AB_PF_CONTACTS_O
-0x8038101e  PR_EMS_AB_PF_CONTACTS
-0x803a0102  PR_EMS_AB_HELP_DATA16
-0x803b001e  PR_EMS_AB_HELP_FILE_NAME
-0x803c000d  PR_EMS_AB_OBJ_DIST_NAME_O
-0x803c001e  PR_EMS_AB_OBJ_DIST_NAME
-0x803d001e  PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER
-0x803e001e  PR_EMS_AB_AUTOREPLY_SUBJECT
-0x803f000d  PR_EMS_AB_HOME_PUBLIC_SERVER_O
-0x803f001e  PR_EMS_AB_HOME_PUBLIC_SERVER
-0x8040101e  PR_EMS_AB_ENCRYPT_ALG_LIST_NA
-0x8041101e  PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER
-0x8042001e  PR_EMS_AB_IMPORTED_FROM
-0x8043001e  PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA
-0x80440003  PR_EMS_AB_ACCESS_CATEGORY
-0x80450102  PR_EMS_AB_ACTIVATION_SCHEDULE
-0x80460003  PR_EMS_AB_ACTIVATION_STYLE
-0x80470102  PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE_MSDOS
-0x8048001e  PR_EMS_AB_ADDRESS_TYPE
-0x8049001e  PR_EMS_AB_ADMD
-0x804a001e  PR_EMS_AB_ADMIN_DESCRIPTION
-0x804b001e  PR_EMS_AB_ADMIN_DISPLAY_NAME
-0x804c001e  PR_EMS_AB_ADMIN_EXTENSION_DLL
-0x804d000d  PR_EMS_AB_ALIASED_OBJECT_NAME_O
-0x804d001e  PR_EMS_AB_ALIASED_OBJECT_NAME
-0x804e000d  PR_EMS_AB_ALT_RECIPIENT_O
-0x804e001e  PR_EMS_AB_ALT_RECIPIENT
-0x804f000d  PR_EMS_AB_ALT_RECIPIENT_BL_O
-0x804f101e  PR_EMS_AB_ALT_RECIPIENT_BL
-0x80500102  PR_EMS_AB_ANCESTOR_ID
-0x8051000d  PR_EMS_AB_ASSOC_REMOTE_DXA_O
-0x8051101e  PR_EMS_AB_ASSOC_REMOTE_DXA
-0x80520003  PR_EMS_AB_ASSOCIATION_LIFETIME
-0x8053000d  PR_EMS_AB_AUTH_ORIG_BL_O
-0x8053101e  PR_EMS_AB_AUTH_ORIG_BL
-0x8054001e  PR_EMS_AB_AUTHORIZED_DOMAIN
-0x80550102  PR_EMS_AB_AUTHORIZED_PASSWORD
-0x8056001e  PR_EMS_AB_AUTHORIZED_USER
-0x8057101e  PR_EMS_AB_BUSINESS_CATEGORY
-0x8058000d  PR_EMS_AB_CAN_CREATE_PF_O
-0x8058101e  PR_EMS_AB_CAN_CREATE_PF
-0x8059000d  PR_EMS_AB_CAN_CREATE_PF_BL_O
-0x8059101e  PR_EMS_AB_CAN_CREATE_PF_BL
-0x805a000d  PR_EMS_AB_CAN_CREATE_PF_DL_O
-0x805a101e  PR_EMS_AB_CAN_CREATE_PF_DL
-0x805b000d  PR_EMS_AB_CAN_CREATE_PF_DL_BL_O
-0x805b101e  PR_EMS_AB_CAN_CREATE_PF_DL_BL
-0x805c000d  PR_EMS_AB_CAN_NOT_CREATE_PF_O
-0x805c101e  PR_EMS_AB_CAN_NOT_CREATE_PF
-0x805d000d  PR_EMS_AB_CAN_NOT_CREATE_PF_BL_O
-0x805d101e  PR_EMS_AB_CAN_NOT_CREATE_PF_BL
-0x805e000d  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_O
-0x805e101e  PR_EMS_AB_CAN_NOT_CREATE_PF_DL
-0x805f000d  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_O
-0x805f101e  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL
-0x8060000b  PR_EMS_AB_CAN_PRESERVE_DNS
-0x80610003  PR_EMS_AB_CLOCK_ALERT_OFFSET
-0x8062000b  PR_EMS_AB_CLOCK_ALERT_REPAIR
-0x80630003  PR_EMS_AB_CLOCK_WARNING_OFFSET
-0x8064000b  PR_EMS_AB_CLOCK_WARNING_REPAIR
-0x8065001e  PR_EMS_AB_COMPUTER_NAME
-0x8066101e  PR_EMS_AB_CONNECTED_DOMAINS
-0x80670003  PR_EMS_AB_CONTAINER_INFO
-0x80680003  PR_EMS_AB_COST
-0x8069001e  PR_EMS_AB_COUNTRY_NAME
-0x806a0003  PR_EMS_AB_DELIV_CONT_LENGTH
-0x806b1102  PR_EMS_AB_DELIV_EITS
-0x806c1102  PR_EMS_AB_DELIV_EXT_CONT_TYPES
-0x806d000b  PR_EMS_AB_DELIVER_AND_REDIRECT
-0x806e0003  PR_EMS_AB_DELIVERY_MECHANISM
-0x806f101e  PR_EMS_AB_DESCRIPTION
-0x8070101e  PR_EMS_AB_DESTINATION_INDICATOR
-0x8071001e  PR_EMS_AB_DIAGNOSTIC_REG_KEY
-0x8072000d  PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_O
-0x8072101e  PR_EMS_AB_DL_MEM_REJECT_PERMS_BL
-0x8073000d  PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_O
-0x8073101e  PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL
-0x80741102  PR_EMS_AB_DL_MEMBER_RULE
-0x8075000d  PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_O
-0x8075001e  PR_EMS_AB_DOMAIN_DEF_ALT_RECIP
-0x8076001e  PR_EMS_AB_DOMAIN_NAME
-0x80770102  PR_EMS_AB_DSA_SIGNATURE
-0x8078000b  PR_EMS_AB_DXA_ADMIN_COPY
-0x8079000b  PR_EMS_AB_DXA_ADMIN_FORWARD
-0x807a0003  PR_EMS_AB_DXA_ADMIN_UPDATE
-0x807b000b  PR_EMS_AB_DXA_APPEND_REQCN
-0x807c000d  PR_EMS_AB_DXA_CONF_CONTAINER_LIST_O
-0x807c101e  PR_EMS_AB_DXA_CONF_CONTAINER_LIST
-0x807d0040  PR_EMS_AB_DXA_CONF_REQ_TIME
-0x807e001e  PR_EMS_AB_DXA_CONF_SEQ
-0x807f0003  PR_EMS_AB_DXA_CONF_SEQ_USN
-0x80800003  PR_EMS_AB_DXA_EXCHANGE_OPTIONS
-0x8081000b  PR_EMS_AB_DXA_EXPORT_NOW
-0x80820003  PR_EMS_AB_DXA_FLAGS
-0x8083001e  PR_EMS_AB_DXA_IMP_SEQ
-0x80840040  PR_EMS_AB_DXA_IMP_SEQ_TIME
-0x80850003  PR_EMS_AB_DXA_IMP_SEQ_USN
-0x8086000b  PR_EMS_AB_DXA_IMPORT_NOW
-0x8087101e  PR_EMS_AB_DXA_IN_TEMPLATE_MAP
-0x8088000d  PR_EMS_AB_DXA_LOCAL_ADMIN_O
-0x8088001e  PR_EMS_AB_DXA_LOCAL_ADMIN
-0x80890003  PR_EMS_AB_DXA_LOGGING_LEVEL
-0x808a001e  PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE
-0x808b101e  PR_EMS_AB_DXA_OUT_TEMPLATE_MAP
-0x808c001e  PR_EMS_AB_DXA_PASSWORD
-0x808d0003  PR_EMS_AB_DXA_PREV_EXCHANGE_OPTIONS
-0x808e000b  PR_EMS_AB_DXA_PREV_EXPORT_NATIVE_ONLY
-0x808f0003  PR_EMS_AB_DXA_PREV_IN_EXCHANGE_SENSITIVITY
-0x8090000d  PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_O
-0x8090001e  PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES
-0x80910003  PR_EMS_AB_DXA_PREV_REPLICATION_SENSITIVITY
-0x80920003  PR_EMS_AB_DXA_PREV_TEMPLATE_OPTIONS
-0x80930003  PR_EMS_AB_DXA_PREV_TYPES
-0x8094001e  PR_EMS_AB_DXA_RECIPIENT_CP
-0x8095000d  PR_EMS_AB_DXA_REMOTE_CLIENT_O
-0x8095001e  PR_EMS_AB_DXA_REMOTE_CLIENT
-0x8096001e  PR_EMS_AB_DXA_REQ_SEQ
-0x80970040  PR_EMS_AB_DXA_REQ_SEQ_TIME
-0x80980003  PR_EMS_AB_DXA_REQ_SEQ_USN
-0x8099001e  PR_EMS_AB_DXA_REQNAME
-0x809a001e  PR_EMS_AB_DXA_SVR_SEQ
-0x809b0040  PR_EMS_AB_DXA_SVR_SEQ_TIME
-0x809c0003  PR_EMS_AB_DXA_SVR_SEQ_USN
-0x809d0003  PR_EMS_AB_DXA_TASK
-0x809e0003  PR_EMS_AB_DXA_TEMPLATE_OPTIONS
-0x809f0040  PR_EMS_AB_DXA_TEMPLATE_TIMESTAMP
-0x80a00003  PR_EMS_AB_DXA_TYPES
-0x80a1000d  PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_O
-0x80a1101e  PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST
-0x80a20003  PR_EMS_AB_ENCAPSULATION_METHOD
-0x80a3000b  PR_EMS_AB_ENCRYPT
-0x80a4000b  PR_EMS_AB_EXPAND_DLS_LOCALLY
-0x80a5000d  PR_EMS_AB_EXPORT_CONTAINERS_O
-0x80a5101e  PR_EMS_AB_EXPORT_CONTAINERS
-0x80a6000b  PR_EMS_AB_EXPORT_CUSTOM_RECIPIENTS
-0x80a7000b  PR_EMS_AB_EXTENDED_CHARS_ALLOWED
-0x80a81102  PR_EMS_AB_EXTENSION_DATA
-0x80a9101e  PR_EMS_AB_EXTENSION_NAME
-0x80aa101e  PR_EMS_AB_EXTENSION_NAME_INHERITED
-0x80ab1102  PR_EMS_AB_FACSIMILE_TELEPHONE_NUMBER
-0x80ac0102  PR_EMS_AB_FILE_VERSION
-0x80ad000b  PR_EMS_AB_FILTER_LOCAL_ADDRESSES
-0x80ae000d  PR_EMS_AB_FOLDERS_CONTAINER_O
-0x80ae001e  PR_EMS_AB_FOLDERS_CONTAINER
-0x80af0003  PR_EMS_AB_GARBAGE_COLL_PERIOD
-0x80b0001e  PR_EMS_AB_GATEWAY_LOCAL_CRED
-0x80b1001e  PR_EMS_AB_GATEWAY_LOCAL_DESIG
-0x80b2101e  PR_EMS_AB_GATEWAY_PROXY
-0x80b30102  PR_EMS_AB_GATEWAY_ROUTING_TREE
-0x80b40040  PR_EMS_AB_GWART_LAST_MODIFIED
-0x80b5000d  PR_EMS_AB_HAS_FULL_REPLICA_NCS_O
-0x80b5101e  PR_EMS_AB_HAS_FULL_REPLICA_NCS
-0x80b6000d  PR_EMS_AB_HAS_MASTER_NCS_O
-0x80b6101e  PR_EMS_AB_HAS_MASTER_NCS
-0x80b70003  PR_EMS_AB_HEURISTICS
-0x80b8000b  PR_EMS_AB_HIDE_DL_MEMBERSHIP
-0x80b9000b  PR_EMS_AB_HIDE_FROM_ADDRESS_BOOK
-0x80ba000d  PR_EMS_AB_IMPORT_CONTAINER_O
-0x80ba001e  PR_EMS_AB_IMPORT_CONTAINER
-0x80bb0003  PR_EMS_AB_IMPORT_SENSITIVITY
-0x80bc000d  PR_EMS_AB_INBOUND_SITES_O
-0x80bc101e  PR_EMS_AB_INBOUND_SITES
-0x80bd0003  PR_EMS_AB_INSTANCE_TYPE
-0x80be101e  PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER
-0x80bf0102  PR_EMS_AB_INVOCATION_ID
-0x80c0000b  PR_EMS_AB_IS_DELETED
-0x80c1000b  PR_EMS_AB_IS_SINGLE_VALUED
-0x80c21102  PR_EMS_AB_KCC_STATUS
-0x80c3101e  PR_EMS_AB_KNOWLEDGE_INFORMATION
-0x80c40003  PR_EMS_AB_LINE_WRAP
-0x80c50003  PR_EMS_AB_LINK_ID
-0x80c6001e  PR_EMS_AB_LOCAL_BRIDGE_HEAD
-0x80c7001e  PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS
-0x80c8000b  PR_EMS_AB_LOCAL_INITIAL_TURN
-0x80c9000d  PR_EMS_AB_LOCAL_SCOPE_O
-0x80c9101e  PR_EMS_AB_LOCAL_SCOPE
-0x80ca001e  PR_EMS_AB_LOG_FILENAME
-0x80cb0003  PR_EMS_AB_LOG_ROLLOVER_INTERVAL
-0x80cc000b  PR_EMS_AB_MAINTAIN_AUTOREPLY_HISTORY
-0x80cd0003  PR_EMS_AB_MAPI_DISPLAY_TYPE
-0x80ce0003  PR_EMS_AB_MAPI_ID
-0x80cf0003  PR_EMS_AB_MDB_BACKOFF_INTERVAL
-0x80d00003  PR_EMS_AB_MDB_MSG_TIME_OUT_PERIOD
-0x80d10003  PR_EMS_AB_MDB_OVER_QUOTA_LIMIT
-0x80d20003  PR_EMS_AB_MDB_STORAGE_QUOTA
-0x80d30003  PR_EMS_AB_MDB_UNREAD_LIMIT
-0x80d4000b  PR_EMS_AB_MDB_USE_DEFAULTS
-0x80d5000b  PR_EMS_AB_MESSAGE_TRACKING_ENABLED
-0x80d6000b  PR_EMS_AB_MONITOR_CLOCK
-0x80d7000b  PR_EMS_AB_MONITOR_SERVERS
-0x80d8000b  PR_EMS_AB_MONITOR_SERVICES
-0x80d9000d  PR_EMS_AB_MONITORED_CONFIGURATIONS_O
-0x80d9101e  PR_EMS_AB_MONITORED_CONFIGURATIONS
-0x80da000d  PR_EMS_AB_MONITORED_SERVERS_O
-0x80da101e  PR_EMS_AB_MONITORED_SERVERS
-0x80db101e  PR_EMS_AB_MONITORED_SERVICES
-0x80dc0003  PR_EMS_AB_MONITORING_ALERT_DELAY
-0x80dd0003  PR_EMS_AB_MONITORING_ALERT_UNITS
-0x80de0003  PR_EMS_AB_MONITORING_AVAILABILITY_STYLE
-0x80df0102  PR_EMS_AB_MONITORING_AVAILABILITY_WINDOW
-0x80e0000d  PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_O
-0x80e0101e  PR_EMS_AB_MONITORING_CACHED_VIA_MAIL
-0x80e1000d  PR_EMS_AB_MONITORING_CACHED_VIA_RPC_O
-0x80e1101e  PR_EMS_AB_MONITORING_CACHED_VIA_RPC
-0x80e21102  PR_EMS_AB_MONITORING_ESCALATION_PROCEDURE
-0x80e30003  PR_EMS_AB_MONITORING_HOTSITE_POLL_INTERVAL
-0x80e40003  PR_EMS_AB_MONITORING_HOTSITE_POLL_UNITS
-0x80e50003  PR_EMS_AB_MONITORING_MAIL_UPDATE_INTERVAL
-0x80e60003  PR_EMS_AB_MONITORING_MAIL_UPDATE_UNITS
-0x80e70003  PR_EMS_AB_MONITORING_NORMAL_POLL_INTERVAL
-0x80e80003  PR_EMS_AB_MONITORING_NORMAL_POLL_UNITS
-0x80e9000d  PR_EMS_AB_MONITORING_RECIPIENTS_O
-0x80e9101e  PR_EMS_AB_MONITORING_RECIPIENTS
-0x80ea000d  PR_EMS_AB_MONITORING_RECIPIENTS_NDR_O
-0x80ea101e  PR_EMS_AB_MONITORING_RECIPIENTS_NDR
-0x80eb0003  PR_EMS_AB_MONITORING_RPC_UPDATE_INTERVAL
-0x80ec0003  PR_EMS_AB_MONITORING_RPC_UPDATE_UNITS
-0x80ed0003  PR_EMS_AB_MONITORING_WARNING_DELAY
-0x80ee0003  PR_EMS_AB_MONITORING_WARNING_UNITS
-0x80ef001e  PR_EMS_AB_MTA_LOCAL_CRED
-0x80f0001e  PR_EMS_AB_MTA_LOCAL_DESIG
-0x80f10102  PR_EMS_AB_N_ADDRESS
-0x80f20003  PR_EMS_AB_N_ADDRESS_TYPE
-0x80f3001e  PR_EMS_AB_NT_MACHINE_NAME
-0x80f40003  PR_EMS_AB_NUM_OF_OPEN_RETRIES
-0x80f50003  PR_EMS_AB_NUM_OF_TRANSFER_RETRIES
-0x80f60003  PR_EMS_AB_OBJECT_CLASS_CATEGORY
-0x80f70003  PR_EMS_AB_OBJECT_VERSION
-0x80f8000d  PR_EMS_AB_OFF_LINE_AB_CONTAINERS_O
-0x80f8101e  PR_EMS_AB_OFF_LINE_AB_CONTAINERS
-0x80f90102  PR_EMS_AB_OFF_LINE_AB_SCHEDULE
-0x80fa000d  PR_EMS_AB_OFF_LINE_AB_SERVER_O
-0x80fa001e  PR_EMS_AB_OFF_LINE_AB_SERVER
-0x80fb0003  PR_EMS_AB_OFF_LINE_AB_STYLE
-0x80fc0003  PR_EMS_AB_OID_TYPE
-0x80fd0102  PR_EMS_AB_OM_OBJECT_CLASS
-0x80fe0003  PR_EMS_AB_OM_SYNTAX
-0x80ff000b  PR_EMS_AB_OOF_REPLY_TO_ORIGINATOR
-0x81000003  PR_EMS_AB_OPEN_RETRY_INTERVAL
-0x8101101e  PR_EMS_AB_ORGANIZATION_NAME
-0x8102101e  PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME
-0x81030102  PR_EMS_AB_ORIGINAL_DISPLAY_TABLE
-0x81040102  PR_EMS_AB_ORIGINAL_DISPLAY_TABLE_MSDOS
-0x8105000d  PR_EMS_AB_OUTBOUND_SITES_O
-0x8105101e  PR_EMS_AB_OUTBOUND_SITES
-0x81060102  PR_EMS_AB_P_SELECTOR
-0x81070102  PR_EMS_AB_P_SELECTOR_INBOUND
-0x81080102  PR_EMS_AB_PER_MSG_DIALOG_DISPLAY_TABLE
-0x81090102  PR_EMS_AB_PER_RECIP_DIALOG_DISPLAY_TABLE
-0x810a0102  PR_EMS_AB_PERIOD_REP_SYNC_TIMES
-0x810b0003  PR_EMS_AB_PERIOD_REPL_STAGGER
-0x810c1102  PR_EMS_AB_POSTAL_ADDRESS
-0x810d1003  PR_EMS_AB_PREFERRED_DELIVERY_METHOD
-0x810e001e  PR_EMS_AB_PRMD
-0x810f001e  PR_EMS_AB_PROXY_GENERATOR_DLL
-0x8110000d  PR_EMS_AB_PUBLIC_DELEGATES_BL_O
-0x8110101e  PR_EMS_AB_PUBLIC_DELEGATES_BL
-0x81110102  PR_EMS_AB_QUOTA_NOTIFICATION_SCHEDULE
-0x81120003  PR_EMS_AB_QUOTA_NOTIFICATION_STYLE
-0x81130003  PR_EMS_AB_RANGE_LOWER
-0x81140003  PR_EMS_AB_RANGE_UPPER
-0x8115001e  PR_EMS_AB_RAS_CALLBACK_NUMBER
-0x8116001e  PR_EMS_AB_RAS_PHONE_NUMBER
-0x8117001e  PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME
-0x8118001e  PR_EMS_AB_RAS_REMOTE_SRVR_NAME
-0x81191102  PR_EMS_AB_REGISTERED_ADDRESS
-0x811a001e  PR_EMS_AB_REMOTE_BRIDGE_HEAD
-0x811b001e  PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS
-0x811c000d  PR_EMS_AB_REMOTE_OUT_BH_SERVER_O
-0x811c001e  PR_EMS_AB_REMOTE_OUT_BH_SERVER
-0x811d000d  PR_EMS_AB_REMOTE_SITE_O
-0x811d001e  PR_EMS_AB_REMOTE_SITE
-0x811e0003  PR_EMS_AB_REPLICATION_SENSITIVITY
-0x811f0003  PR_EMS_AB_REPLICATION_STAGGER
-0x8120000b  PR_EMS_AB_REPORT_TO_ORIGINATOR
-0x8121000b  PR_EMS_AB_REPORT_TO_OWNER
-0x81220003  PR_EMS_AB_REQ_SEQ
-0x8123000d  PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_O
-0x8123001e  PR_EMS_AB_RESPONSIBLE_LOCAL_DXA
-0x8124000d  PR_EMS_AB_RID_SERVER_O
-0x8124001e  PR_EMS_AB_RID_SERVER
-0x8125000d  PR_EMS_AB_ROLE_OCCUPANT_O
-0x8125101e  PR_EMS_AB_ROLE_OCCUPANT
-0x8126101e  PR_EMS_AB_ROUTING_LIST
-0x81270003  PR_EMS_AB_RTS_CHECKPOINT_SIZE
-0x81280003  PR_EMS_AB_RTS_RECOVERY_TIMEOUT
-0x81290003  PR_EMS_AB_RTS_WINDOW_SIZE
-0x812a000d  PR_EMS_AB_RUNS_ON_O
-0x812a101e  PR_EMS_AB_RUNS_ON
-0x812b0102  PR_EMS_AB_S_SELECTOR
-0x812c0102  PR_EMS_AB_S_SELECTOR_INBOUND
-0x812d0003  PR_EMS_AB_SEARCH_FLAGS
-0x812e1102  PR_EMS_AB_SEARCH_GUIDE
-0x812f000d  PR_EMS_AB_SEE_ALSO_O
-0x812f101e  PR_EMS_AB_SEE_ALSO
-0x8130101e  PR_EMS_AB_SERIAL_NUMBER
-0x81310003  PR_EMS_AB_SERVICE_ACTION_FIRST
-0x81320003  PR_EMS_AB_SERVICE_ACTION_OTHER
-0x81330003  PR_EMS_AB_SERVICE_ACTION_SECOND
-0x81340003  PR_EMS_AB_SERVICE_RESTART_DELAY
-0x8135001e  PR_EMS_AB_SERVICE_RESTART_MESSAGE
-0x81360003  PR_EMS_AB_SESSION_DISCONNECT_TIMER
-0x8137101e  PR_EMS_AB_SITE_AFFINITY
-0x8138101e  PR_EMS_AB_SITE_PROXY_SPACE
-0x81390040  PR_EMS_AB_SPACE_LAST_COMPUTED
-0x813a001e  PR_EMS_AB_STREET_ADDRESS
-0x813b000d  PR_EMS_AB_SUB_REFS_O
-0x813b101e  PR_EMS_AB_SUB_REFS
-0x813c0003  PR_EMS_AB_SUBMISSION_CONT_LENGTH
-0x813d1102  PR_EMS_AB_SUPPORTED_APPLICATION_CONTEXT
-0x813e000d  PR_EMS_AB_SUPPORTING_STACK_O
-0x813e101e  PR_EMS_AB_SUPPORTING_STACK
-0x813f000d  PR_EMS_AB_SUPPORTING_STACK_BL_O
-0x813f101e  PR_EMS_AB_SUPPORTING_STACK_BL
-0x81400102  PR_EMS_AB_T_SELECTOR
-0x81410102  PR_EMS_AB_T_SELECTOR_INBOUND
-0x8142101e  PR_EMS_AB_TARGET_MTAS
-0x81431102  PR_EMS_AB_TELETEX_TERMINAL_IDENTIFIER
-0x81440003  PR_EMS_AB_TEMP_ASSOC_THRESHOLD
-0x81450003  PR_EMS_AB_TOMBSTONE_LIFETIME
-0x8146001e  PR_EMS_AB_TRACKING_LOG_PATH_NAME
-0x81470003  PR_EMS_AB_TRANS_RETRY_MINS
-0x81480003  PR_EMS_AB_TRANS_TIMEOUT_MINS
-0x81490003  PR_EMS_AB_TRANSFER_RETRY_INTERVAL
-0x814a0003  PR_EMS_AB_TRANSFER_TIMEOUT_NON_URGENT
-0x814b0003  PR_EMS_AB_TRANSFER_TIMEOUT_NORMAL
-0x814c0003  PR_EMS_AB_TRANSFER_TIMEOUT_URGENT
-0x814d0003  PR_EMS_AB_TRANSLATION_TABLE_USED
-0x814e000b  PR_EMS_AB_TRANSPORT_EXPEDITED_DATA
-0x814f0003  PR_EMS_AB_TRUST_LEVEL
-0x81500003  PR_EMS_AB_TURN_REQUEST_THRESHOLD
-0x8151000b  PR_EMS_AB_TWO_WAY_ALTERNATE_FACILITY
-0x8152000d  PR_EMS_AB_UNAUTH_ORIG_BL_O
-0x8152101e  PR_EMS_AB_UNAUTH_ORIG_BL
-0x81531102  PR_EMS_AB_USER_PASSWORD
-0x81540003  PR_EMS_AB_USN_CREATED
-0x81550003  PR_EMS_AB_USN_DSA_LAST_OBJ_REMOVED
-0x81560003  PR_EMS_AB_USN_LAST_OBJ_REM
-0x81570003  PR_EMS_AB_USN_SOURCE
-0x8158101e  PR_EMS_AB_X121_ADDRESS
-0x81590102  PR_EMS_AB_X25_CALL_USER_DATA_INCOMING
-0x815a0102  PR_EMS_AB_X25_CALL_USER_DATA_OUTGOING
-0x815b0102  PR_EMS_AB_X25_FACILITIES_DATA_INCOMING
-0x815c0102  PR_EMS_AB_X25_FACILITIES_DATA_OUTGOING
-0x815d0102  PR_EMS_AB_X25_LEASED_LINE_PORT
-0x815e000b  PR_EMS_AB_X25_LEASED_OR_SWITCHED
-0x815f001e  PR_EMS_AB_X25_REMOTE_MTA_PHONE
-0x81600102  PR_EMS_AB_X400_ATTACHMENT_TYPE
-0x81610003  PR_EMS_AB_X400_SELECTOR_SYNTAX
-0x81620102  PR_EMS_AB_X500_ACCESS_CONTROL_LIST
-0x81630003  PR_EMS_AB_XMIT_TIMEOUT_NON_URGENT
-0x81640003  PR_EMS_AB_XMIT_TIMEOUT_NORMAL
-0x81650003  PR_EMS_AB_XMIT_TIMEOUT_URGENT
-0x81660102  PR_EMS_AB_SITE_FOLDER_GUID
-0x8167000d  PR_EMS_AB_SITE_FOLDER_SERVER_O
-0x8167001e  PR_EMS_AB_SITE_FOLDER_SERVER
-0x81680003  PR_EMS_AB_REPLICATION_MAIL_MSG_SIZE
-0x81690102  PR_EMS_AB_MAXIMUM_OBJECT_ID
-0x8170101e  PR_EMS_AB_NETWORK_ADDRESS
-0x8171101e  PR_EMS_AB_LDAP_DISPLAY_NAME
-0x81730003  PR_EMS_AB_SCHEMA_FLAGS
-0x8174000d  PR_EMS_AB_BRIDGEHEAD_SERVERS_O
-0x8174101e  PR_EMS_AB_BRIDGEHEAD_SERVERS
-0x8175001e  PR_EMS_AB_WWW_HOME_PAGE
-0x8176001e  PR_EMS_AB_NNTP_CONTENT_FORMAT
-0x8177001e  PR_EMS_AB_POP_CONTENT_FORMAT
-0x81780003  PR_EMS_AB_LANGUAGE
-0x8179001e  PR_EMS_AB_POP_CHARACTER_SET
-0x817a0003  PR_EMS_AB_USN_INTERSITE
-0x817b001e  PR_EMS_AB_SUB_SITE
-0x817c1003  PR_EMS_AB_SCHEMA_VERSION
-0x817d001e  PR_EMS_AB_NNTP_CHARACTER_SET
-0x817e000b  PR_EMS_AB_USE_SERVER_VALUES
-0x817f0003  PR_EMS_AB_ENABLED_PROTOCOLS
-0x81800102  PR_EMS_AB_CONNECTION_LIST_FILTER
-0x8181101e  PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES
-0x8182101e  PR_EMS_AB_CHARACTER_SET_LIST
-0x8183000b  PR_EMS_AB_USE_SITE_VALUES
-0x8184101e  PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES
-0x8185001e  PR_EMS_AB_CHARACTER_SET
-0x81860003  PR_EMS_AB_CONTENT_TYPE
-0x8187000b  PR_EMS_AB_ANONYMOUS_ACCESS
-0x81880102  PR_EMS_AB_CONTROL_MSG_FOLDER_ID
-0x8189001e  PR_EMS_AB_USENET_SITE_NAME
-0x818a0102  PR_EMS_AB_CONTROL_MSG_RULES
-0x818b001e  PR_EMS_AB_AVAILABLE_DISTRIBUTIONS
-0x818d0102  PR_EMS_AB_OUTBOUND_HOST
-0x818e101e  PR_EMS_AB_INBOUND_HOST
-0x818f0003  PR_EMS_AB_OUTGOING_MSG_SIZE_LIMIT
-0x81900003  PR_EMS_AB_INCOMING_MSG_SIZE_LIMIT
-0x8191000b  PR_EMS_AB_SEND_TNEF
-0x81920102  PR_EMS_AB_AUTHORIZED_PASSWORD_CONFIRM
-0x8193001e  PR_EMS_AB_INBOUND_NEWSFEED
-0x81940003  PR_EMS_AB_NEWSFEED_TYPE
-0x8195001e  PR_EMS_AB_OUTBOUND_NEWSFEED
-0x81960102  PR_EMS_AB_NEWSGROUP_LIST
-0x8197101e  PR_EMS_AB_NNTP_DISTRIBUTIONS
-0x8198001e  PR_EMS_AB_NEWSGROUP
-0x8199001e  PR_EMS_AB_MODERATOR
-0x819a001e  PR_EMS_AB_AUTHENTICATION_TO_USE
-0x819b000b  PR_EMS_AB_HTTP_PUB_GAL
-0x819c0003  PR_EMS_AB_HTTP_PUB_GAL_LIMIT
-0x819e1102  PR_EMS_AB_HTTP_PUB_PF
-0x81a1001e  PR_EMS_AB_X500_RDN
-0x81a2001e  PR_EMS_AB_X500_NC
-0x81a3101e  PR_EMS_AB_REFERRAL_LIST
-0x81a4000b  PR_EMS_AB_NNTP_DISTRIBUTIONS_FLAG
-0x81a5000d  PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_O
-0x81a5001e  PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP
-0x81a6000d  PR_EMS_AB_NNTP_NEWSFEEDS_O
-0x81a6101e  PR_EMS_AB_NNTP_NEWSFEEDS
-0x81a8000b  PR_EMS_AB_ENABLED_PROTOCOL_CFG
-0x81a9101e  PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES
-0x81ab101e  PR_EMS_AB_HTTP_SERVERS
-0x81ac000b  PR_EMS_AB_MODERATED
-0x81ad001e  PR_EMS_AB_RAS_ACCOUNT
-0x81ae0102  PR_EMS_AB_RAS_PASSWORD
-0x81af0102  PR_EMS_AB_INCOMING_PASSWORD
-0x81b0000b  PR_EMS_AB_OUTBOUND_HOST_TYPE
-0x81b1000b  PR_EMS_AB_PROXY_GENERATION_ENABLED
-0x81b20102  PR_EMS_AB_ROOT_NEWSGROUPS_FOLDER_ID
-0x81b3000b  PR_EMS_AB_CONNECTION_TYPE
-0x81b40003  PR_EMS_AB_CONNECTION_LIST_FILTER_TYPE
-0x81b50003  PR_EMS_AB_PORT_NUMBER
-0x81b6101e  PR_EMS_AB_PROTOCOL_SETTINGS
-0x81b7001e  PR_EMS_AB_GROUP_BY_ATTR_1
-0x81b8001e  PR_EMS_AB_GROUP_BY_ATTR_2
-0x81b9001e  PR_EMS_AB_GROUP_BY_ATTR_3
-0x81ba001e  PR_EMS_AB_GROUP_BY_ATTR_4
-0x81be001e  PR_EMS_AB_VIEW_SITE
-0x81bf001e  PR_EMS_AB_VIEW_CONTAINER_1
-0x81c0001e  PR_EMS_AB_VIEW_CONTAINER_2
-0x81c1001e  PR_EMS_AB_VIEW_CONTAINER_3
-0x81c20040  PR_EMS_AB_PROMO_EXPIRATION
-0x81c3101e  PR_EMS_AB_DISABLED_GATEWAY_PROXY
-0x81c40102  PR_EMS_AB_COMPROMISED_KEY_LIST
-0x81c5000d  PR_EMS_AB_INSADMIN_O
-0x81c5001e  PR_EMS_AB_INSADMIN
-0x81c6000b  PR_EMS_AB_OVERRIDE_NNTP_CONTENT_FORMAT
-0x81c7000d  PR_EMS_AB_OBJ_VIEW_CONTAINERS_O
-0x81c7101e  PR_EMS_AB_OBJ_VIEW_CONTAINERS
-0x8c180003  PR_EMS_AB_VIEW_FLAGS
-0x8c19001e  PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR
-0x8c1a000d  PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_O
-0x8c1a001e  PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN
-0x8c1b1102  PR_EMS_AB_VIEW_DEFINITION
-0x8c1c0102  PR_EMS_AB_MIME_TYPES
-0x8c1d0003  PR_EMS_AB_LDAP_SEARCH_CFG
-0x8c1e000d  PR_EMS_AB_INBOUND_DN_O
-0x8c1e001e  PR_EMS_AB_INBOUND_DN
-0x8c1f000b  PR_EMS_AB_INBOUND_NEWSFEED_TYPE
-0x8c20000b  PR_EMS_AB_INBOUND_ACCEPT_ALL
-0x8c21000b  PR_EMS_AB_ENABLED
-0x8c22000b  PR_EMS_AB_PRESERVE_INTERNET_CONTENT
-0x8c23000b  PR_EMS_AB_DISABLE_DEFERRED_COMMIT
-0x8c24000b  PR_EMS_AB_CLIENT_ACCESS_ENABLED
-0x8c25000b  PR_EMS_AB_REQUIRE_SSL
-0x8c26001e  PR_EMS_AB_ANONYMOUS_ACCOUNT
-0x8c270102  PR_EMS_AB_CERTIFICATE_CHAIN_V3
-0x8c280102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V3
-0x8c290102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V1
-0x8c301102  PR_EMS_AB_CROSS_CERTIFICATE_CRL
-0x8c31000b  PR_EMS_AB_SEND_EMAIL_MESSAGE
-0x8c32000b  PR_EMS_AB_ENABLE_COMPATIBILITY
-0x8c33101e  PR_EMS_AB_SMIME_ALG_LIST_NA
-0x8c34101e  PR_EMS_AB_SMIME_ALG_LIST_OTHER
-0x8c35001e  PR_EMS_AB_SMIME_ALG_SELECTED_NA
-0x8c36001e  PR_EMS_AB_SMIME_ALG_SELECTED_OTHER
-0x8c37000b  PR_EMS_AB_DEFAULT_MESSAGE_FORMAT
-0x8c38001e  PR_EMS_AB_TYPE
-0x8c3a0003  PR_EMS_AB_DO_OAB_VERSION
-0x8c3b0102  PR_EMS_AB_VOICE_MAIL_SYSTEM_GUID
-0x8c3c001e  PR_EMS_AB_VOICE_MAIL_USER_ID
-0x8c3d001e  PR_EMS_AB_VOICE_MAIL_PASSWORD
-0x8c3e0102  PR_EMS_AB_VOICE_MAIL_RECORDED_NAME
-0x8c3f101e  PR_EMS_AB_VOICE_MAIL_GREETINGS
-0x8c401102  PR_EMS_AB_VOICE_MAIL_FLAGS
-0x8c410003  PR_EMS_AB_VOICE_MAIL_VOLUME
-0x8c420003  PR_EMS_AB_VOICE_MAIL_SPEED
-0x8c431003  PR_EMS_AB_VOICE_MAIL_RECORDING_LENGTH
-0x8c44001e  PR_EMS_AB_DISPLAY_NAME_SUFFIX
-0x8c451102  PR_EMS_AB_ATTRIBUTE_CERTIFICATE
-0x8c461102  PR_EMS_AB_DELTA_REVOCATION_LIST
-0x8c471102  PR_EMS_AB_SECURITY_POLICY
-0x8c48000b  PR_EMS_AB_SUPPORT_SMIME_SIGNATURES
-0x8c49000b  PR_EMS_AB_DELEGATE_USER
-0x8c50000b  PR_EMS_AB_LIST_PUBLIC_FOLDERS
-0x8c51001e  PR_EMS_AB_LABELEDURI
-0x8c52000b  PR_EMS_AB_RETURN_EXACT_MSG_SIZE
-0x8c53001e  PR_EMS_AB_GENERATION_QUALIFIER
-0x8c54001e  PR_EMS_AB_HOUSE_IDENTIFIER
-0x8c550102  PR_EMS_AB_SUPPORTED_ALGORITHMS
-0x8c56001e  PR_EMS_AB_DMD_NAME
-0x8c57001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_11
-0x8c58001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_12
-0x8c59001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_13
-0x8c60001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_14
-0x8c61001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_15
-0x8c620003  PR_EMS_AB_REPLICATED_OBJECT_VERSION
-0x8c63001e  PR_EMS_AB_MAIL_DROP
-0x8c64001e  PR_EMS_AB_FORWARDING_ADDRESS
-0x8c650102  PR_EMS_AB_FORM_DATA
-0x8c66001e  PR_EMS_AB_OWA_SERVER
-0x8c67001e  PR_EMS_AB_EMPLOYEE_NUMBER
-0x8c68001e  PR_EMS_AB_TELEPHONE_PERSONAL_PAGER
-0x8c69001e  PR_EMS_AB_EMPLOYEE_TYPE
-0x8c6a1102  PR_EMS_AB_TAGGED_X509_CERT
-0x8c6b001e  PR_EMS_AB_PERSONAL_TITLE
-0x8c6c001e  PR_EMS_AB_LANGUAGE_ISO639
-0x8c6d0102  PR_EMS_AB_OBJECT_GUID
-0x8c8e001e  PR_EMS_AB_PHONETIC_GIVEN_NAME
-0x8c8f001e  PR_EMS_AB_PHONETIC_SURNAME
-0x8c90001e  PR_EMS_AB_PHONETIC_DEPARTMENT_NAME
-0x8c91001e  PR_EMS_AB_PHONETIC_COMPANY_NAME
-0x8c92001e  PR_EMS_AB_PHONETIC_DISPLAY_NAME
-0x8c96001e  PR_EMS_AB_ROOM_CONTAINERS
-0xf000000d  PR_EMS_AB_OTHER_RECIPS
-0xfff8101e  PR_EMS_AB_CHILD_RDNS
-0xfff9001e  PR_EMS_AB_HIERARCHY_PATH
-0xfffa0102  PR_EMS_AB_OBJECT_OID
-0xfffb000b  PR_EMS_AB_IS_MASTER
-0xfffc0102  PR_EMS_AB_PARENT_ENTRYID
-0xfffd0003  PR_EMS_AB_CONTAINERID
-0xfffe001e  PR_EMS_AB_SERVER
diff --git a/branches/plugfest/libmapi/conf/mparse.pl b/branches/plugfest/libmapi/conf/mparse.pl
deleted file mode 100755 (executable)
index f2a97ed..0000000
+++ /dev/null
@@ -1,1308 +0,0 @@
-#!/usr/bin/perl -w
-
-###################################################
-# package to parse the mapi-properties files and 
-# generate code for libmapi in OpenChange
-#
-# Perl code based on pidl one from Andrew Tridgell and the Samba team
-#
-# Copyright (C) Julien Kerihuel 2005-2011
-# released under the GNU GPL
-
-use strict;
-use Getopt::Long;
-
-my $ret = "";
-my $tabs = "";
-
-sub indent() { $tabs.="\t"; }
-sub deindent() { $tabs = substr($tabs, 1); }
-sub mparse($) { $ret .= $tabs.(shift)."\n"; }
-
-my($opt_outputdir) = '.';
-my($opt_parser) = '';
-
-my     %prop_types = (
-    0x0                => "PT_UNSPECIFIED",
-    0x1                => "PT_NULL",
-    0x2                => "PT_SHORT",
-    0x3                => "PT_LONG",
-    0x4                => "PT_FLOAT",
-    0x5                => "PT_DOUBLE",
-    0x6                => "PT_CURRENCY",
-    0x7                => "PT_APPTIME",
-    0xa                => "PT_ERROR",
-    0xb                => "PT_BOOLEAN",
-    0xd                => "PT_OBJECT",
-    0x14       => "PT_I8",
-    0x1e       => "PT_STRING8",
-    0x1f       => "PT_UNICODE",
-    0x40       => "PT_SYSTIME",
-    0x48       => "PT_CLSID",
-    0xFB       => "PT_SVREID",
-    0xFD       => "PT_SRESTRICT",
-    0xFE       => "PT_ACTIONS",
-    0x102      => "PT_BINARY",
-# Multi-valued property types
-    0x1002     => "PT_MV_SHORT",
-    0x1003     => "PT_MV_LONG",
-    0x1004     => "PT_MV_FLOAT",
-    0x1005     => "PT_MV_DOUBLE",
-    0x1006     => "PT_MV_CURRENCY",
-    0x1007     => "PT_MV_APPTIME",
-    0x1014     => "PT_MV_I8",
-    0x101e     => "PT_MV_STRING8",
-    0x101f     => "PT_MV_UNICODE",
-    0x1040     => "PT_MV_SYSTIME",
-    0x1048     => "PT_MV_CLSID",
-    0x1102     => "PT_MV_BINARY"
-);
-
-my     %prop_names = (
-    "PT_UNSPECIFIED"   =>      0x0,
-    "PT_NULL"          =>      0x1,
-    "PT_SHORT"         =>      0x2,
-    "PT_LONG"          =>      0x3,
-    "PT_FLOAT"         =>      0x4,
-    "PT_DOUBLE"                =>      0x5,
-    "PT_CURRENCY"      =>      0x6,
-    "PT_APPTIME"       =>      0x7,
-    "PT_ERROR"         =>      0xa,
-    "PT_BOOLEAN"       =>      0xb,
-    "PT_OBJECT"                =>      0xd,
-    "PT_I8"            =>      0x14,
-    "PT_STRING8"       =>      0x1e,
-    "PT_UNICODE"       =>      0x1f,
-    "PT_SYSTIME"       =>      0x40,
-    "PT_CLSID"         =>      0x48,
-    "PT_SVREID"                =>      0xfb,
-    "PT_SRESTRICT"     =>      0xfd,
-    "PT_ACTIONS"       =>      0xfe,
-    "PT_BINARY"                =>      0x102,
-# Multi-valued property types
-    "PT_MV_SHORT"      =>      0x1002,
-    "PT_MV_LONG"       =>      0x1003,
-    "PT_MV_FLOAT"      =>      0x1004,
-    "PT_MV_DOUBLE"     =>      0x1005,
-    "PT_MV_CURRENCY"   =>      0x1006,
-    "PT_MV_APPTIME"    =>      0x1007,
-    "PT_MV_I8"         =>      0x1014,
-    "PT_MV_STRING8"    =>      0x101e,
-    "PT_MV_UNICODE"    =>      0x101f,
-    "PT_MV_SYSTIME"    =>      0x1040,
-    "PT_MV_CLSID"      =>      0x1048,
-    "PT_MV_BINARY"     =>      0x1102
-);
-
-my     %oleguid = (
-    "PSETID_Appointment"       =>      "00062002-0000-0000-c000-000000000046",
-    "PSETID_Task"              =>      "00062003-0000-0000-c000-000000000046",
-    "PSETID_Address"           =>      "00062004-0000-0000-c000-000000000046",
-    "PSETID_Common"            =>      "00062008-0000-0000-c000-000000000046",
-    "PSETID_Note"              =>      "0006200e-0000-0000-c000-000000000046",
-    "PSETID_Log"               =>      "0006200a-0000-0000-c000-000000000046",
-    "PSETID_Sharing"           =>      "00062040-0000-0000-c000-000000000046",
-    "PSETID_PostRss"           =>      "00062041-0000-0000-c000-000000000046",
-    "PSETID_UnifiedMessaging"  =>      "4442858e-a9e3-4e80-b900-317a210cc15b",
-    "PSETID_Meeting"           =>      "6ed8da90-450b-101b-98da-00aa003f1305",
-    "PSETID_AirSync"           =>      "71035549-0739-4dcb-9163-00f0580dbbdf",
-    "PSETID_Messaging"         =>      "41f28f13-83f4-4114-a584-eedb5a6b0bff",
-    "PSETID_Attachment"                =>      "96357f7f-59e1-47d0-99a7-46515c183b54",
-    "PSETID_CalendarAssistant" =>      "11000e07-b51b-40d6-Af21-caa85edab1d0",
-    "PS_PUBLIC_STRINGS"                =>      "00020329-0000-0000-c000-000000000046",
-    "PS_INTERNET_HEADERS"      =>      "00020386-0000-0000-c000-000000000046",
-    "PS_MAPI"                  =>      "00020328-0000-0000-c000-000000000046",
-    "PSETID_Remote"            =>      "00062014-0000-0000-c000-000000000046"
-);
-
-# main program
-
-my $result = GetOptions (
-                        'outputdir=s' => \$opt_outputdir,
-                        'parser=s' => \$opt_parser
-                        );
-
-if (not $result) {
-    exit(1);
-}
-
-#####################################################################
-# read a file into a string
-sub FileLoad($)
-{
-    my($filename) = shift;
-    local(*INPUTFILE);
-    open(INPUTFILE, $filename) || return undef;
-    my($saved_delim) = $/;
-    undef $/;
-    my($data) = <INPUTFILE>;
-    close(INPUTFILE);
-    $/ = $saved_delim;
-    return $data;
-}
-
-#####################################################################
-# write a string into a file
-sub FileSave($$)
-{
-    my($filename) = shift;
-    my($v) = shift;
-    local(*FILE);
-    open(FILE, ">$filename") || die "can't open $filename";    
-    print FILE $v;
-    close(FILE);
-}
-
-#####################################################################
-# generate mapitags.h file
-sub mapitags_header($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_type;
-    my $prop_value;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#ifndef __MAPITAGS_H__";
-    mparse "#define __MAPITAGS_H__";
-    mparse "";
-
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           $prop_type = hex $prop[0];
-           $prop_type &= 0xFFFF;
-           $prop_value = hex $prop[0];
-           $prop_value = ($prop_value >> 16) & 0xFFFF;
-
-           mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", $prop[1], $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
-           if (($prop_type == 0x1e) || ($prop_type == 0x101e)){
-               $prop_type++;
-               $prop[0] = sprintf "0x%.8x", ((hex $prop[0]) & 0xFFFF0000) + $prop_type;
-               mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", "$prop[1]_UNICODE", $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
-           }
-           $prop_type = 0xa;
-           $prop[0] = sprintf "0x%.8x", ((hex $prop[0]) & 0xFFFF0000) + $prop_type;
-           mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", "$prop[1]_ERROR", $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
-       }
-    }
-    mparse "";
-    mparse "#endif /* !__MAPITAGS_H__ */";
-
-    return $ret;
-    
-}
-
-
-#####################################################################
-# generate mapitags.c file
-sub mapitags_interface($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_type;
-    my $prop_value;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#include \"libmapi/libmapi.h\"";
-    mparse "#include \"libmapi/libmapi_private.h\"";
-    mparse "#include \"gen_ndr/ndr_exchange.h\"";
-    mparse "#include \"libmapi/mapitags.h\"";
-    mparse "";
-    mparse "struct mapi_proptags";
-    mparse "{";
-    indent;
-    mparse "uint32_t   proptag;";
-    mparse "uint32_t   proptype;";
-    mparse "const char *propname;";
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "static struct mapi_proptags mapitags[] = {";
-    indent;
-    
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           $prop_type = hex $prop[0];
-           $prop_type &= 0xFFFF;
-           $prop_value = hex $prop[0];
-           $prop_value = ($prop_value >> 16) & 0xFFFF;
-           if ($prop_types{$prop_type}) {
-               mparse sprintf "{ %-51s, %-13s, \"%s\" },", $prop[1], $prop_types{$prop_type}, $prop[1];
-               if (($prop_type == 0x1e) || ($prop_type == 0x101e)) {
-                   $prop_type++;
-                   mparse sprintf "{ %-51s, %-13s, \"%s\" },", "$prop[1]_UNICODE", $prop_types{$prop_type}, "$prop[1]_UNICODE";
-               }
-               $prop_type = 0xa;
-               mparse sprintf "{ %-51s, %-13s, \"%s\" },", "$prop[1]_ERROR", $prop_types{$prop_type}, $prop[1];
-           }
-       }
-    }
-
-    mparse sprintf "{ %-51s, %-13d, \"NULL\"}", 0, 0;
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "_PUBLIC_ const char *get_proptag_name(uint32_t proptag)";
-    mparse "{";
-    indent;
-    mparse "uint32_t idx;";
-    mparse "";
-    mparse "for (idx = 0; mapitags[idx].proptag; idx++) {";
-    indent;
-    mparse "if (mapitags[idx].proptag == proptag) { ";
-    indent;
-    mparse "return mapitags[idx].propname;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "_PUBLIC_ uint32_t get_proptag_value(const char *propname)";
-    mparse "{";
-    indent;
-    mparse "uint32_t idx;";
-    mparse "";
-    mparse "for (idx = 0; mapitags[idx].proptag; idx++) {";
-    indent;
-    mparse "if (!strcmp(mapitags[idx].propname, propname)) { ";
-    indent;
-    mparse "return mapitags[idx].proptag;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    return $ret;
-    
-}
-
-#####################################################################
-# generate mapitags_enum.idl file
-sub mapitags_enum($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_type;
-    my %hash;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "";
-
-    mparse "typedef [v1_enum, flag(NDR_PAHEX)] enum {";
-    indent;
-    
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           $prop_type = hex $prop[0];
-           $prop_type &= 0xFFFF;
-
-           mparse sprintf "%-51s = %s,", $prop[1], $prop[0];
-
-           if (($prop_type == 0x1e) || ($prop_type == 0x101e)) {
-               $prop_type = hex $prop[0];
-               $prop_type++;
-               mparse sprintf "%-51s = 0x%.8x,", "$prop[1]_UNICODE", $prop_type;
-           }
-           if (!exists($hash{((hex $prop[0]) & 0xFFFF0000)})) {
-               $prop_type = 0xa;
-               $prop_type += ((hex $prop[0]) & 0xFFFF0000);
-               mparse sprintf "%-51s = 0x%.8x,", "$prop[1]_ERROR", $prop_type;
-               $hash{((hex $prop[0]) & 0xFFFF0000)} = 1;
-           }
-       }
-    }
-    mparse sprintf "%-51s = %s", "MAPI_PROP_RESERVED", "0xFFFFFFFF";
-    deindent;
-    mparse "} MAPITAGS;";    
-    mparse "";
-    
-    return $ret;
-}
-
-
-#####################################################################
-# generate mapi_nameid_private.h file
-sub mapi_nameid_private_header($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_OOM;
-    my $prop_ID;
-    my $prop_Type;
-    my $prop_name;
-    my $prop_Kind;
-    my $prop_OLEGUID;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#ifndef __MAPI_NAMEID_PRIVATE_H__";
-    mparse "#define __MAPI_NAMEID_PRIVATE_H__";
-    mparse "";
-    mparse "static struct mapi_nameid_tags mapi_nameid_tags[] = {";
-    indent;
-    
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-
-           if ($prop[1] ne "NULL") {
-               $prop[1] = sprintf "\"%s\"", $prop[1];
-           }
-           if ($prop[3] ne "NULL") {
-               $prop[3] = sprintf "\"%s\"", $prop[3]
-           }
-           if ($prop[0] eq "NULL") {
-               $prop[0] = "0x00000000";
-           }
-           mparse sprintf "{ %-51s, %-40s, %-15s, %-30s, %-30s, %-15s, %-20s, 0x0 },", 
-           $prop[0], $prop[1], $prop[2], $prop[3], $prop[4], $prop[5], $prop[6];
-       }
-    }
-
-    mparse sprintf "{ 0x00000000, NULL, 0x0, NULL, PT_UNSPECIFIED, 0x0, NULL, 0x0 }";
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "#endif /* !MAPI_NAMEID_PRIVATE_H__ */";
-
-    return $ret;
-}
-
-#####################################################################
-# generate mapi_nameid.h file
-sub mapi_nameid_header($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $propID;
-    my $proptype;
-    my $property;
-    my $counter = 0;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#ifndef __MAPI_NAMEID_H__";
-    mparse "#define __MAPI_NAMEID_H__";
-    mparse "";
-
-    mparse "/* NOTE TO DEVELOPERS: If this is a MNID_STRING named property,";
-    mparse " * then we use the arbitrary 0xa000-0afff property ID range for";
-    mparse " * internal mapping purpose only.";
-    mparse " */";
-
-    mparse "";
-    mparse "struct mapi_nameid_tags {";
-    indent;
-    mparse "uint32_t                   proptag;";
-    mparse "const char                 *OOM;";
-    mparse "uint16_t                   lid;";
-    mparse "const char                 *Name;";
-    mparse "uint32_t                   propType;";
-    mparse "uint8_t                            ulKind;";
-    mparse "const char                 *OLEGUID;";
-    mparse "uint32_t                   position;";
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "struct mapi_nameid {";
-    indent;
-    mparse "struct MAPINAMEID          *nameid;";
-    mparse "uint16_t                   count;";
-    mparse "struct mapi_nameid_tags            *entries;";
-    deindent;
-    mparse "};";
-    mparse "";
-
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           if ($prop[0] ne "NULL") {
-               $proptype = $prop_names{$prop[4]};
-               $propID = hex $prop[2];
-               if ($propID == 0) {
-                   # 40960 == 0xa000
-                   $propID = 40960 + $counter;
-                   $counter++;
-               }
-               $property = sprintf "0x%.8x", ($propID << 16) | $proptype;
-               mparse sprintf "#define %-51s %s", $prop[0], $property; 
-           }
-       }
-    }
-
-    mparse "";
-    mparse "#endif /* !MAPI_NAMEID_H__ */";
-
-    return $ret;
-}
-
-#####################################################################
-# generate mapicode.c file
-
-sub mapicodes_interface($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @errors;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#include \"libmapi/libmapi.h\"";
-    mparse "#include \"libmapi/libmapi_private.h\"";
-    mparse "#include \"gen_ndr/ndr_exchange.h\"";
-    mparse "";
-    mparse "void set_errno(enum MAPISTATUS status)";
-    mparse "{";
-    indent;
-    mparse "errno = status;";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "struct mapi_retval {";
-    indent;
-    mparse "enum MAPISTATUS            err;";
-    mparse "const char         *name;";
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "static const struct mapi_retval mapi_retval[] = {";
-    indent;
-
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @errors = split(/\s+/, $line);
-           mparse sprintf "{ %8s, \"%s\" },", $errors[1], $errors[1];
-       }
-    }
-
-
-    mparse " { MAPI_E_RESERVED, NULL }";
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "_PUBLIC_ void mapi_errstr(const char *function, enum MAPISTATUS mapi_code)";
-    mparse "{";
-    indent;
-    mparse "struct ndr_print   ndr_print;";
-    mparse "";
-    mparse "ndr_print.depth = 1;";
-    mparse "ndr_print.print = ndr_print_debug_helper;";
-    mparse "ndr_print.no_newline = false;";
-    mparse "ndr_print_MAPISTATUS(&ndr_print, function, mapi_code);";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "_PUBLIC_ const char *mapi_get_errstr(enum MAPISTATUS mapi_code)";
-    mparse "{";
-    indent;
-    mparse "uint32_t i;";
-    mparse "";
-    mparse "for (i = 0; mapi_retval[i].name; i++) {";
-    indent;
-    mparse "if (mapi_retval[i].err == mapi_code) {";
-    indent;
-    mparse "return mapi_retval[i].name;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-}
-
-#####################################################################
-# generate mapicodes_enum.idl file
-sub mapicodes_enum($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_type;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "";
-
-    mparse "typedef [public, v1_enum, flag(NDR_PAHEX)] enum {";
-    indent;
-    
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           mparse sprintf "%-51s = %s,", $prop[1], $prop[0];
-       }
-    }
-    mparse sprintf "%-51s = %s", "MAPI_E_RESERVED", "0xFFFFFFFF";
-    deindent;
-    mparse "} MAPISTATUS;";    
-    mparse "";
-    
-    return $ret;
-}
-
-#####################################################################
-# generate openchangedb_property.c file
-sub openchangedb_property($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-    my $prop_type;
-    my $prop_value;
-    my $pidtag;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#include \"mapiproxy/dcesrv_mapiproxy.h\"";
-    mparse "#include \"libmapiproxy.h\"";
-    mparse "#include \"libmapi/libmapi.h\"";
-    mparse "#include \"libmapi/libmapi_private.h\"";
-    mparse "";
-    mparse "struct pidtags {";
-    mparse "   uint32_t        proptag;";
-    mparse "   const char      *pidtag;";
-    mparse "};";
-    mparse "";
-    mparse "static struct pidtags pidtags[] = {";
-    indent;
-    
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           $prop_type = hex $prop[0];
-           $prop_type &= 0xFFFF;
-           $prop_value = hex $prop[0];
-           $prop_value = ($prop_value >> 16) & 0xFFFF;
-           if ($prop_types{$prop_type}) {
-               if ($prop[2]) {
-                   mparse sprintf "{ %-51s, \"%s\"},", $prop[1], $prop[2];
-               } else {
-                   mparse sprintf "{ %-51s, \"0x%.8x\"},", $prop[1], hex $prop[0];
-               }
-
-               if (($prop_type == 0x1e) ||  ($prop_type == 0x101e)) {
-                   if ($prop[2]) {
-                       mparse sprintf "{ %-51s, \"%s\"},", "$prop[1]_UNICODE", $prop[2];
-                   } else {
-                       mparse sprintf "{ %-51s, \"0x%.8x\"},", "$prop[1]_UNICODE", hex $prop[0];
-                   }
-               }
-           }
-       }
-    }
-
-    mparse sprintf "{ %-51s, NULL }", 0;
-    deindent;
-    mparse "};";
-    mparse "";
-    mparse "_PUBLIC_ const char *openchangedb_property_get_attribute(uint32_t proptag)";
-    mparse "{";
-    indent;
-    mparse "uint32_t i;";
-    mparse "";
-    mparse "for (i = 0; pidtags[i].pidtag; i++) {";
-    indent;
-    mparse "if (pidtags[i].proptag == proptag) {";
-    indent;
-    mparse "return pidtags[i].pidtag;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "DEBUG(0, (\"[%s:%d]: Unsupported property tag '0x%.8x'\\n\", __FUNCTION__, __LINE__, proptag));";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-}
-
-#####################################################################
-# generate codepage_lcid.c file
-sub codepage_lcid_interface($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @params;
-    my $locale;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "#include \"libmapi/libmapi.h\"";
-    mparse "#include \"libmapi/libmapi_private.h\"";
-    mparse "#include <locale.h>";
-    mparse "#include <langinfo.h>";
-    mparse "";
-    mparse "/**";
-    mparse "  \\file codepage_lcid.c";
-    mparse "";
-    mparse "  \\brief Codepage and Locale ID operations";
-    mparse " */";
-    mparse "";
-
-    # Step 1. Generate code for defines
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @params = split(/\s+/, $line);
-           if ($params[0] eq "DEFINE") {
-               mparse sprintf "#define %-30s %15d", $params[1], $params[2];
-           }
-       }
-    }
-
-## We do not have yet convenient functions making use of this struct. This causes warning
-#    mparse "";
-#    mparse "static const char *language_group[] =";
-#    mparse "{";
-#    indent;
-#    foreach $line (@lines) {
-#      $line =~ s/^\#+.*$//;
-#      if ($line) {
-#          @params = split(/\s+/, $line);
-#          if ($params[0] eq "DEFINE") {
-#              mparse sprintf "\"%s\",", $params[1];
-#          }
-#      }
-#    }
-#    mparse "NULL";
-#    deindent;
-#    mparse "};";
-#    mparse "";
-
-    # Step 2. Generate the locales array
-    mparse "struct cpid_lcid {";
-    indent;
-    mparse "const char *language;";
-    mparse "const char *locale;";
-    mparse "uint32_t   lcid;";
-    mparse "uint32_t   cpid;";
-    mparse "uint32_t   language_group;";
-    deindent;
-    mparse "};";
-    mparse "";
-
-    mparse "static const struct cpid_lcid locales[] =";
-    mparse "{";
-    indent;
-
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @params = split(/\s+/, $line);
-           if ($params[0] ne "DEFINE") {
-
-               $params[0] = ($params[1] eq "NULL") ? (sprintf "\"%s\",", $params[0]) : 
-                   (sprintf "\"%s (%s)\",", $params[0], $params[1]);
-               $params[0] =~ s/_/ /g;
-               $params[2] = sprintf "\"%s\",", $params[2];
-               mparse sprintf "{ %-32s %-18s %-6s, %-4s, %-24s },", 
-               $params[0], $params[2], $params[3], $params[4], $params[5];                 
-           }
-       }
-    }
-
-    mparse "{ NULL, NULL, 0, 0, 0 }";
-    deindent;
-    mparse "};";
-    mparse "";
-
-    # mapi_get_system_locale
-    mparse "/**";
-    mparse "  \\details Returns current locale used by the system";
-    mparse "";
-    mparse " \\return pointer to locale string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ char *mapi_get_system_locale(void)";
-    mparse "{";
-    indent;
-    mparse "char       *locale;";
-    mparse "";
-    mparse "locale = setlocale(LC_CTYPE, \"\");";
-    mparse "return locale;";
-    deindent;
-    mparse "}";
-    mparse "";   
-
-    # mapi_verify_cpid
-    mparse "/**";
-    mparse "  \\details Verify if the specified codepage is valid";
-    mparse "";
-    mparse "  \\param cpid the codepage to lookup";
-    mparse "";
-    mparse "  \\return 0 on success, otherwise 1";
-    mparse " */";
-    mparse "_PUBLIC_ bool mapi_verify_cpid(uint32_t cpid)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "for (i = 0; locales[i].lcid; i++) {";
-    indent;
-    mparse "if (cpid == locales[i].cpid) {";
-    indent;
-    mparse "return true;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return false;";
-    deindent;
-    mparse "}";
-    mparse "";   
-
-    # mapi_get_cpid_from_lcid
-    mparse "/**";
-    mparse "  \\details Returns codepage for a given LCID (Locale ID)";
-    mparse "";
-    mparse "  \\param lcid the locale ID to lookup";
-    mparse "";
-    mparse "  \\return non-zero codepage on success, otherwise 0 if";
-    mparse "   only unicode is supported for this language";
-    mparse " */";
-    mparse "_PUBLIC_ uint32_t mapi_get_cpid_from_lcid(uint32_t lcid)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "for (i = 0; locales[i].lcid; i++) {";
-    indent;
-    mparse "if (lcid == locales[i].lcid) {";
-    indent;
-    mparse "return locales[i].cpid;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_cpid_from_locale
-    mparse "/**";
-    mparse "  \\details Return codepage associated to specified locale";
-    mparse "";
-    mparse "  \\param locale The locale string to lookup";
-    mparse "";
-    mparse "  \\return non-zero codepage on success, otherwise 0";
-    mparse " */";
-    mparse "_PUBLIC_ uint32_t mapi_get_cpid_from_locale(const char *locale)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!locale) return 0;";
-    mparse "";
-    mparse "for (i = 0; locales[i].locale; i++) {";
-    indent;
-    mparse "if (locales[i].locale && !strncmp(locales[i].locale, locale, strlen(locales[i].locale))) {";
-    indent;
-    mparse "return locales[i].cpid;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_cpid_from_language
-    mparse "/**";
-    mparse "  \\details Return codepage associated to specified language";
-    mparse "";
-    mparse "  \\param language The language string to lookup";
-    mparse "";
-    mparse "  \\return non-zero codepage on success, otherwise 0";
-    mparse " */";
-    mparse "_PUBLIC_ uint32_t mapi_get_cpid_from_language(const char *language)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!language) return 0;";
-    mparse "";
-    mparse "for (i = 0; locales[i].language; i++) {";
-    indent;
-    mparse "if (locales[i].language && !strncmp(locales[i].language, language, strlen(locales[i].language))) {";
-    indent;
-    mparse "return locales[i].cpid;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_lcid_from_locale
-    mparse "/**";
-    mparse "  \\details Returns LCID (Locale ID) for a given locale";
-    mparse "";
-    mparse "  \\param locale the locale string to lookup";
-    mparse "";
-    mparse "  \\return non-zero LCID on success, otherwise 0";
-    mparse " */";
-    mparse "_PUBLIC_ uint32_t mapi_get_lcid_from_locale(const char *locale)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!locale) return 0;";
-    mparse "";
-    mparse "for (i = 0; locales[i].locale; i++) {";
-    indent;
-    mparse "if (locales[i].locale && !strncmp(locales[i].locale, locale, strlen(locales[i].locale))) {";
-    indent;
-    mparse "return locales[i].lcid;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_lcid_from_language
-    mparse "/**";
-    mparse "  \\details Returns LCID (Locale ID) for a given language";
-    mparse "";
-    mparse "  \\param language the language string to lookup";
-    mparse "";
-    mparse "  \\return non-zero LCID on success, otherwise 0";
-    mparse " */";
-    mparse "_PUBLIC_ uint32_t mapi_get_lcid_from_language(const char *language)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!language) return 0;";
-    mparse "";
-    mparse "for (i = 0; locales[i].language; i++) {";
-    indent;
-    mparse "if (locales[i].language && !strncmp(locales[i].language, language, strlen(locales[i].language))) {";
-    indent;
-    mparse "return locales[i].lcid;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_locale_from_lcid
-    mparse "/**";
-    mparse "  \\details Returns Locale for a given Locale ID";
-    mparse "";
-    mparse "  \\param lcid the locale ID to lookup";
-    mparse "";
-    mparse "  \\return locale string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ const char *mapi_get_locale_from_lcid(uint32_t lcid)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "for (i = 0; locales[i].lcid; i++) {";
-    indent;
-    mparse "if (locales[i].lcid == lcid) {";
-    indent;
-    mparse "return locales[i].locale;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_locale_from_language
-    mparse "/**";
-    mparse "  \\details Returns Locale for a given language";
-    mparse "";
-    mparse "  \\param language the language string to lookup";
-    mparse "";
-    mparse "  \\return Locale string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ const char *mapi_get_locale_from_language(const char *language)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!language) return NULL;";
-    mparse "";
-    mparse "for (i = 0; locales[i].language; i++) {";
-    indent;
-    mparse "if (locales[i].language && !strncmp(locales[i].language, language, strlen(locales[i].language))) {";
-    indent;
-    mparse "return locales[i].locale;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_language_from_locale
-       mparse "/**";
-    mparse "  \\details Returns Language for a given Locale";
-    mparse "";
-    mparse "  \\param locale the language string to lookup";
-    mparse "";
-    mparse "  \\return Language string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ const char *mapi_get_language_from_locale(const char *locale)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!locale) return NULL;";
-    mparse "";
-    mparse "for (i = 0; locales[i].locale; i++) {";
-    indent;
-    mparse "if (locales[i].locale && !strncmp(locales[i].locale, locale, strlen(locales[i].locale))) {";
-    indent;
-    mparse "return locales[i].language;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-    # mapi_get_language_from_lcid
-    mparse "/**";
-    mparse "  \\details Returns Language for a given Locale ID";
-    mparse "";
-    mparse "  \\param lcid the locale ID to lookup";
-    mparse "";
-    mparse "  \\return language string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ const char *mapi_get_language_from_lcid(uint32_t lcid)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "for (i = 0; locales[i].lcid; i++) {";
-    indent;
-    mparse "if (locales[i].lcid == lcid) {";
-    indent;
-    mparse "return locales[i].language;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # mapi_get_language_by_group
-        mparse "/**";
-    mparse "  \\details Returns List of languages for a given Language Group";
-    mparse "";
-    mparse "  \\param mem_ctx pointer to the memory context";
-    mparse "  \\param group the locale group to lookup";
-    mparse "";
-    mparse "  \\return Array of languages string on success, otherwise NULL";
-    mparse " */";
-    mparse "_PUBLIC_ char **mapi_get_language_from_group(TALLOC_CTX *mem_ctx, uint32_t group)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "uint32_t   counter = 0;";
-    mparse "char               **languages;";
-    mparse "";
-    mparse "/* Sanity Checks */";
-    mparse "if (!mem_ctx) return NULL;";
-    mparse "";
-    mparse "languages = talloc_array(mem_ctx, char *, counter + 1);";
-    mparse "for (i = 0; locales[i].language; i++) {";
-    indent;
-    mparse "if (locales[i].language_group == group) {";
-    indent;
-    mparse "languages = talloc_realloc(mem_ctx, languages, char *, counter + 1);";
-    mparse "languages[counter] = talloc_strdup(languages, locales[i].language);";
-    mparse "counter += 1;";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "if (!counter) {";
-    indent;
-    mparse "talloc_free(languages);";
-    mparse "return NULL;";
-    deindent;
-    mparse "}";
-    mparse "";
-    mparse "return languages;";
-    deindent;
-    mparse "}";
-    mparse "";
-
-    # assessor for mapidump_get_languages
-    mparse "void mapi_get_language_list(void)";
-    mparse "{";
-    indent;
-    mparse "uint32_t   i;";
-    mparse "";
-    mparse "for (i = 0; locales[i].language; i++) {";
-    indent;
-    mparse "printf(\"%s\\n\", locales[i].language);";
-    deindent;
-    mparse "}";
-    deindent;
-    mparse "}";
-}
-
-
-#####################################################################
-# generate OpenChange properties defines for Python
-sub pymapi_properties($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @props;
-    my $prop_type;
-
-    mparse "/* parser auto-generated by mparse */";
-    mparse "";
-    mparse "#include <Python.h>";
-    mparse "#include \"pyopenchange/pymapi.h\"";
-    mparse "";
-    mparse "int pymapi_add_properties(PyObject *m)";
-    mparse "{";
-    indent;
-
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @props = split(/\s+/, $line);
-           $prop_type = hex $props[0];
-           $prop_type &= 0xFFFF;
-           mparse sprintf "PyModule_AddObject(m, \"%s\", PyInt_FromLong(%s));", $props[1], $props[0];
-           mparse sprintf "PyModule_AddObject(m, \"%s\", PyInt_FromLong(%s));", $props[2], $props[0] if ($props[2]);
-           if (($prop_type == 0x1e) || ($prop_type == 0x101e)) {
-               $prop_type = hex $props[0];
-               $prop_type++;
-               mparse sprintf "PyModule_AddObject(m, \"%s\", PyInt_FromLong(0x%.8x));", "$props[1]_UNICODE", $prop_type;
-           }
-       }
-
-    }
-    mparse "";
-    mparse "return 0;";
-    deindent;
-    mparse "}";
-}
-
-
-#####################################################################
-# generate mapistore_namedprops.ldif file
-sub mapistore_namedprops($)
-{
-    my $contents = shift;
-    my $line;
-    my @lines;
-    my @prop;
-
-    mparse "# LDIF file auto-generated by mparse ";
-    mparse "";
-
-    mparse sprintf "dn: CN=default";
-    mparse sprintf "objectClass: top";
-    mparse sprintf "cn: default";
-    mparse sprintf "";
-
-    mparse sprintf "dn: CN=custom";
-    mparse sprintf "objectClass: top";
-    mparse sprintf "cn: custom";
-    mparse sprintf "";
-
-    for my $key ( keys %oleguid ) {
-       my $value = $oleguid{$key};
-       
-       mparse sprintf "dn: CN=%s,CN=default", $value;
-       mparse sprintf "cn: %s", $value;
-       mparse sprintf "name: %s", $key;
-       mparse sprintf "oleguid: %s", $value;
-       mparse "";
-    }
-
-    @lines = split(/\n/, $contents);
-    foreach $line (@lines) {
-       $line =~ s/^\#+.*$//;
-       if ($line) {
-           @prop = split(/\s+/, $line);
-           if ($prop[5] eq "MNID_ID" && $prop[7]) {
-               mparse sprintf "dn: CN=%s,CN=%s,CN=default", $prop[2], $oleguid{$prop[6]};
-               mparse sprintf "objectClass: %s", $prop[5];
-               mparse sprintf "cn: %s", $prop[2];
-               mparse sprintf "canonical: %s", $prop[0];
-               mparse sprintf "oleguid: %s", $oleguid{$prop[6]};
-               mparse sprintf "mapped_id: %s", $prop[7];
-               mparse sprintf "prop_id: %s", $prop[2];
-               mparse sprintf "prop_type: %s", $prop_names{$prop[4]};
-               mparse sprintf "oom: %s", $prop[1];
-               mparse sprintf "";
-           } elsif ($prop[5] eq "MNID_STRING" && $prop[7]) {
-               mparse sprintf "dn: CN=%s,CN=%s,CN=default", $prop[3], $oleguid{$prop[6]};
-               mparse sprintf "objectClass: %s", $prop[5];
-               mparse sprintf "cn: %s", $prop[3];
-               mparse sprintf "canonical: %s", $prop[0];
-               mparse sprintf "oleguid: %s", $oleguid{$prop[6]};
-               mparse sprintf "mapped_id: %s", $prop[7];
-               mparse sprintf "prop_id: 0x0";
-               mparse sprintf "prop_type: %s", $prop[4];
-               mparse sprintf "prop_name: %s", $prop[3];
-               mparse sprintf "";
-           }
-       }
-    }
-    return $ret;
-}
-
-sub process_file($)
-{
-    my $mapi_file = shift;
-    my $outputdir = $opt_outputdir;
-
-    print "Parsing $mapi_file\n";
-    my $contents = FileLoad($mapi_file);
-    defined $contents || return undef;
-
-    
-    if ($opt_parser eq "mapitags") {
-       print "Generating $outputdir" . "mapitags.h\n";
-       my $parser = ("$outputdir/mapitags.h");
-       FileSave($parser, mapitags_header($contents));
-       
-       print "Generating $outputdir" . "mapitags.c\n";
-       $ret = '';
-       my $code_parser = ("$outputdir/mapitags.c");
-       FileSave($code_parser, mapitags_interface($contents));
-       
-       print "Generating mapitags_enum.h\n";
-       $ret = '';
-       my $enum_parser = ("mapitags_enum.h");
-       FileSave($enum_parser, mapitags_enum($contents));
-    }
-
-    if ($opt_parser eq "mapicodes") {
-       print "Generating $outputdir" . "mapicode.c\n";
-       $ret = '';
-       my $code_parser = ("$outputdir/mapicode.c");
-       FileSave($code_parser, mapicodes_interface($contents));
-
-       print "Generating mapicodes_enum.h\n";
-       $ret = '';
-       my $enum_parser = ("mapicodes_enum.h");
-       FileSave($enum_parser, mapicodes_enum($contents));
-    }
-
-    if ($opt_parser eq "mapi_nameid") {
-       print "Generating $outputdir" . "mapi_nameid_private.h\n";
-       $ret = '';
-       my $parser = ("$outputdir/mapi_nameid_private.h");
-       FileSave($parser, mapi_nameid_private_header($contents));
-
-       print "Generating $outputdir" . "mapi_nameid.h\n";
-       $ret = '';
-       my $nameid_parser = ("$outputdir/mapi_nameid.h");
-       FileSave($nameid_parser, mapi_nameid_header($contents));
-    }
-
-    if ($opt_parser eq "codepage_lcid") {
-       print "Generating $outputdir" . "codepage_lcid.c\n";
-       $ret = '';
-       my $code_parser = ("$outputdir/codepage_lcid.c");
-       FileSave($code_parser, codepage_lcid_interface($contents));
-    }
-
-    if ($opt_parser eq "openchangedb_property") {
-       print "Generating $outputdir" . "openchangedb_property.c\n";
-       my $openchangedb_parser = ("$outputdir/openchangedb_property.c");
-       FileSave($openchangedb_parser, openchangedb_property($contents));
-    }
-
-    if ($opt_parser eq "mapistore_namedprops") {
-       print "Generating $outputdir" . "mapistore_namedprops.ldif\n";
-       my $mapistore_parser = ("$outputdir/mapistore_namedprops.ldif");
-       FileSave($mapistore_parser, mapistore_namedprops($contents));
-    }
-
-    if ($opt_parser eq "pymapi_properties") {
-       print "Generating $outputdir" . "pymapi_properties.c\n";
-       my $pymapi_parser = ("$outputdir/pymapi_properties.c");
-       FileSave($pymapi_parser, pymapi_properties($contents));
-    }
-}
-
-process_file($_) foreach (@ARGV);
diff --git a/branches/plugfest/libmapi/emsmdb.c b/branches/plugfest/libmapi/emsmdb.c
deleted file mode 100644 (file)
index 3e153c9..0000000
+++ /dev/null
@@ -1,1226 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005 - 2011.
-   Copyright (C) Jelmer Vernooij 2005.
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange.h"
-#include "gen_ndr/ndr_exchange_c.h"
-#include <gen_ndr/ndr_misc.h>
-
-#include <param.h>
-
-/**
-   \file emsmdb.c
-
-   \brief EMSMDB stack functions
- */
-
-
-/**
-   \details Hash a string and returns a unsigned integer hash value
-
-   \param str the string to hash
-
-   \return a hash value greater than 0 on success, otherwise 0
-
-   \note This function is based on the hash algorithm from gdbm and
-   from Samba4 TDB code.
- */
-static unsigned int emsmdb_hash(const char *str)
-{
-       uint32_t        value;  /* Used to compute the hash value.  */
-       uint32_t        i;      /* Used to cycle through random values. */
-       uint32_t        len;
-
-       /* Sanity check */
-       if (!str) return 0;
-
-       len = strlen(str);
-
-       /* Set the initial value from the key size. */
-       for (value = 0x238F13AF * len, i = 0; i < len; i++)
-               value = (value + (str[i] << (i * 5 % 24)));
-
-       return (1103515243 * value + 12345);  
-}
-
-
-/**
-   \details Establishes a new Session Context with the server on the
-   exchange_emsmdb pipe
-
-   \param parent_mem_ctx pointer to the memory context
-   \param session pointer to the MAPI session context
-   \param p pointer to the DCERPC pipe
-   \param cred pointer to the user credentials
-   \param return_value pointer on EcDoConnect MAPI return value
-
-   \return an allocated emsmdb_context on success, otherwise NULL
- */
-struct emsmdb_context *emsmdb_connect(TALLOC_CTX *parent_mem_ctx, 
-                                     struct mapi_session *session,
-                                     struct dcerpc_pipe *p, 
-                                     struct cli_credentials *cred,
-                                     int *return_value)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct EcDoConnect      r;
-       struct emsmdb_context   *ret;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                pullTimeStamp = 0;
-
-       /* Sanity Checks */
-       if (!session) return NULL;
-       if (!p) return NULL;
-       if (!cred) return NULL;
-       if (!return_value) return NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "emsmdb_connect");
-
-       ret = talloc_zero(parent_mem_ctx, struct emsmdb_context);
-       ret->rpc_connection = p;
-       ret->mem_ctx = parent_mem_ctx;
-
-       ret->cache_requests = talloc(parent_mem_ctx, struct EcDoRpc_MAPI_REQ *);
-       ret->info.szDisplayName = NULL;
-       ret->info.szDNPrefix = NULL;
-
-       r.in.szUserDN = session->profile->mailbox;
-       r.in.ulFlags = 0x00000000;
-       r.in.ulConMod = emsmdb_hash(r.in.szUserDN);
-       r.in.cbLimit = 0x00000000;
-       r.in.ulCpid = session->profile->codepage;
-       r.in.ulLcidString = session->profile->language;
-       r.in.ulLcidSort = session->profile->method;
-       r.in.ulIcxrLink = 0xFFFFFFFF;
-       r.in.usFCanConvertCodePages = 0x1;
-       r.in.rgwClientVersion[0] = 0x000c;
-       r.in.rgwClientVersion[1] = 0x183e;
-       r.in.rgwClientVersion[2] = 0x03e8;
-       r.in.pullTimeStamp = &pullTimeStamp;
-
-       r.out.szDNPrefix = (const char **)&ret->info.szDNPrefix;
-       r.out.szDisplayName = (const char **)&ret->info.szDisplayName;
-       r.out.handle = &ret->handle;
-       r.out.pcmsPollsMax = &ret->info.pcmsPollsMax;
-       r.out.pcRetry = &ret->info.pcRetry;
-       r.out.pcmsRetryDelay = &ret->info.pcmsRetryDelay;
-       r.out.picxr = &ret->info.picxr;
-       r.out.pullTimeStamp = &pullTimeStamp;
-
-       status = dcerpc_EcDoConnect_r(p->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       if (!NT_STATUS_IS_OK(status) || retval) {
-               *return_value = retval;
-               mapi_errstr("EcDoConnect", retval);
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       ret->info.szDNPrefix = talloc_steal(parent_mem_ctx, ret->info.szDNPrefix);
-       ret->info.szDisplayName = talloc_steal(parent_mem_ctx, ret->info.szDisplayName);
-
-       ret->info.rgwServerVersion[0] = r.out.rgwServerVersion[0];
-       ret->info.rgwServerVersion[1] = r.out.rgwServerVersion[1];
-       ret->info.rgwServerVersion[2] = r.out.rgwServerVersion[2];
-
-       ret->cred = cred;
-       ret->max_data = 0xFFF0;
-       ret->setup = false;
-
-       talloc_free(mem_ctx);
-
-       return ret;
-}
-
-
-/**
-   \details Establishes a new Session Context with the server on the
-   exchange_emsmdb pipe using 0xA EcDoConnectEx opnum
-
-   \param mem_ctx pointer to the memory context
-   \param session pointer to the MAPI session context
-   \param p pointer to the DCERPC pipe
-   \param cred pointer to the user credentials
-   \param return_value pointer on EcDoConnectEx MAPI return value
-
-   \return an allocated emsmdb_context structure on success, otherwise
-   NULL
- */
-struct emsmdb_context *emsmdb_connect_ex(TALLOC_CTX *mem_ctx,
-                                        struct mapi_session *session,
-                                        struct dcerpc_pipe *p,
-                                        struct cli_credentials *cred,
-                                        int *return_value)
-{
-       TALLOC_CTX              *tmp_ctx;
-       struct EcDoConnectEx    r;
-       struct emsmdb_context   *ctx;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                pulTimeStamp = 0;
-       uint32_t                pcbAuxOut = 0x00001008;
-       struct mapi2k7_AuxInfo  *rgbAuxOut;
-
-       /* Sanity Checks */
-       if (!session) return NULL;
-       if (!p) return NULL;
-       if (!cred) return NULL;
-       if (!return_value) return NULL;
-
-       tmp_ctx = talloc_named(NULL, 0, "emsmdb_connect_ex");
-
-       ctx = talloc_zero(mem_ctx, struct emsmdb_context);
-       ctx->rpc_connection = p;
-       ctx->mem_ctx = mem_ctx;
-
-       ctx->info.szDisplayName = NULL;
-       ctx->info.szDNPrefix = NULL;
-       
-       r.out.handle = &ctx->handle;
-
-       r.in.szUserDN = session->profile->mailbox;
-       r.in.ulFlags = 0x00000000;
-       r.in.ulConMod = emsmdb_hash(r.in.szUserDN);
-       r.in.cbLimit = 0x00000000;
-       r.in.ulCpid = session->profile->codepage;
-       r.in.ulLcidString = session->profile->language;
-       r.in.ulLcidSort = session->profile->method;
-       r.in.ulIcxrLink = 0xFFFFFFFF;
-       r.in.usFCanConvertCodePages = 0x1;
-
-       r.out.szDNPrefix = (const char **) &ctx->info.szDNPrefix;
-       r.out.szDisplayName = (const char **) &ctx->info.szDisplayName;
-       r.out.pcmsPollsMax = &ctx->info.pcmsPollsMax;
-       r.out.pcRetry = &ctx->info.pcRetry;
-       r.out.pcmsRetryDelay = &ctx->info.pcmsRetryDelay;
-       r.out.picxr = &ctx->info.picxr;
-       r.out.pulTimeStamp = &pulTimeStamp;
-
-       r.in.rgwClientVersion[0] = 0x000c;
-       r.in.rgwClientVersion[1] = 0x183e;
-       r.in.rgwClientVersion[2] = 0x03e8;
-       r.in.pulTimeStamp = &pulTimeStamp;
-       r.in.rgbAuxIn = NULL;
-       r.in.cbAuxIn = 0x00000000;
-
-       rgbAuxOut = talloc_zero(ctx->mem_ctx, struct mapi2k7_AuxInfo);
-       rgbAuxOut->AUX_HEADER = NULL;
-       r.out.rgbAuxOut = rgbAuxOut;
-
-       r.in.pcbAuxOut = &pcbAuxOut;
-       r.out.pcbAuxOut = &pcbAuxOut;
-
-       status = dcerpc_EcDoConnectEx_r(p->binding_handle, tmp_ctx, &r);
-       retval = r.out.result;
-       if (!NT_STATUS_IS_OK(status) || retval) {
-               *return_value = retval;
-               mapi_errstr("EcDoConnectEx", retval);
-               talloc_free(tmp_ctx);
-               return NULL;
-       }
-
-       ctx->info.szDisplayName = talloc_steal(mem_ctx, ctx->info.szDisplayName);
-       ctx->info.szDNPrefix = talloc_steal(mem_ctx, ctx->info.szDNPrefix);
-
-       ctx->info.rgwServerVersion[0] = r.out.rgwServerVersion[0];
-       ctx->info.rgwServerVersion[1] = r.out.rgwServerVersion[1];
-       ctx->info.rgwServerVersion[2] = r.out.rgwServerVersion[2];
-       
-       ctx->cred = cred;
-       ctx->max_data = 0xFFF0;
-       ctx->setup = false;
-
-       talloc_free(tmp_ctx);
-       return ctx;
-}
-
-
-/**
-   \details Destructor for the EMSMDB context. Call the EcDoDisconnect
-   function.
-
-   \param data generic pointer to data with mapi_provider information
-
-   \return MAPI_E_SUCCESS on success, otherwise -1
- */
-int emsmdb_disconnect_dtor(void *data)
-{
-       struct mapi_provider    *provider = (struct mapi_provider *)data;
-       struct emsmdb_context   *emsmdb_ctx;
-
-       emsmdb_ctx = (struct emsmdb_context *)provider->ctx;
-       emsmdb_disconnect(emsmdb_ctx);  
-
-       talloc_free(emsmdb_ctx->cache_requests);
-
-       if (emsmdb_ctx->info.szDisplayName) {
-               talloc_free(emsmdb_ctx->info.szDisplayName);
-       }
-
-       if (emsmdb_ctx->info.szDNPrefix) {
-               talloc_free(emsmdb_ctx->info.szDNPrefix);
-       }
-
-       return 0;
-}
-
-
-/**
-   \details Destroy the EMSMDB context handle
-
-   \param emsmdb_ctx pointer to the EMSMDB context
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-enum MAPISTATUS emsmdb_disconnect(struct emsmdb_context *emsmdb_ctx)
-{
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       struct EcDoDisconnect   r;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!emsmdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       r.in.handle = r.out.handle = &emsmdb_ctx->handle;
-
-       status = dcerpc_EcDoDisconnect_r(emsmdb_ctx->rpc_connection->binding_handle, emsmdb_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Send an empty MAPI packet - useful to keep connection up
-   or force notifications.
-
-   \param emsmdb_ctx pointer to the EMSMDB connection context
-   \param res pointer on pointer to a MAPI response structure
-
-   \return NT_STATUS_OK on success, otherwise NT status error
- */
-_PUBLIC_ NTSTATUS emsmdb_transaction_null(struct emsmdb_context *emsmdb_ctx, 
-                                         struct mapi_response **res)
-{
-       struct EcDoRpc          r;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       NTSTATUS                status;
-       uint16_t                *length;
-
-       /* Sanity checks */
-       if(!emsmdb_ctx) return NT_STATUS_INVALID_PARAMETER;
-       if (!res) return NT_STATUS_INVALID_PARAMETER;
-
-       mapi_request = talloc_zero(emsmdb_ctx->mem_ctx, struct mapi_request);
-       mapi_response = talloc_zero(emsmdb_ctx->mem_ctx, struct mapi_response);
-
-       r.in.mapi_request = mapi_request;
-       r.in.mapi_request->mapi_len = 2;
-       r.in.mapi_request->length = 2;
-
-       r.in.handle = r.out.handle = &emsmdb_ctx->handle;
-       r.in.size = emsmdb_ctx->max_data;
-       r.in.offset = 0x0;
-       r.in.max_data = emsmdb_ctx->max_data;
-       length = talloc_zero(emsmdb_ctx->mem_ctx, uint16_t);
-       *length = r.in.mapi_request->mapi_len;
-       r.in.length = r.out.length = length;
-
-       r.out.mapi_response = mapi_response;
-
-       status = dcerpc_EcDoRpc_r(emsmdb_ctx->rpc_connection->binding_handle, emsmdb_ctx->mem_ctx, &r);
-       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
-               return status;
-       }
-
-       *res = mapi_response;
-
-       return status;
-}
-
-
-static int mapi_response_destructor(void *data)
-{
-       struct mapi_response    *mapi_response = (struct mapi_response *)data;
-
-       if (!mapi_response) return 0;
-
-       if (mapi_response->mapi_repl) {
-               if (mapi_response->handles) {
-                       talloc_free(mapi_response->handles);
-               }
-
-               if (!mapi_response->mapi_repl->error_code) {
-                       talloc_free(mapi_response->mapi_repl);
-               }
-       }
-
-       return 0;
-}
-
-
-/**
-   \details Make a EMSMDB transaction.
-
-   \param emsmdb_ctx pointer to the EMSMDB connection context
-   \param mem_ctx pointer to the memory context
-   \param req pointer to the MAPI request to send
-   \param repl pointer on pointer to the MAPI reply returned by the
-   server
-
-   \return NT_STATUS_OK on success, otherwise NT status error
- */
-_PUBLIC_ NTSTATUS emsmdb_transaction(struct emsmdb_context *emsmdb_ctx, 
-                                    TALLOC_CTX *mem_ctx,
-                                    struct mapi_request *req, 
-                                    struct mapi_response **repl)
-{
-       struct EcDoRpc          r;
-       struct mapi_response    *mapi_response;
-       uint16_t                *length;
-       NTSTATUS                status;
-       struct EcDoRpc_MAPI_REQ *multi_req;
-       uint8_t                 i = 0;
-
-start:
-       r.in.handle = r.out.handle = &emsmdb_ctx->handle;
-       r.in.size = emsmdb_ctx->max_data;
-       r.in.offset = 0x0;
-
-       mapi_response = talloc_zero(emsmdb_ctx->mem_ctx, struct mapi_response);
-       mapi_response->mapi_repl = NULL;
-       mapi_response->handles = NULL;
-       talloc_set_destructor((void *)mapi_response, (int (*)(void *))mapi_response_destructor);
-       r.out.mapi_response = mapi_response;
-
-       /* process cached data */
-       if (emsmdb_ctx->cache_count) {
-               multi_req = talloc_array(mem_ctx, struct EcDoRpc_MAPI_REQ, emsmdb_ctx->cache_count + 2);
-               for (i = 0; i < emsmdb_ctx->cache_count; i++) {
-                       multi_req[i] = *emsmdb_ctx->cache_requests[i];
-               }
-               multi_req[i] = req->mapi_req[0];
-               req->mapi_req = multi_req;
-       }
-
-       req->mapi_req = talloc_realloc(mem_ctx, req->mapi_req, struct EcDoRpc_MAPI_REQ, emsmdb_ctx->cache_count + 2);
-       req->mapi_req[i+1].opnum = 0;
-
-       r.in.mapi_request = req;
-       r.in.mapi_request->mapi_len += emsmdb_ctx->cache_size;
-       r.in.mapi_request->length += emsmdb_ctx->cache_size;
-       length = talloc_zero(mem_ctx, uint16_t);
-       *length = r.in.mapi_request->mapi_len;
-       r.in.length = r.out.length = length;
-       r.in.max_data = (*length >= 0x4000) ? 0x7FFF : emsmdb_ctx->max_data;
-
-       status = dcerpc_EcDoRpc_r(emsmdb_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       if (!NT_STATUS_IS_OK(status)) {
-               if (emsmdb_ctx->setup == false) {
-                       errno = 0;
-                       emsmdb_ctx->max_data = 0x7FFF;
-                       emsmdb_ctx->setup = true;
-                       talloc_free(mapi_response);
-                       goto start;
-               } else {
-                       talloc_free(mapi_response);
-                       return status;
-               }
-       } else {
-               emsmdb_ctx->setup = true;
-       }
-       emsmdb_ctx->cache_size = emsmdb_ctx->cache_count = 0;
-
-       if (r.out.mapi_response->mapi_repl && r.out.mapi_response->mapi_repl->error_code) {
-               talloc_set_destructor((void *)mapi_response, NULL);
-               r.out.mapi_response->handles = NULL;
-       }
-
-       *repl = r.out.mapi_response;
-
-       return status;
-}
-
-
-/**
-   \details Make a EMSMDB EXT2 transaction.
-
-   \param emsmdb_ctx pointer to the EMSMDB connection context
-   \param mem_ctx pointer to the memory context
-   \param req pointer to the MAPI request to send
-   \param repl pointer on pointer to the MAPI reply returned by the
-   server
-
-   \return NT_STATUS_OK on success, otherwise NT status error
- */
-_PUBLIC_ NTSTATUS emsmdb_transaction_ext2(struct emsmdb_context *emsmdb_ctx,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct mapi_request *req,
-                                         struct mapi_response **repl)
-{
-       NTSTATUS                status;
-       struct EcDoRpcExt2      r;
-       struct mapi2k7_response mapi2k7_response;
-       struct ndr_push         *ndr_uncomp_rgbIn;
-       struct ndr_push         *ndr_comp_rgbIn;
-       struct ndr_push         *ndr_rgbIn;
-       struct ndr_pull         *ndr_pull = NULL;
-       uint32_t                pulFlags = 0x0;
-       uint32_t                pcbOut = 0x8007;
-       uint32_t                pcbAuxOut = 0x1008;
-       uint32_t                pulTransTime = 0;
-       DATA_BLOB               rgbOut;
-       struct RPC_HEADER_EXT   RPC_HEADER_EXT;
-
-       r.in.handle = r.out.handle = &emsmdb_ctx->handle;
-       r.in.pulFlags = r.out.pulFlags = &pulFlags;
-
-       /* Step 1. Push mapi_request in a data blob */
-       ndr_uncomp_rgbIn = ndr_push_init_ctx(mem_ctx);
-       ndr_set_flags(&ndr_uncomp_rgbIn->flags, LIBNDR_FLAG_NOALIGN);
-       ndr_push_mapi_request(ndr_uncomp_rgbIn, NDR_SCALARS|NDR_BUFFERS, req);
-
-       /* Step 2. Compress the blob */
-       /*      ndr_comp_rgbIn = ndr_push_init_ctx(mem_ctx); */
-       /*      ndr_push_lzxpress_compress(ndr_comp_rgbIn, ndr_uncomp_rgbIn); */
-
-       /* If the compressed blob is larger than the uncompressed one, use obfuscation */
-       /*      if (ndr_comp_rgbIn->offset > ndr_uncomp_rgbIn->offset) { */
-       /*              talloc_free(ndr_comp_rgbIn); */
-       ndr_comp_rgbIn = ndr_uncomp_rgbIn;
-       obfuscate_data(ndr_comp_rgbIn->data, ndr_comp_rgbIn->offset, 0xA5);
-               
-       RPC_HEADER_EXT.Version = 0x0000;
-       RPC_HEADER_EXT.Flags = RHEF_XorMagic|RHEF_Last;
-       RPC_HEADER_EXT.Size = ndr_comp_rgbIn->offset;
-       RPC_HEADER_EXT.SizeActual = ndr_comp_rgbIn->offset;
-
-       ndr_rgbIn = ndr_push_init_ctx(mem_ctx);
-       ndr_set_flags(&ndr_rgbIn->flags, LIBNDR_FLAG_NOALIGN);
-       ndr_push_RPC_HEADER_EXT(ndr_rgbIn, NDR_SCALARS|NDR_BUFFERS, &RPC_HEADER_EXT);
-       ndr_push_bytes(ndr_rgbIn, ndr_comp_rgbIn->data, ndr_comp_rgbIn->offset);
-               /*      } else { */
-               /*              RPC_HEADER_EXT.Version = 0x0000; */
-               /*              RPC_HEADER_EXT.Flags = RHEF_Compressed|RHEF_Last; */
-               /*              RPC_HEADER_EXT.Size = ndr_comp_rgbIn->offset; */
-               /*              RPC_HEADER_EXT.SizeActual = ndr_uncomp_rgbIn->offset; */
-
-               /*              ndr_rgbIn = ndr_push_init_ctx(mem_ctx); */
-               /*              ndr_set_flags(&ndr_rgbIn->flags, LIBNDR_FLAG_NOALIGN); */
-               /*              ndr_push_RPC_HEADER_EXT(ndr_rgbIn, NDR_SCALARS|NDR_BUFFERS, &RPC_HEADER_EXT); */
-               /*              ndr_push_bytes(ndr_rgbIn, ndr_comp_rgbIn->data, ndr_comp_rgbIn->offset); */
-               /*      } */
-
-               /* Plain request (no obfuscation or compression) */
-               /* ndr_comp_rgbIn = ndr_uncomp_rgbIn; */
-               /* RPC_HEADER_EXT.Version = 0x0000; */
-               /* RPC_HEADER_EXT.Flags = RHEF_Last; */
-               /* RPC_HEADER_EXT.Size = ndr_uncomp_rgbIn->offset; */
-               /* RPC_HEADER_EXT.SizeActual = ndr_uncomp_rgbIn->offset; */
-
-               /* Pull the complete rgbIn */
-               /* ndr_rgbIn = ndr_push_init_ctx(mem_ctx); */
-               /* ndr_set_flags(&ndr_rgbIn->flags, LIBNDR_FLAG_NOALIGN); */
-               /* ndr_push_RPC_HEADER_EXT(ndr_rgbIn, NDR_SCALARS|NDR_BUFFERS, &RPC_HEADER_EXT); */
-               /* ndr_push_bytes(ndr_rgbIn, ndr_comp_rgbIn->data, ndr_comp_rgbIn->offset); */
-
-       r.in.rgbIn = ndr_rgbIn->data;
-       r.in.cbIn = ndr_rgbIn->offset;
-       r.in.pcbOut = r.out.pcbOut = &pcbOut;
-
-       r.in.rgbAuxIn = NULL;
-       r.in.cbAuxIn = 0;
-
-       r.in.pcbAuxOut = r.out.pcbAuxOut = &pcbAuxOut;
-
-       r.out.pulTransTime = &pulTransTime;
-
-       status = dcerpc_EcDoRpcExt2_r(emsmdb_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       talloc_free(ndr_rgbIn);
-       talloc_free(ndr_comp_rgbIn);
-               
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       } else if (r.out.result) {
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       /* Pull MAPI response form rgbOut */
-       rgbOut.data = r.out.rgbOut;
-       rgbOut.length = *r.out.pcbOut;
-       ndr_pull = ndr_pull_init_blob(&rgbOut, mem_ctx);
-       ndr_set_flags(&ndr_pull->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REF_ALLOC);
-       
-       ndr_pull_mapi2k7_response(ndr_pull, NDR_SCALARS|NDR_BUFFERS, &mapi2k7_response);
-
-       *repl = mapi2k7_response.mapi_response;
-
-       return status;
-}
-
-
-_PUBLIC_ NTSTATUS emsmdb_transaction_wrapper(struct mapi_session *session,
-                                            TALLOC_CTX *mem_ctx,
-                                            struct mapi_request *req,
-                                            struct mapi_response **repl)
-{
-       switch (session->profile->exchange_version) {
-       case 0x0:
-         return emsmdb_transaction((struct emsmdb_context *)session->emsmdb->ctx, mem_ctx, req, repl);
-       case 0x1:
-       case 0x2:
-         return emsmdb_transaction_ext2((struct emsmdb_context *)session->emsmdb->ctx, mem_ctx, req, repl);
-               break;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the notify context structure and bind a local
-   UDP port to receive notifications from the server
-
-   \param mapi_ctx pointer to the MAPI context
-   \param mem_ctx pointer to the memory context
-
-   \return an allocated mapi_notify_ctx structure on success,
-   otherwise NULL
- */
-struct mapi_notify_ctx *emsmdb_bind_notification(struct mapi_context *mapi_ctx,
-                                                TALLOC_CTX *mem_ctx)
-{
-       struct interface        *ifaces;
-       struct mapi_notify_ctx  *notify_ctx = NULL;
-       unsigned short          port = DFLT_NOTIF_PORT;
-       const char              *ipaddr = NULL;
-       uint32_t                attempt = 0;
-
-       /* Sanity Checks */
-       if (!mapi_ctx) return NULL;
-       if (!mapi_ctx->session) return NULL;
-       if (!mapi_ctx->session->profile) return NULL;
-
-       notify_ctx = talloc_zero(mem_ctx, struct mapi_notify_ctx);
-
-       notify_ctx->notifications = talloc_zero((TALLOC_CTX *)notify_ctx, struct notifications);
-       notify_ctx->notifications->prev = NULL;
-       notify_ctx->notifications->next = NULL;
-
-       load_interfaces(mem_ctx, lpcfg_interfaces(mapi_ctx->lp_ctx), &ifaces);
-       ipaddr = iface_best_ip(ifaces, mapi_ctx->session->profile->server);
-       if (!ipaddr) {
-               talloc_free(notify_ctx->notifications);
-               talloc_free(notify_ctx);
-               return NULL;
-       }
-       notify_ctx->addr = talloc_zero(mem_ctx, struct sockaddr);
-       notify_ctx->addr->sa_family = AF_INET;
-       ((struct sockaddr_in *)(notify_ctx->addr))->sin_addr.s_addr = inet_addr(ipaddr);
-retry:
-       if (attempt) port++;
-       ((struct sockaddr_in *)(notify_ctx->addr))->sin_port = htons(port);
-
-       notify_ctx->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
-       if (notify_ctx->fd == -1) {
-               talloc_free(notify_ctx->notifications);
-               talloc_free(notify_ctx->addr);
-               talloc_free(notify_ctx);
-               return NULL;
-       }
-
-       fcntl(notify_ctx->fd, F_SETFL, O_NONBLOCK);
-
-       if (bind(notify_ctx->fd, notify_ctx->addr, sizeof(struct sockaddr)) == -1) {
-               shutdown(notify_ctx->fd, SHUT_RDWR);
-               close(notify_ctx->fd);
-               if (attempt < 3) {
-                       attempt++;
-                       errno = 0;
-                       goto retry;
-               }
-
-               talloc_free(notify_ctx->notifications);
-               talloc_free(notify_ctx->addr);
-               talloc_free(notify_ctx);
-               return NULL;
-       }
-
-       return notify_ctx;
-}
-
-
-/**
-   \details Register for notifications on the server
-   
-   \param session Pointer to the current MAPI session
-   \param notifkey The opaque client-generated context data
-   \param ulEventMask Notification flags. Exchange completely ignores
-   this value and it should be set to 0
-
-   \return NTSTATUS_OK on success, otherwise NT status error
- */
-NTSTATUS emsmdb_register_notification(struct mapi_session *session,
-                                     struct NOTIFKEY *notifkey, 
-                                     uint16_t ulEventMask)
-{
-       struct EcRRegisterPushNotification      request;
-       NTSTATUS                                status;
-       enum MAPISTATUS                         retval;
-       TALLOC_CTX                              *mem_ctx;
-       struct emsmdb_context                   *emsmdb_ctx;
-       struct mapi_notify_ctx                  *notify_ctx;
-       struct policy_handle                    handle;
-       uint32_t                                hNotification = 0;
-
-       /* Sanity Checks*/
-       if (!notifkey) return NT_STATUS_INVALID_PARAMETER;
-
-       emsmdb_ctx = (struct emsmdb_context *)session->emsmdb->ctx;
-       notify_ctx = (struct mapi_notify_ctx *)session->notify_ctx;
-       mem_ctx = talloc_named(NULL, 0, "emsmdb_register_notification");
-
-       request.in.handle = &emsmdb_ctx->handle;
-       request.in.ulEventMask = ulEventMask;
-       request.in.cbContext = notifkey->cb;
-       request.in.rgbContext = talloc_array(mem_ctx, uint8_t, request.in.cbContext);
-       memcpy(request.in.rgbContext, notifkey->ab, request.in.cbContext);
-       request.in.grbitAdviseBits = 0xffffffff;
-       request.in.rgCallbackAddress = talloc_array(mem_ctx, uint8_t, sizeof (struct sockaddr));
-       /* cp address family and length */
-       request.in.rgCallbackAddress[0] = (notify_ctx->addr->sa_family & 0xFF);
-       request.in.rgCallbackAddress[1] = (notify_ctx->addr->sa_family & 0xFF00) >> 8;
-       memcpy(&request.in.rgCallbackAddress[2], notify_ctx->addr->sa_data, 14);
-       request.in.cbCallbackAddress = sizeof (struct sockaddr);
-
-       request.out.handle = &handle;
-       request.out.hNotification = &hNotification;
-
-       status = dcerpc_EcRRegisterPushNotification_r(emsmdb_ctx->rpc_connection->binding_handle, emsmdb_ctx->mem_ctx, &request);
-       retval = request.out.result;
-       if (!NT_STATUS_IS_OK(status) || retval) {
-               talloc_free(mem_ctx);
-               return status;
-       }
-
-       talloc_free(mem_ctx);
-
-       return status;
-}
-
-
-/**
-   \details Retrieves the EMSMDB context server information structure
-
-   \param session pointer to the MAPI session context
-
-   \return the server info structure on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdb_info *emsmdb_get_info(struct mapi_session *session)
-{
-       if (!session->emsmdb->ctx) {
-               return NULL;
-       }
-
-       return &((struct emsmdb_context *)session->emsmdb->ctx)->info;
-}
-
-
-/**
-   \details Free property values retrieved with pull_emsmdb_property
-
-   \param lpProp pointer to SPropValue structure
-   \param data generic pointer to associated lpProp data
-
- */
-void free_emsmdb_property(struct SPropValue *lpProp, void *data)
-{
-       if (!data) return;
-       if (!lpProp) return;
-
-       switch (lpProp->ulPropTag & 0xFFFF) {
-       case PT_I2:
-               talloc_free((uint16_t *)data);
-               break;
-       case PT_ERROR:
-       case PT_LONG:
-               talloc_free((uint32_t *)data);
-               break;
-       case PT_I8:
-               talloc_free((uint64_t *)data);
-               break;
-       case PT_BOOLEAN:
-               talloc_free((uint8_t *)data);
-               break;
-       default:
-               break;
-               
-       }
-}
-
-
-/**
-   \details Retrieves a property value from a DATA blob
-
-   \param mem_ctx pointer to the memory context
-   \param lp_ctx pointer to the loadparm context
-   \param offset pointer on pointer to the current offset
-   \param tag the property tag which value is to be retrieved
-   \param data pointer to the data
-
-   \return pointer on constant generic data on success, otherwise NULL
- */
-const void *pull_emsmdb_property(TALLOC_CTX *mem_ctx,
-                                struct loadparm_context *lp_ctx,
-                                uint32_t *offset, 
-                                enum MAPITAGS tag, 
-                                DATA_BLOB *data)
-{
-       struct ndr_pull                 *ndr;
-       const char                      *pt_string8;
-       const char                      *pt_unicode;
-       uint16_t                        *pt_i2;
-       uint64_t                        *pt_i8;
-       uint32_t                        *pt_long;
-       uint8_t                         *pt_boolean;
-       double                          *pt_double;
-       struct FILETIME                 *pt_filetime;
-       struct GUID                     *pt_clsid;
-       struct SBinary_short            pt_binary;
-       struct Binary_r                 *sbin;
-       struct mapi_SLPSTRArray         pt_slpstr;
-       struct StringArray_r            *slpstr;
-       struct mapi_MV_LONG_STRUCT      pt_MVl;
-       struct LongArray_r              *MVl;
-       struct mapi_SBinaryArray        pt_MVbin;
-       struct BinaryArray_r            *MVbin;
-       uint32_t                        i;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_pull);
-       ndr->offset = *offset;
-       ndr->data = data->data;
-       ndr->data_size = data->length;
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-
-       switch(tag & 0xFFFF) {
-       case PT_I2:
-               pt_i2 = talloc_zero(mem_ctx, uint16_t);
-               ndr_pull_uint16(ndr, NDR_SCALARS, pt_i2);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_i2;
-       case PT_ERROR:
-       case PT_LONG:
-               pt_long = talloc_zero(mem_ctx, uint32_t);
-               ndr_pull_uint32(ndr, NDR_SCALARS, pt_long);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_long;
-       case PT_BOOLEAN:
-               pt_boolean = talloc_zero(mem_ctx, uint8_t);
-               ndr_pull_uint8(ndr, NDR_SCALARS, pt_boolean);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_boolean;
-       case PT_I8:
-               pt_i8 = talloc_zero(mem_ctx, uint64_t);
-               ndr_pull_hyper(ndr, NDR_SCALARS, pt_i8);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_i8;
-       case PT_DOUBLE:
-               pt_double = talloc_zero(mem_ctx, double);
-               ndr_pull_double(ndr, NDR_SCALARS, pt_double);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_double;
-       case PT_UNICODE:
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
-               ndr_pull_string(ndr, NDR_SCALARS, &pt_unicode);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_unicode;
-       case PT_STRING8:
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
-               ndr_pull_string(ndr, NDR_SCALARS, &pt_string8);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_string8;
-       case PT_SYSTIME:
-               pt_filetime = talloc_zero(mem_ctx, struct FILETIME);
-               ndr_pull_hyper(ndr, NDR_SCALARS, (uint64_t *) pt_filetime);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_filetime;
-       case PT_CLSID:
-               pt_clsid = talloc_zero(mem_ctx, struct GUID);
-               ndr_pull_GUID(ndr, NDR_SCALARS, pt_clsid);
-               *offset = ndr->offset;
-               talloc_free(ndr);
-               return (const void *) pt_clsid;
-       case 0xFB:
-       case PT_BINARY:
-               ndr_pull_SBinary_short(ndr, NDR_SCALARS, &pt_binary);
-               *offset = ndr->offset;
-               sbin = talloc_zero(mem_ctx, struct Binary_r);
-               sbin->cb = pt_binary.cb;
-               sbin->lpb = (uint8_t *)talloc_memdup(sbin, pt_binary.lpb, pt_binary.cb);
-               talloc_free(ndr);
-               return (const void *) sbin;
-       case PT_MV_LONG:
-               ndr_pull_mapi_MV_LONG_STRUCT(ndr, NDR_SCALARS, &pt_MVl);
-               *offset = ndr->offset;
-               MVl = talloc_zero(mem_ctx, struct LongArray_r);
-               MVl->cValues = pt_MVl.cValues;
-               MVl->lpl = talloc_array(mem_ctx, uint32_t, pt_MVl.cValues);
-               for (i = 0; i < MVl->cValues; i++) {
-                       MVl->lpl[i] = pt_MVl.lpl[i];
-               }
-               talloc_free(ndr);
-               return (const void *) MVl;
-       case PT_MV_STRING8:
-               ndr_pull_mapi_SLPSTRArray(ndr, NDR_SCALARS, &pt_slpstr);
-               *offset = ndr->offset;
-               slpstr = talloc_zero(mem_ctx, struct StringArray_r);
-               slpstr->cValues = pt_slpstr.cValues;
-               slpstr->lppszA = talloc_array(mem_ctx, const char *, pt_slpstr.cValues);
-               for (i = 0; i < slpstr->cValues; i++) {
-                       slpstr->lppszA[i] = talloc_strdup(mem_ctx, pt_slpstr.strings[i].lppszA);
-               }
-               talloc_free(ndr);
-               return (const void *) slpstr;
-       case PT_MV_BINARY:
-               ndr_pull_mapi_SBinaryArray(ndr, NDR_SCALARS, &pt_MVbin);
-               *offset = ndr->offset;
-               MVbin = talloc_zero(mem_ctx, struct BinaryArray_r);
-               MVbin->cValues = pt_MVbin.cValues;
-               MVbin->lpbin = talloc_array(mem_ctx, struct Binary_r, pt_MVbin.cValues);
-               for (i = 0; i < MVbin->cValues; i++) {
-                       MVbin->lpbin[i].cb = pt_MVbin.bin[i].cb;
-                       MVbin->lpbin[i].lpb = (uint8_t *)talloc_size(mem_ctx, MVbin->lpbin[i].cb);
-                       memcpy(MVbin->lpbin[i].lpb, pt_MVbin.bin[i].lpb, MVbin->lpbin[i].cb);
-               }
-               talloc_free(ndr);
-               return (const void *) MVbin;
-       default:
-               fprintf (stderr, "unhandled type case in pull_emsmdb_property(): 0x%x\n", (tag & 0xFFFF));
-               return NULL;
-       }
-}
-
-
-/**
-   \details Get a SPropValue array from a DATA blob
-
-   \param mem_ctx pointer to the memory context
-   \param lp_ctx pointer to the loadparm context
-   \param content pointer to the DATA blob content
-   \param tags pointer to a list of property tags to lookup
-   \param propvals pointer on pointer to the returned SPropValues
-   \param cn_propvals pointer to the number of propvals
-   \param flag describes the type data
-
-   \return MAPI_E_SUCCESS on success
- */
-enum MAPISTATUS emsmdb_get_SPropValue(TALLOC_CTX *mem_ctx,
-                                     struct loadparm_context *lp_ctx,
-                                     DATA_BLOB *content,
-                                     struct SPropTagArray *tags,
-                                     struct SPropValue **propvals, 
-                                     uint32_t *cn_propvals,
-                                     uint8_t flag)
-{
-       struct SPropValue       *p_propval;
-       uint32_t                i_propval;
-       uint32_t                i_tag;
-       int                     proptag;
-       uint32_t                cn_tags;
-       uint32_t                offset = 0;
-       const void              *data;
-
-       i_propval = 0;
-       cn_tags = tags->cValues;
-       *cn_propvals = 0;
-       *propvals = talloc_array(mem_ctx, struct SPropValue, cn_tags + 1);
-
-       for (i_tag = 0; i_tag < cn_tags; i_tag++) {
-               if (flag) { 
-                       if (((uint8_t)(*(content->data + offset))) == PT_ERROR) {
-                               proptag = (int)tags->aulPropTag[i_tag];
-                               proptag &= 0xFFFF0000;
-                               proptag |= PT_ERROR;
-                               tags->aulPropTag[i_tag] = (enum MAPITAGS) proptag;
-                       }
-                       offset += sizeof (uint8_t);
-               }
-
-               data = pull_emsmdb_property(mem_ctx, lp_ctx, &offset, tags->aulPropTag[i_tag], content);
-               if (data) {
-                       data = talloc_steal(*propvals, data);
-                       p_propval = &((*propvals)[i_propval]);
-                       p_propval->ulPropTag = tags->aulPropTag[i_tag];
-                       p_propval->dwAlignPad = 0x0;
-
-                       set_SPropValue(p_propval, data);
-                       free_emsmdb_property(p_propval, (void *) data);
-                       i_propval++;
-               }
-       }
-
-       (*propvals)[i_propval].ulPropTag = (enum MAPITAGS) 0x0;
-       *cn_propvals = i_propval;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get a SRowSet from a DATA blob
-
-   \param mem_ctx pointer on the memory context
-   \param lp_ctx pointer on the loadparm context
-   \param rowset pointer on the returned SRowSe
-   \param proptags pointer on a list of property tags to lookup
-   \param content pointer on the DATA blob content
-
-   \return MAPI_E_SUCCESS on success
-
-   \note TODO: this doesn't yet handle the TypedPropertyValue and
-   FlaggedPropertyValueWithTypeSpecified variants
- */
-_PUBLIC_ void emsmdb_get_SRowSet(TALLOC_CTX *mem_ctx,
-                                struct loadparm_context *lp_ctx,
-                                struct SRowSet *rowset, 
-                                struct SPropTagArray *proptags, 
-                                DATA_BLOB *content)
-{
-       struct SRow             *rows;
-       struct SPropValue       *lpProps;
-       int                     proptag;
-       uint32_t                idx;
-       uint32_t                prop;
-       uint32_t                offset = 0;
-       const void              *data;
-       uint32_t                row_count;
-       bool                    is_FlaggedPropertyRow = false;
-       bool                    havePropertyValue;
-       uint8_t                 flag;
-
-       /* caller allocated */
-       rows = rowset->aRow;
-       row_count = rowset->cRows;
-
-       for (idx = 0; idx < row_count; idx++) {
-               if (0x1 == *(content->data + offset)) {
-                       is_FlaggedPropertyRow = true;
-               } else {
-                       is_FlaggedPropertyRow = false;
-               }
-               ++offset;
-
-               lpProps = talloc_array(mem_ctx, struct SPropValue, proptags->cValues);
-               for (prop = 0; prop < proptags->cValues; prop++) {
-                       havePropertyValue = true;
-                       lpProps[prop].ulPropTag = proptags->aulPropTag[prop];
-                       if (is_FlaggedPropertyRow) {
-                               flag = (uint8_t)(*(content->data + offset));
-                               ++offset; /* advance offset for the flag */
-                               switch (flag) {
-                               case 0x0:
-                                       /* Property Value is valid */
-                                       break;
-                               case 0x1:
-                                       /* Property Value is not present */
-                                       havePropertyValue = false;
-                                       break;
-                               case PT_ERROR:
-                                       lpProps[prop].ulPropTag = proptags->aulPropTag[prop];
-                                       proptag = (int) lpProps[prop].ulPropTag;
-                                       proptag &= 0xFFFF0000;
-                                       proptag |= PT_ERROR;
-                                       lpProps[prop].ulPropTag = (enum MAPITAGS) proptag;
-                                       break;
-                               default:
-                                       /* unknown FlaggedPropertyValue flag */
-                                       break;
-
-                               }
-                       }
-                       if (havePropertyValue) {
-                               lpProps[prop].dwAlignPad = 0x0;
-                               data = pull_emsmdb_property(mem_ctx, lp_ctx, &offset, lpProps[prop].ulPropTag, content);
-                               talloc_steal(lpProps, data);
-                               set_SPropValue(&lpProps[prop], data);
-                               free_emsmdb_property(&lpProps[prop], (void *) data);
-                       }
-               }
-
-               rows[idx].ulAdrEntryPad = 0;
-               rows[idx].cValues = proptags->cValues;
-               rows[idx].lpProps = lpProps;
-       }
-}
-
-
-/**
-   \details Get a SRow from a DATA blob
-
-   \param mem_ctx pointer on the memory context
-   \param lp_ctx pointer on the loadparm context
-   \param aRow pointer on the returned SRow
-   \param proptags pointer on a list of property tags to lookup
-   \param propcount number of SPropValue entries in aRow
-   \param content pointer on the DATA blob content
-   \param flag the type data
-   \param align alignment pad
-
-   \return MAPI_E_SUCCESS on success
-
-   \note TODO: We shouldn't have any alignment pad here
- */
-void emsmdb_get_SRow(TALLOC_CTX *mem_ctx,
-                    struct loadparm_context *lp_ctx,
-                    struct SRow *aRow, 
-                    struct SPropTagArray *proptags, 
-                    uint16_t propcount, 
-                    DATA_BLOB *content, 
-                    uint8_t flag, 
-                    uint8_t align)
-{
-       uint32_t                i;
-       uint32_t                offset = 0;
-       enum MAPITAGS           aulPropTag = (enum MAPITAGS) 0;
-       int                     proptag;
-       const void              *data;
-
-       aRow->cValues = propcount;
-       aRow->lpProps = talloc_array(mem_ctx, struct SPropValue, propcount);
-
-       for (i = 0; i < propcount; i++) {
-               aulPropTag = proptags->aulPropTag[i];
-               if (flag) {
-                       if (((uint8_t)(*(content->data + offset))) == PT_ERROR) {
-                               proptag = (int) aulPropTag;
-                               proptag &= 0xFFFF0000;
-                               proptag |= 0xA;                 
-                               aulPropTag = (enum MAPITAGS)proptag;
-                       }
-                       offset += align;
-               } 
-
-               data = pull_emsmdb_property(mem_ctx, lp_ctx, &offset, aulPropTag, content);
-               talloc_steal(aRow->lpProps, data);
-               aRow->lpProps[i].ulPropTag = aulPropTag;
-               aRow->lpProps[i].dwAlignPad = 0x0;
-               set_SPropValue(&(aRow->lpProps[i]), data);
-               free_emsmdb_property(&aRow->lpProps[i], (void *) data);
-       }
-       if (align) {
-               offset += align;
-       }
-}
-
-/**
-   \details Get an async notification context handle
-
-   \param emsmdb_ctx pointer to the EMSMDB context
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-enum MAPISTATUS emsmdb_async_connect(struct emsmdb_context *emsmdb_ctx)
-{
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct EcDoAsyncConnectEx       r;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!emsmdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       r.in.handle = &(emsmdb_ctx->handle);
-       r.out.async_handle = &(emsmdb_ctx->async_handle);
-       status = dcerpc_EcDoAsyncConnectEx_r(emsmdb_ctx->rpc_connection->binding_handle, emsmdb_ctx->mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-       
-       return MAPI_E_SUCCESS;
-}
-
-bool server_version_at_least(struct emsmdb_context *ctx, uint16_t major_ver, uint16_t minor_ver, uint16_t major_build, uint16_t minor_build)
-{
-       /* See MS-OXCRPC Section 3.1.9 to understand this */
-       uint16_t normalisedword0;
-       uint16_t normalisedword1;
-       uint16_t normalisedword2;
-       uint16_t normalisedword3;
-
-       if (ctx->info.rgwServerVersion[1] & 0x8000) {
-               /* new format */
-               normalisedword0 = (ctx->info.rgwServerVersion[0] & 0xFF00) >> 8;
-               normalisedword1 = (ctx->info.rgwServerVersion[0] & 0x00FF);
-               normalisedword2 = (ctx->info.rgwServerVersion[1] & 0x7FFF);
-               normalisedword3 = ctx->info.rgwServerVersion[2];
-       } else {
-               normalisedword0 = ctx->info.rgwServerVersion[0];
-               normalisedword1 = 0;
-               normalisedword2 = ctx->info.rgwServerVersion[1];
-               normalisedword3 = ctx->info.rgwServerVersion[2];
-       }
-       if (normalisedword0 < major_ver) {
-               /* the server major version is less than the minimum we wanted */
-               return false;
-       }
-       if (normalisedword0 > major_ver) {
-               /* the server major version is greater than we wanted */
-               return true;
-       }
-       /* the server major number matches the minimum we wanted, so proceed to check further */
-       if (normalisedword1 < minor_ver) {
-               /* major numbers match, but minor version was too low */
-               return false;
-       }
-       if (normalisedword1 > minor_ver) {
-               /* major numbers match, and minor number was greater, so thats enough */
-               return true;
-       }
-       /* both major and minor versions match, start testing build numbers */
-       if (normalisedword2 < major_build) {
-               /* major and minor numbers match, build number less than required */
-               return false;
-       }
-       if (normalisedword2 > major_build) {
-               /* major and minor numbers match, build number was greater */
-               return true;
-       }
-       /* major and minor versions and major build numbers match */
-       if (normalisedword3 < minor_build) {
-               /* not quite high enough */
-               return false;
-       }
-       /* if we get here, then major and minor build numbers match, major build matches
-          and minor build was greater than or equal to that required */
-       return true;
-}
diff --git a/branches/plugfest/libmapi/emsmdb.h b/branches/plugfest/libmapi/emsmdb.h
deleted file mode 100644 (file)
index 3f9a4e6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij 2005.
-   Copyright (C) Julien Kerihuel 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __EMSMDB_H__
-#define        __EMSMDB_H__
-
-struct emsmdb_info {
-       char                    *szDisplayName;
-       char                    *szDNPrefix;
-       uint32_t                pcmsPollsMax;
-       uint32_t                pcRetry;
-       uint32_t                pcmsRetryDelay;
-       uint32_t                picxr;
-       uint16_t                rgwServerVersion[3];
-};
-
-struct emsmdb_context {
-       struct dcerpc_pipe      *rpc_connection;
-       struct policy_handle    handle;
-       struct nspi_context     *nspi;
-       struct cli_credentials  *cred;
-       TALLOC_CTX              *mem_ctx;
-       struct EcDoRpc_MAPI_REQ **cache_requests;
-       uint32_t                cache_size;
-       uint8_t                 cache_count;
-       uint16_t                prop_count;
-       enum MAPITAGS           *properties;
-       uint16_t                max_data;
-       bool                    setup;
-       struct emsmdb_info      info;
-       struct policy_handle    async_handle; ///< The handle to use for Async notification requests
-       struct dcerpc_pipe      *async_rpc_connection;
-};
-
-#define        MAILBOX_PATH    "/o=%s/ou=%s/cn=Recipients/cn=%s"
-
-#endif /* __EMSMDB_H__ */
diff --git a/branches/plugfest/libmapi/freebusy.c b/branches/plugfest/libmapi/freebusy.c
deleted file mode 100644 (file)
index 800ccd2..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <ctype.h>
-#include <time.h>
-
-/**
-   \file freebusy.c
-
-   \brief Convenient API to access FreeBusy
- */
-
-
-/**
-   \details Retrieve FreeBusy data associated with the specified
-   recipient
-
-   \param obj_store pointer to the public folder MAPI object
-   \param recipient name of the recipient to fetch freebusy data
-   \param pSRow pointer to the returned properties
-
-   \note The function returns a SRow structure with the following
-   property tags:
-   -# PR_NORMALIZED_SUBJECT
-   -# PR_FREEBUSY_LAST_MODIFIED
-   -# PR_FREEBUSY_START_RANGE
-   -# PR_FREEBUSY_END_RANGE
-   -# PR_FREEBUSY_ALL_MONTHS
-   -# PR_FREEBUSY_ALL_EVENTS
-   -# PR_FREEBUSY_TENTATIVE_MONTHS
-   -# PR_FREEBUSY_TENTATIVE_EVENTS
-   -# PR_FREEBUSY_BUSY_MONTHS
-   -# PR_FREEBUSY_BUSY_EVENTS
-   -# PR_FREEBUSY_OOF_MONTHS
-   -# PR_FREEBUSY_OOF_EVENTS
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS GetUserFreeBusyData(mapi_object_t *obj_store, 
-                                            const char *recipient,
-                                            struct SRow *pSRow)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_session             *session;
-       mapi_id_t                       id_freebusy;
-       mapi_object_t                   obj_freebusy;
-       mapi_object_t                   obj_exfreebusy;
-       mapi_object_t                   obj_message;
-       mapi_object_t                   obj_htable;
-       mapi_object_t                   obj_ctable;
-       struct SRowSet                  *pRowSet;
-       struct SRowSet                  SRowSet;
-       struct SPropValue               *lpProps;
-       struct mapi_SRestriction        res;
-       struct SSortOrderSet            criteria;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       char                            *message_name;
-       char                            *folder_name;
-       const char                      *email = NULL;
-       char                            *o = NULL;
-       char                            *ou = NULL;
-       char                            *username;
-       const uint64_t                  *fid;
-       const uint64_t                  *mid;
-       uint32_t                        i;
-       uint32_t                        count;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pSRow, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-
-       mem_ctx = (TALLOC_CTX *) session;
-
-       /* Step 0. Retrieve the user Email Address and build FreeBusy strings */
-       pRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = GetABRecipientInfo(session, recipient, NULL, &pRowSet);
-       OPENCHANGE_RETVAL_IF(retval, retval, pRowSet);
-
-       email = (const char *) get_SPropValue_SRowSet_data(pRowSet, PR_EMAIL_ADDRESS_UNICODE);
-       o = x500_get_dn_element(mem_ctx, email, ORG);
-       ou = x500_get_dn_element(mem_ctx, email, ORG_UNIT);
-       username = x500_get_dn_element(mem_ctx, email, "/cn=Recipients/cn=");
-
-       if (!username) {
-               MAPIFreeBuffer(o);
-               MAPIFreeBuffer(ou);
-               MAPIFreeBuffer(pRowSet);
-               
-               return MAPI_E_NOT_FOUND;
-       }
-
-       /* toupper username */
-       for (i = 0; username[i]; i++) {
-               username[i] = toupper((unsigned char)username[i]);
-       }
-
-       message_name = talloc_asprintf(mem_ctx, FREEBUSY_USER, username);
-       folder_name = talloc_asprintf(mem_ctx, FREEBUSY_FOLDER, o, ou);
-
-       MAPIFreeBuffer(username);
-       MAPIFreeBuffer(o);
-       MAPIFreeBuffer(ou);
-       MAPIFreeBuffer(pRowSet);
-
-       /* Step 1. Open the FreeBusy root folder */
-       retval = GetDefaultPublicFolder(obj_store, &id_freebusy, olFolderPublicFreeBusyRoot);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       mapi_object_init(&obj_freebusy);
-       retval = OpenFolder(obj_store, id_freebusy, &obj_freebusy);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 2. Open the hierarchy table */
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_freebusy, &obj_htable, 0, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 3. Customize Hierarchy Table view */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
-                                         PR_FID,
-                                         PR_DISPLAY_NAME);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 4. Find FreeBusy folder row */
-       res.rt = RES_PROPERTY;
-       res.res.resProperty.relop = RELOP_EQ;
-       res.res.resProperty.ulPropTag = PR_DISPLAY_NAME;
-       res.res.resProperty.lpProp.ulPropTag = PR_DISPLAY_NAME;
-       res.res.resProperty.lpProp.value.lpszA = folder_name;
-       retval = FindRow(&obj_htable, &res, BOOKMARK_BEGINNING, DIR_FORWARD, &SRowSet);
-       MAPIFreeBuffer(folder_name);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 5. Open the folder */
-       fid = (const uint64_t *) get_SPropValue_SRowSet_data(&SRowSet, PR_FID);
-       if (!fid || *fid == MAPI_E_NOT_FOUND) return MAPI_E_NOT_FOUND;
-
-       mapi_object_init(&obj_exfreebusy);
-       retval = OpenFolder(&obj_freebusy, *fid, &obj_exfreebusy);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 6. Open the contents table */
-       mapi_object_init(&obj_ctable);
-       retval = GetContentsTable(&obj_exfreebusy, &obj_ctable, 0, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 7. Customize Contents Table view */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x5,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_ADDRBOOK_MID,
-                                         PR_INSTANCE_NUM,
-                                         PR_NORMALIZED_SUBJECT);
-       retval = SetColumns(&obj_ctable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 8. Sort the table */
-       memset(&criteria, 0x0, sizeof (struct SSortOrderSet));
-       criteria.cSorts = 1;
-       criteria.aSort = talloc_array(mem_ctx, struct SSortOrder, criteria.cSorts);
-       criteria.aSort[0].ulPropTag = PR_NORMALIZED_SUBJECT;
-       criteria.aSort[0].ulOrder = TABLE_SORT_ASCEND;
-       retval = SortTable(&obj_ctable, &criteria);
-       MAPIFreeBuffer(criteria.aSort);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 9. Find the user FreeBusy message row */
-       res.rt = RES_PROPERTY;
-       res.res.resProperty.relop = RELOP_EQ;
-       res.res.resProperty.ulPropTag = PR_NORMALIZED_SUBJECT;
-       res.res.resProperty.lpProp.ulPropTag = PR_NORMALIZED_SUBJECT;
-       res.res.resProperty.lpProp.value.lpszA = message_name;
-       retval = FindRow(&obj_ctable, &res, BOOKMARK_BEGINNING, DIR_FORWARD, &SRowSet);
-       MAPIFreeBuffer(message_name);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 10. Open the message */
-       fid = (const uint64_t *)get_SPropValue_SRowSet_data(&SRowSet, PR_FID);  
-       mid = (const uint64_t *)get_SPropValue_SRowSet_data(&SRowSet, PR_MID);
-       OPENCHANGE_RETVAL_IF(!fid || *fid == MAPI_E_NOT_FOUND, MAPI_E_NOT_FOUND, NULL);
-       OPENCHANGE_RETVAL_IF(!mid || *mid == MAPI_E_NOT_FOUND, MAPI_E_NOT_FOUND, NULL);
-
-       mapi_object_init(&obj_message);
-       retval = OpenMessage(obj_store, *fid, *mid, &obj_message, 0x0);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Step 11. Get FreeBusy properties */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xc, 
-                                         PR_NORMALIZED_SUBJECT,
-                                         PR_FREEBUSY_LAST_MODIFIED,
-                                         PR_FREEBUSY_START_RANGE,
-                                         PR_FREEBUSY_END_RANGE,
-                                         PR_FREEBUSY_ALL_MONTHS,
-                                         PR_FREEBUSY_ALL_EVENTS,
-                                         PR_FREEBUSY_TENTATIVE_MONTHS,
-                                         PR_FREEBUSY_TENTATIVE_EVENTS,
-                                         PR_FREEBUSY_BUSY_MONTHS,
-                                         PR_FREEBUSY_BUSY_EVENTS,
-                                         PR_FREEBUSY_OOF_MONTHS,
-                                         PR_FREEBUSY_OOF_EVENTS);
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       pSRow->cValues = count;
-       pSRow->lpProps = lpProps;
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_ctable);
-       mapi_object_release(&obj_exfreebusy);
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&obj_freebusy);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Check if a date conflicts with existing FreeBusy Busy/Out
-   Of Office events
-
-   \param obj_store pointer to the public folder MAPI object
-   \param date pointer to the date to check
-   \param conflict pointer to the returned boolean value
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS IsFreeBusyConflict(mapi_object_t *obj_store,
-                                           struct FILETIME *date,
-                                           bool *conflict)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_session             *session;
-       struct SRow                     aRow;
-       const struct LongArray_r        *all_months;
-       const struct BinaryArray_r      *all_events;
-       struct Binary_r                 bin;
-       const uint32_t                  *publish_start;
-       NTTIME                          nttime;
-       time_t                          time;
-       struct tm                       *tm;
-       uint32_t                        fbusytime;
-       uint32_t                        fmonth;
-       uint32_t                        month;
-       int                             year;
-       uint32_t                        idx;
-       uint32_t                        i;
-       bool                            found = false;
-       uint32_t                        start;
-       uint32_t                        end;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!date, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!conflict, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_store);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_SESSION_LIMIT, NULL);
-
-       *conflict = false;
-
-       /* Step 1. Retrieve the freebusy data for the user */
-       retval = GetUserFreeBusyData(obj_store, session->profile->username, &aRow);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       publish_start = (const uint32_t *) find_SPropValue_data(&aRow, PR_FREEBUSY_START_RANGE);
-       all_months = (const struct LongArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_ALL_MONTHS);
-       all_events = (const struct BinaryArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_ALL_EVENTS);
-
-       if (!all_months || (*(const uint32_t *)all_months) == MAPI_E_NOT_FOUND ||
-           !all_events || (*(const uint32_t *)all_events) == MAPI_E_NOT_FOUND) {
-               return MAPI_E_SUCCESS;
-       }
-
-       /* Step 2. Convert the input date to freebusy */
-       nttime = ((uint64_t) date->dwHighDateTime << 32);
-       nttime |= (uint64_t) date->dwLowDateTime;
-       time = nt_time_to_unix(nttime);
-       tm = localtime(&time);
-
-       fmonth = tm->tm_mon + 1;
-       fbusytime = ((tm->tm_mday - 1) * 60 * 24) + (tm->tm_hour * 60);
-
-       /* Step 3. Check if the years matches */
-       year = GetFreeBusyYear(publish_start);
-
-       if (year != (tm->tm_year + 1900)) {
-               return MAPI_E_SUCCESS;
-       }
-
-       /* Step 4. Check if we have already registered events for the month */
-       
-       for (idx = 0; idx < all_months->cValues; idx++) {
-               month = all_months->lpl[idx] - (year * 16);
-               if (month == fmonth) {
-                       found = true;
-                       break;
-               }
-       }
-       if (found == false) return MAPI_E_SUCCESS;
-
-       /* Step 5. Check if one this months events conflicts with the date */
-       bin = all_events->lpbin[idx];
-       if (bin.cb % 4) {
-               return MAPI_E_INVALID_PARAMETER;
-       }
-
-       for (i = 0; i < bin.cb; i += 4) {
-               start = (bin.lpb[i + 1] << 8) | bin.lpb[i];
-               end = (bin.lpb[i + 3] << 8) | bin.lpb[i + 2];
-               if ((fbusytime >= start) && (fbusytime <= end)) {
-                       *conflict = true;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Return the year associated with the FreeBusy start range
-
-   \param publish_start pointer to the publish start integer
-
-   \return a valid year on success, otherwise 0
- */
-_PUBLIC_ int GetFreeBusyYear(const uint32_t *publish_start)
-{
-       struct tm       *tm;
-       uint32_t        year;
-       time_t          time;
-       NTTIME          nttime;
-
-       if (!publish_start) return 0;
-
-       nttime = *publish_start;
-       nttime *= 60;
-       nttime *= 10000000;
-       time = nt_time_to_unix(nttime);
-       tm = localtime(&time);
-       year = (tm->tm_year + 1900);
-
-       return year;
-}
diff --git a/branches/plugfest/libmapi/fxparser.c b/branches/plugfest/libmapi/fxparser.c
deleted file mode 100644 (file)
index 3cef68f..0000000
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Brad Hards <bradh@frogmouth.net> 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "libmapi/fxparser.h"
-
-#ifdef ENABLE_ASSERTS
-#include <assert.h>
-#define OC_ASSERT(x) assert(x)
-#else
-#define OC_ASSERT(x)
-#endif
-
-/**
-   \file fxparser.c
-
-   \brief Fast Transfer stream parser
- */
-
-static bool pull_uint8_t(struct fx_parser_context *parser, uint8_t *val)
-{
-       if ((parser->idx) + 1 > parser->data.length) {
-               val = 0;
-               return false;
-       }
-       *val = parser->data.data[parser->idx];
-       (parser->idx)++;
-       return true;
-}
-
-static bool pull_uint16_t(struct fx_parser_context *parser, uint16_t *val)
-{
-       if ((parser->idx) + 2 > parser->data.length) {
-               val = 0;
-               return false;
-       }
-       *val = parser->data.data[parser->idx];
-       (parser->idx)++;
-       *val += parser->data.data[parser->idx] << 8;
-       (parser->idx)++;
-       return true;
-}
-
-static bool pull_uint32_t(struct fx_parser_context *parser, uint32_t *val)
-{
-       if ((parser->idx) + 4 > parser->data.length) {
-               val = 0;
-               return false;
-       }
-       *val = parser->data.data[parser->idx];
-       (parser->idx)++;
-       *val += parser->data.data[parser->idx] << 8;
-       (parser->idx)++;
-       *val += parser->data.data[parser->idx] << 16;
-       (parser->idx)++;
-       *val += parser->data.data[parser->idx] << 24;
-       (parser->idx)++;
-       return true;
-}
-
-static bool pull_tag(struct fx_parser_context *parser)
-{
-       bool result;
-       result = pull_uint32_t(parser, &(parser->tag));
-       if (!result) {
-               printf("bad pull of tag\n");
-       }
-       return result;
-}
-
-static bool pull_uint8_data(struct fx_parser_context *parser, uint8_t **data_read)
-{
-       for (; parser->offset < parser->length; ++(parser->offset)) {
-               /* printf("parser %i of %i\n", parser->offset, parser->length); */
-               if (!pull_uint8_t(parser, (uint8_t*)&((*data_read)[parser->offset]))) {
-                       return false;
-               }
-       }
-       return true;
-}
-
-static bool pull_int64_t(struct fx_parser_context *parser, int64_t *val)
-{
-       int64_t tmp;
-       if ((parser->idx) + 8 > parser->data.length) {
-               *val = 0;
-               return false;
-       }
-       *val = parser->data.data[parser->idx];
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 8);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 16);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 24);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 32);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 40);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 48);
-       (parser->idx)++;
-
-       tmp = parser->data.data[parser->idx];
-       *val += (tmp << 56);
-       (parser->idx)++;
-
-       return true;
-}
-
-static bool pull_double(struct fx_parser_context *parser, double *val)
-{
-       return pull_int64_t(parser, (int64_t *)val);
-}
-
-static bool pull_guid(struct fx_parser_context *parser, struct GUID *guid)
-{
-       int i;
-
-       if ((parser->idx) + 16 > parser->data.length) {
-               GUID_all_zero(guid);
-               return false;
-       }
-       pull_uint32_t(parser, &(guid->time_low));
-       pull_uint16_t(parser, &(guid->time_mid));
-       pull_uint16_t(parser, &(guid->time_hi_and_version));
-       pull_uint8_t(parser, &(guid->clock_seq[0]));
-       pull_uint8_t(parser, &(guid->clock_seq[1]));
-       for (i = 0; i < 6; ++i) {
-               pull_uint8_t(parser, &(guid->node[i]));
-       }
-       return true;
-}
-
-static bool fetch_ucs2_data(struct fx_parser_context *parser, uint32_t numbytes, smb_ucs2_t **data_read)
-{
-       if ((parser->idx) + numbytes > parser->data.length) {
-               // printf("insufficient data in fetch_ucs2_data (%i requested, %zi available)\n", numbytes, (parser->data.length - parser->idx));
-               return false;
-       }
-
-       *data_read = talloc_array(parser->mem_ctx, smb_ucs2_t, numbytes/2);
-       memcpy(*data_read, &(parser->data.data[parser->idx]), numbytes);
-       parser->idx += numbytes;
-       return true;
-}
-
-static bool fetch_ucs2_nullterminated(struct fx_parser_context *parser, smb_ucs2_t **data_read)
-{
-       uint32_t idx_local = parser->idx;
-       while (idx_local < parser->data.length -1) {
-               smb_ucs2_t val = 0x0000;
-               val += parser->data.data[idx_local];
-               idx_local++;
-               val += parser->data.data[idx_local] << 8;
-               idx_local++;
-               if (val == 0x0000) {
-                       break;
-               }
-       }
-       return fetch_ucs2_data(parser, idx_local-(parser->idx), data_read); 
-}
-
-/*
- pull a property value from the blob, starting at position idx
-*/
-static bool fetch_property_value(struct fx_parser_context *parser, DATA_BLOB *buf, struct SPropValue *prop, uint32_t *len)
-{
-       switch(prop->ulPropTag & 0xFFFF) {
-       case PT_SHORT:
-       {
-               pull_uint16_t(parser, &(prop->value.i));
-               break;
-       }
-       case PT_LONG:
-       {
-               pull_uint32_t(parser, &(prop->value.l));
-               break;
-       }
-       case PT_DOUBLE:
-       {
-               pull_double(parser, (double *)&(prop->value.dbl));
-               break;
-       }
-       case PT_BOOLEAN:
-       {
-               pull_uint8_t(parser, &(prop->value.b));
-               /* special case for fast transfer, 2 bytes instead of one */
-               (parser->idx)++;
-               break;
-       }
-       case PT_I8:
-       {
-               int64_t val;
-               pull_int64_t(parser, &(val));
-               prop->value.d = val;
-               break;
-       }
-       case PT_STRING8:
-       {
-               char *ptr = 0;
-               if (parser->length == 0) {
-                       pull_uint32_t(parser, &(parser->length));
-                       parser->offset = 0;
-                       prop->value.lpszA = talloc_array(parser->mem_ctx, char, parser->length + 1);
-               }
-               for (; parser->offset < parser->length; ++(parser->offset)) {
-                       if (!pull_uint8_t(parser, (uint8_t*)&(prop->value.lpszA[parser->offset]))) {
-                               return false;
-                       }
-               }
-               ptr = (char*)prop->value.lpszA;
-               ptr += parser->length;
-               *ptr = '\0';
-               break;
-       }
-       case PT_UNICODE:
-       {
-               /* TODO: rethink this to handle split buffers */
-               smb_ucs2_t *ucs2_data = NULL;
-               if (parser->length == 0) {
-                       pull_uint32_t(parser, &(parser->length));
-                       ucs2_data = talloc_array(parser->mem_ctx, smb_ucs2_t, parser->length/2);
-                       parser->offset = 0;
-               }
-               char *utf8_data = NULL;
-               size_t utf8_len;
-               if (!fetch_ucs2_data(parser, parser->length, &ucs2_data)) {
-                       return false;
-               }
-               pull_ucs2_talloc(parser->mem_ctx, &utf8_data, ucs2_data, &utf8_len);
-               prop->value.lpszW = utf8_data;
-               break;
-       }
-       case PT_SYSTIME:
-       {
-               struct FILETIME filetime = {0,0};
-               pull_uint32_t(parser, &(filetime.dwLowDateTime));
-               pull_uint32_t(parser, &(filetime.dwHighDateTime));
-               prop->value.ft = filetime;
-               break;
-       }
-       case PT_CLSID:
-       {
-               int i = 0;
-               prop->value.lpguid = talloc_zero(parser->mem_ctx, struct FlatUID_r);
-               for (i = 0; i < 16; ++i) {
-                       pull_uint8_t(parser, &(prop->value.lpguid->ab[i]));
-               }
-               break;
-       }
-       case PT_SVREID:
-       case PT_BINARY:
-       {
-               if (parser->length == 0) {
-                         pull_uint32_t(parser, &(prop->value.bin.cb));
-                         parser->length = prop->value.bin.cb;
-                         prop->value.bin.lpb = talloc_array(parser->mem_ctx, uint8_t, parser->length + 1);
-                         parser->offset = 0;
-               }
-               if (!pull_uint8_data(parser, &(prop->value.bin.lpb))) {
-                       return false;
-               }
-               break;
-       }
-       case PT_OBJECT:
-       {
-               pull_uint32_t(parser, &(prop->value.object));
-               break;
-       }
-       case PT_MV_BINARY:
-       {
-               /* TODO: handle partial count / length */
-               uint32_t        i;
-               pull_uint32_t(parser, &(prop->value.MVbin.cValues));
-               prop->value.MVbin.lpbin = talloc_array(parser->mem_ctx, struct Binary_r, prop->value.MVbin.cValues);
-               for (i = 0; i < prop->value.MVbin.cValues; i++) {
-                       pull_uint32_t(parser, &(prop->value.MVbin.lpbin[i].cb));
-                       parser->length = prop->value.MVbin.lpbin[i].cb;
-                       prop->value.MVbin.lpbin[i].lpb = talloc_array(parser->mem_ctx, uint8_t, parser->length + 1);
-                       parser->offset = 0;
-                       if (!pull_uint8_data(parser, &(prop->value.MVbin.lpbin[i].lpb))) {
-                               return false;
-                       }
-               }
-               break;
-       }
-       default:
-               printf("unhandled conversion case in fetch_property_value(): 0x%x\n", (prop->ulPropTag & 0xFFFF));
-               OPENCHANGE_ASSERT();
-       }
-       return true;
-}
-
-static void pull_named_property(struct fx_parser_context *parser)
-{
-       uint8_t type = 0;
-       pull_guid(parser, &(parser->namedprop.lpguid));
-       /* printf("guid       : %s\n", GUID_string(parser->mem_ctx, &(parser->namedprop.lpguid))); */
-       pull_uint8_t(parser, &type);
-       if (type == 0) {
-               parser->namedprop.ulKind = MNID_ID;
-               pull_uint32_t(parser, &(parser->namedprop.kind.lid));
-               /* printf("LID dispid: 0x%08x\n", parser->namedprop.kind.lid); */
-       } else if (type == 1) {
-               smb_ucs2_t *ucs2_data = NULL;
-               size_t utf8_len;
-               parser->namedprop.ulKind = MNID_STRING;
-               fetch_ucs2_nullterminated(parser, &ucs2_data);
-               pull_ucs2_talloc(parser->mem_ctx, (char**)&(parser->namedprop.kind.lpwstr.Name), ucs2_data, &(utf8_len));
-               parser->namedprop.kind.lpwstr.NameSize = utf8_len;
-               /* printf("named: %s\n", parser->namedprop.kind.lpwstr.Name); */
-       } else {
-               printf("unknown named property kind: 0x%02x\n", parser->namedprop.ulKind);
-               OPENCHANGE_ASSERT();
-       }
-       if (parser->op_namedprop) {
-               parser->op_namedprop(parser->lpProp.ulPropTag, parser->namedprop, parser->priv);
-       }
-}
-
-/**
-  \details set a callback function for marker output
-*/
-_PUBLIC_ void fxparser_set_marker_callback(struct fx_parser_context *parser, fxparser_marker_callback_t marker_callback)
-{
-       parser->op_marker = marker_callback;
-}
-
-/**
-  \details set a callback function for delete properties output
-*/
-_PUBLIC_ void fxparser_set_delprop_callback(struct fx_parser_context *parser, fxparser_delprop_callback_t delprop_callback)
-{
-       parser->op_delprop = delprop_callback;
-}
-
-/**
-  \details set a callback function for named properties output
-*/
-_PUBLIC_ void fxparser_set_namedprop_callback(struct fx_parser_context *parser, fxparser_namedprop_callback_t namedprop_callback)
-{
-       parser->op_namedprop = namedprop_callback;
-}
-
-/**
-  \details set a callback function for property output
-*/
-_PUBLIC_ void fxparser_set_property_callback(struct fx_parser_context *parser, fxparser_property_callback_t property_callback)
-{
-       parser->op_property = property_callback;
-}
-
-/**
-  \details initialise a fast transfer parser
-*/
-_PUBLIC_ struct fx_parser_context* fxparser_init(TALLOC_CTX *mem_ctx, void *priv)
-{
-       struct fx_parser_context *parser = talloc_zero(mem_ctx, struct fx_parser_context);
-
-       parser->mem_ctx = mem_ctx;
-       parser->data = data_blob_talloc_named(parser->mem_ctx, NULL, 0, "fast transfer parser");
-       parser->state = ParserState_Entry;
-       parser->idx = 0;
-       parser->lpProp.ulPropTag = (enum MAPITAGS) 0;
-       parser->lpProp.dwAlignPad = 0;
-       parser->lpProp.value.l = 0;
-       parser->length = 0;
-       parser->priv = priv;
-
-       return parser;
-}
-
-/**
-  \details parse a fast transfer buffer
-*/
-_PUBLIC_ void fxparser_parse(struct fx_parser_context *parser, DATA_BLOB *fxbuf)
-{
-       data_blob_append(parser->mem_ctx, &(parser->data), fxbuf->data, fxbuf->length);
-       parser->enough_data = true;
-       while((parser->idx < parser->data.length) && parser->enough_data) {
-               switch(parser->state) {
-                       case ParserState_Entry:
-                       {
-                               pull_tag(parser);
-                               /* printf("tag: 0x%08x\n", parser->tag); */
-                               parser->state = ParserState_HaveTag;
-                               break;
-                       }
-                       case ParserState_HaveTag:
-                       {
-                               switch (parser->tag) {
-                                       case PR_START_TOP_FLD:
-                                       case PR_START_SUB_FLD:
-                                       case PR_END_FOLDER:
-                                       case PR_START_MESSAGE:
-                                       case PR_START_FAI_MSG:
-                                       case PR_END_MESSAGE:
-                                       case PR_START_RECIP:
-                                       case PR_END_RECIP:
-                                       case PR_NEW_ATTACH:
-                                       case PR_END_ATTACH:
-                                       case PR_START_EMBED:
-                                       case PR_END_EMBED:
-                                               if (parser->op_marker) {
-                                                       parser->op_marker(parser->tag, parser->priv);
-                                               }
-                                               parser->state = ParserState_Entry;
-                                               break;
-                                       case PR_FX_DEL_PROP:
-                                       {
-                                               uint32_t tag;
-                                               if (pull_uint32_t(parser, &tag)) {
-                                                       if (parser->op_delprop) {
-                                                               parser->op_delprop(tag, parser->priv);
-                                                       }
-                                                       parser->state = ParserState_Entry;
-                                               } else {
-                                                       parser->enough_data = false;
-                                               }
-                                               break;
-                                       }
-                                       default:
-                                       {
-                                               /* standard property thing */
-                                         parser->lpProp.ulPropTag = (enum MAPITAGS) parser->tag;
-                                               parser->lpProp.dwAlignPad = 0;
-                                               if ((parser->lpProp.ulPropTag >> 16) & 0x8000) {
-                                                       /* this is a named property */
-                                                       // printf("tag: 0x%08x\n", parser->tag);
-                                                       // TODO: this should probably be a separate parser state
-                                                       // TODO: this needs to return the named property
-                                                       pull_named_property(parser);
-                                               }
-                                               parser->state = ParserState_HavePropTag;
-                                       }
-                               }
-                               break;
-                       }
-                       case ParserState_HavePropTag:
-                       {
-                               if (fetch_property_value(parser, &(parser->data), &(parser->lpProp), &(parser->length))) {
-                                       // printf("position %i of %zi\n", parser->idx, parser->data.length);
-                                       if (parser->op_property) {
-                                               parser->op_property(parser->lpProp, parser->priv);
-                                       }
-                                       parser->state = ParserState_Entry;
-                                       parser->length = 0;
-                               } else {
-                                       parser->enough_data = false;
-                               }
-                               break;
-                       }
-               }
-       }
-       {
-               // Remove the part of the buffer that we've used
-               uint32_t remainder_len = parser->data.length - parser->idx;
-               DATA_BLOB remainder = data_blob_talloc_named(parser->mem_ctx, &(parser->data.data[parser->idx]), remainder_len, "fast transfer parser");
-               data_blob_free(&(parser->data));
-               parser->data = remainder;
-               parser->idx = 0;
-       }
-}
diff --git a/branches/plugfest/libmapi/fxparser.h b/branches/plugfest/libmapi/fxparser.h
deleted file mode 100644 (file)
index b5436b6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __LIBMAPI_FXPARSER_H__
-#define __LIBMAPI_FXPARSER_H__
-
-/* This header is private to the parser. If you use this directly, you may suffer API or ABI breakage.
-   
-   We mean it.
-*/
-
-enum fx_parser_state { ParserState_Entry, ParserState_HaveTag, ParserState_HavePropTag };
-
-struct fx_parser_context {
-       TALLOC_CTX              *mem_ctx;
-       DATA_BLOB               data;   /* the data we have (so far) to parse */
-       uint32_t                idx;    /* where we are up to in the data blob */
-       enum fx_parser_state    state;
-       struct SPropValue       lpProp;         /* the current property tag and value we are parsing */
-       struct MAPINAMEID       namedprop;      /* the current named property we are parsing */
-       uint32_t                length;         /* the total length of the property we're parsing (for variable length props such as strings */
-       uint32_t                offset;         /* the current offset in the variable length property (how much of the length do we already have */
-       bool                    enough_data;
-       uint32_t                tag;
-       void                    *priv;
-       
-       /* callbacks for parser actions */
-       enum MAPISTATUS (*op_marker)(uint32_t, void *);
-       enum MAPISTATUS (*op_delprop)(uint32_t, void *);
-       enum MAPISTATUS (*op_namedprop)(uint32_t, struct MAPINAMEID, void *);
-       enum MAPISTATUS (*op_property)(struct SPropValue, void *);
-};
-
-#endif
diff --git a/branches/plugfest/libmapi/libmapi.h b/branches/plugfest/libmapi/libmapi.h
deleted file mode 100644 (file)
index 8bdf33c..0000000
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-   libmapi public header file
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __LIBMAPI_H__
-#define __LIBMAPI_H__
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-
-/* Samba4 includes */
-#include <talloc.h>
-#include <dcerpc.h>
-#include <util/debug.h>
-#include <tevent.h>
-#include <param.h>
-#include <dlinklist.h>
-
-/* OpenChange includes */
-#include <gen_ndr/exchange.h>
-#include <gen_ndr/property.h>
-
-#include "libmapi/version.h"
-#include "libmapi/nspi.h"
-#include "libmapi/emsmdb.h"
-#include "libmapi/mapi_context.h"
-#include "libmapi/mapi_provider.h"
-#include "libmapi/mapi_object.h"
-#include "libmapi/mapi_id_array.h"
-#include "libmapi/mapi_notification.h"
-#include "libmapi/mapi_profile.h"
-#include "libmapi/mapi_nameid.h"
-#include "libmapi/mapidefs.h"
-#include "libmapi/mapicode.h"
-#include "libmapi/socket/netif.h"
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
-__BEGIN_DECLS
-
-/* The following public definitions come from libmapi/nspi.c */
-struct nspi_context    *nspi_bind(TALLOC_CTX *, struct dcerpc_pipe *, struct cli_credentials *, uint32_t, uint32_t, uint32_t);
-enum MAPISTATUS                nspi_unbind(struct nspi_context *);
-enum MAPISTATUS                nspi_UpdateStat(struct nspi_context *, TALLOC_CTX *, uint32_t *);
-enum MAPISTATUS                nspi_QueryRows(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct SPropTagArray *, uint32_t, struct SRowSet **);
-enum MAPISTATUS                nspi_SeekEntries(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropValue *, struct SPropTagArray *, struct SPropTagArray *, struct SRowSet **);
-enum MAPISTATUS                nspi_GetMatches(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct Restriction_r *, struct SRowSet **, struct SPropTagArray **);
-enum MAPISTATUS                nspi_ResortRestriction(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropTagArray *, struct SPropTagArray **);
-enum MAPISTATUS                nspi_DNToMId(struct nspi_context *, TALLOC_CTX *, struct StringsArray_r *, struct SPropTagArray **);
-enum MAPISTATUS                nspi_GetPropList(struct nspi_context *, TALLOC_CTX *, bool, uint32_t, struct SPropTagArray **);
-enum MAPISTATUS                nspi_GetProps(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct SPropTagArray *, struct SRowSet **);
-enum MAPISTATUS                nspi_CompareMIds(struct nspi_context *, TALLOC_CTX *, uint32_t, uint32_t, uint32_t *);
-enum MAPISTATUS                nspi_ModProps(struct nspi_context *, TALLOC_CTX *, uint32_t, struct SPropTagArray *, struct SRow *);
-enum MAPISTATUS                nspi_GetSpecialTable(struct nspi_context *, TALLOC_CTX *, uint32_t, struct SRowSet **);
-enum MAPISTATUS                nspi_GetTemplateInfo(struct nspi_context *, TALLOC_CTX *, uint32_t, uint32_t, char *, struct SRow **);
-enum MAPISTATUS                nspi_ModLinkAtt(struct nspi_context *, bool, uint32_t, uint32_t, struct BinaryArray_r *);
-enum MAPISTATUS                nspi_QueryColumns(struct nspi_context *, TALLOC_CTX *, bool, struct SPropTagArray **);
-enum MAPISTATUS                nspi_GetNamesFromIDs(struct nspi_context *, TALLOC_CTX *, struct FlatUID_r *, struct SPropTagArray *, struct SPropTagArray **, struct PropertyNameSet_r **);
-enum MAPISTATUS                nspi_GetIDsFromNames(struct nspi_context *, TALLOC_CTX *, bool, uint32_t, struct PropertyName_r *, struct SPropTagArray **);
-enum MAPISTATUS                nspi_ResolveNames(struct nspi_context *, TALLOC_CTX *, const char **, struct SPropTagArray *, struct SRowSet ***, struct PropertyTagArray_r ***);
-enum MAPISTATUS                nspi_ResolveNamesW(struct nspi_context *, TALLOC_CTX *, const char **, struct SPropTagArray *, struct SRowSet ***, struct PropertyTagArray_r ***);
-
-/* The following public definitions come from libmapi/emsmdb.c */
-NTSTATUS               emsmdb_transaction_null(struct emsmdb_context *, struct mapi_response **);
-NTSTATUS               emsmdb_transaction(struct emsmdb_context *, TALLOC_CTX *, struct mapi_request *, struct mapi_response **);
-NTSTATUS               emsmdb_transaction_ext2(struct emsmdb_context *, TALLOC_CTX *, struct mapi_request *, struct mapi_response **);
-NTSTATUS               emsmdb_transaction_wrapper(struct mapi_session *, TALLOC_CTX *, struct mapi_request *, struct mapi_response **);
-struct emsmdb_info     *emsmdb_get_info(struct mapi_session *);
-void                   emsmdb_get_SRowSet(TALLOC_CTX *, struct loadparm_context *, struct SRowSet *, struct SPropTagArray *, DATA_BLOB *);
-
-/* The following public definitions come from libmapi/cdo_mapi.c */
-enum MAPISTATUS                MapiLogonEx(struct mapi_context *, struct mapi_session **, const char *, const char *);
-enum MAPISTATUS                MapiLogonProvider(struct mapi_context *, struct mapi_session **, const char *, const char *, enum PROVIDER_ID);
-enum MAPISTATUS                MAPIInitialize(struct mapi_context **, const char *);
-void                   MAPIUninitialize(struct mapi_context *);
-enum MAPISTATUS                SetMAPIDumpData(struct mapi_context *, bool);
-enum MAPISTATUS                SetMAPIDebugLevel(struct mapi_context *, uint32_t);
-enum MAPISTATUS                GetLoadparmContext(struct mapi_context *, struct loadparm_context **);
-
-/* The following public definitions come from libmapi/simple_mapi.c */
-enum MAPISTATUS                GetDefaultPublicFolder(mapi_object_t *, uint64_t *, const uint32_t);
-enum MAPISTATUS                GetDefaultFolder(mapi_object_t *, uint64_t *, const uint32_t);
-bool                   IsMailboxFolder(mapi_object_t *, uint64_t, uint32_t *);
-enum MAPISTATUS                GetFolderItemsCount(mapi_object_t *, uint32_t *, uint32_t *);
-enum MAPISTATUS                AddUserPermission(mapi_object_t *, const char *, enum ACLRIGHTS);
-enum MAPISTATUS                ModifyUserPermission(mapi_object_t *, const char *, enum ACLRIGHTS);
-enum MAPISTATUS                RemoveUserPermission(mapi_object_t *, const char *);
-enum MAPISTATUS                GetBestBody(mapi_object_t *, uint8_t *);
-
-/* The following public definitions come from auto-generated libmapi/mapitags.c */
-const char             *get_proptag_name(uint32_t);
-uint32_t               get_proptag_value(const char *);
-
-/* The following public definitions come from auto-generated libmapi/mapicode.c */
-void                   mapi_errstr(const char *, enum MAPISTATUS);
-const char             *mapi_get_errstr(enum MAPISTATUS);
-
-/* The following public definitions come from libmapi/codepage_lcid.c */
-char                   *mapi_get_system_locale(void);
-bool                   mapi_verify_cpid(uint32_t);
-uint32_t               mapi_get_cpid_from_lcid(uint32_t);
-uint32_t               mapi_get_cpid_from_locale(const char *);
-uint32_t               mapi_get_cpid_from_language(const char *);
-uint32_t               mapi_get_lcid_from_locale(const char *);
-uint32_t               mapi_get_lcid_from_language(const char *);
-const char             *mapi_get_locale_from_lcid(uint32_t);
-const char             *mapi_get_locale_from_language(const char *);
-const char             *mapi_get_language_from_locale(const char *);
-const char             *mapi_get_language_from_lcid(uint32_t);
-char                   **mapi_get_language_from_group(TALLOC_CTX *, uint32_t);
-
-/* The following public definitions come from libmapi/mapidump.c */
-void                   mapidump_SPropValue(struct SPropValue, const char *);
-void                   mapidump_SPropTagArray(struct SPropTagArray *);
-void                   mapidump_SRowSet(struct SRowSet *, const char *);
-void                   mapidump_SRow(struct SRow *, const char *);
-void                   mapidump_PAB_entry(struct SRow *);
-void                   mapidump_Recipients(const char **, struct SRowSet *, struct SPropTagArray *);
-void                   mapidump_date(struct mapi_SPropValue_array *, uint32_t, const char *);
-void                   mapidump_date_SPropValue(struct SPropValue, const char *, const char *);
-void                   mapidump_message_summary(mapi_object_t *);
-void                   mapidump_message(struct mapi_SPropValue_array *, const char *, mapi_object_t *);
-void                   mapidump_appointment(struct mapi_SPropValue_array *, const char *);
-void                   mapidump_contact(struct mapi_SPropValue_array *, const char *);
-const char             *get_task_status(uint32_t);
-const char             *get_importance(uint32_t);
-void                   mapidump_task(struct mapi_SPropValue_array *, const char *);
-void                   mapidump_note(struct mapi_SPropValue_array *, const char *);
-void                   mapidump_msgflags(uint32_t, const char *);
-void                   mapidump_newmail(struct NewMailNotification *, const char *);
-void                   mapidump_tags(enum MAPITAGS *, uint16_t, const char *);
-void                   mapidump_foldercreated(struct FolderCreatedNotification *, const char *);
-void                   mapidump_folderdeleted(struct FolderDeletedNotification *, const char *);
-void                   mapidump_foldermoved(struct FolderMoveCopyNotification *, const char *);
-void                   mapidump_foldercopied(struct FolderMoveCopyNotification *, const char *);
-void                   mapidump_messagedeleted(struct MessageDeletedNotification *, const char *);
-void                   mapidump_messagecreated(struct MessageCreatedNotification *, const char *);
-void                   mapidump_messagemodified(struct MessageModifiedNotification *, const char *);
-void                   mapidump_messagemoved(struct MessageMoveCopyNotification *, const char *);
-void                   mapidump_messagecopied(struct MessageMoveCopyNotification *, const char *);
-const char             *mapidump_freebusy_month(uint32_t, uint32_t);
-uint32_t               mapidump_freebusy_year(uint32_t, uint32_t);
-void                   mapidump_freebusy_date(uint32_t, const char *);
-void                   mapidump_freebusy_event(struct Binary_r *, uint32_t, uint32_t, const char *);
-void                   mapidump_languages_list(void);
-
-/* The following public definitions come from libmapi/mapi_object.c */
-enum MAPISTATUS                mapi_object_init(mapi_object_t *);
-void                   mapi_object_release(mapi_object_t *);
-enum MAPISTATUS                mapi_object_copy(mapi_object_t *, mapi_object_t *);
-struct mapi_session    *mapi_object_get_session(mapi_object_t *);
-void                   mapi_object_set_session(mapi_object_t *, struct mapi_session *);
-mapi_id_t              mapi_object_get_id(mapi_object_t *);
-void                   mapi_object_set_logon_id(mapi_object_t *, uint8_t);
-enum MAPISTATUS                mapi_object_get_logon_id(mapi_object_t *, uint8_t *);
-void                   mapi_object_set_logon_store(mapi_object_t *);
-void                   mapi_object_debug(mapi_object_t *);
-enum MAPISTATUS                mapi_object_bookmark_get_count(mapi_object_t *, uint32_t *);
-enum MAPISTATUS                mapi_object_bookmark_debug(mapi_object_t *);
-
-/* The following public definitions come from libmapi/mapi_id_array.c */
-enum MAPISTATUS                mapi_id_array_init(struct mapi_context *, mapi_id_array_t *);
-enum MAPISTATUS                mapi_id_array_release(mapi_id_array_t *);
-enum MAPISTATUS                mapi_id_array_get(TALLOC_CTX *, mapi_id_array_t *, mapi_id_t **);
-enum MAPISTATUS                mapi_id_array_add_obj(mapi_id_array_t *, mapi_object_t *);
-enum MAPISTATUS                mapi_id_array_add_id(mapi_id_array_t *, mapi_id_t);
-enum MAPISTATUS                mapi_id_array_del_id(mapi_id_array_t *, mapi_id_t);
-enum MAPISTATUS                mapi_id_array_del_obj(mapi_id_array_t *, mapi_object_t *);
-
-/* The following public definitions come from libmapi/mapi_nameid.c */
-struct mapi_nameid     *mapi_nameid_new(TALLOC_CTX *);
-enum MAPISTATUS                mapi_nameid_OOM_add(struct mapi_nameid *, const char *, const char *);
-enum MAPISTATUS                mapi_nameid_lid_add(struct mapi_nameid *, uint16_t, const char *);
-enum MAPISTATUS                mapi_nameid_string_add(struct mapi_nameid *, const char *, const char *);
-enum MAPISTATUS                mapi_nameid_custom_lid_add(struct mapi_nameid *, uint16_t, uint16_t, const char *);
-enum MAPISTATUS                mapi_nameid_custom_string_add(struct mapi_nameid *, const char *, uint16_t, const char *);
-enum MAPISTATUS                mapi_nameid_canonical_add(struct mapi_nameid *, uint32_t);
-enum MAPISTATUS                mapi_nameid_property_lookup(uint32_t);
-enum MAPISTATUS                mapi_nameid_OOM_lookup(const char *, const char *, uint16_t *);
-enum MAPISTATUS                mapi_nameid_lid_lookup(uint16_t, const char *, uint16_t *);
-enum MAPISTATUS                mapi_nameid_string_lookup(const char *, const char *, uint16_t *);
-enum MAPISTATUS                mapi_nameid_SPropTagArray(struct mapi_nameid *, struct SPropTagArray *);
-enum MAPISTATUS                mapi_nameid_map_SPropTagArray(struct mapi_nameid *, struct SPropTagArray *, struct SPropTagArray *);
-enum MAPISTATUS                mapi_nameid_unmap_SPropTagArray(struct mapi_nameid *, struct SPropTagArray *);
-enum MAPISTATUS                mapi_nameid_map_SPropValue(struct mapi_nameid *, struct SPropValue *, uint32_t, struct SPropTagArray *);
-enum MAPISTATUS                mapi_nameid_unmap_SPropValue(struct mapi_nameid *, struct SPropValue *, uint32_t);
-enum MAPISTATUS                mapi_nameid_lookup_SPropTagArray(struct mapi_nameid *, struct SPropTagArray *);
-enum MAPISTATUS                mapi_nameid_lookup_SPropValue(struct mapi_nameid *, struct SPropValue *, unsigned long);
-enum MAPISTATUS                mapi_nameid_GetIDsFromNames(struct mapi_nameid *, mapi_object_t *, struct SPropTagArray *);
-
-/* The following public definitions come from libmapi/property.c */
-struct SPropTagArray   *set_SPropTagArray(TALLOC_CTX *, uint32_t, ...);
-enum MAPISTATUS                SPropTagArray_add(TALLOC_CTX *, struct SPropTagArray *, enum MAPITAGS);
-const void             *get_SPropValue(struct SPropValue *, enum MAPITAGS);
-struct SPropValue      *get_SPropValue_SRowSet(struct SRowSet *, uint32_t);
-const void             *get_SPropValue_SRowSet_data(struct SRowSet *, uint32_t);
-enum MAPISTATUS                set_default_error_SPropValue_SRow(struct SRow *, enum MAPITAGS, void *);
-struct SPropValue      *get_SPropValue_SRow(struct SRow *, uint32_t);
-const void             *get_SPropValue_SRow_data(struct SRow *, uint32_t);
-const void             *find_SPropValue_data(struct SRow *, uint32_t);
-const void             *find_mapi_SPropValue_data(struct mapi_SPropValue_array *, uint32_t);
-const void             *get_mapi_SPropValue_data(struct mapi_SPropValue *);
-const void             *get_SPropValue_data(struct SPropValue *);
-bool                   set_SPropValue_proptag(struct SPropValue *, enum MAPITAGS, const void *);
-struct SPropValue      *add_SPropValue(TALLOC_CTX *, struct SPropValue *, uint32_t *, enum MAPITAGS, const void *);
-bool                   set_SPropValue(struct SPropValue *, const void *);
-uint32_t               get_mapi_property_size(struct mapi_SPropValue *);
-uint32_t               cast_mapi_SPropValue(TALLOC_CTX *, struct mapi_SPropValue *, struct SPropValue *);
-uint32_t               cast_SPropValue(TALLOC_CTX *, struct mapi_SPropValue *, struct SPropValue *);
-enum MAPISTATUS                SRow_addprop(struct SRow *, struct SPropValue);
-uint32_t               SRowSet_propcpy(TALLOC_CTX *, struct SRowSet *, struct SPropValue);
-void                   mapi_SPropValue_array_named(mapi_object_t *, struct mapi_SPropValue_array *);
-enum MAPISTATUS                get_mapi_SPropValue_array_date_timeval(struct timeval *, struct mapi_SPropValue_array *, uint32_t);
-enum MAPISTATUS                get_mapi_SPropValue_date_timeval(struct timeval *t, struct SPropValue);
-bool                   set_SPropValue_proptag_date_timeval(struct SPropValue *, enum MAPITAGS, const struct timeval *);
-struct RecurrencePattern *get_RecurrencePattern(TALLOC_CTX *, struct Binary_r *);
-struct AppointmentRecurrencePattern *get_AppointmentRecurrencePattern(TALLOC_CTX *mem_ctx, struct Binary_r *);
-struct TimeZoneStruct  *get_TimeZoneStruct(TALLOC_CTX *, struct Binary_r *);
-struct GlobalObjectId  *get_GlobalObjectId(TALLOC_CTX *, struct Binary_r *);
-const char             *get_TypedString(struct TypedString *);
-
-/* The following public definitions come from libmapi/IABContainer.c */
-enum MAPISTATUS                ResolveNames(struct mapi_session *, const char **, struct SPropTagArray *, struct SRowSet **,  struct PropertyTagArray_r **, uint32_t);
-enum MAPISTATUS                GetGALTable(struct mapi_session *, struct SPropTagArray *, struct SRowSet **, uint32_t, uint8_t);
-enum MAPISTATUS                GetGALTableCount(struct mapi_session *, uint32_t *);
-enum MAPISTATUS                GetABRecipientInfo(struct mapi_session *, const char *, struct SPropTagArray *, struct SRowSet **);
-
-/* The following public definitions come from libmapi/IProfAdmin.c */
-enum MAPISTATUS                mapi_profile_add_string_attr(struct mapi_context *, const char *, const char *, const char *);
-enum MAPISTATUS                mapi_profile_modify_string_attr(struct mapi_context *, const char *, const char *, const char *);
-enum MAPISTATUS                mapi_profile_delete_string_attr(struct mapi_context *, const char *, const char *, const char *);
-const char             *mapi_profile_get_ldif_path(void);
-enum MAPISTATUS                CreateProfileStore(const char *, const char *);
-enum MAPISTATUS                OpenProfile(struct mapi_context *, struct mapi_profile *, const char *, const char *);
-enum MAPISTATUS                LoadProfile(struct mapi_context *, struct mapi_profile *);
-enum MAPISTATUS                ShutDown(struct mapi_profile *);
-enum MAPISTATUS                CreateProfile(struct mapi_context *, const char *, const char *, const char *, uint32_t);
-enum MAPISTATUS                DeleteProfile(struct mapi_context *, const char *);
-enum MAPISTATUS                ChangeProfilePassword(struct mapi_context *, const char *, const char *, const char *);
-enum MAPISTATUS                CopyProfile(struct mapi_context *, const char *, const char *);
-enum MAPISTATUS                DuplicateProfile(struct mapi_context *, const char *, const char *, const char *);
-enum MAPISTATUS                RenameProfile(struct mapi_context *, const char *, const char *);
-enum MAPISTATUS                SetDefaultProfile(struct mapi_context *, const char *);
-enum MAPISTATUS                GetDefaultProfile(struct mapi_context *, char **);
-enum MAPISTATUS                GetProfileTable(struct mapi_context *, struct SRowSet *);
-enum MAPISTATUS                GetProfileAttr(struct mapi_profile *, const char *, unsigned int *, char ***);
-enum MAPISTATUS                FindProfileAttr(struct mapi_profile *, const char *, const char *);
-enum MAPISTATUS                ProcessNetworkProfile(struct mapi_session *, const char *, mapi_profile_callback_t, const void *);
-
-/* The following public definitions come from libmapi/IMAPIContainer.c */
-enum MAPISTATUS                GetContentsTable(mapi_object_t *, mapi_object_t *, uint8_t, uint32_t *);
-enum MAPISTATUS                GetHierarchyTable(mapi_object_t *, mapi_object_t *, uint8_t, uint32_t *);
-enum MAPISTATUS                GetPermissionsTable(mapi_object_t *, uint8_t, mapi_object_t *);
-enum MAPISTATUS                GetRulesTable(mapi_object_t *, mapi_object_t *, uint8_t);
-enum MAPISTATUS                ModifyPermissions(mapi_object_t *, uint8_t, struct mapi_PermissionsData *);
-enum MAPISTATUS                SetSearchCriteria(mapi_object_t *, struct mapi_SRestriction *, uint32_t, mapi_id_array_t *);
-enum MAPISTATUS                GetSearchCriteria(mapi_object_t *, struct mapi_SRestriction *, uint32_t *, uint16_t *, uint64_t **);
-
-/* The following public definitions come from libmapi/IMAPIFolder.c */
-enum MAPISTATUS                CreateMessage(mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS                DeleteMessage(mapi_object_t *, mapi_id_t *, uint32_t);
-enum MAPISTATUS                HardDeleteMessage(mapi_object_t *, mapi_id_t *, uint16_t);
-enum MAPISTATUS                GetMessageStatus(mapi_object_t *, mapi_id_t, uint32_t *);
-enum MAPISTATUS                SetMessageStatus(mapi_object_t *, mapi_id_t, uint32_t, uint32_t, uint32_t *);
-enum MAPISTATUS                MoveCopyMessages(mapi_object_t *, mapi_object_t *, mapi_id_array_t *, bool);
-enum MAPISTATUS                CreateFolder(mapi_object_t *, enum FOLDER_TYPE, const char *, const char *, uint32_t, mapi_object_t *);
-enum MAPISTATUS                EmptyFolder(mapi_object_t *);
-enum MAPISTATUS                DeleteFolder(mapi_object_t *, mapi_id_t, uint8_t, bool *);
-enum MAPISTATUS                MoveFolder(mapi_object_t *, mapi_object_t *, mapi_object_t *, char *, bool);
-enum MAPISTATUS                CopyFolder(mapi_object_t *, mapi_object_t *, mapi_object_t *, char *, bool, bool);
-enum MAPISTATUS                SetReadFlags(mapi_object_t *, uint8_t, uint16_t, uint64_t *);
-enum MAPISTATUS                HardDeleteMessagesAndSubfolders(mapi_object_t *);
-
-/* The following public definitions come from libmapi/IMAPIProp.c */
-enum MAPISTATUS                GetProps(mapi_object_t *, struct SPropTagArray *, struct SPropValue **, uint32_t *);
-enum MAPISTATUS                SetProps(mapi_object_t *, struct SPropValue *, unsigned long);
-enum MAPISTATUS                SaveChangesAttachment(mapi_object_t *, mapi_object_t *, enum SaveFlags);
-enum MAPISTATUS                GetPropList(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                GetPropsAll(mapi_object_t *, struct mapi_SPropValue_array *);
-enum MAPISTATUS                DeleteProps(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                SetPropertiesNoReplicate(mapi_object_t *, struct SPropValue *, unsigned long);
-enum MAPISTATUS                DeletePropertiesNoReplicate(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                GetNamesFromIDs(mapi_object_t *, enum MAPITAGS, uint16_t *, struct MAPINAMEID **);
-enum MAPISTATUS                GetIDsFromNames(mapi_object_t *, uint16_t, struct MAPINAMEID *, uint32_t, struct SPropTagArray **);
-enum MAPISTATUS                QueryNamedProperties(mapi_object_t *, uint8_t, struct GUID *, uint16_t *, uint16_t **, struct MAPINAMEID **);
-enum MAPISTATUS                CopyProps(mapi_object_t *, mapi_object_t *, struct SPropTagArray *, uint8_t, uint16_t *, struct PropertyProblem **);
-enum MAPISTATUS                CopyTo(mapi_object_t *, mapi_object_t *, struct SPropTagArray *, uint8_t, uint16_t *, struct PropertyProblem **);
-
-/* The following public definitions come from libmapi/IMAPISession.c */
-enum MAPISTATUS                OpenPublicFolder(struct mapi_session *, mapi_object_t *);
-enum MAPISTATUS                OpenMsgStore(struct mapi_session *, mapi_object_t *);
-enum MAPISTATUS                OpenUserMailbox(struct mapi_session *, const char *, mapi_object_t *);
-
-/* The following public definitions come from libmapi/IMAPISupport.c */
-enum MAPISTATUS                Subscribe(mapi_object_t *, uint32_t *, uint16_t, bool, mapi_notify_callback_t, void *);
-enum MAPISTATUS                Unsubscribe(struct mapi_session *, uint32_t);
-enum MAPISTATUS                DispatchNotifications(struct mapi_session *);
-enum MAPISTATUS                MonitorNotification(struct mapi_session *, void *, struct mapi_notify_continue_callback_data *);
-
-/* The following public definitions come from libmapi/IMAPITable.c */
-enum MAPISTATUS                SetColumns(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                QueryPosition(mapi_object_t *, uint32_t *, uint32_t *);
-enum MAPISTATUS                QueryRows(mapi_object_t *, uint16_t, enum QueryRowsFlags, struct SRowSet *);
-enum MAPISTATUS                QueryColumns(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                SeekRow(mapi_object_t *, enum BOOKMARK, int32_t, uint32_t *);
-enum MAPISTATUS                SeekRowBookmark(mapi_object_t *, uint32_t, uint32_t, uint32_t *);
-enum MAPISTATUS                SeekRowApprox(mapi_object_t *, uint32_t, uint32_t);
-enum MAPISTATUS                CreateBookmark(mapi_object_t *, uint32_t *);
-enum MAPISTATUS                FreeBookmark(mapi_object_t *, uint32_t);
-enum MAPISTATUS                SortTable(mapi_object_t *, struct SSortOrderSet *);
-enum MAPISTATUS                Reset(mapi_object_t *);
-enum MAPISTATUS                Restrict(mapi_object_t *, struct mapi_SRestriction *, uint8_t *);
-enum MAPISTATUS                FindRow(mapi_object_t *, struct mapi_SRestriction *, enum BOOKMARK, enum FindRow_ulFlags, struct SRowSet *);
-enum MAPISTATUS                GetStatus(mapi_object_t *, uint8_t *);
-enum MAPISTATUS                Abort(mapi_object_t *, uint8_t *);
-enum MAPISTATUS                ExpandRow(mapi_object_t *, uint64_t, uint16_t, struct SRowSet *, uint32_t *);
-enum MAPISTATUS                CollapseRow(mapi_object_t *, uint64_t, uint32_t *);
-enum MAPISTATUS                GetCollapseState(mapi_object_t *, uint64_t, uint32_t, struct SBinary_short *);
-enum MAPISTATUS                SetCollapseState(mapi_object_t *, struct SBinary_short *);
-
-/* The following public definitions come from libmapi/IMSProvider.c */
-char                   *RfrGetNewDSA(struct mapi_context *, struct mapi_session *, const char *, const char *);
-enum MAPISTATUS                RfrGetFQDNFromLegacyDN(struct mapi_context *, struct mapi_session *, const char **);
-enum MAPISTATUS                Logoff(mapi_object_t *);
-enum MAPISTATUS                RegisterNotification(struct mapi_session *, uint16_t);
-enum MAPISTATUS                RegisterAsyncNotification(struct mapi_session *, uint32_t *);
-
-/* The following public definitions come from libmapi/IMessage.c */
-enum MAPISTATUS                CreateAttach(mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS                DeleteAttach(mapi_object_t *, uint32_t);
-enum MAPISTATUS                GetAttachmentTable(mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS                GetValidAttach(mapi_object_t *, uint16_t *, uint32_t **);
-enum MAPISTATUS                OpenAttach(mapi_object_t *, uint32_t,mapi_object_t *);
-enum MAPISTATUS                SetRecipientType(struct SRow *, enum ulRecipClass);
-enum MAPISTATUS                ModifyRecipients(mapi_object_t *, struct SRowSet *);
-enum MAPISTATUS                ReadRecipients(mapi_object_t *, uint32_t, uint8_t *, struct ReadRecipientRow **);
-enum MAPISTATUS                RemoveAllRecipients(mapi_object_t *);
-enum MAPISTATUS                SubmitMessage(mapi_object_t *);
-enum MAPISTATUS                AbortSubmit(mapi_object_t *, mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS                SaveChangesMessage(mapi_object_t *, mapi_object_t *, uint8_t);
-enum MAPISTATUS                TransportSend(mapi_object_t *, struct mapi_SPropValue_array *);
-enum MAPISTATUS                GetRecipientTable(mapi_object_t *, struct SRowSet *, struct SPropTagArray *);
-enum MAPISTATUS                SetMessageReadFlag(mapi_object_t *, mapi_object_t *, uint8_t);
-enum MAPISTATUS                OpenEmbeddedMessage(mapi_object_t *, mapi_object_t *, enum OpenEmbeddedMessage_OpenModeFlags);
-
-/* The following public definitions come from libmapi/IMsgStore.c */
-enum MAPISTATUS                OpenFolder(mapi_object_t *, mapi_id_t,mapi_object_t *);
-enum MAPISTATUS                PublicFolderIsGhosted(mapi_object_t *, mapi_object_t *, bool *);
-enum MAPISTATUS                OpenPublicFolderByName(mapi_object_t *, mapi_object_t *, const char *);
-enum MAPISTATUS                SetReceiveFolder(mapi_object_t *, mapi_object_t *, const char *);
-enum MAPISTATUS                GetReceiveFolder(mapi_object_t *, mapi_id_t *, const char *);
-enum MAPISTATUS                GetReceiveFolderTable(mapi_object_t *, struct SRowSet *);
-enum MAPISTATUS                GetTransportFolder(mapi_object_t *, mapi_id_t *);
-enum MAPISTATUS                GetOwningServers(mapi_object_t *, mapi_object_t *, uint16_t *, uint16_t *, char **);
-enum MAPISTATUS                GetStoreState(mapi_object_t *, uint32_t *);
-enum MAPISTATUS                GetOutboxFolder(mapi_object_t *, mapi_id_t *);
-enum MAPISTATUS                TransportNewMail(mapi_object_t *, mapi_object_t *, mapi_object_t *,const char *, uint32_t);
-
-/* The following public definitions come from libmapi/IStoreFolder.c */
-enum MAPISTATUS                OpenMessage(mapi_object_t *, mapi_id_t, mapi_id_t, mapi_object_t *, uint8_t);
-enum MAPISTATUS                ReloadCachedInformation(mapi_object_t *);
-
-/* The following public definitions come from libmapi/IUnknown.c */
-enum MAPISTATUS                MAPIAllocateBuffer(struct mapi_context *, uint32_t, void **);
-enum MAPISTATUS                MAPIFreeBuffer(void *);
-enum MAPISTATUS                Release(mapi_object_t *);
-enum MAPISTATUS                GetLastError(void);
-enum MAPISTATUS                GetLongTermIdFromId(mapi_object_t *, mapi_id_t, struct LongTermId *);
-enum MAPISTATUS                GetIdFromLongTermId(mapi_object_t *, struct LongTermId, mapi_id_t *);
-
-/* The following public definitions come from libmapi/IStream.c */
-enum MAPISTATUS                OpenStream(mapi_object_t *, enum MAPITAGS, enum OpenStream_OpenModeFlags, mapi_object_t *);
-enum MAPISTATUS                ReadStream(mapi_object_t *, unsigned char *, uint16_t, uint16_t *);
-enum MAPISTATUS                WriteStream(mapi_object_t *, DATA_BLOB *, uint16_t *);
-enum MAPISTATUS                CommitStream(mapi_object_t *);
-enum MAPISTATUS                GetStreamSize(mapi_object_t *, uint32_t *);
-enum MAPISTATUS                SeekStream(mapi_object_t *, uint8_t, uint64_t, uint64_t *);
-enum MAPISTATUS                SetStreamSize(mapi_object_t *, uint64_t);
-enum MAPISTATUS                CopyToStream(mapi_object_t *, mapi_object_t *, uint64_t, uint64_t *, uint64_t *);
-enum MAPISTATUS                LockRegionStream(mapi_object_t *, uint64_t, uint64_t, uint32_t);
-enum MAPISTATUS                UnlockRegionStream(mapi_object_t *, uint64_t, uint64_t, uint32_t);
-enum MAPISTATUS                CloneStream(mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS                WriteAndCommitStream(mapi_object_t *, DATA_BLOB *, uint16_t *);
-
-/* The following public definitions come from libmapi/IXPLogon.c */
-enum MAPISTATUS                AddressTypes(mapi_object_t *, uint16_t *, struct mapi_LPSTR **);
-enum MAPISTATUS                SetSpooler(mapi_object_t *);
-enum MAPISTATUS                SpoolerLockMessage(mapi_object_t *, mapi_object_t *, enum LockState);
-enum MAPISTATUS                OptionsData(mapi_object_t *, const char *, uint8_t **, uint16_t *, uint8_t **, uint16_t *, const char** );
-
-/* The following public definitions come from libmapi/FXICS.c */
-enum MAPISTATUS                GetLocalReplicaIds(mapi_object_t *, uint32_t, struct GUID *, uint8_t [6]);
-enum MAPISTATUS                TellVersion(mapi_object_t *, uint16_t version[3]);
-enum MAPISTATUS                FXDestConfigure(mapi_object_t *, enum FastTransferDestConfig_SourceOperation, mapi_object_t *);
-enum MAPISTATUS                FXCopyFolder(mapi_object_t *, uint8_t, uint8_t, mapi_object_t *);
-enum MAPISTATUS                FXCopyMessages(mapi_object_t *, mapi_id_array_t *, uint8_t, uint8_t, mapi_object_t *);
-enum MAPISTATUS                FXCopyTo(mapi_object_t *, uint8_t, uint32_t, uint8_t, struct SPropTagArray *, mapi_object_t *);
-enum MAPISTATUS                FXCopyProperties(mapi_object_t *, uint8_t, uint32_t, uint8_t, struct SPropTagArray *, mapi_object_t *);
-enum MAPISTATUS                FXGetBuffer(mapi_object_t *obj_source_context, uint16_t maxSize, enum TransferStatus *, uint16_t *, uint16_t *, DATA_BLOB *);
-enum MAPISTATUS                FXPutBuffer(mapi_object_t *obj_dest_context, DATA_BLOB *blob, uint16_t *usedSize);
-enum MAPISTATUS                ICSSyncConfigure(mapi_object_t *, enum SynchronizationType, uint8_t, uint16_t, uint32_t, DATA_BLOB, struct SPropTagArray*, mapi_object_t *);
-enum MAPISTATUS                ICSSyncUploadStateBegin(mapi_object_t *, enum StateProperty, uint32_t);
-enum MAPISTATUS                ICSSyncUploadStateContinue(mapi_object_t *, DATA_BLOB);
-enum MAPISTATUS                ICSSyncUploadStateEnd(mapi_object_t *);
-
-/* The following public definitions come from libmapi/freebusy.c */
-enum MAPISTATUS                GetUserFreeBusyData(mapi_object_t *, const char *, struct SRow *);
-enum MAPISTATUS                IsFreeBusyConflict(mapi_object_t *, struct FILETIME *, bool *);
-int                    GetFreeBusyYear(const uint32_t *);
-
-/* The following public definitions come from libmapi/x500.c */
-char                   *x500_get_dn_element(TALLOC_CTX *, const char *, const char *);
-char                   *x500_truncate_dn_last_elements(TALLOC_CTX *, const char *, uint32_t);
-char                   *x500_get_servername(const char *);
-
-/* The following public definitions come from libmapi/lzfu.c */
-enum MAPISTATUS                WrapCompressedRTFStream(mapi_object_t *, DATA_BLOB *);
-enum MAPISTATUS                uncompress_rtf(TALLOC_CTX *, uint8_t *, uint32_t, DATA_BLOB *);
-uint32_t               calculateCRC(uint8_t *, uint32_t, uint32_t);
-enum MAPISTATUS                compress_rtf(TALLOC_CTX *, const char*, const size_t, uint8_t **, size_t *);
-
-/* The following public definitions come from libmapi/utils.c */
-char                   *guid_delete_dash(TALLOC_CTX *, const char *);
-struct Binary_r                *generate_recipient_entryid(TALLOC_CTX *, const char *);
-enum MAPISTATUS                GetFIDFromEntryID(uint16_t, uint8_t *, uint64_t, uint64_t *);
-
-/* The following public definitions come from libmapi/socket/netif.c */
-int                    get_interfaces(struct iface_struct *, int);
-
-/* The following public definitions come from libmapi/fxparser.c */
-struct fx_parser_context;
-typedef enum MAPISTATUS (*fxparser_marker_callback_t)(uint32_t, void *);
-typedef enum MAPISTATUS (*fxparser_delprop_callback_t)(uint32_t, void *);
-typedef enum MAPISTATUS (*fxparser_namedprop_callback_t)(uint32_t, struct MAPINAMEID, void *);
-typedef enum MAPISTATUS (*fxparser_property_callback_t)(struct SPropValue, void *);
-
-struct fx_parser_context *fxparser_init(TALLOC_CTX *, void *);
-void                    fxparser_set_marker_callback(struct fx_parser_context *, fxparser_marker_callback_t);
-void                    fxparser_set_delprop_callback(struct fx_parser_context *, fxparser_delprop_callback_t);
-void                    fxparser_set_namedprop_callback(struct fx_parser_context *, fxparser_namedprop_callback_t);
-void                    fxparser_set_property_callback(struct fx_parser_context *, fxparser_property_callback_t);
-void                    fxparser_parse(struct fx_parser_context *, DATA_BLOB *);
-
-__END_DECLS
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2)
-
-#endif /* __LIBMAPI_H__ */
diff --git a/branches/plugfest/libmapi/libmapi_private.h b/branches/plugfest/libmapi/libmapi_private.h
deleted file mode 100644 (file)
index f2b8a4c..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-   libmapi private header file
-
-   Copyright (C) Julien Kerihuel 2010-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __LIBMAPI_PRIVATE_H__
-#define __LIBMAPI_PRIVATE_H__
-
-#include "config.h"
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#if defined(HAVE_PTHREADS)
-#include <pthread.h>
-#elif defined(HAVE_GTHREAD)
-#include <gthread.h>
-#endif
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-
-/* This provides a "we need to fix this problem" signal
-   in development builds, but not in release builds */
-#if SNAPSHOT == yes
-  #include <assert.h>
-  #define OPENCHANGE_ASSERT() assert(0)
-#else
-  #define OPENCHANGE_ASSERT()
-#endif
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-/* The following private definitions come from ndr_mapi.c */
-void obfuscate_data(uint8_t *, uint32_t, uint8_t);
-enum ndr_err_code ndr_pull_lzxpress_decompress(struct ndr_pull *, struct ndr_pull **, ssize_t);
-enum ndr_err_code ndr_push_lzxpress_compress(struct ndr_push *, struct ndr_push *);
-
-/* The following private definitions come from libmapi/nspi.c */
-int nspi_disconnect_dtor(void *);
-
-/* The following private definitions come from libmapi/emsmdb.c */
-struct emsmdb_context  *emsmdb_connect(TALLOC_CTX *, struct mapi_session *, struct dcerpc_pipe *, struct cli_credentials *, int *);
-struct emsmdb_context  *emsmdb_connect_ex(TALLOC_CTX *, struct mapi_session *, struct dcerpc_pipe *, struct cli_credentials *, int *);
-int                    emsmdb_disconnect_dtor(void *);
-enum MAPISTATUS                emsmdb_disconnect(struct emsmdb_context *);
-struct mapi_notify_ctx *emsmdb_bind_notification(struct mapi_context *, TALLOC_CTX *);
-NTSTATUS               emsmdb_register_notification(struct mapi_session *, struct NOTIFKEY *, uint16_t);
-void                   free_emsmdb_property(struct SPropValue *, void *);
-const void             *pull_emsmdb_property(TALLOC_CTX *, struct loadparm_context *, uint32_t *, enum MAPITAGS, DATA_BLOB *);
-enum MAPISTATUS                emsmdb_get_SPropValue(TALLOC_CTX *, struct loadparm_context *, DATA_BLOB *, struct SPropTagArray *, struct SPropValue **, uint32_t *, uint8_t);
-void                   emsmdb_get_SRow(TALLOC_CTX *, struct loadparm_context *, struct SRow *, struct SPropTagArray *, uint16_t, DATA_BLOB *, uint8_t, uint8_t);
-enum MAPISTATUS                emsmdb_async_connect(struct emsmdb_context *);
-bool                   server_version_at_least(struct emsmdb_context *, uint16_t, uint16_t, uint16_t, uint16_t);
-
-/* The following private definition comes from libmapi/async_emsmdb.c */
-enum MAPISTATUS emsmdb_async_waitex(struct emsmdb_context *, uint32_t, uint32_t *);
-
-/* The following private definitions come from auto-generated libmapi/mapicode.c */
-void                   set_errno(enum MAPISTATUS);
-
-/* The following private definitions come from libmapi/codepage_lcid.c */
-void                   mapi_get_language_list(void);
-
-/* The following private definitions come from libmapi/mapi_object.c */
-int                    mapi_object_is_invalid(mapi_object_t *);
-void                   mapi_object_set_id(mapi_object_t *, mapi_id_t);
-mapi_handle_t          mapi_object_get_handle(mapi_object_t *);
-void                   mapi_object_set_handle(mapi_object_t *, mapi_handle_t);
-void                   mapi_object_table_init(TALLOC_CTX *, mapi_object_t *);
-enum MAPISTATUS                mapi_object_bookmark_find(mapi_object_t *, uint32_t,struct SBinary_short *);
-
-/* The following private definitions come from libmapi/property.c */
-enum MAPITAGS          *get_MAPITAGS_SRow(TALLOC_CTX *, struct SRow *, uint32_t *);
-uint32_t               MAPITAGS_delete_entries(enum MAPITAGS *, uint32_t, uint32_t, ...);
-size_t                 get_utf8_utf16_conv_length(const char *);
-
-/* The following private definitions come from libmapi/IProfAdmin.c */
-enum MAPISTATUS                OpenProfileStore(TALLOC_CTX *, struct ldb_context **, const char *);
-
-/* The following private definitions come from libmapi/IMAPISupport.c  */
-enum MAPISTATUS                ProcessNotification(struct mapi_notify_ctx *, struct mapi_response *);
-
-/* The following private definitions come from libmapi/IMAPITable.c  */
-uint32_t               get_mapi_SRestriction_size(struct mapi_SRestriction *);
-
-/* The following private definitions come from libmapi/IMSProvider.c  */
-enum MAPISTATUS                Logon(struct mapi_session *, struct mapi_provider *, enum PROVIDER_ID);
-enum MAPISTATUS                GetNewLogonId(struct mapi_session *, uint8_t *);
-
-/* The following private definitions come from libmapi/IMessage.c */
-uint8_t                        mapi_recipients_get_org_length(struct mapi_profile *);
-uint16_t               mapi_recipients_RecipientFlags(struct SRow *);
-
-/* The following private definitions come from libmapi/socket/interface.c  */
-void                   load_interfaces(TALLOC_CTX *, const char **, struct interface **);
-int                    iface_count(struct interface *);
-const char             *iface_n_ip(struct interface *, int);
-const char             *iface_n_bcast(struct interface *, int);
-const char             *iface_n_netmask(struct interface *, int);
-const char             *iface_best_ip(struct interface *, const char *);
-bool                   iface_is_local(struct interface *, const char *);
-bool                   iface_same_net(const char *, const char *, const char *);
-
-__END_DECLS
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2)
-
-#endif /* !__LIBMAPI_PRIVATE_H__ */
diff --git a/branches/plugfest/libmapi/lzfu.c b/branches/plugfest/libmapi/lzfu.c
deleted file mode 100644 (file)
index aa00557..0000000
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   This work is based on libpst-0.5.2, and the author(s) of
-   that code will also hold appropriate copyrights.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-#include <ctype.h>
-/**
-   \file lzfu.c
-   
-   \brief Compressed RTF related functions
-*/
-
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define LE32_CPU(x)                \
-  x = ((((x) & 0xff000000) >> 24) | \
-       (((x) & 0x00ff0000) >> 8 ) | \
-       (((x) & 0x0000ff00) << 8 ) | \
-       (((x) & 0x000000ff) << 24));
-#define LE16_CPU(x)           \
-  x = ((((x) & 0xff00) >> 8) | \
-       (((x) & 0x00ff) << 8));
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define        LE32_CPU(x) {}
-#define        LE16_CPU(x) {}
-#else
-#error Byte order not supported
-#endif /* BYTE_ORDER */
-
-#define        LZFU_COMPRESSED         0x75465a4c
-#define        LZFU_UNCOMPRESSED       0x414c454d
-
-/* Initial directory */
-#define LZFU_INITDICT                                  \
-  "{\\rtf1\\ansi\\mac\\deff0\\deftab720{\\fonttbl;}"   \
-  "{\\f0\\fnil \\froman \\fswiss \\fmodern \\fscrip"   \
-  "t \\fdecor MS Sans SerifSymbolArialTimes Ne"                \
-  "w RomanCourier{\\colortbl\\red0\\green0\\blue0"     \
-  "\r\n\\par \\pard\\plain\\f0\\fs20\\b\\i\\u\\tab"    \
-  "\\tx"
-
-/* initial length of dictionary */
-#define LZFU_INITLENGTH                207
-
-#define        LZFU_DICTLENGTH         0x1000
-#define        LZFU_HEADERLENGTH       0x10
-
-/* header for compressed rtf */
-typedef struct _lzfuheader {
-       uint32_t        cbSize;
-       uint32_t        cbRawSize;
-       uint32_t        dwMagic;
-       uint32_t        dwCRC;
-} lzfuheader;
-
-
-/**
-   \details creates a DATA_BLOB in uncompressed Rich Text Format (RTF)
-   from the compressed format used in the PR_RTF_COMPRESSED property
-   opened in the stream.
-
-   \param obj_stream stream object with RTF stream content
-   \param rtf the output blob with uncompressed content
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error. Possible
-   MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: obj_stream is not a valid pointer
-   - MAPI_E_CORRUPT_DATA: a problem was encountered while
-     decompressing the RTF compressed data
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-   transaction
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code.
-   \note rtf->data needs to be freed with MAPIFreeBuffer
-
-   \sa OpenStream
-*/
-_PUBLIC_ enum MAPISTATUS WrapCompressedRTFStream(mapi_object_t *obj_stream, 
-                                                DATA_BLOB *rtf)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session;
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                in_size;
-       uint8_t                 *rtfcomp;
-       uint16_t                read_size;
-       unsigned char           buf[0x1000];
-
-       /* sanity check and init */
-       OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_stream);
-       OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mapi_ctx = session->mapi_ctx;
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = mapi_ctx->mem_ctx;
-
-       /* Read the stream pointed by obj_stream */
-       read_size = 0;
-       in_size = 0;
-       rtfcomp = talloc_zero(mem_ctx, uint8_t);
-       do {
-               retval = ReadStream(obj_stream, buf, 0x1000, &read_size);
-               OPENCHANGE_RETVAL_IF(retval, GetLastError(), rtf->data);
-               if (read_size) {
-                       rtfcomp = talloc_realloc(mem_ctx, rtfcomp, uint8_t, 
-                                                  in_size + read_size);
-                       memcpy(&(rtfcomp[in_size]), buf, read_size);
-                       in_size += read_size;
-               }
-       } while (read_size);
-
-       return uncompress_rtf(mem_ctx, rtfcomp, in_size, rtf);
-}
-
-typedef struct _decompression_state {
-       uint8_t*        dict;
-       uint32_t        dict_writeoffset;
-       uint8_t*        compressed_data;
-       uint32_t        in_size;
-       uint32_t        in_pos;
-} decompression_state;
-
-/**
-  Initialise the decompression_state
-  
-  \param mem_ctx the memory context to allocate the decompression state on
-  \param dict the resulting decompression_state
-*/
-static void initialise_decompression_state(TALLOC_CTX *mem_ctx, uint8_t *compressed_data,
-                                          uint32_t in_size, decompression_state *state)
-{
-       state->dict = talloc_array(mem_ctx, uint8_t, LZFU_DICTLENGTH);
-
-       memcpy(state->dict, LZFU_INITDICT, LZFU_INITLENGTH);
-       state->dict_writeoffset = LZFU_INITLENGTH;
-       
-       state->compressed_data = compressed_data;
-       state->in_size = in_size;
-       state->in_pos = LZFU_HEADERLENGTH;
-}
-
-static void cleanup_decompression_state(decompression_state *state)
-{
-       talloc_free(state->dict);
-}
-
-typedef struct _output_state {
-       uint32_t        out_size;
-       uint32_t        out_pos;
-       DATA_BLOB       *output_blob;
-} output_state;
-
-static void initialise_output_state(TALLOC_CTX *mem_ctx, output_state *state, uint32_t rawSize, DATA_BLOB *output_blob)
-{
-       state->out_pos = 0;
-       state->out_size = rawSize + LZFU_HEADERLENGTH + 4;
-       output_blob->data = (uint8_t *) talloc_size(mem_ctx, state->out_size);
-       output_blob->length = 0;
-       state->output_blob = output_blob;
-}
-
-static void parse_header(uint8_t *header_data, lzfuheader *header)
-{
-       memcpy(header, header_data, sizeof(*header));
-       LE32_CPU(header->cbSize);   
-       LE32_CPU(header->cbRawSize);
-       LE32_CPU(header->dwMagic);  
-       LE32_CPU(header->dwCRC);
-
-       DEBUG(2, ("COMPSIZE = 0x%x\n", header->cbSize));
-       DEBUG(2, ("RAWSIZE = 0x%x\n", header->cbRawSize));
-       DEBUG(2, ("COMPTYPE = 0x%08x\n", header->dwMagic)); // TODO: make this look like MS-OXRTFCP examples
-       DEBUG(2, ("CRC = 0x%08x\n", header->dwCRC));
-}
-
-static enum MAPISTATUS verify_header(uint8_t *header_data, uint32_t in_size, lzfuheader *header)
-{
-       parse_header(header_data, header);
-
-       if (header->cbSize != in_size - 4) {
-               DEBUG(0, ("in_size mismatch:%u\n", in_size));
-               OPENCHANGE_RETVAL_ERR(MAPI_E_CORRUPT_DATA, NULL);
-       }
-
-       if ((header->dwMagic != LZFU_COMPRESSED) && (header->dwMagic != LZFU_UNCOMPRESSED)) {
-               DEBUG(0, ("bad magic: 0x%x\n", header->dwMagic));
-               OPENCHANGE_RETVAL_ERR(MAPI_E_CORRUPT_DATA, NULL);
-       }
-       
-       return MAPI_E_SUCCESS;
-}
-
-static uint8_t get_next_byte(decompression_state *state)
-{
-       if (state->in_pos > state->in_size) {
-               return 0;
-       }  
-       uint8_t next_byte = state->compressed_data[state->in_pos];
-       state->in_pos += 1;
-       return next_byte;
-}
-
-static uint8_t get_next_control(decompression_state *state)
-{
-       uint8_t c = get_next_byte(state);
-       DEBUG(3, ("control: 0x%02x\n", c));
-       return c;
-}
-
-static uint8_t get_next_literal(decompression_state *state)
-{
-       uint8_t c = get_next_byte(state);
-       if (isprint(c)) {
-               DEBUG(3, ("literal %c\n", c));
-       } else {
-               DEBUG(3, ("literal 0x%02x\n", c));
-       }
-       return c;
-}
-
-typedef struct _dictionaryref {
-       uint8_t         length;
-       uint16_t         offset;
-} dictionaryref;
-
-static dictionaryref get_next_dictionary_reference(decompression_state *state)
-{
-       dictionaryref reference;
-       uint8_t highbyte = get_next_byte(state);
-       uint8_t lowbyte = get_next_byte(state);
-       reference.length = lowbyte & 0x0F; /* low 4 bits are length */
-       reference.length += 2; /* stored as two less than actual length */
-       reference.offset = ((highbyte << 8) + lowbyte);
-       reference.offset &= 0xFFF0; /* high 12 bits are offset */
-       reference.offset >>= 4; /* shift the offset down */
-       return reference;
-}
-
-static void append_to_dictionary(decompression_state *state, char c)
-{
-       state->dict[state->dict_writeoffset] = c;
-       state->dict_writeoffset = (state->dict_writeoffset + 1) % LZFU_DICTLENGTH;
-}
-
-static void append_to_output(output_state *output, char c)
-{
-       output->output_blob->data[output->out_pos] = c;
-       output->out_pos += 1;
-       output->output_blob->length += 1;
-}
-
-static char get_dictionary_entry(decompression_state *state, uint32_t index)
-{
-       char c = state->dict[index % LZFU_DICTLENGTH];
-       if (isprint(c)) {
-               DEBUG(3, ("dict entry %i: %c\n", index, c));
-       } else {
-               DEBUG(3, ("dict entry 0x%04x: 0x%02x\n", index, c));
-       }
-       return c;
-}
-
-static bool output_would_overflow(output_state *output)
-{
-       bool would_overflow = (output->out_pos > output->out_size);
-       if (would_overflow) {
-               DEBUG(0, (" overrun on out_pos: %u > %u\n", output->out_pos, output->out_size));
-               DEBUG(0, (" overrun data: %s\n", output->output_blob->data));
-       }
-       return would_overflow;
-}
-
-static bool input_would_overflow(decompression_state *state)
-{
-       bool would_overflow = (state->in_pos > state->in_size);
-       if (would_overflow) {
-               DEBUG(0, ("input overrun at in_pos: %i (of %i)\n", state->in_pos, state->in_size));
-       }
-       return would_overflow;
-}
-
-_PUBLIC_ enum MAPISTATUS uncompress_rtf(TALLOC_CTX *mem_ctx, 
-                                        uint8_t *rtfcomp, uint32_t in_size,
-                                        DATA_BLOB *rtf)
-{
-       lzfuheader              lzfuhdr;
-       decompression_state     state;
-       uint8_t                 bitmask_pos;
-       output_state            output;
-
-       enum MAPISTATUS         retval;
-
-       if (in_size < sizeof(lzfuhdr)+1) {
-               OPENCHANGE_RETVAL_ERR(MAPI_E_CORRUPT_DATA, NULL);
-       }
-
-       initialise_decompression_state(mem_ctx, rtfcomp, in_size, &state);
-
-       retval = verify_header(rtfcomp, state.in_size, &lzfuhdr);
-       if (retval != MAPI_E_SUCCESS) {
-               cleanup_decompression_state(&state);
-               return retval;
-       }
-
-       if (lzfuhdr.dwMagic == LZFU_UNCOMPRESSED) {
-               // TODO: handle uncompressed case
-       }
-
-       initialise_output_state(mem_ctx, &output, lzfuhdr.cbRawSize, rtf);
-
-       while ((state.in_pos + 1) < state.in_size) {
-               uint8_t control = get_next_control(&state);
-               for(bitmask_pos = 0; bitmask_pos < 8; ++bitmask_pos) {
-                       if (control & ( 1 << bitmask_pos)) { /* its a dictionary reference */
-                               dictionaryref dictref;
-                               int i;
-                               dictref = get_next_dictionary_reference(&state);
-                               if (dictref.offset == state.dict_writeoffset) {
-                                       DEBUG(4, ("matching offset - done\n"));
-                                       append_to_output(&output, '\0');
-                                       cleanup_decompression_state(&state);
-                                       return MAPI_E_SUCCESS;
-                               }
-                               for (i = 0; i < dictref.length; ++i) {
-                                       if (output_would_overflow(&output)) {
-                                               cleanup_decompression_state(&state);
-                                               return MAPI_E_CORRUPT_DATA;
-                                       }
-                                       char c = get_dictionary_entry(&state, (dictref.offset + i));
-                                       append_to_output(&output, c);
-                                       append_to_dictionary(&state, c);
-                               }
-                       } else { /* its a literal */
-                               if ( output_would_overflow(&output) || input_would_overflow(&state) ) {
-                                       cleanup_decompression_state(&state);
-                                       talloc_free(rtf->data);
-                                       return MAPI_E_CORRUPT_DATA;
-                               }
-                               char c = get_next_literal(&state);
-                               append_to_output(&output, c);
-                               append_to_dictionary(&state, c);
-                       }
-               }
-       }
-       
-       cleanup_decompression_state(&state);
-
-       OPENCHANGE_RETVAL_ERR(MAPI_E_SUCCESS, NULL);
-}
-
-static uint32_t CRCTable[] = {
-0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
-0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
-0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
-0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
-0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
-0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
-0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
-0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
-0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
-0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
-0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
-0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
-0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
-0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
-0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
-0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
-0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
-0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
-0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
-0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
-0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
-0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
-0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
-0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
-0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
-0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
-0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
-0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
-0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
-0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
-0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
-0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
-0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
-0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
-0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
-0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
-0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
-0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
-0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
-0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
-0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
-0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
-0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
-0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
-0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
-0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
-0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
-0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
-0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
-0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
-0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
-0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
-0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
-0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
-};
-
-uint32_t calculateCRC(uint8_t *input, uint32_t offset, uint32_t length)
-{
-       uint32_t crc = 0;
-       uint32_t i;
-       for (i = offset; i < offset+length; ++i) {
-               DEBUG(5, ("input at %i: 0x%02x\n", i, input[i]));
-               uint8_t table_position = (crc ^ input[i]) & 0xFF;
-               DEBUG(5, ("table_position: 0x%02x\n", table_position));
-               uint32_t intermediateValue = crc >> 8;
-               DEBUG(5, ("intermediateValue: 0x%08x\n", intermediateValue));
-               crc = CRCTable[table_position] ^ intermediateValue;
-               DEBUG(5, ("tableValue: 0x%08x\n", CRCTable[table_position]));
-               DEBUG(5, ("crc: 0x%08x\n", crc));
-       }
-       return crc;
-}
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-
-static size_t longest_match(const char *rtf, const size_t rtf_size, size_t input_idx, uint8_t *dict, size_t *dict_write_idx, size_t *dict_match_offset, size_t *dict_match_length)
-{
-       size_t best_match_length = 0;
-       size_t dict_iterator;
-       for (dict_iterator = 0; dict_iterator < MIN(*dict_write_idx, LZFU_DICTLENGTH); ++dict_iterator) {
-               size_t match_length_from_this_pos = 0;
-               while ((rtf[input_idx + match_length_from_this_pos] == dict[dict_iterator + match_length_from_this_pos]) &&
-                      ((dict_iterator + match_length_from_this_pos) < ((*dict_write_idx) % LZFU_DICTLENGTH)) && /* does this line need to have % LZFU_DICTLENGTH? */
-                      ((input_idx + match_length_from_this_pos) < rtf_size) && 
-                      (match_length_from_this_pos < 17)) {
-                       match_length_from_this_pos += 1;
-                       if (match_length_from_this_pos > best_match_length) {
-                               best_match_length = match_length_from_this_pos;
-                               dict[(*dict_write_idx) % LZFU_DICTLENGTH] = rtf[input_idx + match_length_from_this_pos - 1];
-                               *dict_write_idx += 1;
-                               *dict_match_offset = dict_iterator;
-                       }
-               }
-       }
-       *dict_match_length = best_match_length;
-       return best_match_length;
-}
-
-_PUBLIC_ enum MAPISTATUS compress_rtf(TALLOC_CTX *mem_ctx, const char *rtf, const size_t rtf_size,
-                                     uint8_t **rtfcomp, size_t *rtfcomp_size)
-{
-       size_t                  input_idx = 0;
-       lzfuheader              header;
-       uint8_t                 *dict;
-       size_t                  output_idx = 0;
-       size_t                  control_byte_idx = 0;
-       uint8_t                 control_bit = 0x01;
-       size_t                  dict_write_idx = 0;
-
-       /* as an upper bound, assume that the output is no larger than 9/8 of the input size, plus the header size */
-       *rtfcomp = (uint8_t *) talloc_size(mem_ctx, 9 * rtf_size / 8 + sizeof(lzfuheader));
-       control_byte_idx = sizeof(lzfuheader);
-       (*rtfcomp)[control_byte_idx] = 0x00;
-       output_idx = control_byte_idx + 1;
-
-       /* allocate and initialise the dictionary */
-       dict = talloc_zero_array(mem_ctx, uint8_t, LZFU_DICTLENGTH);
-       memcpy(dict, LZFU_INITDICT, LZFU_INITLENGTH);
-       dict_write_idx = LZFU_INITLENGTH;
-
-       while (input_idx < rtf_size) {
-               size_t dict_match_length = 0;
-               size_t dict_match_offset = 0;
-               DEBUG(4, ("compressing byte %zi of %zi\n", input_idx, rtf_size));
-               if (longest_match(rtf, rtf_size, input_idx, dict, &dict_write_idx, &dict_match_offset, &dict_match_length) > 1) {
-                       uint16_t dict_ref = dict_match_offset << 4;
-                       dict_ref += (dict_match_length - 2);
-                       input_idx += dict_match_length;
-                       (*rtfcomp)[control_byte_idx] |= control_bit;
-                       /* append dictionary reference to output */
-                       (*rtfcomp)[output_idx] = (dict_ref & 0xFF00) >> 8;
-                       output_idx += 1;
-                       (*rtfcomp)[output_idx] = (dict_ref & 0xFF);
-                       output_idx += 1;
-               } else {
-                       if (dict_match_length == 0) {
-                               /* we haven't written a literal to the dict yet */
-                               dict[dict_write_idx % LZFU_DICTLENGTH] = rtf[input_idx];
-                               dict_write_idx += 1;
-                       }
-                       /* append to output, and increment the output position */
-                       (*rtfcomp)[output_idx] = rtf[input_idx];
-                       output_idx += 1;
-                       DEBUG(5, ("new output_idx = 0x%08zx (for char value 0x%02x)\n", output_idx, rtf[input_idx]));
-                       /* increment the input position */
-                       input_idx += 1;
-               }
-               if (control_bit == 0x80) {
-                       control_bit = 0x01;
-                       control_byte_idx = output_idx;
-                       (*rtfcomp)[control_byte_idx] = 0x00;
-                       output_idx = control_byte_idx + 1;
-                       DEBUG(5, ("new output_idx cb = 0x%08zx\n", output_idx));
-               } else {
-                       control_bit = control_bit << 1;
-               }
-       }
-       {
-               /* append final marker dictionary reference to output */
-               uint16_t dict_ref = (dict_write_idx % LZFU_DICTLENGTH) << 4;
-               // printf("dict ref: 0x%04x at 0x%08zx\n", dict_ref, output_idx);
-               (*rtfcomp)[control_byte_idx] |= control_bit;
-               // printf("dict ref hi: 0x%02x\n", (dict_ref & 0xFF00) >> 8);
-               (*rtfcomp)[output_idx] = (dict_ref & 0xFF00) >> 8;
-               output_idx += 1;
-               // printf("dict ref lo: 0x%02x\n", dict_ref & 0xFF);
-               (*rtfcomp)[output_idx] = (dict_ref & 0xFF);
-               output_idx += 1;
-       }
-
-       header.cbSize = output_idx - sizeof(lzfuheader) + 12;
-       header.cbRawSize = rtf_size;
-       header.dwMagic = LZFU_COMPRESSED;
-       header.dwCRC = calculateCRC(*rtfcomp, sizeof(lzfuheader), output_idx - sizeof(lzfuheader));
-       memcpy(*rtfcomp, &header, sizeof(lzfuheader));
-       *rtfcomp_size = output_idx;
-       *rtfcomp = (uint8_t *) talloc_realloc_size(mem_ctx, *rtfcomp, *rtfcomp_size);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/mapi_context.h b/branches/plugfest/libmapi/mapi_context.h
deleted file mode 100644 (file)
index bc53344..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-   MAPI Context.
-
-   Copyright (C) Julien Kerihuel 2007-2010.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        _MAPI_CONTEXT_H
-#define        _MAPI_CONTEXT_H
-
-#include <talloc.h>
-
-struct ldb_context;
-struct mapi_session;
-
-struct mapi_context
-{
-  TALLOC_CTX           *mem_ctx;
-  struct ldb_context   *ldb_ctx;
-  struct mapi_session  *session;
-  bool                 dumpdata;
-  struct loadparm_context *lp_ctx;
-};
-
-
-#endif /* ! _MAPI_CONTEXT_H */
diff --git a/branches/plugfest/libmapi/mapi_id_array.c b/branches/plugfest/libmapi/mapi_id_array.c
deleted file mode 100644 (file)
index a021d4a..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \file mapi_id_array.c
-
-   \brief mapi_id_array support functions
-*/
-
-
-/**
-   \details Initialize a mapi_id_array structure
-
-   \param mapi_ctx pointer to the MAPI context
-   \param id pointer to a mapi_id_array structure
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_release
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_init(struct mapi_context *mapi_ctx,
-                                           mapi_id_array_t *id)
-{
-       TALLOC_CTX      *mem_ctx;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = mapi_ctx->mem_ctx;
-
-       id->count = 0;
-       id->lpContainerList = talloc_zero((TALLOC_CTX *)mem_ctx, mapi_container_list_t);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Uninitialize a mapi_id_array structure
-
-   \param id pointer to a mapi_id_array structure
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_init
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_release(mapi_id_array_t *id)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_INVALID_PARAMETER, NULL);
-
-       id->count = 0;
-       talloc_free(id->lpContainerList);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the ContainerList and store it within a uint64_t
-   array.
-
-   \param mem_ctx allocated talloc pointer
-   \param id pointer to a mapi_id_array structure
-   \param ContainerList pointer on a pointer of uint64_t values
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa GetSearchCriteria
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_get(TALLOC_CTX *mem_ctx,
-                                          mapi_id_array_t *id, 
-                                          mapi_id_t **ContainerList)
-{
-       mapi_container_list_t   *element;
-       uint32_t                i = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ContainerList, MAPI_E_INVALID_PARAMETER, NULL);
-
-       *ContainerList = talloc_array(mem_ctx, uint64_t, id->count + 1);
-
-       element = id->lpContainerList;
-       while (element) {
-               ContainerList[0][i] = element->id;
-               i++;
-               element = element->next;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Add a container ID to the list given its mapi_object_t
-
-   \param id pointer to a mapi_id_array structure
-   \param obj pointer on the mapi object we retrieve the container ID
-   from
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_add_id
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_add_obj(mapi_id_array_t *id, 
-                                              mapi_object_t *obj)
-{
-       mapi_container_list_t   *element;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-
-       element = talloc_zero((TALLOC_CTX *)id->lpContainerList, mapi_container_list_t);
-       element->id = mapi_object_get_id(obj);
-       DLIST_ADD(id->lpContainerList, element);
-       
-       id->count++;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Add a container ID to the list given its container ID
-
-   \param id pointer to a mapi_id_array structure
-   \param fid the container ID
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_add_obj
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_add_id(mapi_id_array_t *id, mapi_id_t fid)
-{
-       mapi_container_list_t   *element;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!fid, MAPI_E_INVALID_PARAMETER, NULL);
-
-       element = talloc_zero((TALLOC_CTX *)id->lpContainerList, mapi_container_list_t);
-       element->id = fid;
-       DLIST_ADD(id->lpContainerList, element);
-       
-       id->count++;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Delete a container ID from the list given its container ID
-
-   \param id pointer to a mapi_id_array structure
-   \param fid the container ID
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_add_id
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_del_id(mapi_id_array_t *id, mapi_id_t fid)
-{
-       mapi_container_list_t   *element;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->count, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_NOT_INITIALIZED, NULL);
-
-       element = id->lpContainerList;
-
-       while (element) {
-               if (element->id == fid) {
-                       DLIST_REMOVE(id->lpContainerList, element);
-                       return MAPI_E_SUCCESS;
-               }
-               element = element->next;
-       }
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Delete a container ID from the list given its mapi_object_t
-
-   \param id pointer to a mapi_id_array structure
-   \param obj pointer on the mapi object we retrieve the container ID
-   from
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: The mapi_id_array_t is uninitialized
-   - MAPI_E_CALL_FAILED: A network problem was encountered during the
-     transaction
-
-   \sa mapi_id_array_add_id
- */
-_PUBLIC_ enum MAPISTATUS mapi_id_array_del_obj(mapi_id_array_t *id, mapi_object_t *obj)
-{
-       mapi_container_list_t   *element;
-       mapi_id_t               fid;
-       
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!obj, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!id->count, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!id->lpContainerList, MAPI_E_NOT_INITIALIZED, NULL);
-
-       fid = mapi_object_get_id(obj);
-       OPENCHANGE_RETVAL_IF(!fid, MAPI_E_NOT_INITIALIZED, NULL);
-
-       element = id->lpContainerList;
-
-       while (element) {
-               if (element->id == fid) {
-                       DLIST_REMOVE(id->lpContainerList, element);
-                       return MAPI_E_SUCCESS;
-               }
-               element = element->next;
-       }
-       return MAPI_E_NOT_FOUND;
-}
diff --git a/branches/plugfest/libmapi/mapi_id_array.h b/branches/plugfest/libmapi/mapi_id_array.h
deleted file mode 100644 (file)
index 02a8f53..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPI_ID_ARRAY_H
-#define        __MAPI_ID_ARRAY_H
-
-typedef struct mapi_container_list {
-       struct mapi_container_list      *prev;
-       struct mapi_container_list      *next;
-       mapi_id_t                       id;
-} mapi_container_list_t;
-
-typedef struct mapi_id_array {
-       uint16_t                count;
-       mapi_container_list_t   *lpContainerList;
-} mapi_id_array_t;
-
-#endif /* __MAPI_ID_ARRAY_H */
diff --git a/branches/plugfest/libmapi/mapi_nameid.c b/branches/plugfest/libmapi/mapi_nameid.c
deleted file mode 100644 (file)
index 87fbcfe..0000000
+++ /dev/null
@@ -1,891 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/mapi_nameid.h"
-#include "libmapi/mapi_nameid_private.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file mapi_nameid.c
-
-   \brief mapi_nameid convenience API
-*/
-
-
-/**
-   \details Create a new mapi_nameid structure
-
-   \param mem_ctx memory context to use for allocation
-
-   \returns a pointer to an allocated mapi_nameid structure on
-   success, otherwise NULL
-
-   \sa GetIDsFromNames
-*/
-_PUBLIC_ struct mapi_nameid *mapi_nameid_new(TALLOC_CTX *mem_ctx)
-{
-       struct mapi_nameid      *mapi_nameid = NULL;
-
-       /* Sanity check */
-       if (!mem_ctx) return NULL;
-
-       mapi_nameid = talloc_zero(mem_ctx, struct mapi_nameid);
-       if (!mapi_nameid) return NULL;
-
-       mapi_nameid->nameid = NULL;
-       mapi_nameid->entries = NULL;
-       mapi_nameid->count = 0;
-
-       return mapi_nameid;
-}
-
-
-/**
-   \details Add a mapi_nameid entry given its OOM and OLEGUID
-   (MNID_ID|MNID_STRING)
-
-   \param mapi_nameid the structure where results are stored
-   \param OOM the Outlook Object Model matching string
-   \param OLEGUID the property set this entry belongs to
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: the entry intended to be added was not found
-
-   \sa mapi_nameid_new
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_OOM_add(struct mapi_nameid *mapi_nameid,
-                                            const char *OOM, 
-                                            const char *OLEGUID)
-{
-       uint32_t                i;
-       uint16_t                count;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!OOM, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].OOM &&
-                   !strcmp(OOM, mapi_nameid_tags[i].OOM) && 
-                   !strcmp(OLEGUID, mapi_nameid_tags[i].OLEGUID)) {
-                       mapi_nameid->nameid = talloc_realloc(mapi_nameid, 
-                                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                                            mapi_nameid->count + 1);
-                       mapi_nameid->entries = talloc_realloc(mapi_nameid,
-                                                           mapi_nameid->entries, struct mapi_nameid_tags,
-                                                           mapi_nameid->count + 1);
-                       count = mapi_nameid->count;
-
-                       mapi_nameid->entries[count] = mapi_nameid_tags[i];
-
-                       mapi_nameid->nameid[count].ulKind = (enum ulKind)mapi_nameid_tags[i].ulKind;
-                       GUID_from_string(mapi_nameid_tags[i].OLEGUID,
-                                        &(mapi_nameid->nameid[count].lpguid));
-                       switch (mapi_nameid_tags[i].ulKind) {
-                       case MNID_ID:
-                               mapi_nameid->nameid[count].kind.lid = mapi_nameid_tags[i].lid;
-                               break;
-                       case MNID_STRING:
-                               mapi_nameid->nameid[count].kind.lpwstr.Name = mapi_nameid_tags[i].Name;
-                               mapi_nameid->nameid[count].kind.lpwstr.NameSize = get_utf8_utf16_conv_length(mapi_nameid_tags[i].Name);
-                               break;
-                       }
-                       mapi_nameid->count++;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Add a mapi_nameid entry given its lid and OLEGUID
-   (MNID_ID)
-
-   \param mapi_nameid the structure where results are stored
-   \param lid the light ID of the name property (used by MNID_ID named
-   props only)
-   \param OLEGUID the property set this entry belongs to
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: the entry intended to be added was not found
-
-   \sa mapi_nameid_new
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_lid_add(struct mapi_nameid *mapi_nameid,
-                                            uint16_t lid, const char *OLEGUID)
-{
-       uint32_t                i;
-       uint16_t                count;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!lid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if ((lid == mapi_nameid_tags[i].lid) &&
-                   !strcmp(OLEGUID, mapi_nameid_tags[i].OLEGUID)) {
-                       mapi_nameid->nameid = talloc_realloc(mapi_nameid, 
-                                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                                            mapi_nameid->count + 1);
-                       mapi_nameid->entries = talloc_realloc(mapi_nameid,
-                                                           mapi_nameid->entries, struct mapi_nameid_tags,
-                                                           mapi_nameid->count + 1);
-                       count = mapi_nameid->count;
-
-                       mapi_nameid->entries[count] = mapi_nameid_tags[i];
-
-                       mapi_nameid->nameid[count].ulKind = (enum ulKind) mapi_nameid_tags[i].ulKind;
-                       GUID_from_string(mapi_nameid_tags[i].OLEGUID,
-                                        &(mapi_nameid->nameid[count].lpguid));
-                       switch (mapi_nameid_tags[i].ulKind) {
-                       case MNID_ID:
-                               mapi_nameid->nameid[count].kind.lid = mapi_nameid_tags[i].lid;
-                               break;
-                       case MNID_STRING:
-                               mapi_nameid->nameid[count].kind.lpwstr.Name = mapi_nameid_tags[i].Name;
-                               mapi_nameid->nameid[count].kind.lpwstr.NameSize = get_utf8_utf16_conv_length(mapi_nameid_tags[i].Name);
-                               break;
-                       }
-                       mapi_nameid->count++;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;        
-}
-
-
-/**
-   \details Add a mapi_nameid entry given its Name and OLEGUID
-   (MNID_STRING)
-
-   \param mapi_nameid the structure where results are stored
-   \param Name the property name (used by MNID_STRING named
-   props only)
-   \param OLEGUID the property set this entry belongs to
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: the entry intended to be added was not found
-
-   \sa mapi_nameid_new
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_string_add(struct mapi_nameid *mapi_nameid,
-                                               const char *Name,
-                                               const char *OLEGUID)
-{
-       uint32_t                i;
-       uint16_t                count;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!Name, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].Name && 
-                   !strcmp(Name, mapi_nameid_tags[i].Name) &&
-                   !strcmp(OLEGUID, mapi_nameid_tags[i].OLEGUID)) {
-                       mapi_nameid->nameid = talloc_realloc(mapi_nameid, 
-                                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                                            mapi_nameid->count + 1);
-                       mapi_nameid->entries = talloc_realloc(mapi_nameid,
-                                                           mapi_nameid->entries, struct mapi_nameid_tags,
-                                                           mapi_nameid->count + 1);
-                       count = mapi_nameid->count;
-
-                       mapi_nameid->entries[count] = mapi_nameid_tags[i];
-
-                       mapi_nameid->nameid[count].ulKind = (enum ulKind) mapi_nameid_tags[i].ulKind;
-                       GUID_from_string(mapi_nameid_tags[i].OLEGUID,
-                                        &(mapi_nameid->nameid[count].lpguid));
-                       switch (mapi_nameid_tags[i].ulKind) {
-                       case MNID_ID:
-                               mapi_nameid->nameid[count].kind.lid = mapi_nameid_tags[i].lid;
-                               break;
-                       case MNID_STRING:
-                               mapi_nameid->nameid[count].kind.lpwstr.Name = mapi_nameid_tags[i].Name;
-                               mapi_nameid->nameid[count].kind.lpwstr.NameSize = get_utf8_utf16_conv_length(mapi_nameid_tags[i].Name);
-                               break;
-                       }
-                       mapi_nameid->count++;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;
-}
-
-/**
-  \details Register and add a custom MNID_ID named property given its
-  lid, proptype and OLEGUID.
-  \param mapi_nameid the structure where results are stored 
-  \param lid the light ID of the name property (used by MNID_ID named
-  props only)
-  \param propType the named property type
-  \param OLEGUID the property set this entry belongs to
-  \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-  \note Developers may also call GetLastError() to retrieve the last
-  MAPI error code. Possible MAPI error codes are:
-  - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-  - MAPI_E_INVALID_PARAMETER: one of the parameter was no set properly
-
-  \sa mapi_nameid_new, mapi_nameid_lid_add
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_custom_lid_add(struct mapi_nameid *mapi_nameid, 
-                                                   uint16_t lid, uint16_t propType, 
-                                                   const char *OLEGUID)
-{
-       uint16_t        count;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED,  NULL);
-       OPENCHANGE_RETVAL_IF(!lid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!propType, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_nameid->nameid = talloc_realloc(mapi_nameid,
-                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                            mapi_nameid->count + 1);
-       mapi_nameid->entries = talloc_realloc(mapi_nameid, 
-                                             mapi_nameid->entries, struct mapi_nameid_tags,
-                                             mapi_nameid->count + 1);
-
-       count = mapi_nameid->count;
-       mapi_nameid->entries[count].lid = lid;
-       mapi_nameid->entries[count].propType = propType;
-       mapi_nameid->entries[count].ulKind = MNID_ID;
-       mapi_nameid->entries[count].OLEGUID = OLEGUID;
-
-       mapi_nameid->nameid[count].ulKind = MNID_ID;
-       GUID_from_string(OLEGUID, &(mapi_nameid->nameid[count].lpguid));
-       mapi_nameid->nameid[count].kind.lid = lid;
-
-       mapi_nameid->count++;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Register and add a custom MNID_STRING named property given
-   its string, proptype and OLEGUID.
-   \param mapi_nameid the structure where results are stored
-   \param Name the property name (used by MNID_STRING named props only)
-   \param propType the named property type
-   \param OLEGUID the property set this entry belongs to
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the parameter was not set properly.
-
-   \sa mapi_nameid_new, mapi_nameid_string_add
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_custom_string_add(struct mapi_nameid *mapi_nameid,
-                                                      const char *Name, uint16_t propType,
-                                                      const char *OLEGUID)
-{
-       uint16_t        count;
-
-       /* Sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!Name, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!propType, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_nameid->nameid = talloc_realloc(mapi_nameid,
-                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                            mapi_nameid->count + 1);
-       mapi_nameid->entries = talloc_realloc(mapi_nameid,
-                                             mapi_nameid->entries, struct mapi_nameid_tags,
-                                             mapi_nameid->count + 1);
-       count = mapi_nameid->count;
-       mapi_nameid->entries[count].Name = Name;
-       mapi_nameid->entries[count].propType = propType;
-       mapi_nameid->entries[count].ulKind = MNID_STRING;
-       mapi_nameid->entries[count].OLEGUID = OLEGUID;
-
-       mapi_nameid->nameid[count].ulKind = MNID_STRING;
-       GUID_from_string(OLEGUID, &(mapi_nameid->nameid[count].lpguid));
-       mapi_nameid->nameid[count].kind.lpwstr.Name = Name;
-       mapi_nameid->nameid[count].kind.lpwstr.NameSize = get_utf8_utf16_conv_length(Name);
-
-       mapi_nameid->count++;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Add a mapi_nameid entry given its canonical property tag
-
-   \param mapi_nameid the structure where results are stored
-   \param proptag the canonical property tag we are searching
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZE: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: the entry intended to be added was not found
-
-   \sa mapi_nameid_new
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_canonical_add(struct mapi_nameid *mapi_nameid,
-                                                  uint32_t proptag)
-{
-       uint32_t        i;
-       uint16_t        count;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!proptag, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].proptag == proptag) {
-                       mapi_nameid->nameid = talloc_realloc(mapi_nameid,
-                                                            mapi_nameid->nameid, struct MAPINAMEID,
-                                                            mapi_nameid->count + 1);
-                       mapi_nameid->entries = talloc_realloc(mapi_nameid,
-                                                             mapi_nameid->entries, struct mapi_nameid_tags,
-                                                             mapi_nameid->count + 1);
-                       count = mapi_nameid->count;
-
-                       mapi_nameid->entries[count] = mapi_nameid_tags[i];
-
-                       mapi_nameid->nameid[count].ulKind = (enum ulKind) mapi_nameid_tags[i].ulKind;
-                       GUID_from_string(mapi_nameid_tags[i].OLEGUID,
-                                        &(mapi_nameid->nameid[count].lpguid));
-                       switch (mapi_nameid_tags[i].ulKind) {
-                       case MNID_ID:
-                               mapi_nameid->nameid[count].kind.lid = mapi_nameid_tags[i].lid;
-                               break;
-                       case MNID_STRING:
-                               mapi_nameid->nameid[count].kind.lpwstr.Name = mapi_nameid_tags[i].Name;
-                               mapi_nameid->nameid[count].kind.lpwstr.NameSize = get_utf8_utf16_conv_length(mapi_nameid_tags[i].Name);
-                               break;
-                       }
-                       mapi_nameid->count++;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Search for a given referenced unmapped named property and
-   return whether it was found or not.
-
-   \param proptag the unmapped property tag to lookup
-
-   \return MAPI_E_SUCCESS on success otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_property_lookup(uint32_t proptag)
-{
-       uint32_t        i;
-
-       for (i = 0; mapi_nameid_tags[i].proptag; i++) {
-               if (mapi_nameid_tags[i].proptag == proptag) {
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Search for a given OOM,OLEGUID couple and return the
-   associated propType.
-
-   \param OOM The Outlook Object Model
-   \param OLEGUID the named property GUID for this entry
-   \param propType pointer on returned named property type
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameter was not set properly.
-   - MAPI_E_NOT_FOUND: no named property found
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_OOM_lookup(const char *OOM, const char *OLEGUID,
-                                               uint16_t *propType)
-{
-       uint32_t        i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!OOM, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].OOM && 
-                   !strcmp(mapi_nameid_tags[i].OOM, OOM) &&
-                   !strcmp(mapi_nameid_tags[i].OLEGUID, OLEGUID)) {
-                       *propType = mapi_nameid_tags[i].propType;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
-}
-
-
-/**
-   \details Search for a given lid,OLEGUID couple and return the
-   associated propType.
-
-   \param lid the named property light ID
-   \param OLEGUID the named property GUID for this entry
-   \param propType pointer on returned named property type
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameter was not set properly.
-   - MAPI_E_NOT_FOUND: no named property found
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_lid_lookup(uint16_t lid, const char *OLEGUID,
-                                               uint16_t *propType)
-{
-       uint32_t        i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!lid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].lid == lid &&
-                   !strcmp(mapi_nameid_tags[i].OLEGUID, OLEGUID)) {
-                       *propType = mapi_nameid_tags[i].propType;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
-}
-
-
-/**
-   \details Search for a given Name,OLEGUID couple and return the
-   associated propType.
-
-   \param Name the named property name
-   \param OLEGUID the named property GUID for this entry
-   \param propType pointer on returned named property type
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameter was not set properly.
-   - MAPI_E_NOT_FOUND: no named property found
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_string_lookup(const char *Name, 
-                                                  const char *OLEGUID,
-                                                  uint16_t *propType)
-{
-       uint32_t        i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!Name, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
-               if (mapi_nameid_tags[i].Name &&
-                   !strcmp(mapi_nameid_tags[i].Name, Name) &&
-                   !strcmp(mapi_nameid_tags[i].OLEGUID, OLEGUID)) {
-                       *propType = mapi_nameid_tags[i].propType;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
-}
-
-
-/**
-   \details set SPropTagArray ulPropTag property types from
-   mapi_nameid returned by GetIDsFromNames()
-
-   \param mapi_nameid the structure where results are stored
-   \param SPropTagArray the array of property tags returned by
-   previous call to GetIDsFromNames()
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames
-*/
-_PUBLIC_ enum MAPISTATUS mapi_nameid_SPropTagArray(struct mapi_nameid *mapi_nameid,
-                                                  struct SPropTagArray *SPropTagArray)
-{
-       uint32_t        i;
-
-       /* sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < mapi_nameid->count; i++) {
-               if (mapi_nameid->entries[i].propType) {
-                 SPropTagArray->aulPropTag[i] = (enum MAPITAGS)(((int)SPropTagArray->aulPropTag[i] & 0xFFFF0000) | 
-                                                                mapi_nameid->entries[i].propType);
-               }
-       }
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Replace named property tags in SPropTagArray with the
-   property ID Exchange expects and stored in SPropTagArray2.
-
-   \param mapi_nameid the structure where results are stored
-   \param SPropTagArray the array of property tags with original
-   property tags
-   \param SPropTagArray2 the array of named property tags resolved
-   with GetIDsFromNames
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_map_SPropTagArray(struct mapi_nameid *mapi_nameid,
-                                                       struct SPropTagArray *SPropTagArray,
-                                                       struct SPropTagArray *SPropTagArray2)
-{
-       uint32_t        i;
-       uint32_t        j;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray2, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < SPropTagArray->cValues; i++) {
-               for (j = 0; j < mapi_nameid->count; j++) {
-                 if ((enum MAPITAGS)mapi_nameid->entries[j].proptag == SPropTagArray->aulPropTag[i]) {
-                         SPropTagArray->aulPropTag[i] = (enum MAPITAGS)(((int)SPropTagArray2->aulPropTag[j] & 0xFFFF0000) |
-                                                                         mapi_nameid->entries[j].propType);
-                               mapi_nameid->entries[j].position = i;
-                       }
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Restore the original SPropTagArray array with the property
-   tags saved in the mapi_nameid structure.
-
-   \param mapi_nameid the structure where results are stored
-   \param SPropTagArray the array of property tags with original
-   property tags
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_unmap_SPropTagArray(struct mapi_nameid *mapi_nameid,
-                                                        struct SPropTagArray *SPropTagArray)
-{
-       uint32_t        i;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       for (i = 0; i < mapi_nameid->count; i++) {
-               if (mapi_nameid->entries[i].position <= SPropTagArray->cValues) {
-                 SPropTagArray->aulPropTag[mapi_nameid->entries[i].position] = (enum MAPITAGS) mapi_nameid->entries[i].proptag;
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Replace named property tags in the SPropValue array with
-   the property ID Exchange expects and stored in SPropTagArray.
-
-   \param mapi_nameid the structure where results are stored
-   \param lpProps pointer on a SPropValue structure with property tags
-   and values
-   \param PropCount count of lpProps elements
-   \param SPropTagArray the array of named property tags resolved
-   with GetIDsFromNames
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_map_SPropValue(struct mapi_nameid *mapi_nameid,
-                                                   struct SPropValue *lpProps,
-                                                   uint32_t PropCount,
-                                                   struct SPropTagArray *SPropTagArray)
-{
-       uint32_t        i;
-       uint32_t        j;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpProps, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!PropCount, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < PropCount; i++) {
-               for (j = 0; j < mapi_nameid->count; j++) {
-                 if ((enum MAPITAGS)mapi_nameid->entries[j].proptag == lpProps[i].ulPropTag) {
-                         lpProps[i].ulPropTag = (enum MAPITAGS)(((int)SPropTagArray->aulPropTag[j] & 0xFFFF0000) |
-                                                                mapi_nameid->entries[j].propType);
-                               mapi_nameid->entries[j].position = i;
-                       }
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Restore the original SPropValue array with the property
-   tags saved in the mapi_nameid structure.
-
-   \param mapi_nameid the structure where results are stored
-   \param lpProps the array of SPropValue structures with original
-   property tags
-   \param PropCount count of lpProps elements
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_unmap_SPropValue(struct mapi_nameid *mapi_nameid,
-                                                     struct SPropValue *lpProps,
-                                                     uint32_t PropCount)
-{
-       uint32_t        i;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpProps, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!PropCount, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < mapi_nameid->count; i++) {
-               if (mapi_nameid->entries[i].position <= PropCount) {
-                 lpProps[mapi_nameid->entries[i].position].ulPropTag = (enum MAPITAGS) mapi_nameid->entries[i].proptag;
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Loop over SPropTagArray and look for canonical named
-   property tags we can add to the nameid structure.
-
-   \param nameid the structure where results are stored
-   \param SPropTagArray the array of property tags where to look for
-   canonical named property tags.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: no named property found
-
-   \sa GetIDsFromNames
-
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_lookup_SPropTagArray(struct mapi_nameid *nameid,
-                                                         struct SPropTagArray *SPropTagArray)
-{
-       enum MAPISTATUS retval;
-       uint32_t        i;
-       uint16_t        proptype;
-       bool            status = false;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < SPropTagArray->cValues; i++) {
-               proptype = (SPropTagArray->aulPropTag[i] & 0xFFFF0000) >> 16;
-               if (mapi_nameid_property_lookup(SPropTagArray->aulPropTag[i]) == MAPI_E_SUCCESS) {
-                       retval = mapi_nameid_canonical_add(nameid, SPropTagArray->aulPropTag[i]);
-                       if (retval == MAPI_E_SUCCESS) {
-                               status = true;
-                       }
-               }
-       }
-
-       return (status == true) ? MAPI_E_SUCCESS : MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Loop over lpProps and look for canonical named
-   property tags we can add to the nameid structure.
-
-   \param mapi_nameid the structure where results are stored
-   \param lpProps pointer on a SPropValue structure with the property
-   tags where to look for canonical named property tags
-   \param PropCount count of lpProps elemense
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-   - MAPI_E_NOT_FOUND: no named property found
-
-   \sa GetIDsFromNames
-
- */
-_PUBLIC_ enum MAPISTATUS mapi_nameid_lookup_SPropValue(struct mapi_nameid *mapi_nameid,
-                                                      struct SPropValue *lpProps,
-                                                      unsigned long PropCount)
-{
-       enum MAPISTATUS retval;
-       uint32_t        i;
-       uint16_t        proptype;
-       bool            status = false;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpProps, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (i = 0; i < PropCount; i++) {
-               proptype = (lpProps[i].ulPropTag & 0xFFFF0000) >> 16;
-               if (((proptype >= 0x8000) && (proptype <= 0x8FFF)) ||
-                   ((proptype >= 0xa000) && (proptype <= 0xaFFF))) {
-                       retval = mapi_nameid_canonical_add(mapi_nameid, lpProps[i].ulPropTag);
-                       if (retval == MAPI_E_SUCCESS) {
-                               status = true;
-                       }
-               }
-       }
-
-       return (status == true) ? MAPI_E_SUCCESS : MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Lookup named properties (MNID_STRING) and return their
-   mapped proptags
-
-   This convenient function calls GetIDsFromNames() and returns
-   property tags with their real property type.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_INVALID_PARAMETER: one of the parameters was not set
-   properly
-
-   \sa GetIDsFromNames, mapi_nameid_SPropTagArray
-*/
-_PUBLIC_ enum MAPISTATUS mapi_nameid_GetIDsFromNames(struct mapi_nameid *mapi_nameid,
-                                                    mapi_object_t *obj, 
-                                                    struct SPropTagArray *SPropTagArray)
-{
-       enum MAPISTATUS         retval;
-       uint32_t                i;
-
-       /* sanity check */
-       OPENCHANGE_RETVAL_IF(!mapi_nameid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-
-       retval = GetIDsFromNames(obj, mapi_nameid->count, mapi_nameid->nameid, 0,
-                                &SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, GetLastError(), NULL);
-
-       for (i = 0; i < SPropTagArray->cValues; i++) {
-         SPropTagArray->aulPropTag[i] = (enum MAPITAGS)(((int)SPropTagArray->aulPropTag[i] & 0xFFFF0000) | 
-                                                        mapi_nameid->entries[i].propType);
-       }
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/mapi_notification.h b/branches/plugfest/libmapi/mapi_notification.h
deleted file mode 100644 (file)
index 8dda76c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPI_NOTIFICATION_H__
-#define        __MAPI_NOTIFICATION_H__
-
-/* notification which takes:
- * - ulEvenType = type of notification
- * - void * = notification data
- * - void * = private data pointer
-*/
-typedef int (*mapi_notify_callback_t)(uint16_t, void *, void *);
-
-typedef int (*mapi_notify_continue_callback_t)(void *);
-
-struct notifications {
-       uint32_t                ulConnection;           /* connection number */
-       uint32_t                NotificationFlags;      /* events mask associated */
-       mapi_id_t               parentID;               /* parent EntryID == FID here */
-       mapi_notify_callback_t  callback;               /* callback to run when */
-       void                    *private_data;          /* private data for the callback */
-       struct mapi_object      obj_notif;              /* notification object */
-       struct notifications    *prev;
-       struct notifications    *next;
-};
-
-struct mapi_notify_ctx {
-       struct NOTIFKEY         key;            /* unique identifier */
-       int                     fd;             /* UDP socket file descriptor */
-       struct sockaddr         *addr;
-       struct notifications    *notifications;
-};
-
-struct mapi_notify_continue_callback_data {
-        mapi_notify_continue_callback_t callback; /* Consulted for continuing processing events*/
-        void *data;                               /* Data for callback */
-        struct timeval tv;                        /* Timeout for Select call */
-};
-
-#define        DFLT_NOTIF_PORT 2500
-
-#endif /*!__MAPI_NOTIFICATION_H__ */
diff --git a/branches/plugfest/libmapi/mapi_object.c b/branches/plugfest/libmapi/mapi_object.c
deleted file mode 100644 (file)
index 99b7170..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Fabien Le Mentec 2007.
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \file mapi_object.c
-
-   \brief mapi_object_t support functions
-*/
-
-
-/* FIXME: mapi_object functions should return error codes */
-
-
-/**
-   keep intern to this file
-*/
-#define INVALID_HANDLE_VALUE 0xffffffff
-
-
-/**
-   \details Reset a MAPI object structure
-
-   \param obj pointer on the MAPI object to reset
- */
-static void mapi_object_reset(mapi_object_t *obj)
-{
-       obj->handle = INVALID_HANDLE_VALUE;
-       obj->logon_id = 0;
-       obj->store = false;
-       obj->id = 0;
-       obj->session = NULL;
-       obj->private_data = NULL;
-}
-
-
-/**
-   \details Initialize MAPI object
-
-   This function is required to be called before any 
-   manipulation of this MAPI object.
-
-   \param obj the object to initialize
-   
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-   
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-
-   \sa mapi_object_release
-*/
-_PUBLIC_ enum MAPISTATUS mapi_object_init(mapi_object_t *obj)
-{
-       mapi_object_reset(obj);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Release MAPI object
-
-   This function is required to be called when this MAPI object
-   is no longer required.
-
-   \param obj pointer on the MAPI object to release
-
-   \sa mapi_object_initialize, Release
-*/
-_PUBLIC_ void mapi_object_release(mapi_object_t *obj)
-{
-       enum MAPISTATUS retval;
-
-       if (!obj) return;
-       if (obj->handle == INVALID_HANDLE_VALUE) return;
-
-       retval = Release(obj);
-       if (retval == MAPI_E_SUCCESS) {
-               if (obj->private_data) {
-                       talloc_free(obj->private_data);
-               }
-
-               if (obj->store == true && obj->session) {
-                       obj->session->logon_ids[obj->logon_id] = 0;
-               }
-
-               mapi_object_reset(obj);
-       }
-}
-
-
-/**
-   \details Check if the supplied object has a valid handle
-
-   \param obj pointer on the MAPI object to test
-
-   \return 0 on success, otherwise 1
- */
-int mapi_object_is_invalid(mapi_object_t *obj)
-{
-       if (mapi_object_get_handle(obj) == INVALID_HANDLE_VALUE) {
-               return 1;
-       }
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Copy MAPI object
-
-   This function copies mapi_object data from source to destination.
-
-   \param dst pointer on the destination MAPI object
-   \param src pointer on the source MAPI object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_INITIALIZED
-
- */
-_PUBLIC_ enum MAPISTATUS mapi_object_copy(mapi_object_t *dst, mapi_object_t *src)
-{
-       mapi_object_reset(dst);
-
-       OPENCHANGE_RETVAL_IF(!dst || !src, MAPI_E_NOT_INITIALIZED, NULL);
-
-       dst->id = src->id;
-       dst->handle = src->handle;
-       dst->private_data = src->private_data;
-       dst->logon_id = src->logon_id;
-       dst->session = src->session;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the session associated to the MAPI object
-
-   \param obj the object to get the session for
-
-   \return pointer on a MAPI session on success, otherwise NULL
- */
-_PUBLIC_ struct mapi_session *mapi_object_get_session(mapi_object_t *obj)
-{
-       if (!obj) return NULL;
-       if (!obj->session) return NULL;
-
-       return obj->session;
-}
-
-
-/**
-   \details Set the session for a given MAPI object
-
-   \param obj pointer on the object to set the session for
-   \param session pointer on the MAPI session to associate to the MAPI
-   object
- */
-_PUBLIC_ void mapi_object_set_session(mapi_object_t *obj, 
-                                     struct mapi_session *session)
-{
-       if (obj) {
-               obj->session = session;
-       }
-}
-
-
-/**
-   \details Retrieve an object ID for a given MAPI object
-   \param obj pointer on the MAPI object to get the ID for
-
-   \return the object ID, or 0xFFFFFFFFFFFFFFFF if the object does not exist
-*/
-_PUBLIC_ mapi_id_t mapi_object_get_id(mapi_object_t *obj)
-{
-       return (!obj) ? -1 : obj->id;
-}
-
-
-/**
-   \details Set the id for a given MAPI object
-
-   \param obj pointer on the MAPI object to set the session for
-   \param id Identifier to set to the object obj
- */
-void mapi_object_set_id(mapi_object_t *obj, mapi_id_t id)
-{
-       obj->id = id;
-}
-
-
-/**
-   \details Set the logon id for a given MAPI object
-
-   \param obj pointer to the object to set the logon id for
-   \param logon_id the logon identifier to associate to the MAPI
-   object
- */
-_PUBLIC_ void mapi_object_set_logon_id(mapi_object_t *obj, 
-                                      uint8_t logon_id)
-{
-       if (obj) {
-               obj->logon_id = logon_id;
-       }
-}
-
-
-/**
-   \details Retrieve the logon id for a given MAPI object
-
-   \param obj pointer to the object to retrieve the logon id from
-   \param logon_id pointer to a variable to store the logon id
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS mapi_object_get_logon_id(mapi_object_t *obj, uint8_t *logon_id)
-{
-       if (!obj || !logon_id)
-               return MAPI_E_INVALID_PARAMETER;
-
-       *logon_id = obj->logon_id; 
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Mark a MAPI object as a store object
-   
-   \param obj pointer to the object to set the store boolean for
- */
-_PUBLIC_ void mapi_object_set_logon_store(mapi_object_t *obj)
-{
-       if (obj) {
-               obj->store = true;
-       }
-}
-
-
-/**
-   \details Retrieve the handle associated to a MAPI object
-
-   \param obj pointer on the MAPI object to retrieve the handle from
-
-   \return a valid MAPI object handle on success, otherwise 0xFFFFFFFF.
- */
-mapi_handle_t mapi_object_get_handle(mapi_object_t *obj)
-{
-       return (!obj) ? 0xFFFFFFFF : obj->handle;
-}
-
-
-/**
-   \details Associate a handle to a MAPI object
-
-   \param obj pointer on the MAPI object on which handle has to be set
-   \param handle the MAPI handle value
- */
-void mapi_object_set_handle(mapi_object_t *obj, mapi_handle_t handle)
-{
-       obj->handle = handle;
-}
-
-
-/**
-   \details Dump a MAPI object (for debugging)
-
-   \param obj pointer on the MAPI object to dump out
-*/
-_PUBLIC_ void mapi_object_debug(mapi_object_t *obj)
-{
-       DEBUG(0, ("mapi_object {\n"));
-       DEBUG(0, (" .handle == 0x%x\n", obj->handle));
-       DEBUG(0, (" .id     == 0x%"PRIx64"\n", obj->id));
-       DEBUG(0, ("};\n"));
-}
-
-
-/**
-   \details Initialize MAPI object private data to store a MAPI object
-   table
-
-   \param mem_ctx pointer on the memory context
-   \param obj_table pointer on the MAPI object
- */
-void mapi_object_table_init(TALLOC_CTX *mem_ctx, mapi_object_t *obj_table)
-{
-       mapi_object_table_t     *table = NULL;
-
-       if (obj_table->private_data == NULL) {
-               obj_table->private_data = talloc_zero((TALLOC_CTX *)mem_ctx, mapi_object_table_t);
-       }
-
-       table = (mapi_object_table_t *) obj_table->private_data;
-
-       if (table->bookmark == NULL) {
-               table->bookmark = talloc_zero((TALLOC_CTX *)table, mapi_object_bookmark_t);
-       }
-
-
-       table->proptags.aulPropTag = 0;
-       table->proptags.cValues = 0;
-       /* start bookmark index after BOOKMARK_END */ 
-       table->bk_last = 3;
-}
-
-
-/**
-   \details Fetch a bookmark within a MAPI object table
-
-   \param obj_table pointer on the MAPI object table
-   \param bkPosition the bookmark position to find
-   \param bin pointer on the Sbinary_short the function fills
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-enum MAPISTATUS mapi_object_bookmark_find(mapi_object_t *obj_table, uint32_t bkPosition,
-                                         struct SBinary_short *bin)
-{
-       mapi_object_table_t     *table;
-       mapi_object_bookmark_t  *bookmark;
-
-       table = (mapi_object_table_t *)obj_table->private_data;
-       bookmark = table->bookmark;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!bookmark, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(bkPosition > table->bk_last, MAPI_E_INVALID_BOOKMARK, NULL);
-       
-       while (bookmark) {
-               if (bookmark->index == bkPosition) {
-                       bin->cb = bookmark->bin.cb;
-                       bin->lpb = bookmark->bin.lpb;
-                       return MAPI_E_SUCCESS;
-               }
-               bookmark = bookmark->next;
-       }
-       return MAPI_E_INVALID_BOOKMARK;
-}
-
-
-/**
-   \details Retrieve the number of bookmarks stored in a MAPI object table
-
-   \param obj_table pointer to the MAPI object table
-   \param count pointer to the number of bookmarks to return
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS mapi_object_bookmark_get_count(mapi_object_t *obj_table, 
-                                                       uint32_t *count)
-{
-       mapi_object_table_t     *table;
-
-       table = (mapi_object_table_t *)obj_table->private_data;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_NOT_INITIALIZED, NULL);
-
-       *count = table->bk_last - 3;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Dump bookmarks associated to a MAPI object table
-
-   \param obj_table pointer on the MAPI object table
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS mapi_object_bookmark_debug(mapi_object_t *obj_table)
-{
-       mapi_object_table_t     *table;
-       mapi_object_bookmark_t  *bookmark;
-
-       table = (mapi_object_table_t *)obj_table->private_data;
-       bookmark = table->bookmark;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!table, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!bookmark, MAPI_E_NOT_INITIALIZED, NULL);
-       
-       while (bookmark) {
-               DEBUG(0, ("mapi_object_bookmark {\n"));
-               DEBUG(0, (".index == %u\n", bookmark->index));
-               dump_data(0, bookmark->bin.lpb, bookmark->bin.cb);
-               DEBUG(0, ("};\n"));
-
-               bookmark = bookmark->next;
-       }       
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/mapi_object.h b/branches/plugfest/libmapi/mapi_object.h
deleted file mode 100644 (file)
index ff1bd18..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2009.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPI_OBJECT_H
-#define        __MAPI_OBJECT_H
-
-
-#include <gen_ndr/exchange.h>
-
-
-/* forward declarations
- */
-struct mapi_session;
-
-/* generic mapi object definition
- */
-
-typedef uint64_t mapi_id_t;
-typedef uint32_t mapi_handle_t;
-
-typedef struct mapi_object {
-       bool                    store;
-       uint64_t                id;
-       mapi_handle_t           handle;
-       uint8_t                 logon_id;
-       struct mapi_session     *session;
-       void                    *private_data;
-} mapi_object_t;
-
-
-/*
- * Interface objects
- */
-
-/**
-  IMsgStore store type
-  */
-enum MsgStoreType {
-       PrivateFolderWithoutCachedFids, /*!< Private folder store without the cached folder values filled in */
-       PrivateFolderWithCachedFids,  /*!< Private folder store with the cached folder values filled in */
-       PublicFolder  /*!< Public folder store */
-};
-
-/**
- * IMsgStore object 
- */
-typedef struct mapi_obj_store
-{
-       enum MsgStoreType       store_type;
-       /* Mailbox */
-       uint64_t                fid_mailbox_root;
-       uint64_t                fid_deferred_actions;
-       uint64_t                fid_spooler_queue;
-       uint64_t                fid_top_information_store;
-       uint64_t                fid_inbox;
-       uint64_t                fid_outbox;
-       uint64_t                fid_sent_items;
-       uint64_t                fid_deleted_items;
-       uint64_t                fid_common_views;
-       uint64_t                fid_schedule;
-       uint64_t                fid_search;
-       uint64_t                fid_views;
-       uint64_t                fid_shortcuts;
-       /* Public Folders */
-       uint64_t                fid_pf_public_root;
-       uint64_t                fid_pf_ipm_subtree;
-       uint64_t                fid_pf_non_ipm_subtree;
-       uint64_t                fid_pf_EFormsRegistryRoot;
-       uint64_t                fid_pf_FreeBusyRoot;
-       uint64_t                fid_pf_OfflineAB;
-       uint64_t                fid_pf_EFormsRegistry;
-       uint64_t                fid_pf_LocalSiteFreeBusy;
-       uint64_t                fid_pf_LocalSiteOfflineAB;
-       uint64_t                fid_pf_NNTPArticle;
-       /* cached data */
-       uint64_t                fid_calendar;
-       uint64_t                fid_contact;
-       uint64_t                fid_journal;
-       uint64_t                fid_note;
-       uint64_t                fid_task;
-       uint64_t                fid_drafts;
-} mapi_object_store_t;
-
-
-/**
- * IMAPITable object 
- */
-
-typedef struct mapi_obj_bookmark {
-       uint32_t                        index;
-       struct SBinary_short            bin;
-       struct mapi_obj_bookmark        *prev;
-       struct mapi_obj_bookmark        *next;
-} mapi_object_bookmark_t;
-
-
-typedef struct mapi_obj_table {
-       uint32_t                        bk_last;
-       mapi_object_bookmark_t          *bookmark;
-       struct SPropTagArray            proptags;
-} mapi_object_table_t;
-
-
-typedef struct mapi_obj_message {
-       uint32_t                        cValues;
-       char                            *SubjectPrefix;
-       char                            *NormalizedSubject;
-       struct SPropTagArray            SPropTagArray;
-       struct SRowSet                  SRowSet;
-} mapi_object_message_t;
-
-#endif /*!__MAPI_OBJECT_H */
diff --git a/branches/plugfest/libmapi/mapi_profile.h b/branches/plugfest/libmapi/mapi_profile.h
deleted file mode 100644 (file)
index 4e44d4e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2009.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __MAPI_PROFILE_H
-#define __MAPI_PROFILE_H
-
-
-#include <talloc.h>
-
-
-/* forward decls */
-struct cli_credentials;
-struct ldb_context;
-
-
-/* mapi profile
- */
-struct mapi_profile
-{
-       struct mapi_context     *mapi_ctx;
-       struct cli_credentials  *credentials;
-       char                    *profname;
-       const char              *org;
-       const char              *ou;
-       const char              *username;
-       const char              *password;
-       const char              *mailbox;
-       const char              *workstation;
-       const char              *homemdb;
-       const char              *domain;
-       const char              *realm;
-       const char              *server;
-       const char              *localaddr;
-       bool                    seal;
-       uint32_t                codepage;
-       uint32_t                language;
-       uint32_t                method;
-       uint32_t                exchange_version;
-};
-
-typedef int (*mapi_profile_callback_t)(struct SRowSet *, const void *);
-
-#define        OC_PROFILE_NOPASSWORD   1
-
-#endif /* ! __MAPI_PROFILE_H__ */
diff --git a/branches/plugfest/libmapi/mapi_provider.h b/branches/plugfest/libmapi/mapi_provider.h
deleted file mode 100644 (file)
index 984612e..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007.
-   Copyright (C) Fabien Le Mentec 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __MAPI_PROVIDER_H
-#define __MAPI_PROVIDER_H
-
-
-/* forward decls */
-struct mapi_object;
-struct mapi_profile;
-struct mapi_notify_ctx;
-
-enum PROVIDER_ID {
-       PROVIDER_ID_EMSMDB = 0x1,
-       PROVIDER_ID_NSPI = 0x2,
-       PROVIDER_ID_UNKNOWN
-};
-
-struct mapi_provider {
-       enum PROVIDER_ID        id;
-       void                    *ctx;
-};
-
-struct mapi_objects {
-       struct mapi_object      *object;
-       struct mapi_objects     *prev;
-       struct mapi_objects     *next;
-};
-
-struct mapi_session {
-       struct mapi_provider            *emsmdb;
-       struct mapi_provider            *nspi;
-       struct mapi_profile             *profile;
-       struct mapi_notify_ctx          *notify_ctx;
-       struct mapi_objects             *objects;
-       struct mapi_context             *mapi_ctx;
-       uint8_t                         logon_ids[255];
-
-       struct mapi_session             *next;
-       struct mapi_session             *prev;
-};
-
-#endif /* !__MAPI_PROVIDER_H */
diff --git a/branches/plugfest/libmapi/mapicode.h b/branches/plugfest/libmapi/mapicode.h
deleted file mode 100644 (file)
index 7ffd1b7..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-   libmapi macros header file
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __MAPICODE_H__
-#define __MAPICODE_H__
-
-#define MAPI_RETVAL_IF(x,e,c)  \
-do {                           \
-       if (x) {                        \
-               errno = (e);            \
-               if (c) {                \
-                       talloc_free(c); \
-               }                       \
-               return -1;              \
-       }                               \
-} while (0);
-
-#define OPENCHANGE_RETVAL_IF(x,e,c)    \
-do {                           \
-       if (x) {                        \
-               set_errno(e);           \
-               if (c) {                \
-                       talloc_free(c); \
-               }                       \
-               return (e);             \
-       }                               \
-} while (0);
-
-#define OPENCHANGE_RETVAL_CALL_IF(x,e,r,c)     \
-do {                                   \
-       if (x) {                                \
-               set_errno(e);                   \
-               if (r) {                        \
-                       talloc_free(r);         \
-               }                               \
-               if (c) {                        \
-                       talloc_free(c);         \
-               }                               \
-               return (e);                     \
-       }                                       \
- } while (0);
-
-#define OPENCHANGE_RETVAL_ERR(e,c)     \
-do {                           \
-       set_errno(e);                   \
-       if (c) {                        \
-               talloc_free(c);         \
-       }                               \
-       return (e);                     \
-} while (0);
-
-#define OPENCHANGE_CHECK_NOTIFICATION(s,r)             \
-do {                                           \
-       if (s->notify_ctx)                              \
-               ProcessNotification(s->notify_ctx, r);  \
-} while (0);
-
-/* Status macros for MAPI */
-typedef unsigned long  SCODE;
-
-
-#define SEVERITY_ERROR 1
-#define SEVERITY_WARN  0
-
-#define FACILITY_ITF   4
-#define        MAKE_MAPI_CODE(sev, fac, code) \
-(((SCODE)(sev)<<31)|((SCODE)(fac)<<16)|((SCODE)(code)))
-
-#define        MAKE_MAPI_E(code) (MAKE_MAPI_CODE(SEVERITY_ERROR, FACILITY_ITF, code))
-#define        MAKE_MAPI_S(code) (MAKE_MAPI_CODE(SEVERITY_WARN, FACILITY_ITF, code))
-
-#define        MAPI_STATUS_V(x) ((SCODE)x)
-
-#define        MAPI_STATUS_IS_OK(x) (MAPI_STATUS_V(x) == 0)
-#define        MAPI_STATUS_IS_ERR(x) ((MAPI_STATUS_V(x) & 0xc0000000) == 0xc0000000)
-#define        MAPI_STATUS_EQUAL(x,y) (MAPI_STATUS_V(x) == MAPI_STATUS_V(y))
-
-#define        MAPI_STATUS_IS_OK_RETURN(x) do { \
-               if (MAPI_STATUS_IS_OK(x)) {\
-                       return x;\
-               }\
-} while (0)
-
-#define        MAPI_STATUS_NOT_OK_RETURN(x) do { \
-               if (!MAPI_STATUS_IS_OK(x)) {\
-                       return x;\
-               }\
-} while (0)
-
-#define        MAPI_STATUS_IS_ERR_RETURN(x) do { \
-               if (MAPI_STATUS_IS_ERR(x)) {\
-                       return x;\
-               }\
-} while (0)
-
-#define        MAPI_STATUS_NOT_ERR_RETURN(x) do { \
-               if (!MAPI_STATUS_IS_ERR(x)) {\
-                       return x;\
-               }\
-} while (0)
-
-
-#endif /* !__MAPICODE_H__ */
diff --git a/branches/plugfest/libmapi/mapidefs.h b/branches/plugfest/libmapi/mapidefs.h
deleted file mode 100644 (file)
index d2d50cc..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-   MAPI definitions
-
-   Copyright (C) Julien Kerihuel 2005 - 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __MAPIDEFS_H__
-#define __MAPIDEFS_H__
-
-#define PROP_TAG(type, id) (((id << 16))| (type))
-#define MV_FLAG                        0x1000
-
-/* UNICODE flags */
-#define        MAPI_UNICODE            0x80000000
-
-/* Property types */
-#define        PT_UNSPECIFIED          0x0
-#define        PT_NULL                 0x1
-#define        PT_I2                   0x2
-#define        PT_SHORT                0x2
-#define        PT_LONG                 0x3
-#define        PT_FLOAT                0x4
-#define        PT_DOUBLE               0x5
-#define        PT_CURRENCY             0x6
-#define        PT_APPTIME              0x7
-#define        PT_ERROR                0xa
-#define        PT_BOOLEAN              0xb
-#define        PT_OBJECT               0xd
-#define        PT_I8                   0x14
-#define        PT_STRING8              0x1e
-#define        PT_UNICODE              0x1f
-#define        PT_SYSTIME              0x40
-#define        PT_CLSID                0x48
-#define        PT_SVREID               0xFB
-#define        PT_SRESTRICT            0xFD
-#define        PT_ACTIONS              0xFE
-#define        PT_BINARY               0x102
-
-/* Multi valued property types */
-#define        PT_MV_SHORT             (MV_FLAG | PT_SHORT)
-#define        PT_MV_LONG              (MV_FLAG | PT_LONG)
-#define        PT_MV_FLOAT             (MV_FLAG | PT_FLOAT)
-#define        PT_MV_DOUBLE            (MV_FLAG | PT_DOUBLE)
-#define        PT_MV_CURRENCY          (MV_FLAG | PT_CURRENCY)
-#define        PT_MV_APPTIME           (MV_FLAG | PT_APPTIME)
-#define        PT_MV_I8                (MV_FLAG | PT_I8)
-#define        PT_MV_STRING8           (MV_FLAG | PT_STRING8)
-#define        PT_MV_UNICODE           (MV_FLAG | PT_UNICODE)
-#define        PT_MV_SYSTIME           (MV_FLAG | PT_SYSTIME)
-#define PT_MV_CLSID            (MV_FLAG | PT_CLSID)
-#define        PT_MV_BINARY            (MV_FLAG | PT_BINARY)
-
-/* Restriction types */
-#define RES_AND                        0
-#define RES_OR                 1
-#define RES_NOT                        2
-#define RES_CONTENT            3
-#define RES_PROPERTY           4
-#define RES_COMPAREPROPS       5
-#define RES_BITMASK            6
-#define RES_SIZE               7
-#define RES_EXIST              8
-#define RES_SUBRESTRICTION     9
-#define RES_COMMENT            10
-
-/* Resolve types */
-#define MAPI_UNRESOLVED                0x0
-#define MAPI_AMBIGUOUS         0x1
-#define MAPI_RESOLVED          0x2
-
-/* Positioning Minimal Entry IDs */
-#define        MID_BEGINNING_OF_TABLE  0x0
-#define        MID_CURRENT             0x1
-#define        MID_END_OF_TABLE        0x2
-
-/* Object Type */
-#define MAPI_STORE             0x1     /* Message Store */
-#define MAPI_ADDRBOOK          0x2     /* Address Book */
-#define MAPI_FOLDER            0x3     /* Folder */
-#define MAPI_ABCONT            0x4     /* Address Book Container */
-#define MAPI_MESSAGE           0x5     /* Message */
-#define MAPI_MAILUSER          0x6     /* Individual Recipient */
-#define MAPI_ATTACH            0x7     /* Attachment */
-#define MAPI_DISTLIST          0x8     /* Distribution List Recipient */
-#define MAPI_PROFSECT          0x9     /* Profile Section */
-#define MAPI_STATUS            0xA     /* Status Object */
-#define MAPI_SESSION           0xB     /* Session */
-#define MAPI_FORMINFO          0xC     /* Form Information */
-
-/* Display Type */
-#define DT_MAILUSER            0x0
-#define DT_DISTLIST            0x1
-#define DT_FORUM               0x2
-#define DT_AGENT               0x3
-#define DT_ORGANIZATION                0x4
-#define DT_PRIVATE_DISTLIST    0x5
-#define DT_REMOTE_MAILUSER     0x6
-#define        DT_CONTAINER            0x100
-#define        DT_TEMPLATE             0x101
-#define        DT_ADDRESS_TEMPLATE     0x102
-#define        DT_SEARCH               0x200
-
-/* Attachment method */
-#define NO_ATTACHMENT          0
-#define ATTACH_BY_VALUE                1
-#define ATTACH_BY_REFERENCE    2
-#define ATTACH_BY_REF_RESOLVE  3
-#define ATTACH_BY_REF_ONLY     4
-#define ATTACH_EMBEDDED_MSG    5
-#define ATTACH_OLE             6
-
-/* Creation flags */
-#define        MAPI_CREATE             0x2
-
-/* SaveChanges flags */
-#define KEEP_OPEN_READONLY     0x09
-#define KEEP_OPEN_READWRITE    0x0A
-#define FORCE_SAVE             0x0C
-
-/* OpenMessage flags */
-#define        MAPI_MODIFY             0x1
-/* see MAPI_CREATE above */
-
-
-/* GetGALTable flags */
-#define        TABLE_START             0x0
-#define        TABLE_CUR               0x1
-
-/*
- * ENTRYID flags
- */
-
-/* definition for abFlags[0] */
-#define MAPI_SHORTTERM          0x80
-#define MAPI_NOTRECIP           0x40
-#define MAPI_THISSESSION        0x20
-#define MAPI_NOW                0x10
-#define MAPI_NOTRESERVED        0x08
-
-/* definition for abFlags[1] */
-#define MAPI_COMPOUND           0x80
-
-/*
- * Priority
- */
-
-#define        PRIORITY_LOW            -1
-#define        PRIORITY_NORMAL         0
-#define        PRIORITY_HIGH           1
-
-/*
- * Importance
- */
-
-#define        IMPORTANCE_LOW          0
-#define        IMPORTANCE_NORMAL       1
-#define        IMPORTANCE_HIGH         2
-
-/*
- * Color
- */
-
-#define        olBlue                  0
-#define        olGreen                 1
-#define        olPink                  2
-#define        olYellow                3
-#define        olWhite                 4
-
-
-/*
- * Appointment flags with PR_APPOINTMENT_BUSY_STATUS
- */
-
-#define        BUSY_STATUS_FREE        0
-#define        BUSY_STATUS_TENTATIVE   1
-#define        BUSY_STATUS_BUSY        2
-#define        BUSY_STATUS_OUTOFOFFICE 3
-
-/*
- * Appointment meeting status
- */
-#define MEETING_STATUS_NONMEETING      0
-#define MEETING_STATUS_MEETING         1
-
-/*
- * Task status
- */
-
-#define        olTaskNotStarted                0
-#define        olTaskInProgress                1
-#define        olTaskComplete                  2
-#define        olTaskWaiting                   3
-#define        olTaskDeferred                  4
-
-/*
- * Task OwnerShip
- */
-#define        olNewTask                       0
-#define        olDelegatedTask                 1
-#define        olOwnTask                       2
-
-/*
- * PR_MESSAGE_EDITOR_FORMAT type
- */
-#define        EDITOR_FORMAT_PLAINTEXT         1
-#define        EDITOR_FORMAT_HTML              2
-#define        EDITOR_FORMAT_RTF               3
-
-#define        olEditorText                    1
-#define        olEditorHTML                    2
-#define        olEditorRTF                     3
-#define        olEditorWord                    4
-
-/*
- * Default folders
- */
-#define        olFolderMailboxRoot             0
-#define        olFolderTopInformationStore     1
-#define        olFolderDeletedItems            3
-#define        olFolderOutbox                  4
-#define        olFolderSentMail                5
-#define        olFolderInbox                   6
-#define        olFolderCommonView              8
-#define        olFolderCalendar                9
-#define        olFolderContacts                10
-#define        olFolderJournal                 11
-#define        olFolderNotes                   12
-#define        olFolderTasks                   13
-#define        olFolderDrafts                  16
-#define        olPublicFoldersAllPublicFolders 18
-#define        olFolderConflicts               19
-#define        olFolderSyncIssues              20
-#define        olFolderLocalFailures           21
-#define        olFolderServerFailures          22
-#define        olFolderJunk                    23
-#define        olFolderFinder                  24
-#define        olFolderPublicRoot              25
-#define        olFolderPublicIPMSubtree        26
-#define        olFolderPublicNonIPMSubtree     27
-#define        olFolderPublicEFormsRoot        28
-#define        olFolderPublicFreeBusyRoot      29
-#define        olFolderPublicOfflineAB         30
-#define        olFolderPublicEFormsRegistry    31
-#define        olFolderPublicLocalFreeBusy     32
-#define        olFolderPublicLocalOfflineAB    33
-#define        olFolderPublicNNTPArticle       34
-
-/*
- * IPF container class
- */
-
-#define        IPF_APPOINTMENT                 "IPF.Appointment"
-#define        IPF_CONTACT                     "IPF.Contact"
-#define        IPF_JOURNAL                     "IPF.Journal"
-#define        IPF_NOTE                        "IPF.Note"
-#define        IPF_STICKYNOTE                  "IPF.StickyNote"
-#define        IPF_TASK                        "IPF.Task"
-#define        IPF_POST                        "IPF.Post"
-
-/*
- * Common OLEGUID - see MS-OXPROPS, Section 1.3.2
- */
-
-#define        PSETID_Appointment              "00062002-0000-0000-c000-000000000046"
-#define        PSETID_Task                     "00062003-0000-0000-c000-000000000046"
-#define        PSETID_Address                  "00062004-0000-0000-c000-000000000046"
-#define        PSETID_Common                   "00062008-0000-0000-c000-000000000046"
-#define        PSETID_Note                     "0006200e-0000-0000-c000-000000000046"
-#define        PSETID_Log                      "0006200a-0000-0000-c000-000000000046"
-#define        PSETID_Sharing                  "00062040-0000-0000-c000-000000000046"
-#define        PSETID_PostRss                  "00062041-0000-0000-c000-000000000046"
-#define        PSETID_UnifiedMessaging         "4442858e-a9e3-4e80-b900-317a210cc15b"
-#define        PSETID_Meeting                  "6ed8da90-450b-101b-98da-00aa003f1305"
-#define        PSETID_AirSync                  "71035549-0739-4dcb-9163-00f0580dbbdf"
-#define        PSETID_Messaging                "41f28f13-83f4-4114-a584-eedb5a6b0bff"
-#define        PSETID_Attachment               "96357f7f-59e1-47d0-99a7-46515c183b54"
-#define        PSETID_CalendarAssistant        "11000e07-b51b-40d6-Af21-caa85edab1d0"
-#define        PS_PUBLIC_STRINGS               "00020329-0000-0000-c000-000000000046"
-#define        PS_INTERNET_HEADERS             "00020386-0000-0000-c000-000000000046"
-#define        PS_MAPI                         "00020328-0000-0000-c000-000000000046"
-#define        PSETID_Remote                   "00062014-0000-0000-c000-000000000046"
-
-/* FreeBusy strings for Exchange 2003 and below */
-#define        FREEBUSY_FOLDER         "EX:/o=%s/ou=%s"
-#define        FREEBUSY_USER           "USER-/CN=RECIPIENTS/CN=%s"
-
-#endif /*!__MAPIDEFS_H__ */
diff --git a/branches/plugfest/libmapi/mapidump.c b/branches/plugfest/libmapi/mapidump.c
deleted file mode 100644 (file)
index c05cc49..0000000
+++ /dev/null
@@ -1,1032 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "libmapi/mapidump.h"
-#include <time.h>
-
-#ifdef ENABLE_ASSERTS
-#include <assert.h>
-#define OC_ASSERT(x) assert(x)
-#else
-#define OC_ASSERT(x)
-#endif
-
-/**
-   \file mapidump.c
-
-   \brief Functions for displaying various data structures, mainly for debugging
- */
-
-/**
-  Output one property tag and value
-
-  \param lpProp the property to print
-  \param sep a separator / spacer to insert in front of the label
-*/
-_PUBLIC_ void mapidump_SPropValue(struct SPropValue lpProp, const char *sep)
-{
-       const char                      *proptag;
-       const void                      *data;
-       TALLOC_CTX                      *mem_ctx = NULL;
-       const struct StringArray_r      *StringArray_r = NULL;
-       const struct WStringArray_r     *WStringArray_r = NULL;
-       const struct BinaryArray_r      *BinaryArray_r = NULL;
-       const struct LongArray_r        *LongArray_r = NULL;
-       uint32_t                        i;
-
-       proptag = get_proptag_name(lpProp.ulPropTag);
-       if (!proptag) {
-               mem_ctx = talloc_named(NULL, 0, "mapidump_SPropValue");
-               proptag = talloc_asprintf(mem_ctx, "0x%.8x", lpProp.ulPropTag);
-       }
-       
-
-       switch(lpProp.ulPropTag & 0xFFFF) {
-       case PT_SHORT:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s: 0x%x\n", sep?sep:"", proptag, (*(const uint16_t *)data));
-               break;
-       case PT_LONG:
-       case PT_OBJECT:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s: %u\n", sep?sep:"", proptag, (*(const uint32_t *)data));
-               break;
-       case PT_DOUBLE:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s: %f\n", sep?sep:"", proptag, (*(const double *)data));
-               break;
-       case PT_BOOLEAN:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s: 0x%x\n", sep?sep:"", proptag, (*(const uint8_t *)data));
-               break;
-       case PT_I8:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s: %.16"PRIx64"\n", sep?sep:"", proptag, (*(const uint64_t *)data));
-               break;
-       case PT_STRING8:
-       case PT_UNICODE:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s:", sep?sep:"", proptag);
-               if (data && ((*(const uint16_t *)data) == 0x0000)) {
-                       /* its an empty string */
-                       printf("\n");
-               } else if (data && ((*(enum MAPISTATUS *)data) != MAPI_E_NOT_FOUND)) {
-                       /* its a valid string */
-                       printf(" %s\n", (const char *)data);
-               } else {
-                       /* its a null or otherwise problematic string */
-                       printf(" (NULL)\n");
-               }
-               break;
-       case PT_SYSTIME:
-               mapidump_date_SPropValue(lpProp, proptag, sep);
-               break;
-       case PT_ERROR:
-               data = get_SPropValue_data(&lpProp);
-               printf("%s%s_ERROR: 0x%.8x\n", sep?sep:"", proptag, (*(const uint32_t *)data));
-               break;
-       case PT_CLSID:
-       {
-         const uint8_t *ab = (const uint8_t *) get_SPropValue_data(&lpProp);
-               printf("%s%s: ", sep?sep:"", proptag);
-               for (i = 0; i < 15; ++i) {
-                       printf("%02x ", ab[i]);
-               }
-               printf("%x\n", ab[15]);
-               break;
-       }
-       case PT_SVREID:
-       case PT_BINARY:
-               data = get_SPropValue_data(&lpProp);
-               if (data) {
-                       printf("%s%s:\n", sep?sep:"", proptag);
-                       dump_data(0, ((const struct Binary_r *)data)->lpb, ((const struct Binary_r *)data)->cb);
-               } else {
-                       printf("%s%s: (NULL)\n", sep?sep:"", proptag);
-               }
-               break;
-       case PT_MV_LONG:
-               LongArray_r = (const struct LongArray_r *) get_SPropValue_data(&lpProp);
-               printf("%s%s ", sep?sep:"", proptag);
-               for (i = 0; i < LongArray_r->cValues - 1; i++) {
-                       printf("0x%.8x, ", LongArray_r->lpl[i]);
-               }
-               printf("0x%.8x\n", LongArray_r->lpl[i]);
-               break;
-       case PT_MV_STRING8:
-               StringArray_r = (const struct StringArray_r *) get_SPropValue_data(&lpProp);
-               printf("%s%s: ", sep?sep:"", proptag);
-               for (i = 0; i < StringArray_r->cValues - 1; i++) {
-                       printf("%s, ", StringArray_r->lppszA[i]);
-               }
-               printf("%s\n", StringArray_r->lppszA[i]);
-               break;
-       case PT_MV_UNICODE:
-               WStringArray_r = (const struct WStringArray_r *) get_SPropValue_data(&lpProp);
-               printf("%s%s: ", sep?sep:"", proptag);
-               for (i = 0; i < WStringArray_r->cValues - 1; i++) {
-                       printf("%s, ", WStringArray_r->lppszW[i]);
-               }
-               printf("%s\n", WStringArray_r->lppszW[i]);
-               break;
-       case PT_MV_BINARY:
-               BinaryArray_r = (const struct BinaryArray_r *) get_SPropValue_data(&lpProp);
-               printf("%s%s: ARRAY(%d)\n", sep?sep:"", proptag, BinaryArray_r->cValues);
-               for (i = 0; i < BinaryArray_r->cValues; i++) {
-                       printf("\tPT_MV_BINARY [%d]:\n", i);
-                       dump_data(0, BinaryArray_r->lpbin[i].lpb, BinaryArray_r->lpbin[i].cb);
-               }
-               break;
-       default:
-               /* If you hit this assert, you'll need to implement whatever type is missing */
-               OC_ASSERT(0);
-               break;
-       }
-
-       if (mem_ctx) {
-               talloc_free(mem_ctx);
-       }
-
-}
-
-_PUBLIC_ void mapidump_SPropTagArray(struct SPropTagArray *SPropTagArray)
-{
-       uint32_t        count;
-       const char      *proptag;
-
-       if (!SPropTagArray) return;
-       if (!SPropTagArray->cValues) return;
-
-       for (count = 0; count != SPropTagArray->cValues; count++) {
-               proptag = get_proptag_name(SPropTagArray->aulPropTag[count]);
-               if (proptag) {
-                       printf("%s\n", proptag);
-               } else {
-                       printf("0x%.8x\n", SPropTagArray->aulPropTag[count]);
-               }
-       }
-}
-
-_PUBLIC_ void mapidump_SRowSet(struct SRowSet *SRowSet, const char *sep)
-{
-       uint32_t                i;
-
-       /* Sanity checks */
-       if (!SRowSet) return;
-       if (!SRowSet->cRows) return;
-
-       for (i = 0; i < SRowSet->cRows; i++) {
-               mapidump_SRow(&(SRowSet->aRow[i]), sep);
-       }
-}
-
-_PUBLIC_ void mapidump_SRow(struct SRow *aRow, const char *sep)
-{
-       uint32_t                i;
-
-       for (i = 0; i < aRow->cValues; i++) {
-               mapidump_SPropValue(aRow->lpProps[i], sep);
-       }
-}
-
-/**
-  Output a row of the public address book
-  
-  \param aRow one row of the public address book (Global Address List)
-  
-  This function is usually used with GetGALTable, which can obtain several
-  rows at once - you'll need to iterate over the rows.
-  
-  The SRow is assumed to contain entries for PR_ADDRTYPE_UNICODE, PR_DISPLAY_NAME_UNICODE,
-  PR_EMAIL_ADDRESS_UNICODE and PR_ACCOUNT_UNICODE.
-*/
-_PUBLIC_ void mapidump_PAB_entry(struct SRow *aRow)
-{
-       const char      *addrtype;
-       const char      *name;
-       const char      *email;
-       const char      *account;
-
-       addrtype = (const char *)find_SPropValue_data(aRow, PR_ADDRTYPE_UNICODE);
-       name = (const char *)find_SPropValue_data(aRow, PR_DISPLAY_NAME_UNICODE);
-       email = (const char *)find_SPropValue_data(aRow, PR_EMAIL_ADDRESS_UNICODE);
-       account = (const char *)find_SPropValue_data(aRow, PR_ACCOUNT_UNICODE);
-
-       printf("[%s] %s:\n\tName: %-25s\n\tEmail: %-25s\n", 
-              addrtype, account, name, email);
-       fflush(0);
-}
-
-
-_PUBLIC_ void mapidump_Recipients(const char **usernames, struct SRowSet *rowset, struct SPropTagArray *flaglist)
-{
-       uint32_t                i;
-       uint32_t                j;
-
-       for (i = 0, j= 0; i < flaglist->cValues; i++) {
-               switch (flaglist->aulPropTag[i]) {
-               case MAPI_UNRESOLVED:
-                       printf("\tUNRESOLVED (%s)\n", usernames[i]);
-                       break;
-               case MAPI_AMBIGUOUS:
-                       printf("\tAMBIGUOUS (%s)\n", usernames[i]);
-                       break;
-               case MAPI_RESOLVED:
-                       printf("\tRESOLVED (%s)\n", usernames[i]);
-                       mapidump_SRow(&rowset->aRow[j], "\t\t[+] ");
-                       j++;
-                       break;
-               default:
-                       break;
-               }
-       }
-}
-
-_PUBLIC_ void mapidump_date(struct mapi_SPropValue_array *properties, uint32_t mapitag, const char *label)
-{
-       TALLOC_CTX              *mem_ctx;
-       NTTIME                  time;
-       const struct FILETIME   *filetime;
-       const char              *date;
-
-       mem_ctx = talloc_named(NULL, 0, "mapidump_date");
-
-       filetime = (const struct FILETIME *) find_mapi_SPropValue_data(properties, mapitag);
-       if (filetime) {
-               time = filetime->dwHighDateTime;
-               time = time << 32;
-               time |= filetime->dwLowDateTime;
-               date = nt_time_string(mem_ctx, time);
-               printf("\t%-15s:   %s\n", label, date);
-               fflush(0);
-       }
-
-       talloc_free(mem_ctx);
-}
-
-/**
-  \details This function dumps a property containing a date / time to standard output
-  
-  If the property does not contain a PT_SYSTIME type value, then no output will occur.
-  
-  \param lpProp the property to dump
-  \param label the label to display prior to the time (e.g. the property tag)
-  \param sep a separator / spacer to insert in front of the label
-  
-  \note Prior to OpenChange 0.9, this function took 2 arguments, assuming a default separator of
-  a tab. You can get the old behaviour by using "\t" for sep.
-*/
-_PUBLIC_ void mapidump_date_SPropValue(struct SPropValue lpProp, const char *label, const char *sep)
-{
-       TALLOC_CTX              *mem_ctx;
-       NTTIME                  time;
-       const struct FILETIME           *filetime;
-       const char              *date;
-
-       mem_ctx = talloc_named(NULL, 0, "mapidump_date_SPropValue");
-
-       filetime = (const struct FILETIME *) get_SPropValue_data(&lpProp);
-       if (filetime) {
-               time = filetime->dwHighDateTime;
-               time = time << 32;
-               time |= filetime->dwLowDateTime;
-               date = nt_time_string(mem_ctx, time);
-               printf("%s%s:   %s\n", sep, label, date);
-               fflush(0);
-       }
-
-       talloc_free(mem_ctx);
-}
-
-/**
-   \details This function dumps message information retrieved from
-   OpenMessage call. It provides a quick method to print message
-   summaries with information such as subject and recipients.
-
-   \param obj_message pointer to the MAPI message object to use
- */
-_PUBLIC_ void mapidump_message_summary(mapi_object_t *obj_message)
-{
-       mapi_object_message_t           *msg;
-       int                             *recipient_type;
-       const char                      *recipient;
-       uint32_t                        i;
-
-       if (!obj_message) return;
-       if (!obj_message->private_data) return;
-
-       msg = (mapi_object_message_t *) obj_message->private_data;
-
-       printf("Subject: ");
-       if (msg->SubjectPrefix) {
-               printf("[%s] ", msg->SubjectPrefix);
-       }
-
-       if (msg->NormalizedSubject) {
-               printf("%s", msg->NormalizedSubject);
-       }
-       printf("\n");
-
-       if (!&(msg->SRowSet)) return;
-       for (i = 0; i < msg->SRowSet.cRows; i++) {
-               recipient_type = (int *) find_SPropValue_data(&(msg->SRowSet.aRow[i]), PR_RECIPIENT_TYPE);
-               recipient = (const char *) find_SPropValue_data(&(msg->SRowSet.aRow[i]), PR_SMTP_ADDRESS_UNICODE);
-               if (!recipient) {
-                       recipient = (const char *) find_SPropValue_data(&(msg->SRowSet.aRow[i]), PR_SMTP_ADDRESS);
-               }
-               if (recipient_type && recipient) {
-                       switch (*recipient_type) {
-                       case MAPI_ORIG:
-                               printf("From: %s\n", recipient);
-                               break;
-                       case MAPI_TO:
-                               printf("To: %s\n", recipient);
-                               break;
-                       case MAPI_CC:
-                               printf("Cc: %s\n", recipient);
-                               break;
-                       case MAPI_BCC:
-                               printf("Bcc: %s\n", recipient);
-                               break;
-                       }
-               }
-       }
-       printf("\n");
-}
-
-/**
-   \details This function dumps the properties relating to an email message to standard output
-
-   The expected way to obtain the properties array is to use OpenMessage() to obtain the
-   message object, then to use GetPropsAll() to obtain all the properties.
-
-   \param properties array of message properties
-   \param id identification to display for the message (can be NULL)
-   \param obj_msg pointer to the message MAPI object (can be NULL)
-
-   \sa mapidump_appointment, mapidump_contact, mapidump_task, mapidump_note
-*/
-_PUBLIC_ void mapidump_message(struct mapi_SPropValue_array *properties, const char *id, mapi_object_t *obj_msg)
-{
-       const char                      *msgid;
-       const char                      *from;
-       const char                      *to;
-       const char                      *cc;
-       const char                      *bcc;
-       const char                      *subject;
-       const char                      *body;
-       const char                      *codepage;
-       const struct SBinary_short      *html = NULL;
-       const uint8_t                   *has_attach;
-       const uint32_t                  *cp;
-       ssize_t                         len;
-
-       msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID);
-       subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY);
-       if (!body) {
-               body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY_UNICODE);
-               if (!body) {
-                       html = (const struct SBinary_short *) find_mapi_SPropValue_data(properties, PR_HTML);
-               }
-       }
-       from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME);
-       to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO);
-       cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC);
-       bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC);
-
-       has_attach = (const uint8_t *)find_mapi_SPropValue_data(properties, PR_HASATTACH);
-
-       cp = (const uint32_t *)find_mapi_SPropValue_data(properties, PR_MESSAGE_CODEPAGE);
-       switch (cp ? *cp : 0) {
-       case CP_USASCII:
-               codepage = "CP_USASCII";
-               break;
-       case CP_UNICODE:
-               codepage = "CP_UNICODE";
-               break;
-       case CP_JAUTODETECT:
-               codepage = "CP_JAUTODETECT";
-               break;
-       case CP_KAUTODETECT:
-               codepage = "CP_KAUTODETECT";
-               break;
-       case CP_ISO2022JPESC:
-               codepage = "CP_ISO2022JPESC";
-               break;
-       case CP_ISO2022JPSIO:
-               codepage = "CP_ISO2022JPSIO";
-               break;
-       default:
-               codepage = "";
-               break;
-       }
-
-       printf("+-------------------------------------+\n");
-       printf("message id: %s %s\n", msgid ? msgid : "", id?id:"");
-       if (obj_msg) {
-               mapidump_message_summary(obj_msg);
-       } else {
-               printf("subject: %s\n", subject ? subject : "");
-               printf("From: %s\n", from ? from : "");
-               printf("To:  %s\n", to ? to : "");
-               printf("Cc:  %s\n", cc ? cc : "");
-               printf("Bcc: %s\n", bcc ? bcc : "");
-       }
-       if (has_attach) {
-               printf("Attachment: %s\n", *has_attach ? "True" : "False");
-       }
-       printf("Codepage: %s\n", codepage);
-       printf("Body:\n");
-       fflush(0);
-       if (body) {
-               printf("%s\n", body);
-       } else if (html) {
-               len = write(1, html->lpb, html->cb);
-               len = write(1, "\n", 1);
-               fflush(0);
-       }
-}
-
-/**
-   \details This function dumps the properties relating to an appointment to standard output
-
-   The expected way to obtain the properties array is to use OpenMessage() to obtain the
-   appointment object, then to use GetPropsAll() to obtain all the properties.
-
-   \param properties array of appointment properties
-   \param id identification to display for the appointment (can be NULL)
-
-   \sa mapidump_message, mapidump_contact, mapidump_task, mapidump_note
-*/
-_PUBLIC_ void mapidump_appointment(struct mapi_SPropValue_array *properties, const char *id)
-{
-       const struct mapi_SLPSTRArray   *contacts = NULL;
-       const char              *subject = NULL;
-       const char              *location= NULL;
-       const char              *timezone = NULL;
-       const uint32_t          *status;
-       const uint8_t           *priv = NULL;
-       uint32_t                i;
-
-       contacts = (const struct mapi_SLPSTRArray *)find_mapi_SPropValue_data(properties, PidLidContacts);
-       subject = (const char *)find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       timezone = (const char *)find_mapi_SPropValue_data(properties, PidLidTimeZoneDescription);
-       location = (const char *)find_mapi_SPropValue_data(properties, PidLidLocation);
-       status = (const uint32_t *)find_mapi_SPropValue_data(properties, PidLidBusyStatus);
-       priv = (const uint8_t *)find_mapi_SPropValue_data(properties, PidLidPrivate);
-
-       printf("|== %s ==| %s\n", subject?subject:"", id?id:"");
-       fflush(0);
-
-       if (location) {
-               printf("\tLocation: %s\n", location);
-               fflush(0);
-       }
-
-       mapidump_date(properties, PR_START_DATE, "Start time");
-       mapidump_date(properties, PR_END_DATE, "End time");
-
-       if (timezone) {
-               printf("\tTimezone: %s\n", timezone);
-               fflush(0);
-       }
-
-       printf("\tPrivate: %s\n", (priv && (*priv == true)) ? "True" : "False");
-       fflush(0);
-
-       if (status) {
-               printf("\tStatus: %s\n", get_task_status(*status));
-               fflush(0);
-       }
-
-       if (contacts) {
-               printf("\tContacts:\n");
-               fflush(0);
-               for (i = 0; i < contacts->cValues; i++) {
-                       printf("\t\tContact: %s\n", contacts->strings[i].lppszA);
-                       fflush(0);
-               }
-       }       
-}
-
-/**
-   \details This function dumps the properties relating to a contact (address book entry)
-   to standard output
-
-   The expected way to obtain the properties array is to use OpenMessage() to obtain the
-   contact object, then to use GetPropsAll() to obtain all the properties.
-
-   \param properties array of contact properties
-   \param id identification to display for the contact (can be NULL)
-
-   \sa mapidump_message, mapidump_appointment, mapidump_task, mapidump_note
-*/
-_PUBLIC_ void mapidump_contact(struct mapi_SPropValue_array *properties, const char *id)
-{
-       const char      *card_name =NULL;
-       const char      *topic =NULL;
-       const char      *full_name = NULL;
-       const char      *given_name = NULL;
-       const char      *surname = NULL;
-       const char      *company = NULL;
-       const char      *email = NULL;
-       const char      *title = NULL;
-       const char      *office_phone = NULL;
-       const char      *home_phone = NULL;
-       const char      *mobile_phone = NULL;
-       const char      *postal_address = NULL;
-       const char      *street_address = NULL;
-       const char      *locality = NULL;
-       const char      *state = NULL;
-       const char      *country = NULL;
-       const char      *department = NULL;
-       const char      *business_fax = NULL;
-       const char      *business_home_page = NULL;
-
-       card_name = (const char *)find_mapi_SPropValue_data(properties, PidLidFileUnder);
-       topic = (const char *)find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       company = (const char *)find_mapi_SPropValue_data(properties, PR_COMPANY_NAME);
-       title = (const char *)find_mapi_SPropValue_data(properties, PR_TITLE);
-       full_name = (const char *)find_mapi_SPropValue_data(properties, PR_DISPLAY_NAME);
-       given_name = (const char *)find_mapi_SPropValue_data(properties, PR_GIVEN_NAME);
-       surname = (const char *)find_mapi_SPropValue_data(properties, PR_SURNAME);
-       department = (const char *)find_mapi_SPropValue_data(properties, PR_DEPARTMENT_NAME);
-       email = (const char *)find_mapi_SPropValue_data(properties, PidLidEmail1OriginalDisplayName);
-       office_phone = (const char *)find_mapi_SPropValue_data(properties, PR_OFFICE_TELEPHONE_NUMBER);
-       home_phone = (const char *)find_mapi_SPropValue_data(properties, PR_HOME_TELEPHONE_NUMBER);
-       mobile_phone = (const char *)find_mapi_SPropValue_data(properties, PR_MOBILE_TELEPHONE_NUMBER);
-       business_fax = (const char *)find_mapi_SPropValue_data(properties, PR_BUSINESS_FAX_NUMBER);
-       business_home_page = (const char *)find_mapi_SPropValue_data(properties, PR_BUSINESS_HOME_PAGE);
-       postal_address = (const char*)find_mapi_SPropValue_data(properties, PR_POSTAL_ADDRESS);
-       street_address = (const char*)find_mapi_SPropValue_data(properties, PR_STREET_ADDRESS);
-       locality = (const char*)find_mapi_SPropValue_data(properties, PR_LOCALITY);
-       state = (const char*)find_mapi_SPropValue_data(properties, PR_STATE_OR_PROVINCE);
-       country = (const char*)find_mapi_SPropValue_data(properties, PR_COUNTRY);
-
-       if (card_name) 
-               printf("|== %s ==| %s\n", card_name, id?id:"");
-       else if (topic)
-               printf("|== %s ==| %s\n", topic, id?id:"");
-       else 
-         printf("|== <Unknown> ==| %s\n", id?id:"");
-       fflush(0);
-       if (topic) printf("Topic: %s\n", topic);
-       fflush(0);
-       if (full_name)
-               printf("Full Name: %s\n", full_name);
-       else if (given_name && surname)
-               printf("Full Name: %s %s\n", given_name, surname); // initials? l10n?
-       fflush(0);
-       if (title) printf("Job Title: %s\n", title);
-       fflush(0);
-       if (department) printf("Department: %s\n", department);
-       fflush(0);
-       if (company) printf("Company: %s\n", company);
-       fflush(0);
-       if (email) printf("E-mail: %s\n", email);
-       fflush(0);
-       if (office_phone) printf("Office phone number: %s\n", office_phone);
-       fflush(0);
-       if (home_phone) printf("Work phone number: %s\n", home_phone);
-       fflush(0);
-       if (mobile_phone) printf("Mobile phone number: %s\n", mobile_phone);
-       fflush(0);
-       if (business_fax) printf("Business fax number: %s\n", business_fax);
-       fflush(0);
-       if (business_home_page) printf("Business home page: %s\n", business_home_page);
-       fflush(0);
-       if (postal_address) printf("Postal address: %s\n", postal_address);
-       fflush(0);
-       if (street_address) printf("Street address: %s\n", street_address);
-       fflush(0);
-       if (locality) printf("Locality: %s\n", locality);
-       fflush(0);
-       if (state) printf("State / Province: %s\n", state);
-       fflush(0);
-       if (country) printf("Country: %s\n", country);
-       fflush(0);
-
-       printf("\n");
-}
-
-_PUBLIC_ const char *get_task_status(uint32_t status)
-{
-       switch (status) {
-       case olTaskNotStarted:
-               return ("Not Started");
-       case olTaskInProgress:
-               return ("In Progress");
-       case olTaskComplete:
-               return ("Completed");
-       case olTaskWaiting:
-               return ("Waiting on someone else");
-       case olTaskDeferred:
-               return ("Deferred");
-       }
-
-       return NULL;
-}
-
-_PUBLIC_ const char *get_importance(uint32_t importance)
-{
-       switch (importance) {
-       case IMPORTANCE_LOW:
-               return ("Low");
-       case IMPORTANCE_NORMAL:
-               return ("Normal");
-       case IMPORTANCE_HIGH:
-               return ("High");
-       }
-       return NULL;
-}
-
-/**
-   \details This function dumps the properties relating to a task (to-do list entry)
-   to standard output
-
-   The expected way to obtain the properties array is to use OpenMessage() to obtain the
-   task object, then to use GetPropsAll() to obtain all the properties.
-
-   \param properties array of task properties
-   \param id identification to display for the task (can be NULL)
-
-   \sa mapidump_message, mapidump_appointment, mapidump_contact, mapidump_note
-*/
-_PUBLIC_ void mapidump_task(struct mapi_SPropValue_array *properties, const char *id)
-{
-       const struct mapi_SLPSTRArray   *contacts = NULL;
-       const char                      *subject = NULL;
-       const char                      *body = NULL;
-       const double                    *complete = 0;
-       const uint32_t                  *status;
-       const uint32_t                  *importance;
-       const uint8_t                   *private_tag;
-       uint32_t                        i;
-
-       contacts = (const struct mapi_SLPSTRArray *)find_mapi_SPropValue_data(properties, PidLidContacts);
-       subject = (const char *)find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       body = (const char *)find_mapi_SPropValue_data(properties, PR_BODY);
-       complete = (const double *)find_mapi_SPropValue_data(properties, PidLidPercentComplete);
-       status = (const uint32_t *)find_mapi_SPropValue_data(properties, PidLidTaskStatus);
-       importance = (const uint32_t *)find_mapi_SPropValue_data(properties, PR_IMPORTANCE);
-       private_tag = (const uint8_t *)find_mapi_SPropValue_data(properties, PidLidPrivate);
-
-       printf("|== %s ==| %s\n", subject?subject:"", id?id:"");
-       fflush(0);
-
-       printf("\tBody: %s\n", body?body:"none");
-       fflush(0);
-
-       if (complete) {
-               printf("\tComplete: %u %c\n", (uint32_t)(*complete * 100), '%');
-               fflush(0);
-       }
-
-       if (status) {
-               printf("\tStatus: %s\n", get_task_status(*status));
-               fflush(0);
-               if (*status == olTaskComplete) {
-                       mapidump_date(properties, PidLidTaskDateCompleted, "Date Completed");
-               }
-       }
-
-       if (importance) {
-               printf("\tImportance: %s\n", get_importance(*importance));
-               fflush(0);
-       }
-
-       mapidump_date(properties, PidLidTaskDueDate,"Due Date");
-       mapidump_date(properties, PidLidTaskStartDate, "Start Date");
-
-       if (private_tag) {
-               printf("\tPrivate: %s\n", (*private_tag == true)?"True":"False");
-               fflush(0);
-       } else {
-               printf("\tPrivate: false\n");
-               fflush(0);
-       }
-
-       if (contacts) {
-               for (i = 0; i < contacts->cValues; i++) {
-                       printf("\tContact: %s\n", contacts->strings[i].lppszA);
-                       fflush(0);
-               }
-       }
-}
-
-/**
-   \details This function dumps the properties relating to a note to standard output
-
-   The expected way to obtain the properties array is to use OpenMessage() to obtain the
-   note object, then to use GetPropsAll() to obtain all the properties.
-
-   \param properties array of note properties
-   \param id identification to display for the note (can be NULL)
-
-   \sa mapidump_message, mapidump_appointment, mapidump_contact, mapidump_task
-*/
-_PUBLIC_ void mapidump_note(struct mapi_SPropValue_array *properties, const char *id)
-{
-       const char              *subject = NULL;
-       const char              *body = NULL;
-
-       subject = (const char *)find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       body = (const char *)find_mapi_SPropValue_data(properties, PR_BODY);
-
-       printf("|== %s ==| %s\n", subject?subject:"", id?id:"");
-       fflush(0);
-       
-       mapidump_date(properties, PR_CLIENT_SUBMIT_TIME, "Submit Time");
-
-       if (body) {
-               printf("Content:\n");
-               printf("%s\n", body);
-               fflush(0);
-       } else {
-               body = (const char *)find_mapi_SPropValue_data(properties, PR_BODY_HTML);
-               if (body) {
-                       printf("Content HTML:\n");
-                       printf("%s\n", body);
-                       fflush(0);
-               }
-       }
-}
-
-_PUBLIC_ void mapidump_msgflags(uint32_t MsgFlags, const char *sep)
-{
-       uint32_t        i;
-       
-       for (i = 0; mdump_msgflags[i].flag; i++) {
-               if (MsgFlags & mdump_msgflags[i].flag) {
-                       printf("%s\t%s (0x%x)\n", sep?sep:"", 
-                              mdump_msgflags[i].value, mdump_msgflags[i].flag);
-                       fflush(0);
-               }
-       }
-
-}
-
-
-_PUBLIC_ void mapidump_newmail(struct NewMailNotification *newmail, const char *sep)
-{
-       printf("%sParent Entry ID: 0x%"PRIx64"\n", sep?sep:"", newmail->FID);
-       fflush(0);
-       printf("%sMessage Entry ID: 0x%"PRIx64"\n", sep?sep:"", newmail->MID);
-       fflush(0);
-       printf("%sMessage flags:\n", sep?sep:"");
-       fflush(0);
-       mapidump_msgflags(newmail->MessageFlags, sep);
-       if (newmail->UnicodeFlag == 0x0) {
-               printf("%sMessage Class: %s\n", sep?sep:"", newmail->MessageClass.lpszA);
-       } else {
-               printf("%sMessage Class: %s\n", sep?sep:"", newmail->MessageClass.lpszW);
-       }
-       fflush(0);
-}
-
-_PUBLIC_ void mapidump_tags(enum MAPITAGS *Tags, uint16_t TagCount, const char *sep)
-{
-       uint32_t        i;
-       const char      *proptag;
-       for (i = 0; i < TagCount; i++) {
-               proptag = get_proptag_name(Tags[i]);
-               printf("%s Tag: %s\n", sep?sep:"", proptag);
-               fflush(0);
-       }
-}
-
-_PUBLIC_ void mapidump_foldercreated(struct FolderCreatedNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sParent Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->ParentFID);
-       fflush(0);
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-       mapidump_tags (data->Tags, data->TagCount, sep);
-}
-
-_PUBLIC_ void mapidump_folderdeleted(struct FolderDeletedNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sParent Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->ParentFID);
-       fflush(0);
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-}
-
-_PUBLIC_ void mapidump_foldermoved(struct FolderMoveCopyNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sParent Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->ParentFID);
-       fflush(0);
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-       printf("%sOld Parent Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->OldParentFID);
-       fflush(0);
-       printf("%sOld Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->OldFID);
-       fflush(0);
-}
-
-_PUBLIC_ void mapidump_foldercopied(struct FolderMoveCopyNotification *data, const char *sep)
-{
-       mapidump_foldermoved(data, sep);
-}
-
-_PUBLIC_ void mapidump_messagedeleted(struct MessageDeletedNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-       printf("%sMessage Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->MID);
-       fflush(0);
-}
-
-_PUBLIC_ void mapidump_messagecreated(struct MessageCreatedNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-       printf("%sMessage Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->MID);
-       fflush(0);
-       mapidump_tags (data->Tags, data->TagCount, sep);
-}
-
-_PUBLIC_ void mapidump_messagemodified(struct MessageModifiedNotification *data, const char *sep)
-{
-       mapidump_messagecreated((struct MessageCreatedNotification *)data, sep);
-}
-
-_PUBLIC_ void mapidump_messagemoved(struct MessageMoveCopyNotification *data, const char *sep)
-{
-       if (!data) {
-               return;
-       }
-       printf("%sFolder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->FID);
-       fflush(0);
-       printf("%sMessage Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->MID);
-       fflush(0);
-       printf("%sOld Parent Folder Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->OldFID);
-       fflush(0);
-       printf("%sOld Message Entry ID: 0x%"PRIx64"\n", sep?sep:"", data->OldMID);
-}
-
-_PUBLIC_ void mapidump_messagecopied(struct MessageMoveCopyNotification *data, const char *sep)
-{
-       mapidump_messagemoved(data, sep);
-}
-
-_PUBLIC_ const char *mapidump_freebusy_month(uint32_t month, uint32_t year)
-{
-       uint32_t        realmonth;
-
-       realmonth = month - (year * 16);
-
-       switch (realmonth) {
-       case 0x1:
-               return "January";
-       case 0x2:
-               return "February";
-       case 0x3:
-               return "March";
-       case 0x4:
-               return "April";
-       case 0x5:
-               return "May";
-       case 0x6:
-               return "June";
-       case 0x7:
-               return "July";
-       case 0x8:
-               return "August";
-       case 0x9:
-               return "September";
-       case 0xa:
-               return "October";
-       case 0xb:
-               return "November";
-       case 0xc:
-               return "December";
-       }
-       return NULL;
-}
-
-
-_PUBLIC_ uint32_t mapidump_freebusy_year(uint32_t month, uint32_t year)
-{
-       uint32_t        realmonth;
-
-       realmonth = month - (year * 16);
-       while (realmonth > 0xc) {
-               year++;
-               realmonth = month - (year * 16);
-       }
-
-       return year;
-}
-
-
-_PUBLIC_ void mapidump_freebusy_date(uint32_t t, const char *sep)
-{
-       TALLOC_CTX      *mem_ctx;
-       NTTIME          time;
-       const char      *date;
-
-       mem_ctx = talloc_named(NULL, 0, "mapidump_freebusy_date");
-
-       time = t;
-       time *= 60;
-       time *= 10000000;
-
-       date = nt_time_string(mem_ctx, time);
-       DEBUG(0, ("%s %-30s\n", sep, date));
-       talloc_free((char *)date);
-       talloc_free(mem_ctx);
-}
-
-
-_PUBLIC_ void mapidump_freebusy_event(struct Binary_r *bin, uint32_t month, uint32_t year, const char *sep)
-{
-       uint16_t        event_start;
-       uint16_t        event_end;
-       uint32_t        i;
-       uint32_t        hour;
-       uint32_t        hours;
-       uint32_t        day;
-       const char      *month_name;
-       uint32_t        last;
-       uint32_t        minutes = 0;
-
-       if (!bin) return;
-       /* bin.cb must be a multiple of 4 */
-       if (bin->cb % 4) return;
-
-       year = mapidump_freebusy_year(month, year);
-       month_name = mapidump_freebusy_month(month, year);
-       if (!month_name) return;
-
-       for (i = 0; i < bin->cb; i+= 4) {
-               event_start = (bin->lpb[i + 1] << 8) | bin->lpb[i];
-               event_end = (bin->lpb[i + 3] << 8) | bin->lpb[i + 2];
-
-               for (hour = 0; hour < 24; hour++) {
-                       if (!(((event_start - (60 * hour)) % 1440) && (((event_start - (60 * hour)) % 1440) - 30))) {
-                               day = ((event_start - (60 * hour)) / 1440) + 1;
-                               minutes = (event_start - (60 * hour)) % 1440;
-                               last = event_end - event_start;
-#if defined (__FreeBSD__)
-                               DEBUG(0, ("%s %u %s %u at %.2u%.2u hrs and lasts ", sep ? sep : "", day, month_name, year, hour, minutes));
-#else
-                               DEBUG(0, ("%s %u %s %u at %.2u%.2u hrs and lasts ", sep ? sep : "", day, month_name, year, hour + daylight, minutes));
-#endif
-                               if (last < 60) {
-                                       DEBUG(0, ("%u mins\n", last));
-                               } else {
-                                       hours = last / 60;
-                                       minutes = last - hours * 60;
-                                       if (minutes > 0) {
-                                               DEBUG(0, ("%u hrs %u mins\n", hours, minutes));
-                                       } else {
-                                               DEBUG(0, ("%u hrs\n", hours));
-                                       }
-                               }
-                       }
-               }
-       }       
-}
-
-/**
-   \details print the list of languages OpenChange supports
- */
-_PUBLIC_ void mapidump_languages_list(void)
-{
-       mapi_get_language_list();
-}
diff --git a/branches/plugfest/libmapi/mapidump.h b/branches/plugfest/libmapi/mapidump.h
deleted file mode 100644 (file)
index f30dc60..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __MAPIDUMP_H__
-#define        __MAPIDUMP_H__
-
-struct mdump_msgflags {
-       uint16_t        flag;
-       const char      *value;
-};
-
-struct mdump_msgflags mdump_msgflags[] = {
-       {0x1,   "MSGFLAG_READ"},
-       {0x2,   "MSGFLAG_UNMODIFIED"},
-       {0x4,   "MSGFLAG_SUBMIT"},
-       {0x8,   "MSGFLAG_UNSENT"},
-       {0x10,  "MSGFLAG_HASATTACH"},
-       {0x20,  "MSGFLAG_FROMME"},
-       {0x40,  "MSGFLAG_ASSOCIATED"},
-       {0x80,  "MSGFLAG_RESEND"},
-       {0x100, "MSGFLAG_RN_PENDING"},
-       {0x200, "MSGFLAG_NRN_PENDING"},
-       {0, NULL}
-};
-
-#endif /* __MAPIDUMP_H__ */
diff --git a/branches/plugfest/libmapi/nspi.c b/branches/plugfest/libmapi/nspi.c
deleted file mode 100644 (file)
index 0a976bc..0000000
+++ /dev/null
@@ -1,1177 +0,0 @@
-/*
-   OpenChange NSPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005 - 2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange_c.h"
-#include <param.h>
-
-
-/**
-   \file nspi.c
-
-   \brief Name Service Provider (NSPI) stack functions
- */
-
-
-/**
-   \details Initialize the STAT structure and set common STAT parameters
-
-   \param mem_ctx pointer to the memory context
-   \param CodePage the CodePage value to set in the STAT structure
-   \param TemplateLocale the Locale for the STAT TemplateLocale parameter
-   \param SortLocale the Locale for the STAT SortLocal parameter
- */
-static struct STAT *nspi_set_STAT(TALLOC_CTX *mem_ctx, 
-                                 uint32_t CodePage,
-                                 uint32_t TemplateLocale, 
-                                 uint32_t SortLocale)
-{
-       struct STAT             *pStat;
-
-       /* Sanity Checks */
-       if (!CodePage || !TemplateLocale || !SortLocale) {
-               return NULL;
-       }
-
-       pStat = talloc_zero(mem_ctx, struct STAT);
-       pStat->SortType = SortTypeDisplayName;
-       pStat->CodePage = CodePage;
-       pStat->TemplateLocale = TemplateLocale;
-       pStat->SortLocale = SortLocale;
-
-       return pStat;
-}
-
-
-/**
-   \details Initiates a session between a client and the NSPI server.
-
-   \param parent_ctx pointer to the memory context
-   \param p pointer to the DCERPC pipe
-   \param cred pointer to the user credentials
-   \param codepage the code to set in the STAT structure
-   \param language the language to set in the STAT structure
-   \param method the method to set in the STAT structure
-
-   \return Allocated pointer to a nspi_context structure on success,
-   otherwise NULL
- */
-_PUBLIC_ struct nspi_context *nspi_bind(TALLOC_CTX *parent_ctx, 
-                                       struct dcerpc_pipe *p,
-                                       struct cli_credentials *cred, 
-                                       uint32_t codepage,
-                                       uint32_t language, 
-                                       uint32_t method)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct NspiBind         r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *ret;
-       struct GUID             guid;
-
-       /* Sanity checks */
-       if (!p) return NULL;
-       if (!cred) return NULL;
-
-       ret = talloc(parent_ctx, struct nspi_context);
-       ret->rpc_connection = p;
-       ret->mem_ctx = parent_ctx;
-       ret->cred = cred;
-       ret->version = 0;
-
-       /* Sanity Checks */
-       if (!(ret->pStat = nspi_set_STAT((TALLOC_CTX *) ret, codepage, language, method))) {
-               talloc_free(ret);
-               return NULL;
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "nspi_bind");
-
-       r.in.dwFlags = 0;
-
-       r.in.pStat = ret->pStat;
-       r.in.pStat->ContainerID = 0x0;
-
-       r.in.mapiuid = talloc(mem_ctx, struct GUID);
-       memset(r.in.mapiuid, 0, sizeof(struct GUID));
-       
-       r.out.mapiuid = &guid;
-
-       r.in.mapiuid = talloc(mem_ctx, struct GUID);
-       memset(r.in.mapiuid, 0, sizeof(struct GUID));
-
-       r.out.handle = &ret->handle;
-
-       status = dcerpc_NspiBind_r(p->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       if ((!NT_STATUS_IS_OK(status)) || (retval != MAPI_E_SUCCESS)) {
-               talloc_free(ret);
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-       
-       talloc_free(mem_ctx);
-       return ret;
-}
-
-
-/**
-   \details Destructor for the NSPI context. Call the NspiUnbind
-   function.
-   
-   \param data generic pointer to data with mapi_provider information
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-
-int nspi_disconnect_dtor(void *data)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_provider    *provider = (struct mapi_provider *) data;
-
-       retval = nspi_unbind((struct nspi_context *)provider->ctx);
-       return retval;
-}
-
-
-/**
-   \details Destroys the context handle
-
-   \param nspi_ctx pointer to the NSPI connection context
-
-   \return return 1 on success or 2 if the input context is NULL
- */
-_PUBLIC_ enum MAPISTATUS nspi_unbind(struct nspi_context *nspi_ctx)
-{
-       struct NspiUnbind       r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       r.in.handle = r.out.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0;
-
-       status = dcerpc_NspiUnbind_r(nspi_ctx->rpc_connection->binding_handle, nspi_ctx->mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF((retval != 1) && !MAPI_STATUS_IS_OK(NT_STATUS_V(status)), retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Updates the STAT block representing position in a table to
-   reflect positioning changes requested by the client.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param plDelta pointer to an unsigned long indicating movement
-   within the address book container specified by the input parameter
-   pStat.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_UpdateStat(struct nspi_context *nspi_ctx, 
-                                        TALLOC_CTX *mem_ctx,
-                                        uint32_t *plDelta)
-{
-       struct NspiUpdateStat           r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!plDelta, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.plDelta = plDelta;
-
-       r.out.pStat = nspi_ctx->pStat;
-       r.out.plDelta = r.in.plDelta;
-
-       status = dcerpc_NspiUpdateStat_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a number of Rows from a specified table.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param pPropTags pointer to the list of proptags that the client
-   requires to be returned for each row.
-   \param MIds pointer to a list of values representing an Explicit
-   table
-   \param count the number of rows requested
-   \param ppRows pointer on pointer to the the rows returned by the
-   server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_QueryRows(struct nspi_context *nspi_ctx, 
-                                       TALLOC_CTX *mem_ctx,
-                                       struct SPropTagArray *pPropTags,
-                                       struct SPropTagArray *MIds, 
-                                       uint32_t count,
-                                       struct SRowSet **ppRows)
-{
-       struct NspiQueryRows            r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct STAT                     *pStat;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.dwFlags = 0x0;
-       r.in.pStat = nspi_ctx->pStat;
-
-       if (MIds && MIds->cValues) {
-               r.in.dwETableCount = MIds->cValues;
-               r.in.lpETable = (uint32_t *) MIds->aulPropTag;
-               /* We set CurrentRec to the first entry */
-               r.in.pStat->CurrentRec = MIds->aulPropTag[0];
-       } else {
-               r.in.dwETableCount = 0;
-               r.in.lpETable = NULL;
-       }
-
-       r.in.Count = count;     
-       r.in.pPropTags = pPropTags;
-
-       pStat = talloc(mem_ctx, struct STAT);
-       r.out.pStat = pStat;
-
-       r.out.ppRows = ppRows;
-
-       status = dcerpc_NspiQueryRows_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       nspi_ctx->pStat->CurrentRec = r.out.pStat->CurrentRec;
-       nspi_ctx->pStat->Delta = r.out.pStat->Delta;
-       nspi_ctx->pStat->NumPos = r.out.pStat->NumPos;
-       nspi_ctx->pStat->TotalRecs = r.out.pStat->TotalRecs;
-
-       return MAPI_E_SUCCESS;
-
-}
-
-
-/**
-   \details Searches for and sets the logical position in a specific
-   table to the first entry greater than or equal to a specified
-   value. Optionally, it might also return information about rows in
-   the table.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param SortType the table sort order to use
-   \param pTarget SPropValue struct holding the value being sought
-   \param pPropTags pointer to an array of property tags of columns
-   that the client wants to be returned for each row returned.
-   \param pMIds pointer to a list of Mid that comprise a restricted
-   address book container
-   \param pRows pointer to pointer to a SRowSet structure holding the
-   rows returned by the server
-
-   SortType can take the following values:
-   -# SortTypeDisplayName
-   -# SortTypePhoneticDisplayName
-
-   If pTarget property tag is not set accordingly to SortType, the
-   function returns MAPI_E_INVALID_PARAMETER. Possible values are:
-   -# SortType set to SortTypeDisplayName and pTarget property tag set
-      to PR_DISPLAY_NAME or PR_DISPLAY_UNICODE
-   -# SortType set to SortTypePhoneticDisplayName and pTarget property
-      tag set to PR_EMS_AB_PHONETIC_DISPLAY_NAME or
-      PR_EMS_AB_PHONETIC_DISPLAY_NAME_UNICODE
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_SeekEntries(struct nspi_context *nspi_ctx,
-                                         TALLOC_CTX *mem_ctx,
-                                         enum TableSortOrders SortType,
-                                         struct SPropValue *pTarget,
-                                         struct SPropTagArray *pPropTags,
-                                         struct SPropTagArray *pMIds,
-                                         struct SRowSet **pRows)
-{
-       struct NspiSeekEntries          r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct STAT                     *pStat;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pTarget, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pRows, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(((SortType != SortTypeDisplayName) 
-                       && (SortType != SortTypePhoneticDisplayName)), 
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Sanity Checks on SortType and pTarget combination */
-       OPENCHANGE_RETVAL_IF(((SortType == SortTypeDisplayName) && 
-                       (pTarget->ulPropTag != PR_DISPLAY_NAME) && 
-                       (pTarget->ulPropTag != PR_DISPLAY_NAME_UNICODE)),
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-       OPENCHANGE_RETVAL_IF(((SortType == SortTypePhoneticDisplayName) && 
-                       (pTarget->ulPropTag != PR_EMS_AB_PHONETIC_DISPLAY_NAME) &&
-                       (pTarget->ulPropTag != PR_EMS_AB_PHONETIC_DISPLAY_NAME_UNICODE)),
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.pStat->SortType = SortType;
-       r.in.pTarget = pTarget;
-
-       if (pMIds && pMIds->cValues) {
-               r.in.lpETable = pMIds;
-       } else {
-               r.in.lpETable = NULL;
-       }
-
-       r.in.pPropTags = pPropTags;
-
-       r.out.pRows = pRows;
-
-       pStat = talloc(mem_ctx, struct STAT);
-       r.out.pStat = pStat;
-
-       status = dcerpc_NspiSeekEntries_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, pStat);
-       OPENCHANGE_RETVAL_IF(retval, retval, pStat);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns an explicit table.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param pPropTags pointer to an array of property tags of columns
-   \param Filter pointer to the Restriction to apply to the table
-   \param ppRows pointer to pointer to a SRowSet structure holding the
-   rows returned by the server
-   \param ppOutMIds pointer to pointer to a list of MId that comprise
-   a restricted address book container
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetMatches(struct nspi_context *nspi_ctx, 
-                                        TALLOC_CTX *mem_ctx,
-                                        struct SPropTagArray *pPropTags,
-                                        struct Restriction_r *Filter,
-                                        struct SRowSet **ppRows,
-                                        struct SPropTagArray **ppOutMIds)
-{
-       struct NspiGetMatches           r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct STAT                     *pStat;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppRows, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppOutMIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0;
-       
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.pStat->ContainerID = 0x0;
-       r.in.pStat->CurrentRec = 0x0;
-       r.in.pStat->Delta = 0x0;
-       r.in.pStat->NumPos = 0x0;
-       r.in.pStat->TotalRecs = 0x0;
-
-       r.in.pReserved = NULL;
-       r.in.Reserved2 = 0;
-       r.in.Filter = Filter;
-       r.in.lpPropName = NULL;
-       r.in.ulRequested = 5000;
-       r.in.pPropTags = pPropTags;
-
-       pStat = talloc(mem_ctx, struct STAT);
-       r.out.pStat = pStat;
-       r.out.ppOutMIds = ppOutMIds;
-       r.out.ppRows = ppRows;
-
-       status = dcerpc_NspiGetMatches_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_NOT_FOUND, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Applies a sort order to the objects in a restricted
-   address book container
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param SortType the table sort order to use
-   \param pInMIds pointer on a list of MIds that comprise a
-   restricted addess book container
-   \param ppMIds pointer on pointer to the returned list of MIds that
-   comprise a restricted addess book container.
-
-   SortType can take the following values:
-   -# SortTypeDisplayName
-   -# SortTypePhoneticDisplayName
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_ResortRestriction(struct nspi_context *nspi_ctx,
-                                               TALLOC_CTX *mem_ctx,
-                                               enum TableSortOrders SortType,
-                                               struct SPropTagArray *pInMIds,
-                                               struct SPropTagArray **ppMIds)
-{
-       struct NspiResortRestriction    r;
-       enum MAPISTATUS                 retval;
-       NTSTATUS                        status;
-       struct SPropTagArray            *ppInMIds = NULL;
-       struct STAT                     *pStat = NULL;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pInMIds, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppMIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Sanity check on SortType */
-       OPENCHANGE_RETVAL_IF(((SortType != SortTypeDisplayName) && (SortType != SortTypePhoneticDisplayName)),
-                      MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0;
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.pStat->SortType = SortType;
-       r.in.pInMIds = pInMIds;
-       r.in.ppMIds = &ppInMIds;
-
-       pStat = talloc_zero(mem_ctx, struct STAT);
-       r.out.pStat = pStat;
-       r.out.ppMIds = ppMIds;
-
-       status = dcerpc_NspiResortRestriction_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Maps a set of DN to a set of MId
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param pNames pointer to a StringsArray_r structure with the DN to
-   map
-   \param ppMIds pointer on pointer to the returned list of MIds
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_DNToMId(struct nspi_context *nspi_ctx, 
-                                     TALLOC_CTX *mem_ctx,
-                                     struct StringsArray_r *pNames,
-                                     struct SPropTagArray **ppMIds)
-{
-       struct NspiDNToMId      r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pNames, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pNames->Count, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppMIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0;
-       r.in.pNames = pNames;
-
-       r.out.ppMIds = ppMIds;
-
-       status = dcerpc_NspiDNToMId_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL)
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a list of all the properties that have values on
-   the specified object
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param WantObject boolean value defining whether we want the server
-   to include properties with the type set to PT_OBJECT
-   \param dwMId the MId of the specified object
-   \param ppPropTags pointer on pointer to the list of property tags
-   associated to the object.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetPropList(struct nspi_context *nspi_ctx,
-                                         TALLOC_CTX *mem_ctx,
-                                         bool WantObject,
-                                         uint32_t dwMId,
-                                         struct SPropTagArray **ppPropTags)
-{
-       struct NspiGetPropList  r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppPropTags, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       r.in.handle = &nspi_ctx->handle;
-       r.in.dwFlags = (WantObject == true) ? 0x0 : fSkipObjects;
-       r.in.dwMId = dwMId;
-       r.in.CodePage = nspi_ctx->pStat->CodePage;
-       
-       r.out.ppPropTags = ppPropTags;
-
-       status = dcerpc_NspiGetPropList_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-
-/**
-   \details Returns an address book row containing a set of the
-   properties and values that exists on an object
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param pPropTags pointer to the list of property tags that the
-   client wants to be returned
-   \param MId pointer to the MId of the record
-   \param SRowSet pointer on pointer to the row returned by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetProps(struct nspi_context *nspi_ctx, 
-                                      TALLOC_CTX *mem_ctx,
-                                      struct SPropTagArray *pPropTags, 
-                                      struct SPropTagArray *MId,
-                                      struct SRowSet **SRowSet)
-
-{
-       struct NspiGetProps     r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       struct SRow             *ppRows;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!MId, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!MId->cValues, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.dwFlags = 0;
-
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.pStat->CurrentRec = MId->aulPropTag[0];
-       r.in.pStat->Delta = 0x0;
-       r.in.pStat->NumPos = 0x0;
-       r.in.pStat->TotalRecs = 0x0;
-
-       r.in.pPropTags = pPropTags;
-
-       ppRows = talloc(mem_ctx, struct SRow);
-       r.out.ppRows = &ppRows;
-
-       status = dcerpc_NspiGetProps_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL)
-
-       SRowSet[0]->cRows = 1;
-       SRowSet[0]->aRow = talloc(mem_ctx, struct SRow);
-       SRowSet[0]->aRow->ulAdrEntryPad = ppRows->ulAdrEntryPad;
-       SRowSet[0]->aRow->cValues = ppRows->cValues;
-       SRowSet[0]->aRow->lpProps = ppRows->lpProps;
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Compares the position in an address book container of two
-   objects identified by MId and returns the value of the comparison
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param MId1 the first MId to compare
-   \param MId2 the second MId to compare
-   \param plResult pointer to the value of the comparison
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_CompareMIds(struct nspi_context *nspi_ctx,
-                                         TALLOC_CTX *mem_ctx,
-                                         uint32_t MId1, uint32_t MId2,
-                                         uint32_t *plResult)
-{
-       struct NspiCompareMIds  r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!plResult, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.MId1 = MId1;
-       r.in.MId2 = MId2;
-
-       r.out.plResult = plResult;
-
-       status = dcerpc_NspiCompareMIds_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Modify the properties of an object in the address book
-   
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param MId the MId of the address book object
-   \param pPropTags pointer to the list of properties to be modified
-   on the object
-   \param pRow Contains an address book row
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_ModProps(struct nspi_context *nspi_ctx,
-                                      TALLOC_CTX *mem_ctx,
-                                      uint32_t MId,
-                                      struct SPropTagArray *pPropTags,
-                                      struct SRow *pRow)
-{
-       struct NspiModProps     r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pPropTags, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pRow, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-       r.in.pStat = nspi_ctx->pStat;
-
-       if (MId) {
-               r.in.pStat->CurrentRec = MId;
-       }
-
-       r.in.pPropTags = pPropTags;
-       r.in.pRow = pRow;
-
-       status = dcerpc_NspiModProps_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-
-/**
-   \details Returns the rows of a special table to the client. The
-   special table can be a Hierarchy Table or an Address Creation Table
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param Type bitmap of flags defining the type of the special table
-   \param ppRows pointer on pointer to the rows returned by the server
-
-   Possible values for Type:
-   -# NspiAddressCreationTemplates to access an Address Creation Table
-   -# NspiUnicodeStrings for strings to be returned in Unicode
-
-   If NspiAddressCreationTemplates is not set, then
-   NspiGetSpecialTable will automatically fetch the Hierarchy Table.
-
-   If NspiAddressCreationTemplates is set, then NspiUnicodeStrings is
-   ignored.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetSpecialTable(struct nspi_context *nspi_ctx, 
-                                             TALLOC_CTX *mem_ctx,
-                                             uint32_t Type,
-                                             struct SRowSet **ppRows)
-{
-       struct NspiGetSpecialTable      r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(((Type != 0x0) && (Type != 0x2) && (Type != 0x4)),
-                      MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppRows, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.dwFlags = Type;
-
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.lpVersion = &nspi_ctx->version;
-
-       r.out.lpVersion = &nspi_ctx->version;
-       r.out.ppRows = ppRows;
-
-       status = dcerpc_NspiGetSpecialTable_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns information about template objects in the address
-   book.
-
-   \param nspi_ctx pointer to the NSPI memory context
-   \param mem_ctx pointer to the memory context
-   \param dwFlags set of bit flags
-   \param ulType specifies the display type of the template
-   \param pDN the DN of the template requested
-   \param ppData pointer on pointer to the data requested
-
-   Possible values for dwFlags:
-   -# TI_TEMPLATE to return the template
-   -# TI_SCRIPT to return the script associated to the template
-   -# TI_EMT to return the e-mail type associated to the template
-   -# TI_HELPFILE_NAME to return the help file associated to the
-      template
-   -# TI_HELPFILE_CONTENTS to return the contents of the help file
-      associated to the template
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetTemplateInfo(struct nspi_context *nspi_ctx,
-                                             TALLOC_CTX *mem_ctx,
-                                             uint32_t dwFlags,
-                                             uint32_t ulType,
-                                             char *pDN,
-                                             struct SRow **ppData)
-{
-       struct NspiGetTemplateInfo      r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppData, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.dwFlags = dwFlags;
-       r.in.ulType = ulType;
-       r.in.pDN = pDN;
-       r.in.dwCodePage = nspi_ctx->pStat->CodePage;
-       r.in.dwLocaleID = nspi_ctx->pStat->TemplateLocale;
-       
-       r.out.ppData = ppData;
-
-       status = dcerpc_NspiGetTemplateInfo_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-       
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Modifies the values of a specific property of a specific
-   row in the address book. This function only applies only to rows
-   that support the PT_OBJECT Property Type.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param Delete boolean value defining whether the server must remove
-   all values specified by the input parameter lpEntryIDs from the
-   property specified by ulPropTag
-   \param ulPropTag property tag of the property the client wishes to
-   modify
-   \param MId the MId of the address book object
-   \param lpEntryIds array of BinaryArray_r structures intended to be
-   modified or deleted
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_ModLinkAtt(struct nspi_context *nspi_ctx,
-                                        bool Delete,
-                                        uint32_t ulPropTag,
-                                        uint32_t MId,
-                                        struct BinaryArray_r *lpEntryIds)
-{
-       struct NspiModLinkAtt   r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(((ulPropTag & 0xFFFF) != PT_OBJECT), MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpEntryIds, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!lpEntryIds->cValues, MAPI_E_INVALID_PARAMETER, NULL)
-
-       r.in.handle = &nspi_ctx->handle;
-       /* FIXME: need to find fDelete value first */
-       r.in.dwFlags = (Delete == true) ? 0x1 : 0x0; 
-       r.in.ulPropTag = ulPropTag;
-       r.in.MId = MId;
-       r.in.lpEntryIds = lpEntryIds;
-
-       status = dcerpc_NspiModLinkAtt_r(nspi_ctx->rpc_connection->binding_handle, nspi_ctx->mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a list of all the properties the NSPI server is
-   aware off.
-
-   \param nspi_ctx pointer to the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param WantUnicode whether we want UNICODE properties or not
-   \param ppColumns pointer on pointer to a property tag array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
- */
-_PUBLIC_ enum MAPISTATUS nspi_QueryColumns(struct nspi_context *nspi_ctx,
-                                          TALLOC_CTX *mem_ctx,
-                                          bool WantUnicode,
-                                          struct SPropTagArray **ppColumns)
-{
-       struct NspiQueryColumns r;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppColumns, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-       r.in.dwFlags = (WantUnicode == true) ? NspiUnicodeProptypes : 0x0;
-       
-       r.out.ppColumns = ppColumns;
-
-       status = dcerpc_NspiQueryColumns_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Returns a list of property names for a set of proptags
-
-   \param nspi_ctx pointer on the NSPI connection text
-   \param mem_ctx pointer to the memory context
-   \param lpGuid the property set about which the client is requesting
-   information
-   \param pPropTags pointer to the proptags list
-   \param ppReturnedPropTags pointer on pointer to the list of
-   all the proptags in the property set specified in lpGuid
-   \param ppNames pointer on pointer to the list of property names
-   returned by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetNamesFromIDs(struct nspi_context *nspi_ctx,
-                                             TALLOC_CTX *mem_ctx,
-                                             struct FlatUID_r *lpGuid,
-                                             struct SPropTagArray *pPropTags,
-                                             struct SPropTagArray **ppReturnedPropTags,
-                                             struct PropertyNameSet_r **ppNames)
-{
-       struct NspiGetNamesFromIDs      r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppReturnedPropTags, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppNames, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0x0;
-       r.in.lpGuid = lpGuid;
-       r.in.pPropTags = pPropTags;
-
-       r.out.ppReturnedPropTags = ppReturnedPropTags;
-       r.out.ppNames = ppNames;
-
-       status = dcerpc_NspiGetNamesFromIDs_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the Property IDs associated with property names
-   from the NSPI server.
-
-   \param nspi_ctx pointer on the NSPI connection context
-   \param mem_ctx pointer to the memoty context
-   \param VerifyNames boolean value defining whether the NSPI server
-   must verify that all client specified names are recognized by the
-   server
-   \param cNames count of PropertyName_r entries
-   \param ppNames pointer to a PropertyName_r structure with the list of
-   property tags supplied by the client
-   \param ppPropTags pointer on pointer to the list of proptags
-   returned by the server
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_GetIDsFromNames(struct nspi_context *nspi_ctx,
-                                             TALLOC_CTX *mem_ctx,
-                                             bool VerifyNames,
-                                             uint32_t cNames,
-                                             struct PropertyName_r *ppNames,
-                                             struct SPropTagArray **ppPropTags)
-{
-       struct NspiGetIDsFromNames      r;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        i;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppNames, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ppPropTags, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-       r.in.Reserved = 0;
-       r.in.dwFlags = (VerifyNames == true) ? 0x2 : 0x0;
-       r.in.cPropNames = cNames;
-
-       r.in.ppNames = talloc_array(mem_ctx, struct PropertyName_r *, cNames);
-       for (i = 0; i < cNames; i++) {
-               r.in.ppNames[i] = &ppNames[i];
-       }
-
-       r.out.ppPropTags = ppPropTags;
-       
-       status = dcerpc_NspiGetIDsFromNames_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       errno = retval;
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Takes a set of string values in an 8-bit character set and
-   performs ANR on those strings
-
-   \param nspi_ctx pointer on the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param usernames pointer on pointer to the list of values we want
-   to perform ANR on
-   \param pPropTags pointer on the property tags list we want for each
-   row returned
-   \param pppRows pointer on pointer on pointer to the rows returned
-   by the server
-   \param pppMIds pointer on pointer on pointer to the MIds matching
-   the array of strings
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_ResolveNames(struct nspi_context *nspi_ctx, 
-                                          TALLOC_CTX *mem_ctx,
-                                          const char **usernames, 
-                                          struct SPropTagArray *pPropTags, 
-                                          struct SRowSet ***pppRows,
-                                          struct PropertyTagArray_r ***pppMIds)
-{
-       struct NspiResolveNames r;
-       struct StringsArray_r   *paStr;
-       NTSTATUS                status;
-       enum MAPISTATUS         retval;
-       uint32_t                count;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!usernames, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pppRows, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pppMIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (count = 0; usernames[count]; count++);
-       OPENCHANGE_RETVAL_IF(!count, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.Reserved = 0;
-       r.in.pPropTags = pPropTags;
-       
-       paStr = talloc(mem_ctx, struct StringsArray_r);
-       paStr->Count = count;
-       paStr->Strings = usernames;
-       r.in.paStr = paStr;
-
-       r.out.ppMIds = *pppMIds;
-       r.out.ppRows = *pppRows;
-
-       status = dcerpc_NspiResolveNames_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Takes a set of string values in the Unicode character set
-   and performs ANR on those strings
-
-   \param nspi_ctx pointer on the NSPI connection context
-   \param mem_ctx pointer to the memory context
-   \param usernames pointer on pointer to the list of values we want
-   to perform ANR on
-   \param pPropTags pointer on the property tags list we want for each
-   row returned
-   \param pppRows pointer on pointer on pointer to the rows returned
-   by the server
-   \param pppMIds pointer on pointer on pointer to the MIds matching
-   the array of strings
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS nspi_ResolveNamesW(struct nspi_context *nspi_ctx, 
-                                           TALLOC_CTX *mem_ctx,
-                                           const char **usernames, 
-                                           struct SPropTagArray *pPropTags, 
-                                           struct SRowSet ***pppRows,
-                                           struct PropertyTagArray_r ***pppMIds)
-{
-       struct NspiResolveNamesW        r;
-       struct WStringsArray_r          *paWStr;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       uint32_t                        count;
-
-       OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!usernames, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pppRows, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pppMIds, MAPI_E_INVALID_PARAMETER, NULL);
-
-       for (count = 0; usernames[count]; count++);
-       OPENCHANGE_RETVAL_IF(!count, MAPI_E_INVALID_PARAMETER, NULL);
-
-       r.in.handle = &nspi_ctx->handle;
-
-       r.in.pStat = nspi_ctx->pStat;
-       r.in.Reserved = 0;
-       r.in.pPropTags = pPropTags;
-
-       paWStr = talloc(mem_ctx, struct WStringsArray_r);
-       paWStr->Count = count;
-       paWStr->Strings = usernames;
-       r.in.paWStr = paWStr;
-
-       r.out.ppMIds = *pppMIds;
-       r.out.ppRows = *pppRows;
-
-       status = dcerpc_NspiResolveNamesW_r(nspi_ctx->rpc_connection->binding_handle, mem_ctx, &r);
-       retval = r.out.result;
-       OPENCHANGE_RETVAL_IF(!NT_STATUS_IS_OK(status), retval, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/nspi.h b/branches/plugfest/libmapi/nspi.h
deleted file mode 100644 (file)
index 8c03d68..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-   OpenChange NSPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __NSPI_H__
-#define        __NSPI_H__
-
-struct nspi_context {
-       struct dcerpc_pipe      *rpc_connection;
-       struct policy_handle    handle;
-       TALLOC_CTX              *mem_ctx;
-       struct cli_credentials  *cred;
-       struct STAT             *pStat;
-       struct mapi_profile     *profile;
-       struct SRowSet          *rowSet;
-       char                    *org;
-       char                    *org_unit;
-       char                    *servername;
-       uint32_t                version;
-};
-
-#define        ORG             "/o="
-#define        ORG_UNIT        "/ou="
-#define        SERVER_DN       "/o=%s/ou=%s/cn=Configuration/cn=Servers/cn=%s"
-#define        SERVERNAME      "/cn=Servers/cn="
-#define        RECIPIENT_DN    "/o=%s/ou=%s/cn=Recipients/cn=%s"
-
-#endif /* __NSPI_H__ */
diff --git a/branches/plugfest/libmapi/property.c b/branches/plugfest/libmapi/property.c
deleted file mode 100644 (file)
index 4835490..0000000
+++ /dev/null
@@ -1,1274 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005 - 2011.
-   Copyright (C) Gregory Schiro 2006
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <gen_ndr/ndr_property.h>
-#include <param.h>
-
-/**
-   \file property.c
-
-   \brief Functions for manipulating MAPI properties
- */
-
-
-/**
-  \details Create a property tag array
-  
-  \param mem_ctx talloc memory context to use for allocation
-  \param PropCount the number of properties in the array
-  
-  The varargs (the third and subsequent arguments) are the property
-  tags to make up the array. So the normal way to use this to create
-  an array of two tags is like:
-  \code
-  struct SPropTagArray *array
-  array = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
-  \endcode
-*/
-_PUBLIC_ struct SPropTagArray *set_SPropTagArray(TALLOC_CTX *mem_ctx, 
-                                                uint32_t PropCount, ...)
-{
-       struct SPropTagArray    *SPropTagArray;
-       va_list                 ap;
-       uint32_t                i;
-       uint32_t                *aulPropTag;
-
-       aulPropTag = talloc_array(mem_ctx, uint32_t, PropCount);
-
-       va_start(ap, PropCount);
-       for (i = 0; i < PropCount; i++) {
-               aulPropTag[i] = va_arg(ap, int);
-       }
-       va_end(ap);
-
-       SPropTagArray = talloc(mem_ctx, struct SPropTagArray);
-       SPropTagArray->aulPropTag = (enum MAPITAGS *) aulPropTag;
-       SPropTagArray->cValues = PropCount;
-       return SPropTagArray;
-}
-
-/**
-   \details Add a property tag to an existing properties array
-
-   \param mem_ctx talloc memory context to use for allocation
-   \param SPropTagArray existing properties array to add to
-   \param aulPropTag the property tag to add
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
-
-   \note Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-   - MAPI_E_INVALID_PARAMETER: SPropTagArray parameter is not correctly set
-*/
-_PUBLIC_ enum MAPISTATUS SPropTagArray_add(TALLOC_CTX *mem_ctx, 
-                                          struct SPropTagArray *SPropTagArray, 
-                                          enum MAPITAGS aulPropTag)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!SPropTagArray->cValues, MAPI_E_INVALID_PARAMETER, NULL);
-
-       SPropTagArray->cValues += 1;
-       SPropTagArray->aulPropTag = (enum MAPITAGS *) talloc_realloc(mem_ctx, SPropTagArray->aulPropTag,
-                                                                    uint32_t, SPropTagArray->cValues + 1);
-       SPropTagArray->aulPropTag[SPropTagArray->cValues - 1] = aulPropTag;
-       SPropTagArray->aulPropTag[SPropTagArray->cValues] = (enum MAPITAGS) 0;
-
-       return MAPI_E_SUCCESS;
-}
-
-_PUBLIC_ const void *get_SPropValue(struct SPropValue *lpProps, 
-                                   enum MAPITAGS ulPropTag)
-{
-       uint32_t        i;
-
-       /* Sanity checks */
-       if (!lpProps) return NULL;
-
-       for (i = 0; lpProps[i].ulPropTag; i++) {
-               if (ulPropTag == lpProps[i].ulPropTag) {
-                       return get_SPropValue_data(&lpProps[i]);
-               }
-       }
-       return NULL;
-}
-
-_PUBLIC_ struct SPropValue *get_SPropValue_SRowSet(struct SRowSet *RowSet, 
-                                                  uint32_t ulPropTag)
-{
-       uint32_t        i;
-       uint32_t        j;
-
-       /* Sanity Checks */
-       if (!RowSet) return NULL;
-
-       for (i = 0; i != RowSet->cRows; i++) {
-               for (j = 0; j < RowSet->aRow[i].cValues; j++) {
-                       if (ulPropTag == RowSet->aRow[i].lpProps[j].ulPropTag) {
-                               return (&RowSet->aRow[i].lpProps[j]);
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-_PUBLIC_ const void *get_SPropValue_SRowSet_data(struct SRowSet *RowSet,
-                                                uint32_t ulPropTag)
-{
-       struct SPropValue *lpProp;
-
-       lpProp = get_SPropValue_SRowSet(RowSet, ulPropTag);
-       return get_SPropValue(lpProp, ulPropTag);
-}
-
-_PUBLIC_ enum MAPISTATUS set_default_error_SPropValue_SRow(struct SRow *aRow, enum MAPITAGS ulPropTag, void *data)
-{
-       uint32_t        i;
-
-       for (i = 0; i < aRow->cValues; i++) {
-               if ((ulPropTag & 0xFFFF0000) == (aRow->lpProps[i].ulPropTag & 0xFFFF0000) &&
-                   (aRow->lpProps[i].ulPropTag & 0xFFFF) == 0xA) {
-                       set_SPropValue_proptag(&(aRow->lpProps[i]), ulPropTag, data);
-                       return MAPI_E_SUCCESS;
-               }
-       }
-       return MAPI_E_NOT_FOUND;
-}
-
-_PUBLIC_ struct SPropValue *get_SPropValue_SRow(struct SRow *aRow,
-                                               uint32_t ulPropTag)
-{
-       uint32_t        i;
-
-       for (i = 0; i < aRow->cValues; i++) {
-               if (ulPropTag == aRow->lpProps[i].ulPropTag) {
-                       return (&aRow->lpProps[i]);
-               }
-       }
-
-       return NULL;
-}
-
-_PUBLIC_ const void *get_SPropValue_SRow_data(struct SRow *aRow,
-                                             uint32_t ulPropTag)
-{
-       struct SPropValue *lpProp;
-
-       lpProp = get_SPropValue_SRow(aRow, ulPropTag);
-       return get_SPropValue(lpProp, ulPropTag);
-}
-
-/*
-  Create a MAPITAGS array from a SRow entry
- */
-
-enum MAPITAGS *get_MAPITAGS_SRow(TALLOC_CTX *mem_ctx, 
-                                struct SRow *aRow, 
-                                uint32_t *actual_count)
-{
-       enum MAPITAGS   *mapitags;
-       uint32_t        count, idx;
-
-       mapitags = talloc_array(mem_ctx, enum MAPITAGS, aRow->cValues + 1);
-
-       for (count = 0, idx=0; count < aRow->cValues; count++) {
-               if ((aRow->lpProps[count].ulPropTag & 0xFFFF) != PT_ERROR) {
-                       mapitags[idx] = aRow->lpProps[count].ulPropTag;
-                       idx++;
-               }
-       }
-       mapitags[idx] = (enum MAPITAGS) 0;
-       *actual_count = idx;
-
-       return mapitags;
-}
-
-/*
-  Remove MAPITAGS entries from a MAPITAGS array
-*/
-
-uint32_t MAPITAGS_delete_entries(enum MAPITAGS *mapitags, uint32_t final_count, uint32_t PropCount, ...)
-{
-       va_list                 ap;
-       uint32_t                i,j;
-       uint32_t                aulPropTag;
-       uint32_t                count = 0;
-       
-       va_start(ap, PropCount);
-       for (i = 0; i != PropCount; i++) {
-               aulPropTag = va_arg(ap, uint32_t);
-               for (count = 0; mapitags[count]; count++) {
-                       if (aulPropTag == (uint32_t)mapitags[count]) {
-                               final_count -= 1;
-                               for (j = count; mapitags[j]; j++) {
-                                 mapitags[j] = (mapitags[j+1]) ? mapitags[j+1] : (enum MAPITAGS) 0;
-                               }
-                       }
-               }
-       }
-       va_end(ap);
-
-       return final_count;
-}
-
-_PUBLIC_ const void *find_SPropValue_data(struct SRow *aRow, uint32_t mapitag)
-{
-       uint32_t i;
-
-       if ( ! aRow) {
-               return NULL;
-       }
-
-       for (i = 0; i < aRow->cValues; i++) {
-               if (aRow->lpProps[i].ulPropTag == mapitag) {
-                       return get_SPropValue_data(&(aRow->lpProps[i]));
-               }
-       }
-       return NULL;
-}
-
-_PUBLIC_ const void *find_mapi_SPropValue_data(
-                                       struct mapi_SPropValue_array *properties, uint32_t mapitag)
-{
-       uint32_t i;
-
-       if ( ! properties) {
-               return NULL;
-       }
-
-       for (i = 0; i < properties->cValues; i++) {
-               if (properties->lpProps[i].ulPropTag == mapitag) {
-                       return get_mapi_SPropValue_data(&properties->lpProps[i]);
-               }
-       }
-       return NULL;
-}
-
-_PUBLIC_ const void *get_mapi_SPropValue_data(struct mapi_SPropValue *lpProp)
-{
-       if ( ! lpProp) {
-               return NULL;
-       }
-       if (lpProp->ulPropTag == 0) {
-               return NULL;
-       }
-       switch(lpProp->ulPropTag & 0xFFFF) {
-       case PT_BOOLEAN:
-               return (const void *)(uint8_t *)&lpProp->value.b;
-       case PT_I2: /* Equivalent to PT_SHORT */
-               return (const void *)(uint16_t *)&lpProp->value.i;
-       case PT_LONG: /* Equivalent to PT_I4 */
-               return (const void *)&lpProp->value.l;
-       case PT_DOUBLE:
-               return (const void *)&lpProp->value.dbl;
-       case PT_I8:
-               return (const void *)&lpProp->value.d;
-       case PT_SYSTIME:
-               return (const void *)(struct FILETIME *)&lpProp->value.ft;
-       case PT_ERROR:
-               return (const void *)&lpProp->value.err;
-       case PT_STRING8:
-               return (const void *)lpProp->value.lpszA;
-       case PT_UNICODE:
-               return (const void *)lpProp->value.lpszW;
-       case PT_BINARY:
-               return (const void *)(struct SBinary_short *)&lpProp->value.bin;
-       case PT_MV_LONG:
-               return (const void *)(struct mapi_MV_LONG_STRUCT *)&lpProp->value.MVl;
-       case PT_MV_STRING8:
-               return (const void *)(struct mapi_SLPSTRArray *)&lpProp->value.MVszA;
-       case PT_MV_BINARY:
-               return (const void *)(struct mapi_SBinaryArray *)&lpProp->value.MVbin;
-       default:
-               return NULL;
-       }
-}
-
-_PUBLIC_ const void *get_SPropValue_data(struct SPropValue *lpProps)
-{
-       if (lpProps->ulPropTag == 0) {
-               return NULL;
-       }
-
-       switch(lpProps->ulPropTag & 0xFFFF) {
-       case PT_SHORT:
-               return (const void *)&lpProps->value.i;
-       case PT_BOOLEAN:
-               return (const void *)&lpProps->value.b;
-       case PT_I8:
-               return (const void *)&lpProps->value.d;
-       case PT_STRING8:
-               return (const void *)lpProps->value.lpszA;
-       case PT_UNICODE:
-               return (const void *)lpProps->value.lpszW;
-       case PT_SYSTIME:
-               return (const void *)(struct FILETIME *)&lpProps->value.ft;
-       case PT_ERROR:
-               return (const void *)&lpProps->value.err;
-       case PT_LONG:
-               return (const void *)&lpProps->value.l;
-       case PT_DOUBLE:
-               return (const void *)&lpProps->value.dbl;
-       case PT_CLSID:
-               return (const void *)lpProps->value.lpguid;
-       case PT_BINARY:
-               return (const void *)&lpProps->value.bin;
-       case PT_OBJECT:
-               return (const void *)&lpProps->value.object;
-       case PT_MV_SHORT:
-               return (const void *)(struct ShortArray_r *)&lpProps->value.MVi;
-       case PT_MV_LONG:
-               return (const void *)(struct LongArray_r *)&lpProps->value.MVl;
-       case PT_MV_STRING8:
-               return (const void *)(struct StringArray_r *)&lpProps->value.MVszA;
-       case PT_MV_UNICODE:
-               return (const void *)(struct WStringArray_r *)&lpProps->value.MVszW;
-       case PT_MV_BINARY:
-               return (const void *)(struct BinaryArray_r *)&lpProps->value.MVbin;
-       case PT_MV_SYSTIME:
-               return (const void *)(struct DateTimeArray_r *)&lpProps->value.MVft;
-       case PT_NULL:
-               return (const void *)&lpProps->value.null;
-       default:
-               return NULL;
-       }
-}
-
-_PUBLIC_ bool set_SPropValue_proptag(struct SPropValue *lpProps, enum MAPITAGS aulPropTag, const void *data)
-{
-       lpProps->ulPropTag = aulPropTag;
-       lpProps->dwAlignPad = 0x0;
-
-       return (set_SPropValue(lpProps, data));
-}
-
-_PUBLIC_ struct SPropValue *add_SPropValue(TALLOC_CTX *mem_ctx, 
-                                          struct SPropValue *lpProps, 
-                                          uint32_t *cValues, 
-                                          enum MAPITAGS aulPropTag, 
-                                          const void * data)
-{
-       lpProps = talloc_realloc(mem_ctx, lpProps, struct SPropValue, *cValues + 2);
-
-       set_SPropValue_proptag(&lpProps[*cValues], aulPropTag, data);
-       *cValues = *cValues + 1;
-
-       return lpProps;
-}
-/*
-  TODO: should this be public?
-*/
-_PUBLIC_ bool set_SPropValue(struct SPropValue *lpProps, const void *data)
-{
-       if (data == NULL) {
-               lpProps->value.err = MAPI_E_NOT_FOUND;
-               return false;
-       }
-       switch (lpProps->ulPropTag & 0xFFFF) {
-       case PT_SHORT:
-               lpProps->value.i = *((const uint16_t *)data);
-               break;
-       case PT_LONG:
-               lpProps->value.l = *((const uint32_t *)data);
-               break;
-       case PT_DOUBLE:
-               memcpy(&lpProps->value.dbl, (uint8_t *)data, 8);
-               break;
-       case PT_I8:
-               lpProps->value.d = *((const uint64_t *)data);
-               break;
-       case PT_BOOLEAN:
-               lpProps->value.b = *((const uint8_t *)data);
-               break;
-       case PT_STRING8:
-               lpProps->value.lpszA = (const char *) data;
-               break;
-       case PT_BINARY:
-               lpProps->value.bin = *((const struct Binary_r *)data);
-               break;
-       case PT_UNICODE:
-               lpProps->value.lpszW = (const char *) data;
-               break;
-       case PT_CLSID:
-               lpProps->value.lpguid = (struct FlatUID_r *) data;
-               break;
-       case PT_SYSTIME:
-               lpProps->value.ft = *((const struct FILETIME *) data);
-               break;
-       case PT_ERROR:
-               lpProps->value.err = *((enum MAPISTATUS *)data);
-               break;
-       case PT_MV_SHORT:
-               lpProps->value.MVi = *((const struct ShortArray_r *)data);
-               break;
-       case PT_MV_LONG:
-               lpProps->value.MVl = *((const struct LongArray_r *)data);
-               break;
-       case PT_MV_STRING8:
-               lpProps->value.MVszA = *((const struct StringArray_r *)data);
-               break;
-       case PT_MV_BINARY:
-               lpProps->value.MVbin = *((const struct BinaryArray_r *)data);
-               break;
-       case PT_MV_CLSID:
-               lpProps->value.MVguid = *((const struct FlatUIDArray_r *)data);
-               break;
-       case PT_MV_UNICODE:
-               lpProps->value.MVszW = *((const struct WStringArray_r *)data);
-               break;
-       case PT_MV_SYSTIME:
-               lpProps->value.MVft = *((const struct DateTimeArray_r *)data);
-               break;
-       case PT_NULL:
-               lpProps->value.null = *((const uint32_t *)data);
-               break;
-       case PT_OBJECT:
-               lpProps->value.object = *((const uint32_t *)data);
-               break;
-       default:
-               lpProps->value.err = MAPI_E_NOT_FOUND;
-
-               return false;
-       }
-
-       return true;
-}
-
-_PUBLIC_ uint32_t get_mapi_property_size(struct mapi_SPropValue *lpProp)
-{
-       switch(lpProp->ulPropTag & 0xFFFF) {
-       case PT_BOOLEAN:
-               return sizeof (uint8_t);
-       case PT_I2:
-               return sizeof (uint16_t);
-       case PT_LONG:
-       case PT_ERROR:
-               return sizeof (uint32_t);
-       case PT_DOUBLE:
-               return sizeof (double);
-       case PT_I8:
-               return sizeof (uint64_t);
-       case PT_STRING8:
-               return strlen(lpProp->value.lpszA) + 1;
-       case PT_UNICODE:
-               return get_utf8_utf16_conv_length(lpProp->value.lpszW);
-       case PT_SYSTIME:
-               return sizeof (struct FILETIME);
-       case PT_BINARY:
-               return (lpProp->value.bin.cb + sizeof(uint16_t));
-       }
-       return 0;
-}
-
-
-/**
-   \details Convenience function to convert a SPropValue structure
-   into a mapi_SPropValue structure and return the associated size.
-
-   \param mem_ctx pointer to the memory context to use for allocation
-   \param mapi_sprop pointer to the MAPI SPropValue structure to copy data to
-   \param sprop pointer to the SPropValue structure to copy data from
-
-   \return size of the converted data on success, otherwise 0
- */
-_PUBLIC_ uint32_t cast_mapi_SPropValue(TALLOC_CTX *mem_ctx,
-                                      struct mapi_SPropValue *mapi_sprop, 
-                                      struct SPropValue *sprop)
-{
-       mapi_sprop->ulPropTag = sprop->ulPropTag;
-
-       switch(sprop->ulPropTag & 0xFFFF) {
-       case PT_BOOLEAN:
-               mapi_sprop->value.b = sprop->value.b;
-               return sizeof(uint8_t);
-       case PT_I2:
-               mapi_sprop->value.i = sprop->value.i;
-               return sizeof(uint16_t);
-       case PT_LONG:
-               mapi_sprop->value.l = sprop->value.l;
-               return sizeof(uint32_t);
-       case PT_DOUBLE:
-               memcpy(&mapi_sprop->value.dbl, (uint8_t *)&sprop->value.dbl, 8);
-               return sizeof(double);
-       case PT_I8:
-               mapi_sprop->value.d = sprop->value.d;
-               return sizeof(uint64_t);
-       case PT_STRING8:
-               mapi_sprop->value.lpszA = sprop->value.lpszA;
-               if (!mapi_sprop->value.lpszA) return 0;
-               return (strlen(sprop->value.lpszA) + 1);
-       case PT_UNICODE:
-               mapi_sprop->value.lpszW = sprop->value.lpszW;
-               if (!mapi_sprop->value.lpszW) return 0;
-               return (get_utf8_utf16_conv_length(mapi_sprop->value.lpszW));
-       case PT_SYSTIME:
-               mapi_sprop->value.ft.dwLowDateTime = sprop->value.ft.dwLowDateTime;
-               mapi_sprop->value.ft.dwHighDateTime = sprop->value.ft.dwHighDateTime;
-               return (sizeof (struct FILETIME));
-       case PT_BINARY:
-               mapi_sprop->value.bin.cb = sprop->value.bin.cb;
-               mapi_sprop->value.bin.lpb = sprop->value.bin.lpb;
-               return (mapi_sprop->value.bin.cb + sizeof(uint16_t));
-        case PT_ERROR:
-                mapi_sprop->value.err = sprop->value.err;
-                return sizeof(uint32_t);
-       case PT_CLSID:
-       {
-               DATA_BLOB       b;
-
-               b.data = sprop->value.lpguid->ab;
-               b.length = 16;
-               GUID_from_ndr_blob(&b, &mapi_sprop->value.lpguid);
-               return sizeof(struct GUID);
-       }
-       case PT_SVREID:
-               mapi_sprop->value.bin.cb = sprop->value.bin.cb;
-               mapi_sprop->value.bin.lpb = sprop->value.bin.lpb;
-               return (mapi_sprop->value.bin.cb + sizeof(uint16_t));
-       case PT_MV_STRING8:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-               
-               mapi_sprop->value.MVszA.cValues = sprop->value.MVszA.cValues;
-               size += 4;
-               
-               mapi_sprop->value.MVszA.strings = talloc_array(mem_ctx, struct mapi_LPSTR, 
-                                                              mapi_sprop->value.MVszA.cValues);
-               for (i = 0; i < mapi_sprop->value.MVszA.cValues; i++) {
-                       mapi_sprop->value.MVszA.strings[i].lppszA = sprop->value.MVszA.lppszA[i];
-                       size += strlen(mapi_sprop->value.MVszA.strings[i].lppszA) + 1;
-               }
-               return size;
-       }
-       case PT_MV_UNICODE:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-
-               mapi_sprop->value.MVszW.cValues = sprop->value.MVszW.cValues;
-               size += 4;
-               
-               mapi_sprop->value.MVszW.strings = talloc_array(mem_ctx, struct mapi_LPWSTR, 
-                                                              mapi_sprop->value.MVszW.cValues);
-               for (i = 0; i < mapi_sprop->value.MVszW.cValues; i++) {
-                       mapi_sprop->value.MVszW.strings[i].lppszW = sprop->value.MVszW.lppszW[i];
-                       size += strlen(mapi_sprop->value.MVszW.strings[i].lppszW) + 1;
-               }
-               return size;
-       }
-       case PT_MV_BINARY:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-               
-               mapi_sprop->value.MVbin.cValues = sprop->value.MVbin.cValues;
-               size += 4;
-
-               mapi_sprop->value.MVbin.bin = talloc_array(mem_ctx, struct SBinary_short, 
-                                                          mapi_sprop->value.MVbin.cValues);
-               for (i = 0; i < mapi_sprop->value.MVbin.cValues; i++) {
-                       mapi_sprop->value.MVbin.bin[i].cb = sprop->value.MVbin.lpbin[i].cb;
-                       mapi_sprop->value.MVbin.bin[i].lpb = sprop->value.MVbin.lpbin[i].lpb;
-                       size += sprop->value.MVbin.lpbin[i].cb + sizeof (uint16_t);
-               }
-               return size;
-       }
-       case PT_MV_LONG:
-       {
-               uint32_t i;
-               
-               mapi_sprop->value.MVl.cValues = sprop->value.MVl.cValues;
-               mapi_sprop->value.MVl.lpl = talloc_array (mem_ctx, uint32_t, mapi_sprop->value.MVl.cValues);
-               for (i = 0; i < mapi_sprop->value.MVl.cValues; i++) {
-                       mapi_sprop->value.MVl.lpl[i] = sprop->value.MVl.lpl[i];
-               }
-               return sizeof(mapi_sprop->value.MVl.cValues) + (mapi_sprop->value.MVl.cValues * sizeof (uint32_t));
-       }
-        default:
-                printf("unhandled conversion case in cast_mapi_SPropValue(): 0x%x\n", (sprop->ulPropTag & 0xFFFF));
-                OPENCHANGE_ASSERT();
-       }
-       return 0;
-
-}
-
-
-/**
-   \details Convenience function to convert a mapi_SPropValue
-   structure into a SPropValue structure and return the associated
-   size
-
-   \param mem_ctx pointer to the memory context to use for allocation
-   \param mapi_sprop pointer to the MAPI SPropValue structure to copy data from
-   \param sprop pointer to the SPropValue structure to copy data to
-
-   \return size of the converted data on success, otherwise 0
- */
-_PUBLIC_ uint32_t cast_SPropValue(TALLOC_CTX *mem_ctx, 
-                                 struct mapi_SPropValue *mapi_sprop, 
-                                 struct SPropValue *sprop)
-{
-       sprop->ulPropTag = mapi_sprop->ulPropTag;
-
-       switch(sprop->ulPropTag & 0xFFFF) {
-       case PT_BOOLEAN:
-               sprop->value.b = mapi_sprop->value.b;
-               return sizeof(uint8_t);
-       case PT_I2:
-               sprop->value.i = mapi_sprop->value.i;
-               return sizeof(uint16_t);
-       case PT_LONG:
-               sprop->value.l = mapi_sprop->value.l;
-               return sizeof(uint32_t);
-       case PT_DOUBLE:
-               sprop->value.dbl = mapi_sprop->value.dbl;
-               return sizeof(double);
-       case PT_I8:
-               sprop->value.d = mapi_sprop->value.d;
-               return sizeof(uint64_t);
-       case PT_STRING8:
-               sprop->value.lpszA = mapi_sprop->value.lpszA;
-               if (!mapi_sprop->value.lpszA) return 0;
-               return (strlen(sprop->value.lpszA) + 1);
-       case PT_UNICODE:
-               sprop->value.lpszW = mapi_sprop->value.lpszW;
-               if (!sprop->value.lpszW) return 0;
-               return (get_utf8_utf16_conv_length(mapi_sprop->value.lpszW));
-       case PT_SYSTIME:
-               sprop->value.ft.dwLowDateTime = mapi_sprop->value.ft.dwLowDateTime;
-               sprop->value.ft.dwHighDateTime = mapi_sprop->value.ft.dwHighDateTime;
-               return (sizeof (struct FILETIME));
-       case PT_CLSID:
-       {
-               DATA_BLOB       b;
-               
-               GUID_to_ndr_blob(&(mapi_sprop->value.lpguid), talloc_autofree_context(), &b);
-               sprop->value.lpguid = talloc_zero(mem_ctx, struct FlatUID_r);
-               sprop->value.lpguid = (struct FlatUID_r *)memcpy(sprop->value.lpguid->ab, b.data, 16);
-               return (sizeof (struct FlatUID_r));
-       }
-       case PT_SVREID:
-               sprop->value.bin.cb = mapi_sprop->value.bin.cb;
-               sprop->value.bin.lpb = mapi_sprop->value.bin.lpb;
-               return (sprop->value.bin.cb + sizeof (uint16_t));
-       case PT_BINARY:
-               sprop->value.bin.cb = mapi_sprop->value.bin.cb;
-               sprop->value.bin.lpb = mapi_sprop->value.bin.lpb;
-               return (sprop->value.bin.cb + sizeof(uint16_t));
-        case PT_ERROR:
-                sprop->value.err = (enum MAPISTATUS)mapi_sprop->value.err;
-                return sizeof(uint32_t);
-       case PT_MV_LONG:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-
-               sprop->value.MVl.cValues = mapi_sprop->value.MVl.cValues;
-               size += 4;
-
-               sprop->value.MVl.lpl = talloc_array(mem_ctx, uint32_t, sprop->value.MVl.cValues);
-               for (i = 0; i < sprop->value.MVl.cValues; i++) {
-                       sprop->value.MVl.lpl[i] = mapi_sprop->value.MVl.lpl[i];
-                       size += sizeof (uint32_t);
-               }
-               return size;
-       }
-       case PT_MV_STRING8:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-
-               sprop->value.MVszA.cValues = mapi_sprop->value.MVszA.cValues;
-               size += 4;
-
-               sprop->value.MVszA.lppszA = talloc_array(mem_ctx, const char *, sprop->value.MVszA.cValues);
-               for (i = 0; i < sprop->value.MVszA.cValues; i++) {
-                       sprop->value.MVszA.lppszA[i] = mapi_sprop->value.MVszA.strings[i].lppszA;
-                       size += strlen(sprop->value.MVszA.lppszA[i]) + 1;
-               }
-               return size;
-       }
-        case PT_MV_UNICODE:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-
-               sprop->value.MVszW.cValues = mapi_sprop->value.MVszW.cValues;
-               size += 4;
-
-               sprop->value.MVszW.lppszW = talloc_array(mem_ctx, const char*, sprop->value.MVszW.cValues);
-               for (i = 0; i < sprop->value.MVszW.cValues; i++) {
-                       sprop->value.MVszW.lppszW[i] = mapi_sprop->value.MVszW.strings[i].lppszW;
-                       size += 2 * (strlen(sprop->value.MVszW.lppszW[i]) + 1);
-               }
-               return size;
-       }
-       case PT_MV_CLSID:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-               // conceptually we're copying  mapi_SGuidArray over to FlatUIDArray_r
-               //      typedef struct {
-               //              uint32          cValues;
-               //              GUID            lpguid[cValues];
-               //      } mapi_SGuidArray;
-               //      typedef [flag(NDR_NOALIGN)] struct {
-               //              [range(0,100000)]uint32         cValues;
-               //              [size_is(cValues)] FlatUID_r    **lpguid; 
-               //      } FlatUIDArray_r;
-               sprop->value.MVguid.cValues = mapi_sprop->value.MVguid.cValues;
-               size += sizeof(uint32_t);
-               
-               sprop->value.MVguid.lpguid = talloc_array(mem_ctx, struct FlatUID_r*, sprop->value.MVguid.cValues);
-               for (i = 0; i < sprop->value.MVguid.cValues; ++i) {
-                       DATA_BLOB       b;
-                       
-                       sprop->value.MVguid.lpguid[i] = talloc_zero(mem_ctx, struct FlatUID_r);
-                       GUID_to_ndr_blob(&(mapi_sprop->value.MVguid.lpguid[i]), talloc_autofree_context(), &b);
-                       sprop->value.MVguid.lpguid[i] = (struct FlatUID_r *)memcpy(sprop->value.MVguid.lpguid[i]->ab, b.data, sizeof(struct FlatUID_r));
-                       size += (sizeof (struct FlatUID_r));
-               }
-               return size;
-       }
-       case PT_MV_BINARY:
-       {
-               uint32_t        i;
-               uint32_t        size = 0;
-
-               sprop->value.MVbin.cValues = mapi_sprop->value.MVbin.cValues;
-               size += 4;
-
-               sprop->value.MVbin.lpbin = talloc_array(mem_ctx, struct Binary_r, sprop->value.MVbin.cValues);
-               for (i = 0; i < sprop->value.MVbin.cValues; i++) {
-                       sprop->value.MVbin.lpbin[i].cb = mapi_sprop->value.MVbin.bin[i].cb;
-                       if (sprop->value.MVbin.lpbin[i].cb) {
-                         sprop->value.MVbin.lpbin[i].lpb = (uint8_t *)talloc_memdup(sprop->value.MVbin.lpbin, 
-                                                                               mapi_sprop->value.MVbin.bin[i].lpb,
-                                                                               mapi_sprop->value.MVbin.bin[i].cb);
-                       } else {
-                               sprop->value.MVbin.lpbin[i].lpb = NULL;
-                       }
-                       size += sizeof (uint32_t);
-                       size += sprop->value.MVbin.lpbin[i].cb;
-               }
-               return size;
-       }
-        default:
-                printf("unhandled conversion case in cast_SPropValue(): 0x%x\n", (sprop->ulPropTag & 0xFFFF));
-                OPENCHANGE_ASSERT();
-       }
-       return 0;
-}
-
-
-/**
-   \details add a SPropValue structure to a SRow array
-
-   \param aRow pointer to the SRow array where spropvalue should be
-   appended
-   \param spropvalue reference to the SPropValue structure to add to
-   aRow
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_INVALID_PARAMETER.
- */
-_PUBLIC_ enum MAPISTATUS SRow_addprop(struct SRow *aRow, struct SPropValue spropvalue)
-{
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                cValues;
-       struct SPropValue       lpProp;
-       uint32_t                i;
-       
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!aRow, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = (TALLOC_CTX *) aRow;
-
-       /* If the property tag already exist, overwrite its value */
-       for (i = 0; i < aRow->cValues; i++) {
-               if (aRow->lpProps[i].ulPropTag == spropvalue.ulPropTag) {
-                       aRow->lpProps[i] = spropvalue;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       cValues = aRow->cValues + 1;
-       aRow->lpProps = talloc_realloc(mem_ctx, aRow->lpProps, struct SPropValue, cValues);
-       lpProp = aRow->lpProps[cValues-1];
-       lpProp.ulPropTag = spropvalue.ulPropTag;
-       lpProp.dwAlignPad = 0;
-       set_SPropValue(&(lpProp), get_SPropValue_data(&spropvalue));
-       aRow->cValues = cValues;
-       aRow->lpProps[cValues - 1] = lpProp;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Append a SPropValue structure to given SRowSet
-
-   \param mem_ctx pointer to the memory context
-   \param SRowSet pointer to the SRowSet array to update
-   \param spropvalue the SPropValue to append within SRowSet
-
-   \return 0 on success, otherwise 1
- */
-_PUBLIC_ uint32_t SRowSet_propcpy(TALLOC_CTX *mem_ctx, struct SRowSet *SRowSet, struct SPropValue spropvalue)
-{
-       uint32_t                rows;
-       uint32_t                cValues;
-       struct SPropValue       lpProp;
-
-       /* Sanity checks */
-       if (!SRowSet) return 1;
-
-       for (rows = 0; rows < SRowSet->cRows; rows++) {
-               cValues = SRowSet->aRow[rows].cValues + 1;
-               SRowSet->aRow[rows].lpProps = talloc_realloc(mem_ctx, SRowSet->aRow[rows].lpProps, struct SPropValue, cValues);
-               lpProp = SRowSet->aRow[rows].lpProps[cValues-1];
-               lpProp.ulPropTag = spropvalue.ulPropTag;
-               lpProp.dwAlignPad = 0;
-               set_SPropValue(&(lpProp), (void *)&spropvalue.value);
-               SRowSet->aRow[rows].cValues = cValues;
-               SRowSet->aRow[rows].lpProps[cValues - 1] = lpProp;
-       }
-       return 0;
-}
-
-_PUBLIC_ void mapi_SPropValue_array_named(mapi_object_t *obj, 
-                                         struct mapi_SPropValue_array *props)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct MAPINAMEID       *nameid;
-       uint32_t                propID;
-       uint16_t                count;
-       uint32_t                i;
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_SPropValue_array_named");
-
-       for (i = 0; i < props->cValues; i++) {
-               if ((props->lpProps[i].ulPropTag & 0xFFFF0000) > 0x80000000) {
-                       propID = props->lpProps[i].ulPropTag;
-                       propID = (propID & 0xFFFF0000) | PT_NULL;
-                       nameid = talloc_zero(mem_ctx, struct MAPINAMEID);
-                       retval = GetNamesFromIDs(obj, (enum MAPITAGS)propID, &count, &nameid);
-                       if (retval != MAPI_E_SUCCESS) goto end;
-
-                       if (count) {
-                               /* Display property given its propID */
-                               switch (nameid->ulKind) {
-                               case MNID_ID:
-                                 props->lpProps[i].ulPropTag = (enum MAPITAGS)((nameid->kind.lid << 16) | 
-                                                                               ((int)props->lpProps[i].ulPropTag & 0x0000FFFF));
-                                       break;
-                               case MNID_STRING:
-                                       /* MNID_STRING named properties don't have propIDs */
-                                       break;
-                               }
-                       }
-                       talloc_free(nameid);
-               }
-       }
-end:
-       talloc_free(mem_ctx);
-}
-
-_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_array_date_timeval(struct timeval *t,
-                                                               struct mapi_SPropValue_array *properties,
-                                                               uint32_t mapitag)
-{
-       const struct FILETIME   *filetime;
-       NTTIME                  time;
-       
-       filetime = (const struct FILETIME *) find_mapi_SPropValue_data(properties, mapitag);
-       if (!filetime) {
-               t = NULL;
-               return MAPI_E_NOT_FOUND;
-       }
-
-       time = filetime->dwHighDateTime;
-       time = time << 32;
-       time |= filetime->dwLowDateTime;
-       nttime_to_timeval(t, time);
-       
-       return MAPI_E_SUCCESS;  
-}
-
-_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_date_timeval(struct timeval *t, 
-                                                         struct SPropValue lpProp)
-{
-       const struct FILETIME   *filetime;
-       NTTIME                  time;
-       
-       filetime = (const struct FILETIME *) get_SPropValue_data(&lpProp);
-       if (!filetime) {
-               t = NULL;
-               return MAPI_E_NOT_FOUND;
-       }
-
-       time = filetime->dwHighDateTime;
-       time = time << 32;
-       time |= filetime->dwLowDateTime;
-       nttime_to_timeval(t, time);
-       
-       return MAPI_E_SUCCESS;
-}
-
-_PUBLIC_ bool set_SPropValue_proptag_date_timeval(struct SPropValue *lpProps, enum MAPITAGS aulPropTag, const struct timeval *t) 
-{
-       struct FILETIME filetime;
-       NTTIME          time;
-       
-       time = timeval_to_nttime(t);
-
-       filetime.dwLowDateTime = (time << 32) >> 32;
-       filetime.dwHighDateTime = time >> 32;
-
-       return set_SPropValue_proptag(lpProps, aulPropTag, &filetime);
-}
-
-
-/**
-   \details Retrieve a RecurrencePattern structure from a binary blob
-
-   \param mem_ctx pointer to the memory context
-   \param bin pointer to the Binary_r structure with non-mapped
-   reccurrence data
-
-   \return Allocated RecurrencePattern structure on success,
-   otherwise NULL
-
-   \note Developers must free the allocated RecurrencePattern when
-   finished.
- */
-_PUBLIC_ struct RecurrencePattern *get_RecurrencePattern(TALLOC_CTX *mem_ctx, 
-                                                        struct Binary_r *bin)
-{
-        struct RecurrencePattern       *RecurrencePattern = NULL;
-        struct ndr_pull                        *ndr;
-        enum ndr_err_code              ndr_err_code;
-       
-        /* Sanity checks */
-        if (!bin) return NULL;
-        if (!bin->cb) return NULL;
-        if (!bin->lpb) return NULL;
-
-        ndr = talloc_zero(mem_ctx, struct ndr_pull);
-        ndr->offset = 0;
-        ndr->data = bin->lpb;
-        ndr->data_size = bin->cb;
-
-        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-        RecurrencePattern = talloc_zero(mem_ctx, struct RecurrencePattern);
-        ndr_err_code = ndr_pull_RecurrencePattern(ndr, NDR_SCALARS, RecurrencePattern);
-
-        talloc_free(ndr);
-
-        if (ndr_err_code != NDR_ERR_SUCCESS) {
-                talloc_free(RecurrencePattern);
-                return NULL;
-        }
-       
-       /*Copy DeletedInstanceDates and ModifiedInstanceDates into memory*/ 
-       RecurrencePattern->DeletedInstanceDates = (uint32_t *) talloc_memdup(mem_ctx, RecurrencePattern->DeletedInstanceDates, 
-                                                                            sizeof(uint32_t) * RecurrencePattern->DeletedInstanceCount);
-                                                             
-       RecurrencePattern->ModifiedInstanceDates = (uint32_t *) talloc_memdup(mem_ctx, RecurrencePattern->ModifiedInstanceDates, 
-                                                                             sizeof(uint32_t) * RecurrencePattern->ModifiedInstanceCount);
-       
-       /*Set reference to parent so arrays get free with RecurrencePattern struct*/
-       RecurrencePattern->DeletedInstanceDates=talloc_reference(RecurrencePattern, RecurrencePattern->DeletedInstanceDates);
-       RecurrencePattern->ModifiedInstanceDates=talloc_reference(RecurrencePattern, RecurrencePattern->ModifiedInstanceDates);
-
-        return RecurrencePattern;
-}
-_PUBLIC_ struct AppointmentRecurrencePattern *get_AppointmentRecurrencePattern(TALLOC_CTX *mem_ctx, 
-                                                        struct Binary_r *bin)
-{
-        struct AppointmentRecurrencePattern            *arp = NULL;
-        struct ndr_pull                                        *ndr;
-        enum ndr_err_code                              ndr_err_code;
-
-        /* Sanity checks */
-        if (!bin) return NULL;
-        if (!bin->cb) return NULL;
-        if (!bin->lpb) return NULL;
-
-        ndr = talloc_zero(mem_ctx, struct ndr_pull);
-        ndr->offset = 0;
-        ndr->data = bin->lpb;
-        ndr->data_size = bin->cb;
-
-        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-        arp = talloc_zero(mem_ctx, struct AppointmentRecurrencePattern);
-        ndr_err_code = ndr_pull_AppointmentRecurrencePattern(ndr, NDR_SCALARS, arp);
-
-        talloc_free(ndr);
-
-        if (ndr_err_code != NDR_ERR_SUCCESS) {
-                talloc_free(arp);
-                return NULL;
-        }
-
-       /* Copy ExceptionInfo array into memory */ 
-       arp->ExceptionInfo = (struct ExceptionInfo *) talloc_memdup(mem_ctx,arp->ExceptionInfo, sizeof(struct ExceptionInfo) * arp->ExceptionCount);
-       
-       /* Copy DeletedInstanceDates and ModifiedInstanceDates into memory */ 
-       arp->RecurrencePattern.DeletedInstanceDates = (uint32_t *) talloc_memdup(mem_ctx, arp->RecurrencePattern.DeletedInstanceDates, 
-                                                                                sizeof(uint32_t) * arp->RecurrencePattern.DeletedInstanceCount);
-                                                             
-       arp->RecurrencePattern.ModifiedInstanceDates = (uint32_t *) talloc_memdup(mem_ctx, arp->RecurrencePattern.ModifiedInstanceDates, 
-                                                                                 sizeof(uint32_t) * arp->RecurrencePattern.ModifiedInstanceCount);
-       
-       /* Set reference to parent so arrays get free with rest */
-       arp->ExceptionInfo = talloc_reference(arp, arp->ExceptionInfo);
-       arp->RecurrencePattern.DeletedInstanceDates = talloc_reference(arp,arp->RecurrencePattern.DeletedInstanceDates);
-       arp->RecurrencePattern.ModifiedInstanceDates = talloc_reference(arp, arp->RecurrencePattern.ModifiedInstanceDates);
-       
-
-       
-
-        return arp;
-}
-
-
-/**
-   \details Retrieve a TimeZoneStruct structure from a binary blob
-
-   \param mem_ctx pointer to the memory context
-   \param bin pointer to the Binary_r structure with raw
-   TimeZoneStruct data
-
-   \return Allocated TimeZoneStruct structure on success, otherwise
-   NULL
-
-   \note Developers must free the allocated TimeZoneStruct when
-   finished.
- */
-_PUBLIC_ struct TimeZoneStruct *get_TimeZoneStruct(TALLOC_CTX *mem_ctx, 
-                                                  struct Binary_r *bin)
-{
-       struct TimeZoneStruct   *TimeZoneStruct = NULL;
-       struct ndr_pull         *ndr;
-       enum ndr_err_code       ndr_err_code;
-
-       /* Sanity checks */
-       if (!bin) return NULL;
-       if (!bin->cb) return NULL;
-       if (!bin->lpb) return NULL;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_pull);
-       ndr->offset = 0;
-       ndr->data = bin->lpb;
-       ndr->data_size = bin->cb;
-
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-       TimeZoneStruct = talloc_zero(mem_ctx, struct TimeZoneStruct);
-       ndr_err_code = ndr_pull_TimeZoneStruct(ndr, NDR_SCALARS, TimeZoneStruct);
-
-       talloc_free(ndr);
-       
-       if (ndr_err_code != NDR_ERR_SUCCESS) {
-               talloc_free(TimeZoneStruct);
-               return NULL;
-       }
-
-       return TimeZoneStruct;
-}
-
-
-/**
-   \details Retrieve a GlobalObjectId structure from a binary blob
-
-   \param mem_ctx pointer to the memory context
-   \param bin pointer to the Binary_r structure with raw
-   GlobalObjectId data
-
-   \return Allocated GlobalObjectId structure on success, otherwise
-   NULL
-
-   \note Developers must free the allocated GlobalObjectId when
-   finished.
- */
-_PUBLIC_ struct GlobalObjectId *get_GlobalObjectId(TALLOC_CTX *mem_ctx,
-                                                  struct Binary_r *bin)
-{
-       struct GlobalObjectId   *GlobalObjectId = NULL;
-       struct ndr_pull         *ndr;
-       enum ndr_err_code       ndr_err_code;
-
-       /* Sanity checks */
-       if (!bin) return NULL;
-       if (!bin->cb) return NULL;
-       if (!bin->lpb) return NULL;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_pull);
-       ndr->offset = 0;
-       ndr->data = bin->lpb;
-       ndr->data_size = bin->cb;
-
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-       GlobalObjectId = talloc_zero(mem_ctx, struct GlobalObjectId);
-       ndr_err_code = ndr_pull_GlobalObjectId(ndr, NDR_SCALARS, GlobalObjectId);
-
-       talloc_free(ndr);
-
-       if (ndr_err_code != NDR_ERR_SUCCESS) {
-               talloc_free(GlobalObjectId);
-               return NULL;
-       }
-
-       return GlobalObjectId;
-}
-
-/**
-   \details Return the effective value used in a TypedString
-   structure.
-
-   \param tstring pointer to TypedString structure
-
-   \return pointer to a valid string on success, otherwise NULL
- */
-_PUBLIC_ const char *get_TypedString(struct TypedString *tstring)
-{
-       if (!tstring) return NULL;
-
-       switch (tstring->StringType) {
-       case StringType_STRING8:
-               return tstring->String.lpszA;
-       case StringType_UNICODE_REDUCED:
-               return tstring->String.lpszW_reduced;
-       case StringType_UNICODE:
-               return tstring->String.lpszW;
-       case StringType_NONE:
-       case StringType_EMPTY:
-       default:
-               return NULL;
-       }
-
-       return NULL;
-}
-
-/**
-   \details Return the expected size of the utf8 string after
-   conversion to utf16 by iconv() function.
-
-   \param inbuf pointer to the input string
-
-   \return expected length of the converted string
-
-   \note This routine is based upon utf8_pull() function from
-   samba4/lib/util/charset/iconv.c
- */
-size_t get_utf8_utf16_conv_length(const char *inbuf)
-{
-       size_t          in_left;
-       size_t          out_left;
-       size_t          max_out;
-       const uint8_t   *c = (const uint8_t *) inbuf;
-
-       /* Sanity checks */
-       if (!inbuf) return 0;
-
-       in_left = strlen(inbuf);
-       out_left = in_left;
-       out_left = ( out_left * 3);
-       /* includes null-termination bytes */
-       max_out = out_left + 2;
-
-       while (in_left >= 1 && out_left >= 2) {
-               if ((c[0] & 0x80) == 0) {
-                       c += 1;
-                       in_left -= 1;
-                       out_left -= 2;
-                       continue;
-               }
-
-               if ((c[0] & 0xe0) == 0xc0) {
-                       if (in_left < 2 || (c[1] & 0xc0) != 0x80) {
-                               return -1;
-                       }
-                       c += 2;
-                       in_left -= 2;
-                       out_left -= 2;
-                       continue;
-               }
-
-               if ((c[0] & 0xf0) == 0xe0) {
-                       if (in_left < 3 ||
-                           (c[1] & 0xc0) != 0x80 ||
-                           (c[2] & 0xc0) != 0x80) {
-                               return -1;
-                       }
-                       c += 3;
-                       in_left -= 3;
-                       out_left -= 2;
-                       continue;
-               }
-
-               if ((c[0] & 0xf8) == 0xf0) {
-                       unsigned int codepoint;
-                       if (in_left < 4 ||
-                           (c[1] & 0xc0) != 0x80 ||
-                           (c[2] & 0xc0) != 0x80 ||
-                           (c[3] & 0xc0) != 0x80) {
-                               return -1;
-                       }
-                       codepoint = 
-                               (c[3]&0x3f) | 
-                               ((c[2]&0x3f)<<6) | 
-                               ((c[1]&0x3f)<<12) |
-                               ((c[0]&0x7)<<18);
-                       if (codepoint < 0x10000) {
-                               c += 4;
-                               in_left -= 4;
-                               out_left -= 2;
-                               continue;
-                       }
-
-                       codepoint -= 0x10000;
-
-                       if (out_left < 4) {
-                               return -1;
-                       }
-
-                       c += 4;
-                       in_left -= 4;
-                       out_left -= 4;
-                       continue;
-               }
-               
-               /* we don't handle 5 byte sequences */
-               return -1;
-       }
-
-       if (in_left > 0) {
-               return -1;
-       }
-
-       return (max_out - out_left);
-}
diff --git a/branches/plugfest/libmapi/simple_mapi.c b/branches/plugfest/libmapi/simple_mapi.c
deleted file mode 100644 (file)
index e8a0bdc..0000000
+++ /dev/null
@@ -1,914 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2007-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-
-/**
-   \file simple_mapi.c
-
-   \brief Convenience functions.
-*/
-
-
-/**
-   \details Retrieve the folder id for the specified default folder in
-   a public folder store
-
-   \param obj_store the store to search
-   \param id the type of folder to search for
-   \param folder the resulting folder reference
-
-   The following types of folders are supported:
-   - olFolderPublicRoot - the parent (directly or indirectly) for the folders below
-   - olFolderPublicIPMSubtree - Interpersonal Messages (IPM) folders
-   - olFolderPublicNonIPMSubtree - Non-interpersonal message folders
-   - olFolderPublicEFormsRoot - EForms Registry Root Folder
-   - olFolderPublicFreeBusyRoot - Free/busy root folder
-   - olFolderPublicOfflineAB - Offline address book root folder
-   - olFolderPublicEFormsRegistry - EForms Registry for the users locale
-   - olFolderPublicLocalFreeBusy - Site local free/busy folders
-   - olFolderPublicLocalOfflineAB - Site local Offline address book
-   - olFolderPublicNNTPArticle - NNTP article index folder
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_NOT_FOUND: The specified folder could not be found or is
-     not yet supported.
-
-   \sa MAPIInitialize, OpenPublicFolder, GetLastError
- */
-_PUBLIC_ enum MAPISTATUS GetDefaultPublicFolder(mapi_object_t *obj_store,
-                                               uint64_t *folder,
-                                               const uint32_t id)
-{
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-
-       switch (id) {
-       case olFolderPublicRoot:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_public_root;
-               break;
-       case olFolderPublicIPMSubtree:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_ipm_subtree;
-               break;
-       case olFolderPublicNonIPMSubtree:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_non_ipm_subtree;
-               break;
-       case olFolderPublicEFormsRoot:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_EFormsRegistryRoot;
-               break;
-       case olFolderPublicFreeBusyRoot:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_FreeBusyRoot;
-               break;
-       case olFolderPublicOfflineAB:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_OfflineAB;
-               break;
-       case olFolderPublicEFormsRegistry:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_EFormsRegistry;
-               break;
-       case olFolderPublicLocalFreeBusy:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_LocalSiteFreeBusy;
-               break;
-       case olFolderPublicLocalOfflineAB:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_LocalSiteOfflineAB;
-               break;
-       case olFolderPublicNNTPArticle:
-               *folder = ((mapi_object_store_t *)obj_store->private_data)->fid_pf_NNTPArticle;
-               break;
-       default:
-               OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static enum MAPISTATUS CacheDefaultFolders(mapi_object_t *obj_store)
-{
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       mapi_object_store_t     *store;
-       mapi_object_t           obj_inbox;
-       mapi_id_t               id_inbox;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SRow             aRow;
-       struct SPropValue       *lpProps;
-       uint32_t                count;
-       const struct Binary_r   *entryid;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-
-       store = (mapi_object_store_t *)obj_store->private_data;
-       OPENCHANGE_RETVAL_IF(!store, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "CacheDefaultFolders");
-
-       mapi_object_init(&obj_inbox);
-       retval = GetReceiveFolder(obj_store, &id_inbox, NULL);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       retval = OpenFolder(obj_store, id_inbox, &obj_inbox);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x6,
-                                         PR_IPM_APPOINTMENT_ENTRYID,
-                                         PR_IPM_CONTACT_ENTRYID,
-                                         PR_IPM_JOURNAL_ENTRYID,
-                                         PR_IPM_NOTE_ENTRYID,
-                                         PR_IPM_TASK_ENTRYID,
-                                         PR_IPM_DRAFTS_ENTRYID);
-       
-       retval = GetProps(&obj_inbox, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       aRow.cValues = count;
-       aRow.lpProps = lpProps;
-       
-       /* set cached calendar FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_APPOINTMENT_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_calendar);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       /* set cached contact FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_CONTACT_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_contact);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       /* set cached journal FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_JOURNAL_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_journal);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       /* set cached note FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_NOTE_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_note);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       /* set cached task FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_TASK_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_task);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-       
-       /* set cached drafts FID */
-       entryid = (const struct Binary_r *)find_SPropValue_data(&aRow, PR_IPM_DRAFTS_ENTRYID);
-       OPENCHANGE_RETVAL_IF(!entryid, MAPI_E_NOT_FOUND, mem_ctx);
-       retval = GetFIDFromEntryID(entryid->cb, entryid->lpb, id_inbox, &store->fid_drafts);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       store->store_type = PrivateFolderWithCachedFids;
-       
-       mapi_object_release(&obj_inbox);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieves the folder id for the specified default folder
-   in a mailbox store
-
-   \param obj_store the store to search
-   \param id the type of folder to search for
-   \param folder the resulting folder reference
-
-   The following types of folders are supported:
-   - olFolderTopInformationStore
-   - olFolderDeletedItems
-   - olFolderOutbox
-   - olFolderSentMail
-   - olFolderInbox
-   - olFolderCommonView
-   - olFolderCalendar
-   - olFolderContacts
-   - olFolderJournal
-   - olFolderNotes
-   - olFolderTasks
-   - olFolderDrafts
-   - olFolderReminders
-   - olFolderFinder
-
-   Note that this function will cache FID values for common accessed
-   folders such as calendar, contact, journal, note, task and drafts
-   until the store object got released.
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_NOT_FOUND: The specified folder could not be found or is
-     not yet supported.
-
-   \sa MAPIInitialize, OpenMsgStore, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetDefaultFolder(mapi_object_t *obj_store, 
-                                         uint64_t *folder,
-                                         const uint32_t id)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_store_t             *store;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!folder, MAPI_E_INVALID_PARAMETER, NULL);
-
-       store = (mapi_object_store_t *)obj_store->private_data;
-       OPENCHANGE_RETVAL_IF(!store, MAPI_E_NOT_INITIALIZED, NULL);
-
-       if ((id > 6) && (store->store_type == PrivateFolderWithoutCachedFids)) {
-               retval = CacheDefaultFolders(obj_store);
-               OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-       } 
-
-       switch (id) {
-       case olFolderMailboxRoot:
-               *folder = store->fid_mailbox_root;
-               return MAPI_E_SUCCESS;
-       case olFolderTopInformationStore:
-               *folder = store->fid_top_information_store;
-               return MAPI_E_SUCCESS;
-       case olFolderDeletedItems:
-               *folder = store->fid_deleted_items;
-               return MAPI_E_SUCCESS;
-       case olFolderOutbox:
-               *folder = store->fid_outbox;
-               return MAPI_E_SUCCESS;
-       case olFolderSentMail:
-               *folder = store->fid_sent_items;
-               return MAPI_E_SUCCESS;
-       case olFolderInbox:
-               *folder = store->fid_inbox;
-               return MAPI_E_SUCCESS;
-       case olFolderCommonView:
-               *folder = store->fid_common_views;
-               return MAPI_E_SUCCESS;
-       case olFolderCalendar:
-               *folder = store->fid_calendar;
-               return MAPI_E_SUCCESS;
-       case olFolderContacts:
-               *folder = store->fid_contact;
-               return MAPI_E_SUCCESS;
-       case olFolderJournal:
-               *folder = store->fid_journal;
-               return MAPI_E_SUCCESS;
-       case olFolderNotes:
-               *folder = store->fid_note;
-               return MAPI_E_SUCCESS;
-       case olFolderTasks:
-               *folder = store->fid_task;
-               return MAPI_E_SUCCESS;
-       case olFolderDrafts:
-               *folder = store->fid_drafts;
-               return MAPI_E_SUCCESS;
-       case olFolderFinder:
-               *folder = store->fid_search;
-               return MAPI_E_SUCCESS;
-       default:
-               *folder = 0;
-               OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, 0);
-       }
-}
-
-
-/**
-   \details Check if a given folder identifier matches with a
-   system/default one and optionally returns the olFolder type
-
-   \param obj_store pointer to the store object
-   \param fid reference to the folder identifier to check
-   \param olFolder pointer to the returned olFolder
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool IsMailboxFolder(mapi_object_t *obj_store, 
-                             uint64_t fid, 
-                             uint32_t *olFolder)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_store_t     *store;
-       uint32_t                olFolderNum = 0;
-       bool                    ret = true;
-
-       if (!obj_store) {
-               return false;
-       }
-       store = (mapi_object_store_t *) obj_store->private_data;
-       if (!store) {
-               return false;
-       }
-
-       if (fid == 0x0) {
-               return false;
-       }
-
-       if (store->store_type == PrivateFolderWithoutCachedFids) {
-               retval = CacheDefaultFolders(obj_store);
-               if (retval) {
-                       return false;
-               }
-       }
-
-       if(fid == store->fid_top_information_store) {
-               olFolderNum = olFolderTopInformationStore;
-       } else if (fid == store->fid_deleted_items) {
-               olFolderNum = olFolderDeletedItems;
-       } else if (fid == store->fid_outbox) {
-               olFolderNum = olFolderOutbox;
-       } else if (fid == store->fid_sent_items) {
-               olFolderNum = olFolderSentMail;
-       } else if (fid == store->fid_inbox) {
-               olFolderNum = olFolderInbox;
-       } else if (fid == store->fid_common_views) {
-               olFolderNum = olFolderCommonView;
-       } else if (fid == store->fid_calendar) {
-               olFolderNum = olFolderCalendar;
-       } else if (fid == store->fid_contact) {
-               olFolderNum = olFolderContacts;
-       } else if (fid == store->fid_journal) {
-               olFolderNum = olFolderJournal;
-       } else if (fid == store->fid_note) {
-               olFolderNum = olFolderNotes;
-       } else if (fid == store->fid_task) {
-               olFolderNum = olFolderTasks;
-       } else if (fid == store->fid_drafts) {
-               olFolderNum = olFolderDrafts;
-       } else if (fid == store->fid_search) {
-               olFolderNum = olFolderFinder;
-       } else if (fid == store->fid_pf_OfflineAB) {
-               olFolderNum = olFolderPublicOfflineAB;
-       } else if (fid == store->fid_pf_FreeBusyRoot) {
-               olFolderNum = olFolderPublicFreeBusyRoot;
-       } else if (fid == store->fid_pf_EFormsRegistryRoot) {
-               olFolderNum = olFolderPublicEFormsRoot;
-       } else if (fid == store->fid_pf_EFormsRegistry) {
-               olFolderNum = olFolderPublicEFormsRegistry;
-       } else if (fid == store->fid_pf_public_root) {
-               olFolderNum = olFolderPublicRoot;
-       } else if (fid == store->fid_pf_ipm_subtree) {
-               olFolderNum = olFolderPublicIPMSubtree;
-       } else if (fid == store->fid_pf_non_ipm_subtree) {
-               olFolderNum = olFolderPublicNonIPMSubtree;
-       } else if (fid == store->fid_pf_LocalSiteFreeBusy) {
-               olFolderNum = olFolderPublicLocalFreeBusy;
-       } else if (fid == store->fid_pf_LocalSiteOfflineAB) {
-               olFolderNum = olFolderPublicLocalOfflineAB;
-       } else if (fid == store->fid_pf_NNTPArticle) {
-               olFolderNum = olFolderPublicNNTPArticle;
-       } else {
-               olFolderNum = 0xFFFFFFFF;
-               ret = false;
-       }
-
-       if (olFolder) *olFolder = olFolderNum;
-       return ret;
-}
-
-/**
-   \details Retrieves the total and unread number of items for a
-    specified folder.
-
-    \param obj_folder the folder to get item counts for
-    \param unread the number of items in the folder (result)
-    \param total the number of items in the folder, including unread
-    items (result)
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: obj_folder is undefined
-   - MAPI_E_NOT_FOUND: The specified folder could not be found or is
-     not yet supported.
-
-   \sa MAPIInitialize, OpenFolder, GetLastError
-*/
-_PUBLIC_ enum MAPISTATUS GetFolderItemsCount(mapi_object_t *obj_folder,
-                                            uint32_t *unread,
-                                            uint32_t *total)
-{
-       enum MAPISTATUS         retval;
-       TALLOC_CTX              *mem_ctx;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                count;
-
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!unread, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!total, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "GetFolderItemsCount");
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, 
-                                         PR_CONTENT_UNREAD,
-                                         PR_CONTENT_COUNT);
-
-       retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       *unread = lpProps[0].value.l;
-       *total = lpProps[1].value.l;
-
-       talloc_free(mem_ctx);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Adds permissions for a user on a given folder
-
-   \param obj_folder the folder we add permission for
-   \param username the Exchange username we add permissions for
-   \param role the permission mask value
-
-   The following permissions and rights are supported:
-   - RightsNone
-   - RightsReadItems
-   - RightsCreateItems
-   - RightsEditOwn
-   - RightsDeleteOwn
-   - RightsEditAll
-   - RightsDeleteAll
-   - RightsCreateSubfolders
-   - RightsFolderOwner
-   - RightsFolderContact
-   - RoleNone
-   - RoleReviewer
-   - RoleContributor
-   - RoleNoneditingAuthor
-   - RoleAuthor
-   - RoleEditor
-   - RolePublishAuthor
-   - RolePublishEditor
-   - RightsAll
-   - RoleOwner
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: username is NULL
-
-   \sa ResolveNames, ModifyPermissions
- */
-_PUBLIC_ enum MAPISTATUS AddUserPermission(mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct SPropTagArray            *SPropTagArray;
-       const char                      *names[2];
-       struct SRowSet                  *rows = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct mapi_PermissionsData     rowList;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
-
-       rowList.ModifyFlags = 0;
-
-       mem_ctx = talloc_named(NULL, 0, "AddUserPermission");
-
-       /* query Address book */
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
-       names[0] = username;
-       names[1] = NULL;
-       retval = ResolveNames(mapi_object_get_session(obj_folder), (const char **)names,
-                             SPropTagArray, &rows, &flaglist, 0);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!flaglist, MAPI_E_NOT_FOUND, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!rows, MAPI_E_NOT_FOUND, mem_ctx);
-       /* Check if the username was found */
-       OPENCHANGE_RETVAL_IF((flaglist->aulPropTag[0] != MAPI_RESOLVED), MAPI_E_NOT_FOUND, mem_ctx);
-
-       rowList.ModifyCount = 1;
-       rowList.PermissionsData = talloc_array(mem_ctx, struct PermissionData, 1);
-       rowList.PermissionsData[0].PermissionDataFlags = ROW_ADD;
-       rowList.PermissionsData[0].lpProps.cValues = 2;
-       rowList.PermissionsData[0].lpProps.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, 2);
-       cast_mapi_SPropValue((TALLOC_CTX *)rowList.PermissionsData[0].lpProps.lpProps,
-                            &rowList.PermissionsData[0].lpProps.lpProps[0], &rows->aRow[0].lpProps[0]);
-       rowList.PermissionsData[0].lpProps.lpProps[1].ulPropTag = PR_MEMBER_RIGHTS;
-       rowList.PermissionsData[0].lpProps.lpProps[1].value.l = role;
-
-       retval = ModifyPermissions(obj_folder, 0, &rowList);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Modify permissions for a user on a given folder
-   
-   \param obj_folder the folder to modify permissions for
-   \param username the Exchange username to modify permissions for
-   \param role the permission mask value (see AddUserPermission)
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: username is NULL
-   - MAPI_E_NOT_FOUND: couldn't find or change permissions for the
-     given user
-
-   \sa AddUserPermission, ResolveNames, GetPermissionsTable, ModifyPermissions
- */
-_PUBLIC_ enum MAPISTATUS ModifyUserPermission(mapi_object_t *obj_folder, 
-                                             const char *username, 
-                                             enum ACLRIGHTS role)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct SPropTagArray            *SPropTagArray;
-       const char                      *names[2];
-       const char                      *user = NULL;
-       struct SRowSet                  *rows = NULL;
-       struct SRowSet                  rowset;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct mapi_PermissionsData     rowList;
-       struct SPropValue               *lpProp;
-       mapi_object_t                   obj_table;
-       uint32_t                        Numerator;
-       uint32_t                        Denominator;
-       bool                            found = false;
-       uint32_t                        i = 0;
-
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
-
-       rowList.ModifyFlags = 0;
-
-       mem_ctx = talloc_named(NULL, 0, "ModifyUserPermission");
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
-       names[0] = username;
-       names[1] = NULL;
-       retval = ResolveNames(mapi_object_get_session(obj_folder), (const char **)names, 
-                             SPropTagArray, &rows, &flaglist, 0);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       if (flaglist->aulPropTag[0] == MAPI_RESOLVED) {
-         user = (const char *) find_SPropValue_data(&(rows->aRow[0]), PR_DISPLAY_NAME);
-       } else {
-               /* Special case: Not a AD user account but Default or
-                * Anonymous. Since names are language specific, we
-                * can't use strcmp 
-                */
-               user = username;
-       }
-
-       mapi_object_init(&obj_table);
-       retval = GetPermissionsTable(obj_folder, 0x00, &obj_table);
-
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 4,
-                                         PR_ENTRYID,
-                                         PR_MEMBER_RIGHTS,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = QueryPosition(&obj_table, &Numerator, &Denominator);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = QueryRows(&obj_table, Denominator, TBL_ADVANCE, &rowset);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       for (i = 0; i < rowset.cRows; i++) {
-               lpProp = get_SPropValue_SRow(&rowset.aRow[i], PR_MEMBER_NAME);
-               if (lpProp && lpProp->value.lpszA) {
-                       if (!strcmp(lpProp->value.lpszA, user)) {
-                               rowList.ModifyCount = 1;
-                               rowList.PermissionsData = talloc_array(mem_ctx, struct PermissionData, 1);
-                               rowList.PermissionsData[0].PermissionDataFlags = ROW_MODIFY;
-                               rowList.PermissionsData[0].lpProps.cValues = 2;
-                               rowList.PermissionsData[0].lpProps.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, 2);
-                               lpProp = get_SPropValue_SRow(&(rowset.aRow[i]), PR_MEMBER_ID);
-                               if (!lpProp) {
-                                       continue;
-                               }
-                               rowList.PermissionsData[0].lpProps.lpProps[0].ulPropTag = PR_MEMBER_ID;
-                               rowList.PermissionsData[0].lpProps.lpProps[0].value.d = lpProp->value.d;
-                               rowList.PermissionsData[0].lpProps.lpProps[1].ulPropTag = PR_MEMBER_RIGHTS;
-                               rowList.PermissionsData[0].lpProps.lpProps[1].value.l = role;
-                               
-                               retval = ModifyPermissions(obj_folder, 0, &rowList);
-                               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-                               found = true;
-                               break;
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_table);
-       talloc_free(mem_ctx);
-
-       OPENCHANGE_RETVAL_IF((!found), MAPI_E_NOT_FOUND, 0);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Remove permissions for a user on a given folder
-
-   \param obj_folder the folder to remove permission from
-   \param username the Exchange username to remove permissions for
-
-   \return MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS)
-   indicating the error.
-
-   \note Developers may also call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: username or obj_folder are NULL
-   - MAPI_E_NOT_FOUND: couldn't find or remove permissions for the
-     given user
-
-   \sa ResolveNames, GetPermissionsTable, ModifyPermissions
- */
-_PUBLIC_ enum MAPISTATUS RemoveUserPermission(mapi_object_t *obj_folder, 
-                                             const char *username)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct SPropTagArray            *SPropTagArray;
-       const char                      *names[2];
-       const char                      *user = NULL;
-       struct SRowSet                  *rows = NULL;
-       struct SRowSet                  rowset;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct mapi_PermissionsData     rowList;
-       struct SPropValue               *lpProp;
-       mapi_object_t                   obj_table;
-       uint32_t                        Numerator;
-       uint32_t                        Denominator;
-       bool                            found = false;
-       uint32_t                        i = 0;
-
-       OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "RemoveUserPermission");
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
-       names[0] = username;
-       names[1] = NULL;
-       retval = ResolveNames(mapi_object_get_session(obj_folder), (const char **)names, 
-                             SPropTagArray, &rows, &flaglist, 0);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Check if the username was found */
-       OPENCHANGE_RETVAL_IF((flaglist->aulPropTag[0] != MAPI_RESOLVED), MAPI_E_NOT_FOUND, mem_ctx);
-
-       user = (const char *)find_SPropValue_data(&(rows->aRow[0]), PR_DISPLAY_NAME);
-
-       mapi_object_init(&obj_table);
-       retval = GetPermissionsTable(obj_folder, 0x00, &obj_table);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 4,
-                                         PR_ENTRYID,
-                                         PR_MEMBER_RIGHTS,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = QueryPosition(&obj_table, &Numerator, &Denominator);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       retval = QueryRows(&obj_table, Denominator, TBL_ADVANCE, &rowset);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       for (i = 0; i < rowset.cRows; i++) {
-               lpProp = get_SPropValue_SRow(&rowset.aRow[i], PR_MEMBER_NAME);
-               if (lpProp && lpProp->value.lpszA) {
-                       if (!strcmp(lpProp->value.lpszA, user)) {
-                               rowList.ModifyCount = 1;
-                               rowList.PermissionsData = talloc_array(mem_ctx, struct PermissionData, 1);
-                               rowList.PermissionsData[0].PermissionDataFlags = ROW_REMOVE;
-                               rowList.PermissionsData[0].lpProps.cValues = 1;
-                               rowList.PermissionsData[0].lpProps.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, 1);
-                               lpProp = get_SPropValue_SRow(&(rowset.aRow[i]), PR_MEMBER_ID);
-                               if (!lpProp) {
-                                       continue;
-                               }
-                               rowList.PermissionsData[0].lpProps.lpProps[0].ulPropTag = PR_MEMBER_ID;
-                               rowList.PermissionsData[0].lpProps.lpProps[0].value.d = lpProp->value.d;
-                               
-                               retval = ModifyPermissions(obj_folder, 0, &rowList);
-                               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-                               found = true;
-                               break;
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_table);
-       talloc_free(mem_ctx);
-
-       OPENCHANGE_RETVAL_IF((found != true), MAPI_E_NOT_FOUND, 0);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Implement the BestBody algorithm and return the best body
-   content type for a given message.
-
-   \param obj_message the message we find the best body for
-   \param format the format - see below.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND. If
-   MAPI_E_NOT_FOUND is returned then format is set to 0x0
-   (undefined). If MAPI_E_SUCCESS is returned, then format can have
-   one of the following values:
-   - olEditorText: format is plain text
-   - olEditorHTML: format is HTML
-   - olEditorRTF: format is RTF
- */
-_PUBLIC_ enum MAPISTATUS GetBestBody(mapi_object_t *obj_message, 
-                                    uint8_t *format)
-{
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session;
-       enum MAPISTATUS         retval;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SPropValue       *lpProps;
-       struct SRow             aRow;
-       uint32_t                count;
-       uint8_t                 RtfInSync;
-       uint32_t                PlainStatus;
-       uint32_t                RtfStatus;
-       uint32_t                HtmlStatus;
-       const uint32_t          *err_code;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!format, MAPI_E_INVALID_PARAMETER, NULL);
-
-       session = mapi_object_get_session(obj_message);
-       mapi_ctx = session->mapi_ctx;
-
-       /* Step 1. Retrieve properties needed by the BestBody algorithm */
-       SPropTagArray = set_SPropTagArray(mapi_ctx->mem_ctx, 0x4,
-                                         PR_BODY,
-                                         PR_RTF_COMPRESSED,
-                                         PR_HTML,
-                                         PR_RTF_IN_SYNC);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               *format = 0;
-               OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, 0);
-       }
-
-       aRow.ulAdrEntryPad = 0;
-       aRow.cValues = count;
-       aRow.lpProps = lpProps;
-
-       /* Step 2. Retrieve properties values and map errors */
-       err_code = (const uint32_t *)find_SPropValue_data(&aRow, PR_RTF_IN_SYNC);
-       RtfInSync = (err_code) ? *err_code : 0;
-
-       err_code = (const uint32_t *)find_SPropValue_data(&aRow, PR_BODY_ERROR);
-       PlainStatus = (err_code) ? *err_code : 0;
-
-       err_code = (const uint32_t *)find_SPropValue_data(&aRow, PR_RTF_COMPRESSED_ERROR);
-       RtfStatus = (err_code) ? *err_code : 0;
-
-       err_code = (const uint32_t *)find_SPropValue_data(&aRow, PR_BODY_HTML_ERROR);
-       HtmlStatus = (err_code) ? *err_code : 0;
-
-       /* Step 3. Determine the body format (9 possible cases) */
-
-       /* case 1 */
-       if ((PlainStatus == MAPI_E_NOT_FOUND) && (RtfStatus == MAPI_E_NOT_FOUND) && 
-           (HtmlStatus == MAPI_E_NOT_FOUND)) {
-               *format = 0;
-               OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, 0);
-       }
-       
-       /* case 2 */
-       if (((PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY) || (PlainStatus == 0)) && 
-           (RtfStatus == MAPI_E_NOT_FOUND) && (HtmlStatus == MAPI_E_NOT_FOUND)) {
-               *format = olEditorText;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 3 */
-       if ((PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY) && 
-           (HtmlStatus == MAPI_E_NOT_FOUND)) {
-               *format = olEditorRTF;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 4 */
-       if ((PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (HtmlStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (RtfInSync == 1)) {
-               *format = olEditorRTF;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 5 */
-       if ((PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (HtmlStatus == MAPI_E_NOT_ENOUGH_MEMORY) &&
-           (RtfInSync == 0)) {
-               *format = olEditorHTML;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 6 */
-       if (((RtfStatus == 0) || (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           ((HtmlStatus == 0) || (HtmlStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           (RtfInSync == 1)) {
-               *format = olEditorRTF;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 7 */
-       if (((RtfStatus == 0) || (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           ((HtmlStatus == 0) || (HtmlStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           (RtfInSync == 0)) {
-               *format = olEditorHTML;
-               return MAPI_E_SUCCESS;
-       }
-       
-       /* case 8 */
-       if (((PlainStatus == 0) || (PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           ((RtfStatus == 0) || (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           (RtfInSync == 1)) {
-               *format = olEditorRTF;
-               return MAPI_E_SUCCESS;
-       }
-
-       /* case 9 */
-       if (((PlainStatus == 0) || (PlainStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           ((RtfStatus == 0) || (RtfStatus == MAPI_E_NOT_ENOUGH_MEMORY)) &&
-           (RtfInSync == 0)) {
-               *format = olEditorText;
-               return MAPI_E_SUCCESS;
-       }
-
-       OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, 0);
-}
diff --git a/branches/plugfest/libmapi/socket/interface.c b/branches/plugfest/libmapi/socket/interface.c
deleted file mode 100644 (file)
index 21f31c6..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   multiple interface handling
-
-   Copyright (C) Andrew Tridgell 1992-2005
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <param.h>
-
-#define ALLONES  ((uint32_t)0xFFFFFFFF)
-/*
-  address construction based on a patch from fred@datalync.com
-*/
-#define MKBCADDR(_IP, _NM) ((_IP & _NM) | (_NM ^ ALLONES))
-#define MKNETADDR(_IP, _NM) (_IP & _NM)
-
-bool is_zero_ip_v4(struct in_addr ip);
-bool same_net_v4(struct in_addr ip1, struct in_addr ip2, struct in_addr mask);
-uint32_t interpret_addr(const char *str);
-struct in_addr interpret_addr2(const char *str);
-
-/****************************************************************************
-Try and find an interface that matches an ip. If we cannot, return NULL
-  **************************************************************************/
-static struct interface *iface_find(struct interface *interfaces, 
-                                   struct in_addr ip, bool CheckMask)
-{
-       struct interface *i;
-       if (is_zero_ip_v4(ip)) return interfaces;
-
-       for (i=interfaces;i;i=i->next)
-               if (CheckMask) {
-                       if (same_net_v4(i->ip,ip,i->nmask)) return i;
-               } else if (i->ip.s_addr == ip.s_addr) return i;
-
-       return NULL;
-}
-
-
-/****************************************************************************
-add an interface to the linked list of interfaces
-****************************************************************************/
-static void add_interface(TALLOC_CTX *mem_ctx, struct in_addr ip, struct in_addr nmask, struct interface **interfaces)
-{
-       struct interface *iface;
-       struct in_addr bcast;
-
-       if (iface_find(*interfaces, ip, false)) {
-               DEBUG(3,("not adding duplicate interface %s\n",inet_ntoa(ip)));
-               return;
-       }
-
-       iface = talloc(*interfaces == NULL ? mem_ctx : *interfaces, struct interface);
-       if (iface == NULL) 
-               return;
-       
-       ZERO_STRUCTPN(iface);
-
-       iface->ip = ip;
-       iface->nmask = nmask;
-       bcast.s_addr = MKBCADDR(iface->ip.s_addr, iface->nmask.s_addr);
-
-       /* keep string versions too, to avoid people tripping over the implied
-          static in inet_ntoa() */
-       iface->ip_s = talloc_strdup(iface, inet_ntoa(iface->ip));
-       iface->nmask_s = talloc_strdup(iface, inet_ntoa(iface->nmask));
-       
-       if (nmask.s_addr != ~(in_addr_t)0) {
-               iface->bcast_s = talloc_strdup(iface, inet_ntoa(bcast));
-       }
-
-       DLIST_ADD_END(*interfaces, iface, struct interface *);
-
-       DEBUG(2,("added interface ip=%s nmask=%s\n", iface->ip_s, iface->nmask_s));
-}
-
-
-
-/**
-interpret a single element from a interfaces= config line 
-
-This handles the following different forms:
-
-1) wildcard interface name
-2) DNS name
-3) IP/masklen
-4) ip/mask
-5) bcast/mask
-**/
-static void interpret_interface(TALLOC_CTX *mem_ctx, 
-                               const char *token, 
-                               struct iface_struct *probed_ifaces, 
-                               int total_probed,
-                               struct interface **local_interfaces)
-{
-       struct in_addr ip, nmask;
-       char *p;
-       char *address;
-       int i, added=0;
-
-       ip.s_addr = 0;
-       nmask.s_addr = 0;
-       
-       /* first check if it is an interface name */
-       for (i=0;i<total_probed;i++) {
-               if (gen_fnmatch(token, probed_ifaces[i].name) == 0) {
-                       add_interface(mem_ctx, probed_ifaces[i].ip,
-                                     probed_ifaces[i].netmask,
-                                     local_interfaces);
-                       added = 1;
-               }
-       }
-       if (added) return;
-
-       /* maybe it is a DNS name */
-       p = strchr_m(token,'/');
-       if (!p) {
-               /* don't try to do dns lookups on wildcard names */
-               if (strpbrk(token, "*?") != NULL) {
-                       return;
-               }
-               ip.s_addr = interpret_addr2(token).s_addr;
-               for (i=0;i<total_probed;i++) {
-                       if (ip.s_addr == probed_ifaces[i].ip.s_addr) {
-                               add_interface(mem_ctx, probed_ifaces[i].ip,
-                                             probed_ifaces[i].netmask,
-                                             local_interfaces);
-                               return;
-                       }
-               }
-               DEBUG(2,("can't determine netmask for %s\n", token));
-               return;
-       }
-
-       address = talloc_strdup(mem_ctx, token);
-       p = strchr_m(address,'/');
-
-       /* parse it into an IP address/netmasklength pair */
-       *p++ = 0;
-
-       ip.s_addr = interpret_addr2(address).s_addr;
-
-       if (strlen(p) > 2) {
-               nmask.s_addr = interpret_addr2(p).s_addr;
-       } else {
-               nmask.s_addr = htonl(((ALLONES >> atoi(p)) ^ ALLONES));
-       }
-
-       /* maybe the first component was a broadcast address */
-       if (ip.s_addr == MKBCADDR(ip.s_addr, nmask.s_addr) ||
-           ip.s_addr == MKNETADDR(ip.s_addr, nmask.s_addr)) {
-               for (i=0;i<total_probed;i++) {
-                       if (same_net_v4(ip, probed_ifaces[i].ip, nmask)) {
-                               add_interface(mem_ctx, probed_ifaces[i].ip, nmask,
-                                             local_interfaces);
-                               talloc_free(address);
-                               return;
-                       }
-               }
-               DEBUG(2,("Can't determine ip for broadcast address %s\n", address));
-               talloc_free(address);
-               return;
-       }
-
-       add_interface(mem_ctx, ip, nmask, local_interfaces);
-       talloc_free(address);
-}
-
-
-/**
-load the list of network interfaces
-**/
-void load_interfaces(TALLOC_CTX *mem_ctx, const char **interfaces, struct interface **local_interfaces)
-{
-       const char **ptr = interfaces;
-       int i;
-       struct iface_struct ifaces[MAX_INTERFACES];
-       struct in_addr loopback_ip;
-       int total_probed;
-
-       *local_interfaces = NULL;
-
-       loopback_ip = interpret_addr2("127.0.0.1");
-
-       /* probe the kernel for interfaces */
-       total_probed = get_interfaces(ifaces, MAX_INTERFACES);
-
-       /* if we don't have a interfaces line then use all interfaces
-          except loopback */
-       if (!ptr || !*ptr || !**ptr) {
-               if (total_probed <= 0) {
-                       DEBUG(0,("ERROR: Could not determine network interfaces, you must use a interfaces config line\n"));
-               }
-               for (i=0;i<total_probed;i++) {
-                       if (ifaces[i].ip.s_addr != loopback_ip.s_addr) {
-                               add_interface(mem_ctx, ifaces[i].ip, 
-                                             ifaces[i].netmask, local_interfaces);
-                       }
-               }
-       }
-
-       while (ptr && *ptr) {
-               interpret_interface(mem_ctx, *ptr, ifaces, total_probed, local_interfaces);
-               ptr++;
-       }
-
-       if (!*local_interfaces) {
-               DEBUG(0,("WARNING: no network interfaces found\n"));
-       }
-}
-
-/**
-  how many interfaces do we have
-  **/
-int iface_count(struct interface *ifaces)
-{
-       int ret = 0;
-       struct interface *i;
-
-       for (i=ifaces;i;i=i->next)
-               ret++;
-       return ret;
-}
-
-/**
-  return IP of the Nth interface
-  **/
-const char *iface_n_ip(struct interface *ifaces, int n)
-{
-       struct interface *i;
-  
-       for (i=ifaces;i && n;i=i->next)
-               n--;
-
-       if (i) {
-               return i->ip_s;
-       }
-       return NULL;
-}
-
-/**
-  return bcast of the Nth interface
-  **/
-const char *iface_n_bcast(struct interface *ifaces, int n)
-{
-       struct interface *i;
-  
-       for (i=ifaces;i && n;i=i->next)
-               n--;
-
-       if (i) {
-               return i->bcast_s;
-       }
-       return NULL;
-}
-
-/**
-  return netmask of the Nth interface
-  **/
-const char *iface_n_netmask(struct interface *ifaces, int n)
-{
-       struct interface *i;
-  
-       for (i=ifaces;i && n;i=i->next)
-               n--;
-
-       if (i) {
-               return i->nmask_s;
-       }
-       return NULL;
-}
-
-/**
-  return the local IP address that best matches a destination IP, or
-  our first interface if none match
-*/
-const char *iface_best_ip(struct interface *ifaces, const char *dest)
-{
-       struct interface *iface;
-       struct in_addr ip;
-
-       ip.s_addr = interpret_addr(dest);
-       iface = iface_find(ifaces, ip, true);
-       if (iface) {
-               return iface->ip_s;
-       }
-       return iface_n_ip(ifaces, 0);
-}
-
-/**
-  return true if an IP is one one of our local networks
-*/
-bool iface_is_local(struct interface *ifaces, const char *dest)
-{
-       struct in_addr ip;
-
-       ip.s_addr = interpret_addr(dest);
-       if (iface_find(ifaces, ip, true)) {
-               return true;
-       }
-       return false;
-}
-
-/**
-  return true if a IP matches a IP/netmask pair
-*/
-bool iface_same_net(const char *ip1, const char *ip2, const char *netmask)
-{
-       return same_net_v4(interpret_addr2(ip1),
-                       interpret_addr2(ip2),
-                       interpret_addr2(netmask));
-}
diff --git a/branches/plugfest/libmapi/socket/netif.c b/branches/plugfest/libmapi/socket/netif.c
deleted file mode 100644 (file)
index 1386391..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   return a list of network interfaces
-   Copyright (C) Andrew Tridgell 1998
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-/* working out the interfaces for a OS is an incredibly non-portable
-   thing. We have several possible implementations below, and autoconf
-   tries each of them to see what works
-
-   Note that this file does _not_ include includes.h. That is so this code
-   can be called directly from the autoconf tests. That also means
-   this code cannot use any of the normal Samba debug stuff or defines.
-   This is standalone code.
-
-*/
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-#ifdef HAVE_SYS_SOCKIO_H
-#include <sys/sockio.h>
-#endif
-
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
-/* this works for Linux 2.2, Solaris 2.5, SunOS4, HPUX 10.20, OSF1
-   V4.0, Ultrix 4.4, SCO Unix 3.2, IRIX 6.4 and FreeBSD 3.2.
-
-   It probably also works on any BSD style system.  */
-
-/****************************************************************************
-  get the netmask address for a local interface
-****************************************************************************/
-static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
-{  
-       struct ifconf           ifc;
-       struct ifreq            *ifr=NULL;
-       struct in_addr          ipaddr;
-       struct in_addr          nmask;
-       struct sockaddr         *sockaddr;
-       struct sockaddr_in      *sockaddr_in;
-       char                    *iname;
-       char                    buff[8192];
-       int                     fd, i, n;
-       int                     total = 0;
-
-       if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-               return -1;
-       }
-  
-       ifc.ifc_len = sizeof(buff);
-       ifc.ifc_buf = buff;
-
-       if (ioctl(fd, SIOCGIFCONF, &ifc) != 0) {
-               close(fd);
-               return -1;
-       } 
-
-       ifr = ifc.ifc_req;
-  
-       n = ifc.ifc_len / sizeof(struct ifreq);
-
-       /* Loop through interfaces, looking for given IP address */
-       for (i=n-1;i>=0 && total < max_interfaces;i--) {
-               if (ioctl(fd, SIOCGIFADDR, &ifr[i]) != 0) {
-                       continue;
-               }
-
-               iname = ifr[i].ifr_name;
-               sockaddr = (struct sockaddr *) &ifr[i].ifr_addr;
-               sockaddr_in = (struct sockaddr_in *) sockaddr;
-               ipaddr = sockaddr_in->sin_addr;
-
-               if (ioctl(fd, SIOCGIFFLAGS, &ifr[i]) != 0) {
-                       continue;
-               }  
-
-               if (!(ifr[i].ifr_flags & IFF_UP)) {
-                       continue;
-               }
-
-               if (ioctl(fd, SIOCGIFNETMASK, &ifr[i]) != 0) {
-                       continue;
-               }  
-
-               nmask = sockaddr_in->sin_addr;
-
-               strncpy(ifaces[total].name, iname, sizeof(ifaces[total].name)-1);
-               ifaces[total].name[sizeof(ifaces[total].name)-1] = 0;
-               ifaces[total].ip = ipaddr;
-               ifaces[total].netmask = nmask;
-               total++;
-       }
-
-       close(fd);
-
-       return total;
-}  
-
-static int iface_comp(struct iface_struct *i1, struct iface_struct *i2)
-{
-       int r;
-       r = strcmp(i1->name, i2->name);
-       if (r) return r;
-       r = ntohl(i1->ip.s_addr) - ntohl(i2->ip.s_addr);
-       if (r) return r;
-       r = ntohl(i1->netmask.s_addr) - ntohl(i2->netmask.s_addr);
-       return r;
-}
-
-/* this wrapper is used to remove duplicates from the interface list generated
-   above */
-_PUBLIC_ int get_interfaces(struct iface_struct *ifaces, int max_interfaces)
-{
-       int total, i, j;
-
-       total = _get_interfaces(ifaces, max_interfaces);
-       if (total <= 0) return total;
-
-       /* now we need to remove duplicates */
-       qsort(ifaces, total, sizeof(ifaces[0]), QSORT_CAST iface_comp);
-
-       for (i=1;i<total;) {
-               if (iface_comp(&ifaces[i-1], &ifaces[i]) == 0) {
-                       for (j=i-1;j<total-1;j++) {
-                               ifaces[j] = ifaces[j+1];
-                       }
-                       total--;
-               } else {
-                       i++;
-               }
-       }
-
-       return total;
-}
diff --git a/branches/plugfest/libmapi/socket/netif.h b/branches/plugfest/libmapi/socket/netif.h
deleted file mode 100644 (file)
index f168f00..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   structures for socke/netif.c and socket/interface.c
-
-   Copyright (C) Andrew Tridgell 2004
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/** used for network interfaces */
-struct interface {
-       struct interface *next, *prev;
-       struct in_addr ip;
-       struct in_addr nmask;
-       const char *ip_s;
-       const char *bcast_s;
-       const char *nmask_s;
-};
-
-struct iface_struct {
-       char name[16];
-       struct in_addr ip;
-       struct in_addr netmask;
-};
-
-#define MAX_INTERFACES 128
diff --git a/branches/plugfest/libmapi/utils.c b/branches/plugfest/libmapi/utils.c
deleted file mode 100644 (file)
index 69c44c6..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005 - 2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "gen_ndr/ndr_exchange.h"
-
-/**
-   \file utils.c
-
-   \brief General utility functions
- */
-
-
-/* 
-   FIXME: 
-   nor     0x00 0x00 0x00 0x00 at the beginning 
-   neither 0x2f at the end should be listed 
-*/
-static const uint8_t MAPI_LOCAL_UID[] = {
-       0xdc, 0xa7, 0x40, 0xc8, 0xc0, 0x42, 0x10, 0x1a,
-       0xb4, 0xb9, 0x08, 0x00, 0x2b, 0x2f, 0xe1, 0x82
-};
-
-static const uint8_t MAPI_LOCAL_UID_END[] = {
-       0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 
-       0x00, 0x2f
-};
-
-_PUBLIC_ char *guid_delete_dash(TALLOC_CTX *mem_ctx, const char *recipient_id)
-{
-       char            *guid;
-       uint32_t        count,i;
-
-       if (!recipient_id) {
-               return NULL;
-       }
-
-       for (count=0,i=0;i!=strlen(recipient_id);i++) {
-               if (recipient_id[i] != '-') count++;
-       }
-
-       guid = (char *)talloc_zero_size(mem_ctx, count+1);
-       for (count=0,i = 0;i!=strlen(recipient_id);i++) {
-               if (recipient_id[i] != '-') {
-                       guid[count] = recipient_id[i];
-                       count++;
-               }
-       }
-
-       return guid;
-}
-
-/*
-  Constructs a PR_ENTRYID value for recipients.
- */
-_PUBLIC_ struct Binary_r *generate_recipient_entryid(TALLOC_CTX *mem_ctx, const char *recipient_id)
-{
-       struct Binary_r *entryid;
-       uint32_t        off;
-       char            *guid = (char *) NULL;
-
-       entryid = talloc(mem_ctx, struct Binary_r);
-       entryid->cb = sizeof (uint32_t) + sizeof (MAPI_LOCAL_UID) + sizeof (MAPI_LOCAL_UID_END) + 1;
-
-       if (recipient_id) {
-               guid = guid_delete_dash(mem_ctx, recipient_id);
-               entryid->cb += strlen(guid);
-       }
-
-       entryid->lpb = (uint8_t *)talloc_zero_size(mem_ctx, entryid->cb);
-       off = 4;
-       memcpy(entryid->lpb + off, MAPI_LOCAL_UID, sizeof (MAPI_LOCAL_UID));
-       off += sizeof (MAPI_LOCAL_UID);
-       
-       memcpy(entryid->lpb + off, MAPI_LOCAL_UID_END, sizeof (MAPI_LOCAL_UID_END));
-       off += sizeof (MAPI_LOCAL_UID_END);
-
-       if (recipient_id) {
-               strcpy((char *)entryid->lpb + off, guid);
-               off += strlen(recipient_id);
-       }
-       
-       return entryid;
-}
-
-/**
-   \details Create a FID from an EntryID
-
-   \param cb count of lpb bytes
-   \param lpb pointer on an array of bytes
-   \param parent_fid the parent folder identifier
-   \param fid pointer to the returned fid
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS GetFIDFromEntryID(uint16_t cb, 
-                                          uint8_t *lpb, 
-                                          uint64_t parent_fid, 
-                                          uint64_t *fid)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!lpb, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!fid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(cb < 8, MAPI_E_INVALID_PARAMETER, NULL);
-
-       *fid = 0;
-       *fid += ((uint64_t)lpb[cb - 3] << 56);
-       *fid += ((uint64_t)lpb[cb - 4] << 48);
-       *fid += ((uint64_t)lpb[cb - 5] << 40);
-       *fid += ((uint64_t)lpb[cb - 6] << 32);
-       *fid += ((uint64_t)lpb[cb - 7] << 24);
-       *fid += ((uint64_t)lpb[cb - 8] << 16);
-       /* WARNING: for some unknown reason the latest byte of folder
-          ID may change (0x1 or 0x4 values identified so far).
-          However this byte sounds the same than the parent folder
-          one */
-       *fid += (parent_fid & 0xFFFF);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapi/x500.c b/branches/plugfest/libmapi/x500.c
deleted file mode 100644 (file)
index bc3a4d2..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-   OpenChange NSPI implementation.
-
-   Copyright (C) Julien Kerihuel 2005 - 2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-#ifndef HAVE_STRCASESTR
-static char *strcasestr(const char *haystack, const char *needle)
-{
-       const char *s;
-       size_t nlen = strlen(needle);
-
-       for (s=haystack;*s;s++) {
-               if (toupper(*needle) == toupper(*s) &&
-                               strncasecmp(s, needle, nlen) == 0) {
-                       return (char *)((uintptr_t)s);
-               }
-       }
-       return NULL;
-}
-#endif
-
-
-/**
-   \details Extract a DN element from a given DN
-
-   \param mem_ctx pointer to the memory context
-   \param dn pointer to a valid DN
-   \param element pointer to the substring where extraction should start
-
-   \return pointer to an allocated substring on success, otherwise NULL
- */
-_PUBLIC_ char *x500_get_dn_element(TALLOC_CTX *mem_ctx, const char *dn, const char *element)
-{
-       char    *pdn, *p, *str;
-       char    *tmp_dn;
-
-       if ((dn == NULL) || (dn[0] == '\0') || !element) return NULL;
-
-       tmp_dn = talloc_strdup(mem_ctx, dn);
-       pdn = (char *) strcasestr((const char *)tmp_dn, element);
-       if (pdn == NULL) {
-               talloc_free(tmp_dn);
-               return NULL;
-       }
-
-       pdn += strlen(element);
-       p = pdn;
-
-       if ((p = strchr(pdn, '/')) != NULL) {
-               p[0] = '\0';
-       }
-
-       str = talloc_strdup(mem_ctx, pdn);
-
-       talloc_free(tmp_dn);
-       return str;
-}
-
-
-/**
-   \details Truncate a DN element
-
-   \param mem_ctx pointer to the memory context
-   \param dn pointer to a valid DN
-   \param elcount the number of elements to remove from the end of the
-   DN
-
-   \return pointer to an allocated substring on success, otherwise
-   NULL
- */
-_PUBLIC_ char *x500_truncate_dn_last_elements(TALLOC_CTX *mem_ctx, const char *dn, uint32_t elcount)
-{
-       char *tmp_dn;
-       int     i;
-
-       if ((dn == NULL) || (dn[0] == '\0') || !elcount) return NULL;
-
-       tmp_dn = talloc_strdup(mem_ctx, dn);
-       for (i = strlen(tmp_dn); i > 0; i--) {
-               if (tmp_dn[i] == '/') {
-                       elcount -= 1;
-                       if (elcount == 0) {
-                               tmp_dn[i] = '\0';
-                               return tmp_dn;
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-
-/**
- * Retrieve the servername from a string
- * We should definitively find a better way to handle this
- */
-
-_PUBLIC_ char *x500_get_servername(const char *dn)
-{
-       char *pdn;
-       char *servername;
-
-       if (!dn) {
-               return NULL;
-       }
-
-       pdn = (char *) strcasestr(dn, SERVERNAME);
-       if (pdn == NULL) return NULL;
-
-       pdn += strlen(SERVERNAME);
-       servername = strsep(&pdn, "/");
-
-       return (servername);
-}
diff --git a/branches/plugfest/libmapiadmin.pc.in b/branches/plugfest/libmapiadmin.pc.in
deleted file mode 100644 (file)
index cfe3007..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: MAPI admin library
-Description: Library supporting MAPI administration actions
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmapiadmin
-Libs.private: @LIBS@
-Cflags: -I${includedir}
-Requires: libmapi dcerpc_samr
-
diff --git a/branches/plugfest/libmapiadmin/Doxyfile.in b/branches/plugfest/libmapiadmin/Doxyfile.in
deleted file mode 100644 (file)
index c312abb..0000000
+++ /dev/null
@@ -1,1265 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = libmapiadmin
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = libmapiadmin
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.h *.c *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =  *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c *_private.h
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed \
-                        -e '20,50s/.*\<libmapiadmin\/proto_private.h\>//'      \
-                        -e '20,50s/.*\<param.h\>//'                            \
-                        -e '20,50s/.*\<time.h\>//'                             \
-                        -e '20,50s/.*\<credentials.h\>//'                      \
-                        -e '20,50s/.*\<samba\/popt.h\>//'                      \
-                        -e '20,50s/.*\<ldberrors.h\>//'                        \
-                        -e '20,50s/.*\<ldb_wrap.h\>//'                         \
-                        -e '20,50s/.*\<ldb_errors.h\>//'                       \
-                        -e '20,50s/.*\<util_ldb.h\>//'                         \
-                        -e '20,50s/.*\<ldap.h\>//'                             \
-                        -e '20,50s/.*\<ldap_ndr.h\>//'                         \
-                        -e '20,50s/.*\<core\/error.h\>//'                      \
-                        -e '20,50s/.*\<gen_ndr\/ndr_samr.h\>//'                \
-                        -e '20,50s/.*\<gen_ndr\/ndr_samr_c.h\>//'              \
-                         -e 's/_PUBLIC_//'"
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/libmapiadmin
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = YES
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/libmapiadmin/libmapiadmin-mainpage.doxy b/branches/plugfest/libmapiadmin/libmapiadmin-mainpage.doxy
deleted file mode 100644 (file)
index 5865e96..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
-\mainpage libmapiadmin
-
-<h2>Client library for OpenChange Administration</h2>
-
-libmapiadmin provides administration client capabilities for
-OpenChange and Exchange servers.
-
-\note As of version 0.8, libmapiadmin is considered alpha quality.
-
-*/
diff --git a/branches/plugfest/libmapiadmin/libmapiadmin.h b/branches/plugfest/libmapiadmin/libmapiadmin.h
deleted file mode 100644 (file)
index a9f077d..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-   OpenChange Exchange Administration library.
-
-   Copyright (C) Julien Kerihuel 2007-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __LIBMAPIADMIN_H__
-#define        __LIBMAPIADMIN_H__
-
-#define        _GNU_SOURCE     1
-
-struct mapiadmin_ctx;
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
-/* Samba4 includes */
-#include <stdint.h>
-#include <talloc.h>
-#include <ldb.h>
-#include <tevent.h>
-
-/* OpenChange includes */
-#include "libmapi/libmapi.h"
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-#ifndef        MAX
-#define        MAX(p,q) (((p) >= (q)) ? (p) : (q))
-#endif
-
-/**
-       \file
-       Structures for MAPI admin functions
-*/
-
-struct test_join {
-       struct dcerpc_pipe              *p;
-       struct policy_handle            user_handle;
-       struct libnet_JoinDomain        *libnet_r;
-       struct dom_sid                  *dom_sid;
-       const char                      *dom_netbios_name;
-       const char                      *dom_dns_name;
-       struct dom_sid                  *user_sid;
-       struct GUID                     user_guid;
-       const char                      *netbios_name;
-};
-
-/**
-       MAPI admin function context
-*/
-struct mapiadmin_ctx
-{
-       struct mapi_session     *session;
-       const char              *username;
-       const char              *password;
-       const char              *fullname;
-       const char              *description;
-       const char              *comment;
-       struct test_join        *user_ctx;
-       const char              *binding;
-       const char              *dc_binding;
-       struct policy_handle    *handle;
-};
-
-
-__BEGIN_DECLS
-
-/* The following definitions come from samba4 framework */
-struct ldb_dn *samdb_search_dn(struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, const char *, ...) _PRINTF_ATTRIBUTE(4,5);
-int samdb_msg_add_string(struct ldb_context *, TALLOC_CTX *,
-                        struct ldb_message *, const char *, const char *);
-int samdb_replace(struct ldb_context *, TALLOC_CTX *, struct ldb_message *);
-struct dom_sid *dom_sid_add_rid(TALLOC_CTX *, const struct dom_sid *, uint32_t);
-bool encode_pw_buffer(uint8_t buffer[516], const char *, int);
-void arcfour_crypt_blob(uint8_t *, int, const DATA_BLOB *);
-
-/* The following public definitions come from libmapiadmin/mapiadmin.c */
-struct mapiadmin_ctx *mapiadmin_init(struct mapi_session *);
-enum MAPISTATUS mapiadmin_release(struct mapiadmin_ctx *);
-
-/* The following public definitions come from libmapiadmin/mapiadmin_user.c */
-enum MAPISTATUS mapiadmin_user_extend(struct mapiadmin_ctx *);
-enum MAPISTATUS mapiadmin_user_add(struct mapiadmin_ctx *);
-enum MAPISTATUS mapiadmin_user_del(struct mapiadmin_ctx *);
-enum MAPISTATUS mapiadmin_user_mod(struct mapiadmin_ctx *);
-
-__END_DECLS
-
-#define        DEFAULT_PROFDB_PATH     "%s/.openchange/profiles.ldb"
-#define        MAPIADMIN_DEBUG_STR     "[%s:%d]: %s %s\n", __FUNCTION__, __LINE__
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2)
-
-#endif /* __LIBMAPIADMIN_H__ */
diff --git a/branches/plugfest/libmapiadmin/mapiadmin.c b/branches/plugfest/libmapiadmin/mapiadmin.c
deleted file mode 100644 (file)
index 891f4aa..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   OpenChange Exchange Administration library.
-
-   Copyright (C) Julien Kerihuel 2007.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapiadmin/libmapiadmin.h"
-
-/**
-       \file
-       Housekeeping functions for mapiadmin
-*/
-
-/**
-       Create and initialise a mapiadmin_ctx structure
-
-       You should use mapiadmin_release to clean up the mapiadmin_ctx
-       structure when done.
-*/
-_PUBLIC_ struct mapiadmin_ctx *mapiadmin_init(struct mapi_session *session)
-{
-       struct mapiadmin_ctx    *mapiadmin_ctx;
-
-       if (!session) return NULL;
-       if (!session->profile) return NULL;
-
-       mapiadmin_ctx = talloc_zero((TALLOC_CTX *)session, struct mapiadmin_ctx);
-
-       mapiadmin_ctx->binding = talloc_asprintf((TALLOC_CTX *)mapiadmin_ctx, "ncacn_np:%s", 
-                                                session->profile->server);
-       mapiadmin_ctx->session = session;
-
-       return mapiadmin_ctx;
-}
-
-/**
-       Clean up a mapiadmin_ctx structure
-
-       The structure is assumed to have been allocated using mapiadmin_init() or
-       equivalent code.
-*/
-_PUBLIC_ enum MAPISTATUS mapiadmin_release(struct mapiadmin_ctx *mapiadmin_ctx)
-{
-       MAPI_RETVAL_IF(!mapiadmin_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       talloc_free(mapiadmin_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libmapiadmin/mapiadmin_user.c b/branches/plugfest/libmapiadmin/mapiadmin_user.c
deleted file mode 100644 (file)
index b515c51..0000000
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
-   OpenChange Exchange Administration library.
-
-   Based on the work by Andrew Tridgell, 2004
-
-   Original source code available in SAMBA_4_0:
-   source/torture/rpc/testjoin.c
-
-   Copyright (C) Julien Kerihuel 2007-2010.
-
-   SAMR related code
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libmapiadmin/libmapiadmin.h"
-
-#include <param.h>
-#include <credentials.h>
-#include <ldb_errors.h>
-#include <ldb_wrap.h>
-#include <ldap_ndr.h>
-
-#include <core/error.h>
-#include <gen_ndr/ndr_samr.h>
-#include <gen_ndr/ndr_samr_c.h>
-
-#include <time.h>
-
-/**
-       \file
-       User management functions for mapiadmin
-*/
-
-/**
- * open connection so SAMR + Join Domain
- * common code needed when adding or removing users
- */
-static enum MAPISTATUS mapiadmin_samr_connect(struct mapiadmin_ctx *mapiadmin_ctx,
-                                             TALLOC_CTX *mem_ctx)
-{
-       NTSTATUS                        status;
-       struct tevent_context           *ev;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_profile             *profile;
-       struct samr_Connect             c;
-       struct samr_OpenDomain          o;
-       struct samr_LookupDomain        l;
-       struct policy_handle            handle;
-       struct policy_handle            domain_handle;
-       struct lsa_String               name;
-
-       MAPI_RETVAL_IF(!mapiadmin_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session->profile, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session->profile->credentials, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->username, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mapi_ctx = mapiadmin_ctx->session->mapi_ctx;
-       MAPI_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       profile = mapiadmin_ctx->session->profile;
-       
-       mapiadmin_ctx->user_ctx = talloc_zero(mem_ctx, struct test_join);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->user_ctx, MAPI_E_NOT_ENOUGH_RESOURCES ,NULL);
-
-       DEBUG(3, ("Connecting to SAMR\n"));
-
-       ev = tevent_context_init(mem_ctx);
-
-       status = dcerpc_pipe_connect(mapiadmin_ctx->user_ctx,
-                                    &mapiadmin_ctx->user_ctx->p,
-                                    mapiadmin_ctx->dc_binding ? 
-                                    mapiadmin_ctx->dc_binding : 
-                                    mapiadmin_ctx->binding,
-                                    &ndr_table_samr,
-                                    profile->credentials, ev, mapi_ctx->lp_ctx);
-                                            
-       MAPI_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, NULL);     
-
-       profile = mapiadmin_ctx->session->profile;
-
-       c.in.system_name = NULL;
-       c.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-       c.out.connect_handle = &handle;
-
-       status = dcerpc_samr_Connect_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &c);
-       if (!NT_STATUS_IS_OK(status)) {
-               const char *errstr = nt_errstr(status);
-               if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
-                       errstr = dcerpc_errstr(mapiadmin_ctx->user_ctx, mapiadmin_ctx->user_ctx->p->last_fault_code);
-               }
-               DEBUG(3, ("samr_Connect failed - %s\n", errstr));
-               return MAPI_E_CALL_FAILED;
-       }
-
-       DEBUG(3, ("Opening domain %s\n", profile->domain));
-
-       name.string = profile->domain;
-       l.in.connect_handle = &handle;
-       l.in.domain_name = &name;
-
-       l.out.sid = talloc(mem_ctx, struct dom_sid2 *);
-       talloc_steal(mapiadmin_ctx->user_ctx, l.out.sid);
-
-       status = dcerpc_samr_LookupDomain_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &l);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("LookupDomain failed - %s\n", nt_errstr(status)));
-               return MAPI_E_CALL_FAILED;
-       }
-
-       mapiadmin_ctx->user_ctx->dom_sid = *l.out.sid;
-       mapiadmin_ctx->user_ctx->dom_netbios_name = talloc_strdup(mapiadmin_ctx->user_ctx, profile->domain);
-       if (!mapiadmin_ctx->user_ctx->dom_netbios_name) return MAPI_E_CALL_FAILED;
-
-       o.in.connect_handle = &handle;
-       o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-       o.in.sid = *l.out.sid;
-       o.out.domain_handle = &domain_handle;
-
-       status = dcerpc_samr_OpenDomain_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &o);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("OpenDomain failed - %s\n", nt_errstr(status)));
-               return MAPI_E_CALL_FAILED;
-       }
-
-       mapiadmin_ctx->handle = talloc_memdup(mem_ctx, &domain_handle, sizeof (struct policy_handle));
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-struct tce_async_context {
-       int     found;
-};
-
-static int tce_search_callback(struct ldb_request *req, struct ldb_reply *ares)
-{
-       struct tce_async_context        *actx = talloc_get_type(req->context, struct tce_async_context);
-       int                             ret;
-
-        switch (ares->type) {
-
-        case LDB_REPLY_ENTRY:
-               if (ldb_msg_find_element(ares->message, "msExchMailboxGuid") != NULL) {
-                       DEBUG(3, ("[%s:%d]: msExchMailboxGuid found!\n", __FUNCTION__, __LINE__));
-                       actx->found = 1;
-                       talloc_free(ares);
-                       return ldb_request_done(req, LDB_SUCCESS);
-               }
-                break;
-        case LDB_REPLY_DONE:
-                ret = 0;
-                break;
-        default:
-               DEBUG(3, ("[%s:%d]: unknown Reply Type ignore it\n", __FUNCTION__, __LINE__));
-               talloc_free(ares);
-                return LDB_ERR_OTHER;
-        }
-
-        if (talloc_free(ares) == -1) {
-               DEBUG(3, ("[%s:%d]: talloc_free failed\n", __FUNCTION__, __LINE__));
-                return LDB_ERR_OPERATIONS_ERROR;
-        }
-       
-       return LDB_SUCCESS;
-}
-
-/**
- * Extend user attributes to be Exchange user
- */
-_PUBLIC_ enum MAPISTATUS mapiadmin_user_extend(struct mapiadmin_ctx *mapiadmin_ctx)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct tevent_context           *ev = NULL;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_profile             *profile;
-       struct ldb_context              *remote_ldb;
-       struct ldb_request              *req;
-       struct ldb_message              *msg;
-       struct ldb_result               *res;
-       struct ldb_control              **controls;
-       const char                      *control_strings[2] = { "notification:0", NULL };
-       struct tce_async_context        *tce_ctx;
-       const struct dom_sid            *dom_sid;
-       char                            *remote_ldb_url;
-       const char * const              dom_attrs[] = { "*", NULL };
-       int                             ret;
-       uint32_t                        count;
-       char                            **values;
-       const char                      *exch_attrs[7];
-       uint32_t                        i;
-       char                            *realm = NULL;
-       char                            *org = NULL;
-       const char                      *UserAccountControl;
-       struct ldb_dn                   *account_dn;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!mapiadmin_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session->profile, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->session->profile->credentials, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->user_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mapi_ctx = mapiadmin_ctx->session->mapi_ctx;
-       MAPI_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       profile = mapiadmin_ctx->session->profile;
-       dom_sid = mapiadmin_ctx->user_ctx->user_sid;
-
-       /* initialize memory context */
-       mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_extend");
-
-       /* open LDAP connection */
-       ev = tevent_context_init(talloc_autofree_context());
-       remote_ldb_url = talloc_asprintf(mem_ctx, "ldap://%s", profile->server);
-       MAPI_RETVAL_IF(!remote_ldb_url, MAPI_E_CORRUPT_DATA, mem_ctx);
-       remote_ldb = ldb_wrap_connect(mem_ctx, ev, mapi_ctx->lp_ctx, remote_ldb_url, 
-                                     NULL, mapiadmin_ctx->session->profile->credentials, 0);
-       MAPI_RETVAL_IF(!remote_ldb, MAPI_E_NETWORK_ERROR, mem_ctx);
-
-       /* Search the user_dn */
-       account_dn = samdb_search_dn(remote_ldb, mem_ctx, NULL, 
-                                    "(&(objectSid=%s)(objectClass=user))", 
-                                    ldap_encode_ndr_dom_sid(mem_ctx, dom_sid));
-
-       ret = ldb_search(remote_ldb, mem_ctx, &res, account_dn, LDB_SCOPE_SUBTREE, dom_attrs, "(objectSid=%s)",
-                        ldap_encode_ndr_dom_sid(mem_ctx, dom_sid));
-       MAPI_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, mem_ctx);
-       MAPI_RETVAL_IF(res->count != 1, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Prepare a new message for modify */
-       msg = ldb_msg_new(mem_ctx);
-       MAPI_RETVAL_IF(!msg, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       msg->dn = res->msgs[0]->dn;
-
-       /* message: givenName */
-       exch_attrs[0] = talloc_strdup(mem_ctx, mapiadmin_ctx->username);
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, "givenName", exch_attrs[0]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* message: userAccountControl */
-       exch_attrs[1] = talloc_asprintf(mem_ctx, "513");
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, "userAccountControl", 
-                                  exch_attrs[1]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-       msg->elements[1].flags = LDB_FLAG_MOD_REPLACE;
-
-       /* message: mail */
-       retval = GetProfileAttr(profile, "ProxyAddress", &count, &values);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       for (i = 0; i < count; i++) {
-               if (values[i] && !strncasecmp("smtp", values[i], 4)) {
-                       realm = strchr(values[i], '@');
-                       realm += 1;
-               }
-       }
-       MAPI_RETVAL_IF(!realm, MAPI_E_NOT_FOUND, mem_ctx);
-
-       exch_attrs[2] = talloc_asprintf(mem_ctx, "%s@%s", mapiadmin_ctx->username, realm);
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, "mail", exch_attrs[2]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* message: mailNickname */
-       exch_attrs[3] = talloc_strdup(mem_ctx, mapiadmin_ctx->username);
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, "mailNickname", exch_attrs[3]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* message: mDBUseDefaults */
-       exch_attrs[4] = talloc_asprintf(mem_ctx, "TRUE");
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, 
-                                  "mDBUseDefaults", exch_attrs[4]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* message: legacyExchangeDN */
-       org = talloc_strndup(mem_ctx, profile->mailbox,
-                            strlen(profile->mailbox) - strlen(profile->username));
-       exch_attrs[5] = talloc_asprintf(mem_ctx, "%s%s", org, mapiadmin_ctx->username);
-       talloc_free(org);
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, 
-                                  "legacyExchangeDN", exch_attrs[5]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* message: msExchHomeServerName */
-       exch_attrs[6] = talloc_strdup(mem_ctx, profile->homemdb);
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, 
-                                  "msExchHomeServerName", exch_attrs[6]);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-
-       /* Prior we call ldb_modify, set up async ldb request on
-        * msExchMailboxGuid 
-        */
-       req = talloc_zero(mem_ctx, struct ldb_request);
-       tce_ctx = talloc_zero(mem_ctx, struct tce_async_context);
-       controls = ldb_parse_control_strings(remote_ldb, mem_ctx, control_strings);
-
-       ret = ldb_build_search_req(&req, remote_ldb, mem_ctx, 
-                                  msg->dn,
-                                  LDB_SCOPE_BASE,
-                                  "(objectclass=*)",
-                                  NULL,
-                                  controls, 
-                                  (void *)tce_ctx, 
-                                  tce_search_callback, 
-                                  NULL);
-       DEBUG(3, (MAPIADMIN_DEBUG_STR, "ldb_build_search_req", ldb_strerror(ret)));
-       MAPI_RETVAL_IF((ret != LDB_SUCCESS), MAPI_E_CALL_FAILED, mem_ctx);
-
-       ldb_set_timeout(mem_ctx, req, 60);
-
-       ret = ldb_request(remote_ldb, req);
-       DEBUG(3, (MAPIADMIN_DEBUG_STR, "ldb_request", ldb_strerror(ret)));
-       MAPI_RETVAL_IF((ret != LDB_SUCCESS), MAPI_E_CALL_FAILED, mem_ctx);
-
-       ret = ldb_modify(remote_ldb, msg);
-       DEBUG(3, (MAPIADMIN_DEBUG_STR, "ldb_modify", ldb_strerror(ret)));
-       MAPI_RETVAL_IF((ret != LDB_SUCCESS), MAPI_E_CORRUPT_DATA, mem_ctx);
-
-       /* async search */
-       ret = ldb_wait(req->handle, LDB_WAIT_ALL);
-       DEBUG(3, (MAPIADMIN_DEBUG_STR, "ldb_wait", ldb_strerror(ret)));
-       MAPI_RETVAL_IF((ret != LDB_SUCCESS), MAPI_E_CALL_FAILED, mem_ctx);
-       MAPI_RETVAL_IF(!tce_ctx->found, MAPI_E_CALL_FAILED, mem_ctx);
-       
-       /* When successful replace UserAccountControl attr in the user
-        * record 
-        */
-       talloc_free(msg);
-       msg = ldb_msg_new(mem_ctx);
-       MAPI_RETVAL_IF(!msg, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-       msg->dn = res->msgs[0]->dn;
-
-       UserAccountControl = talloc_asprintf(mem_ctx, "66048");
-       ret = samdb_msg_add_string(remote_ldb, mem_ctx, msg, 
-                                  "UserAccountControl", UserAccountControl);
-       MAPI_RETVAL_IF((ret == -1), MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-       msg->elements[0].flags = LDB_FLAG_MOD_REPLACE;
-
-       ret = ldb_modify(remote_ldb, msg);
-       DEBUG(3, (MAPIADMIN_DEBUG_STR, "ldb_modify", ldb_strerror(ret)));
-       MAPI_RETVAL_IF((ret != LDB_SUCCESS), MAPI_E_CORRUPT_DATA, mem_ctx);
-
-       /* reset errno before leaving */
-       errno = 0;
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Add a user to Active Directory 
- */
-_PUBLIC_ enum MAPISTATUS mapiadmin_user_add(struct mapiadmin_ctx *mapiadmin_ctx)
-{
-       TALLOC_CTX                      *mem_ctx;
-       NTSTATUS                        status;
-       enum MAPISTATUS                 retval;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_profile             *profile;
-       struct samr_CreateUser2         r;
-       struct samr_GetUserPwInfo       pwp;
-       struct samr_SetUserInfo         s;
-       union samr_UserInfo             u;
-       uint32_t                        access_granted;
-       uint32_t                        rid;
-       DATA_BLOB                       session_key;
-       struct lsa_String               name;
-       int                             policy_min_pw_len = 0;
-
-       mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_add");
-
-       retval = mapiadmin_samr_connect(mapiadmin_ctx, mem_ctx);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       DEBUG(3, ("Creating account %s\n", mapiadmin_ctx->username));
-       profile = mapiadmin_ctx->session->profile;
-
-       mapi_ctx = mapiadmin_ctx->session->mapi_ctx;
-       MAPI_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, mem_ctx);
-
-again:
-       name.string = mapiadmin_ctx->username;
-       r.in.domain_handle = mapiadmin_ctx->handle;
-       r.in.account_name = &name;
-       r.in.acct_flags = ACB_NORMAL;
-       r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-       r.out.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
-       r.out.access_granted = &access_granted;
-       r.out.rid = &rid;
-
-       status = dcerpc_samr_CreateUser2_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &r);
-
-       if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) {
-               mapiadmin_user_del(mapiadmin_ctx);
-               if (NT_STATUS_IS_OK(status)) {
-                       goto again;
-               } else {
-                       MAPI_RETVAL_IF(1,MAPI_E_CALL_FAILED,mem_ctx);
-               }
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("CreateUser2 failed - %s\n", nt_errstr(status)));
-               MAPI_RETVAL_IF(1,MAPI_E_CALL_FAILED,mem_ctx);
-       }
-
-       mapiadmin_ctx->user_ctx->user_sid = dom_sid_add_rid(mapiadmin_ctx->user_ctx, mapiadmin_ctx->user_ctx->dom_sid, rid);
-
-       pwp.in.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
-       pwp.out.info = talloc_zero(mem_ctx, struct samr_PwInfo);
-
-       status = dcerpc_samr_GetUserPwInfo_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &pwp);
-       if (NT_STATUS_IS_OK(status)) {
-               policy_min_pw_len = pwp.out.info->min_password_length;
-       } else {
-               DEBUG(3, ("GetUserPwInfo failed - %s\n", nt_errstr(status)));
-               MAPI_RETVAL_IF(1,MAPI_E_CALL_FAILED,mem_ctx);
-        }
-
-       if (!mapiadmin_ctx->password) {
-               mapiadmin_ctx->password = generate_random_str(mapiadmin_ctx->user_ctx, MAX(8, policy_min_pw_len));
-       }
-
-       DEBUG(3, ("Setting account password '%s'\n", mapiadmin_ctx->password));
-
-       ZERO_STRUCT(u);
-       s.in.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
-       s.in.info = &u;
-       s.in.level = 24;
-
-       encode_pw_buffer(u.info24.password.data, mapiadmin_ctx->password, STR_UNICODE);
-       u.info24.password_expired = 0;
-
-       status = dcerpc_fetch_session_key(mapiadmin_ctx->user_ctx->p, &session_key);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("SetUserInfo level %d - no session key - %s\n",
-                         s.in.level, nt_errstr(status)));
-               mapiadmin_user_del(mapiadmin_ctx);
-               MAPI_RETVAL_IF(1,MAPI_E_CALL_FAILED,mem_ctx);
-       }
-
-       arcfour_crypt_blob(u.info24.password.data, 516, &session_key);
-
-       status = dcerpc_samr_SetUserInfo_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &s);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("SetUserInfo failed - %s\n", nt_errstr(status)));
-               if (NT_STATUS_EQUAL(status, NT_STATUS_PASSWORD_RESTRICTION)) {
-                       MAPI_RETVAL_IF(1, MAPI_E_BAD_VALUE, mem_ctx);
-               } else {
-                       MAPI_RETVAL_IF(1, MAPI_E_CALL_FAILED, mem_ctx);
-               }
-       }
-
-       ZERO_STRUCT(u);
-       s.in.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
-       s.in.info = &u;
-       s.in.level = 21;
-
-       u.info21.acct_flags = ACB_NORMAL | ACB_PWNOEXP;
-       u.info21.fields_present = SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_DESCRIPTION | SAMR_FIELD_COMMENT | SAMR_FIELD_FULL_NAME;
-
-       u.info21.comment.string = talloc_asprintf(mapiadmin_ctx->user_ctx, 
-                                                 mapiadmin_ctx->comment ? 
-                                                 mapiadmin_ctx->comment :
-                                                 "Created by OpenChange: %s", 
-                                                 timestring(mapiadmin_ctx->user_ctx, time(NULL)));
-       
-       u.info21.full_name.string = talloc_asprintf(mapiadmin_ctx->user_ctx, 
-                                                   mapiadmin_ctx->fullname ?
-                                                   mapiadmin_ctx->fullname :
-                                                   "Account for OpenChange: %s", 
-                                                   timestring(mapiadmin_ctx->user_ctx, time(NULL)));
-       
-       u.info21.description.string = talloc_asprintf(mapiadmin_ctx->user_ctx, 
-                                                     mapiadmin_ctx->description ?
-                                                     mapiadmin_ctx->description :
-                                                     "OpenChange account created by host %s: %s", 
-                                        lpcfg_netbios_name(mapi_ctx->lp_ctx), 
-                                        timestring(mapiadmin_ctx->user_ctx, time(NULL)));
-
-       DEBUG(3, ("Resetting ACB flags, force pw change time\n"));
-
-       status = dcerpc_samr_SetUserInfo_r(mapiadmin_ctx->user_ctx->p->binding_handle, mapiadmin_ctx->user_ctx, &s);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("SetUserInfo failed - %s\n", nt_errstr(status)));
-               MAPI_RETVAL_IF(1, MAPI_E_CALL_FAILED, mem_ctx);
-       }
-       retval = mapiadmin_user_extend(mapiadmin_ctx);
-       if (retval != MAPI_E_SUCCESS) {
-               DEBUG(3, ("mapiadmin_user_extend: 0x%x\n", GetLastError()));
-               mapiadmin_user_del(mapiadmin_ctx);
-               MAPI_RETVAL_IF(1, MAPI_E_CALL_FAILED,mem_ctx);
-       }
-
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Delete a user from Active Directory 
- */
-_PUBLIC_ enum MAPISTATUS mapiadmin_user_del(struct mapiadmin_ctx *mapiadmin_ctx)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       NTSTATUS                status;
-       struct samr_DeleteUser  d;
-       struct policy_handle    user_handle;
-       uint32_t                rid;
-       struct samr_LookupNames n;
-       struct lsa_String       sname;
-       struct samr_OpenUser    r;
-
-       MAPI_RETVAL_IF(!mapiadmin_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!mapiadmin_ctx->username, MAPI_E_NOT_INITIALIZED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_del");
-
-       /* Initiate SAMR connection if not already done */
-       if (!mapiadmin_ctx->user_ctx) {
-               retval = mapiadmin_samr_connect(mapiadmin_ctx, mem_ctx);
-               MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);                
-       }
-
-       sname.string = mapiadmin_ctx->username;
-
-       n.in.domain_handle = mapiadmin_ctx->handle;
-       n.in.num_names = 1;
-       n.in.names = &sname;
-
-       n.out.rids = talloc_zero(mem_ctx, struct samr_Ids);
-       n.out.types = talloc_zero(mem_ctx, struct samr_Ids);
-
-       status = dcerpc_samr_LookupNames_r(mapiadmin_ctx->user_ctx->p->binding_handle, mem_ctx, &n);
-       if (NT_STATUS_IS_OK(status)) {
-               rid = n.out.rids->ids[0];
-       } else {
-               talloc_free(mem_ctx);
-               return MAPI_E_NOT_FOUND;
-       }
-
-       r.in.domain_handle = mapiadmin_ctx->handle;
-       r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-       r.in.rid = rid;
-       r.out.user_handle = &user_handle;
-
-       status = dcerpc_samr_OpenUser_r(mapiadmin_ctx->user_ctx->p->binding_handle, mem_ctx, &r);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("OpenUser(%s) failed - %s\n", mapiadmin_ctx->username, nt_errstr(status)));
-               MAPI_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_NOT_FOUND, mem_ctx);
-       }
-
-       d.in.user_handle = &user_handle;
-       d.out.user_handle = &user_handle;
-       status = dcerpc_samr_DeleteUser_r(mapiadmin_ctx->user_ctx->p->binding_handle, mem_ctx, &d);
-       MAPI_RETVAL_IF(!NT_STATUS_IS_OK(status), MAPI_E_CALL_FAILED, mem_ctx);
-
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-_PUBLIC_ enum MAPISTATUS mapiadmin_user_mod(struct mapiadmin_ctx *mapiadmin)
-{
-       return MAPI_E_NO_SUPPORT;
-}
diff --git a/branches/plugfest/libocpf.pc.in b/branches/plugfest/libocpf.pc.in
deleted file mode 100644 (file)
index a9ebbc1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: OpenChange Property File
-Description: OCPF file format support
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -locpf
-Cflags: -I${includedir}
-Requires: libmapi
diff --git a/branches/plugfest/libocpf/Doxyfile.in b/branches/plugfest/libocpf/Doxyfile.in
deleted file mode 100644 (file)
index 6067b2d..0000000
+++ /dev/null
@@ -1,1269 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = "OpenChange Property Files"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = libocpf
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.h *.c *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =  *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c *_private.h ocpf_api.*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = libocpf/examples
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed \
-                        -e '20,40s/.*\<libmapi\/proto_private.h\>//'   \
-                        -e '20,40s/.*\<gen_ndr\/ndr_exchange.h\>//'            \
-                        -e '20,40s/.*\<param.h\>//'                            \
-                        -e '20,40s/.*\<core\/error.h\>//'                      \
-                        -e '20,40s/.*\<credentials.h\>//'                      \
-                        -e '20,40s/.*\<ldb.h\>//'                              \
-                        -e '20,40s/.*\<ldb_errors.h\>//'                       \
-                        -e '20,40s/.*\<libmapi\/dlinklist.h\>//'               \
-                        -e '20,40s/.*\<libmapi\/defs_private.h\>//'            \
-                        -e '20,40s/.*\<libmapi\/mapi_nameid.h\>//'             \
-                        -e '20,40s/.*\<libmapi\/mapi_nameid_private.h\>//'     \
-                        -e '20,40s/.*\<libocpf\/proto_private.h\>//'   \
-                        -e '20,40s/.*\<libocpf\/ocpf_api.h\>//'                \
-                        -e '20,40s/.*\<libocpf\/ocpf.tab.h\>//'                \
-                        -e '20,40s/.*\<libocpf\/ocpf_dump.h\>//'               \
-                        -e '20,40s/.*\<libgen.h\>//'                   \
-                        -e '20,40s/.*\<time.h\>//'                             \
-                        -e '20,40s/.*\<sys\/*\>//'                             \
-                         -e '20,40s/_PUBLIC_//'"
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/libocpf
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = YES
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/libocpf/examples/common_OLEGUID.ocpf b/branches/plugfest/libocpf/examples/common_OLEGUID.ocpf
deleted file mode 100644 (file)
index 8760510..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  OpenChange Property File
- *
- *  Copyright (C) Julien Kerihuel 2008.
- *
- *  Registers common OLEGUID
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *   
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-
-OLEGUID PSETID_Appointment      "00062002-0000-0000-c000-000000000046"
-OLEGUID PSETID_Task             "00062003-0000-0000-c000-000000000046"
-OLEGUID PSETID_Address          "00062004-0000-0000-c000-000000000046"
-OLEGUID PSETID_Common           "00062008-0000-0000-c000-000000000046"
-OLEGUID PSETID_Note             "0006200e-0000-0000-c000-000000000046"
-OLEGUID PSETID_Log              "0006200a-0000-0000-c000-000000000046"
-OLEGUID PS_PUBLIC_STRINGS       "00020329-0000-0000-c000-000000000046"
-OLEGUID PS_INTERNET_HEADERS     "00020386-0000-0000-c000-000000000046"
diff --git a/branches/plugfest/libocpf/examples/sample_appointment.ocpf b/branches/plugfest/libocpf/examples/sample_appointment.ocpf
deleted file mode 100644 (file)
index d88d056..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  OpenChange Property File
- *
- *  Copyright (C) Julien Kerihuel 2008.
- *
- *  Sample appointment
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *   
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-
-TYPE   "IPM.Appointment"
-
-FOLDER "olFolderCalendar"
-
-OLEGUID        PSETID_Appointment      "00062002-0000-0000-c000-000000000046"
-OLEGUID        PSETID_Common           "00062008-0000-0000-c000-000000000046"
-OLEGUID        PS_PUBLIC_STRINGS       "00020329-0000-0000-c000-000000000046"
-
-SET $subject = "[OCPF] Julien Kerihuel Birthday"
-SET $start_date = T2008-03-06 22:00:00
-SET $end_date = T2008-03-06 23:45:00
-SET $reminder = 45
-SET $keywords = { "candles", "friends", "family" }
-SET $private = B"true"
-SET $wrong = 0
-
-PROPERTY {
-        PR_CONVERSATION_TOPIC = $subject
-        PR_NORMALIZED_SUBJECT = $subject
-        PR_BODY = "Another year, another pleasure"      
-        PR_START_DATE = $start_date
-        PR_END_DATE = $end_date
-        PR_SENSITIVITY = 2
-};
-
-NPROPERTY {
-         OOM:BusyStatus:PSETID_Appointment = 9
-                 
-         OOM:ApptStartDate:PSETID_Appointment  =  $start_date
-         OOM:CommonStart:PSETID_Common =  $start_date
-         OOM:ApptEndDate:PSETID_Appointment    = $end_date
-         OOM:CommonEnd:PSETID_Common   = $end_date
-
-         OOM:Location:PSETID_Appointment = W"Home Sweet Home"
-
-         /* MeetingStatus */
-         MNID_ID:0x8217:PSETID_Appointment = $wrong
-         
-         OOM:Private:PSETID_Common = $private
-
-         /* Set a reminder */
-         MNID_ID:0x8501:PT_LONG:PSETID_Common = $reminder
-
-         /* Add categories */
-         MNID_STRING:"Keywords":PS_PUBLIC_STRINGS = $keywords
-};
\ No newline at end of file
diff --git a/branches/plugfest/libocpf/examples/sample_task.ocpf b/branches/plugfest/libocpf/examples/sample_task.ocpf
deleted file mode 100644 (file)
index 7dfdce0..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *  OpenChange Property File
- *
- *  Copyright (C) Julien Kerihuel 2008.
- *
- *  Sample task
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *   
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>
- */
-
-TYPE   "IPM.Task"
-FOLDER "olFolderTasks"
-
-OLEGUID PSETID_Task             "00062003-0000-0000-c000-000000000046"
-OLEGUID        PSETID_Common           "00062008-0000-0000-c000-000000000046"
-OLEGUID        PS_PUBLIC_STRINGS       "00020329-0000-0000-c000-000000000046"
-
-SET    $subject        =       "[OCPF] Sample Task"
-SET    $body           =       "This is the sample task body"
-SET    $start_date     =       T2008-03-06 20:00:00
-SET    $end_date       =       T2008-03-06 23:00:00
-SET    $importance     =       2 /* IMPORTANCE_HIGH */
-SET    $task_status    =       3 /* Waiting */
-
-PROPERTY {
-        PR_CONVERSATION_TOPIC = $subject
-        PR_NORMALIZED_SUBJECT = $subject
-        PR_BODY = $body
-        PR_IMPORTANCE = $importance
-        PR_SENSITIVITY = 2     /* needed to have private box ticked */
-};
-
-NPROPERTY {
-         OOM:Companies:PSETID_Common = {"OpenChange Project", "Samba Project" }
-         OOM:StartDate:PSETID_Task = $start_date
-         OOM:DueDate:PSETID_Task = $end_date
-         OOM:Status:PSETID_Task = $task_status
-         OOM:Private:PSETID_Common = B"true"
-         MNID_STRING:"Keywords":PS_PUBLIC_STRINGS = { "Category1", "Category2" }
-};
\ No newline at end of file
diff --git a/branches/plugfest/libocpf/lex.h b/branches/plugfest/libocpf/lex.h
deleted file mode 100644 (file)
index 597d200..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __LEX_H_
-#define        __LEX_H_
-
-void ocpf_error_message (struct ocpf_context *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
-
-extern int error_flag;
-
-/* int ocpf_yylex(YYSTYPE *); */
-
-#endif /* __LEX_H_ */
diff --git a/branches/plugfest/libocpf/lex.l b/branches/plugfest/libocpf/lex.l
deleted file mode 100644 (file)
index 983b27a..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-%{
-
-#include <stdarg.h>
-#include <ctype.h>
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-#include "libocpf/ocpf.tab.h"
-#include "libocpf/lex.h"
-
-#define        YY_EXTRA_TYPE   struct ocpf_context *
-#define        YY_NO_UNPUT
-
-/*
- * Prototypes
- */
-
-int    yylex(YYSTYPE *, void *);
-int    yyget_lineno(void *);
-FILE   *yyget_in(void *);
-FILE   *yyget_out(void *);
-int    yyget_leng(void *);
-char   *yyget_text(void *);
-void   yyset_lineno(int, void *);
-void   yyset_extra(YY_EXTRA_TYPE, void *);
-void   yyset_in (FILE *, void *);
-void   yyset_out (FILE *, void *);
-int    yyget_debug(void *);
-void   yyset_debug(int, void *);
-int    yylex_destroy(void *);
-void   yyset_column(int, void *);
-int    yyget_column(void *);
-
-
-static void unterminated(struct ocpf_context *, const char *, unsigned int);
-
-%}
-
-%option reentrant 
-%option bison-bridge
-%option prefix="ocpf_yy"
-%option noyywrap
-
-%%
-TYPE           { return kw_TYPE; }
-FOLDER         { return kw_FOLDER; }
-OLEGUID                { return kw_OLEGUID; }
-SET            { return kw_SET; }
-PROPERTY       { return kw_PROPERTY; }
-NPROPERTY      { return kw_NPROPERTY; }
-TO             { return kw_TO; }
-CC             { return kw_CC; }
-BCC            { return kw_BCC; }
-RECIPIENT      { return kw_RECIPIENT; }
-OOM            { return kw_OOM; }
-MNID_ID                { return kw_MNID_ID; }
-MNID_STRING    { return kw_MNID_STRING; }
-PT_STRING8     { return kw_PT_STRING8; }
-PT_UNICODE     { return kw_PT_UNICODE; }
-PT_SHORT       { return kw_PT_SHORT; }
-PT_LONG                { return kw_PT_LONG; }
-PT_DOUBLE      { return kw_PT_DOUBLE; }
-PT_I8          { return kw_PT_I8; }
-PT_SYSTIME     { return kw_PT_SYSTIME; }
-PT_BOOLEAN     { return kw_PT_BOOLEAN; }
-PT_MV_LONG     { return kw_PT_LONG; }
-PT_MV_STRING8  { return kw_PT_MV_STRING8; }
-PT_MV_UNICODE  { return kw_PT_MV_UNICODE; }
-PT_BINARY      { return kw_PT_BINARY; }
-PT_MV_BINARY   { return kw_PT_MV_BINARY; }
-\{             { return OBRACE; }
-\}             { return EBRACE; }
-,              { return COMMA; }
-;              { return SEMICOLON; }
-:              { return COLON; }
-\<             { return LOWER; }
-\>             { return GREATER; }
-=              { return EQUAL;}
-\/\*                   { 
-                           struct ocpf_context *ctx = yyextra;
-                           int c, start_lineno = ctx->lineno;
-                           int level = 1;
-                           int seen_star = 0;
-                           int seen_slash = 0;
-                           while((c = input(yyscanner)) != EOF) {
-                               if(c == '/') {
-                                   if(seen_star) {
-                                       if(--level == 0)
-                                           break;
-                                       seen_star = 0;
-                                       continue;
-                                   }
-                                   seen_slash = 1;
-                                   continue;
-                               }
-                               if(seen_star && c == '/') {
-                                   if(--level == 0)
-                                       break;
-                                   seen_star = 0;
-                                   continue;
-                               }
-                               if(c == '*') {
-                                   if(seen_slash) {
-                                       level++;
-                                       seen_star = seen_slash = 0;
-                                       continue;
-                                   } 
-                                   seen_star = 1;
-                                   continue;
-                               }
-                               seen_star = seen_slash = 0;
-                               if(c == '\n') {
-                                   ctx->lineno++;
-                                   continue;
-                               }
-                           }
-                           if(c == EOF)
-                               unterminated(ctx, "comment", start_lineno);
-                       }
-"\""                   { 
-                           struct ocpf_context *ctx = yyextra;
-                           int start_lineno = ctx->lineno;
-                           int c, c2;
-                           char buf[0x4000];
-                           char *p = buf;
-                           int f = 0;
-                           int skip_ws = 0;
-                           
-                           while((c = input(yyscanner)) != EOF) {
-                               if(isspace(c) && skip_ws) {
-                                   if(c == '\n')
-                                       ctx->lineno++;
-                                   continue;
-                               }
-                               skip_ws = 0;
-
-                               if (c == '\\') {
-                                       c2 = c;
-                                       c = input(yyscanner);
-                                       if (c == '"') { 
-                                               *p++ = c;
-                                               c = input(yyscanner);
-                                       } else {
-                                               *p++ = c2;
-                                       }
-                               }
-
-                               if(c == '"') {
-                                       if(f) {
-                                               *p++ = '"';
-                                               f = 0;
-                                       } else {
-                                               f = 1;
-                                       }
-                                       continue;
-                               }
-                               if(f == 1) {
-                                       unput(c);
-                                       break;
-                               }
-                               if(c == '\n') {
-                                   ctx->lineno++;
-                                   while(p > buf && isspace((unsigned char)p[-1]))
-                                       p--;
-                                   skip_ws = 1;
-                                   continue;
-                               }
-                               *p++ = c;
-                           }
-                           if(c == EOF)
-                               unterminated(ctx, "string", start_lineno);
-                           *p++ = '\0';
-                           yylval->name = buf;
-                           return STRING; 
-                       }
-W"\""                  { 
-                           struct ocpf_context *ctx = yyextra;
-                           int start_lineno = ctx->lineno;
-                           int c, c2;
-                           char buf[0x4000];
-                           char *p = buf;
-                           int f = 0;
-                           int skip_ws = 0;
-                           
-                           while((c = input(yyscanner)) != EOF) {
-                               if(isspace(c) && skip_ws) {
-                                   if(c == '\n')
-                                       ctx->lineno++;
-                                   continue;
-                               }
-                               skip_ws = 0;
-
-                               if (c == '\\') {
-                                       c2 = c;
-                                       c = input(yyscanner);
-                                       if (c == '"') { 
-                                               *p++ = c;
-                                               c = input(yyscanner);
-                                       } else {
-                                               *p++ = c2;
-                                       }
-                               }
-
-                               if(c == '"') {
-                                       if(f) {
-                                               *p++ = '"';
-                                               f = 0;
-                                       } else {
-                                               f = 1;
-                                       }
-                                       continue;
-                               }
-                               if(f == 1) {
-                                       unput(c);
-                                       break;
-                               }
-                               if(c == '\n') {
-                                   ctx->lineno++;
-                                   while(p > buf && isspace((unsigned char)p[-1]))
-                                       p--;
-                                   skip_ws = 1;
-                                   continue;
-                               }
-                               *p++ = c;
-                           }
-                           if(c == EOF)
-                               unterminated(ctx, "string", start_lineno);
-                           *p++ = '\0';
-                           yylval->name = buf;
-                           return UNICODE; 
-                       }
-\$[-A-Za-z0-9_]+       { char *y = yytext + 1;
-                         yylval->var = strdup((const char *)y);
-                         return VAR;
-                       }
-B\"true\"|-?B\"false\" { char *y = yytext + 1;
-                          if (y && !strcmp(y, "\"true\"")) {
-                               yylval->b = true;
-                          } else {
-                               yylval->b = false;
-                          }
-                          return BOOLEAN;
-                       }
-F-?[0-9]"."[0-9]+e[-+]?[0-9]+ {
-                       struct ocpf_context *ctx = yyextra;
-                       char *y = yytext + 1;
-                       char *e;
-                       yylval->dbl = strtod((const char *)y, &e);
-                       if (e == y) {
-                               ocpf_error_message(ctx, "malformed constant (%s)", yytext);
-                       } else {
-                               return DOUBLE;
-                       }
-                    }
-T[0-9]{4}-[0-9]{2}-[0-9]{2}[ ][0-9]{2}\:[0-9]{2}\:[0-9]{2} {
-                         yylval->date = strdup((const char *)yytext + 1);
-                         return SYSTIME;
-                       }
-0x[0-9A-Fa-f]{2}       {
-                       struct ocpf_context *ctx = yyextra;
-                       char *e, *y = yytext;
-                       yylval->i = strtoul((const char *)y, &e, 0);
-                       if (e == y) 
-                               ocpf_error_message(ctx, "malformed constant (%s)", yytext);
-                       else
-                               return UINT8;
-                       }
-0x[0-9A-Fa-f]+         {
-                        struct ocpf_context *ctx = yyextra;
-                       char *e, *y = yytext;
-                       yylval->l = strtoul((const char *)y, &e, 0);
-                       if (e == y)
-                               ocpf_error_message(ctx, "malformed constant (%s)", yytext);
-                       else
-                               return INTEGER;
-                       
-                       }
-S0x[0-9A-Fa-f]+|-S[0-9]+ {
-                          struct ocpf_context *ctx = yyextra;
-                          char *e, *y;
-                          y = (yytext[0] == 'S') ? yytext + 1 : yytext;
-                          yylval->s = strtoul((const char *)y, &e, 0);
-                          if (e == y)
-                               ocpf_error_message(ctx, "malformed constant (%s)", yytext);
-                          else
-                               return SHORT;
-                        }
-
-L0x[0-9A-Fa-f]+|-?[0-9]+ {
-                         struct ocpf_context *ctx = yyextra;
-                         char *e, *y;
-                         y = (yytext[0] == 'L') ? yytext + 1 : yytext;
-                         yylval->l = strtoul((const char *)y, &e, 0);
-                         if(e == y) 
-                           ocpf_error_message(ctx, "malformed constant (%s)", yytext); 
-                         else
-                           return INTEGER;
-                       }
-D0x[0-9A-Fa-f]+                { 
-                         struct ocpf_context *ctx = yyextra;
-                         char *e, *y = yytext + 1;
-                         yylval->d = strtoull((const char *)y, &e, 0);
-                         if(e == y) 
-                           ocpf_error_message(ctx, "malformed constant (%s)", yytext); 
-                         else
-                           return I8;
-
-                       }
-[A-Za-z][-A-Za-z0-9_]* {
-                         yylval->name = strdup((const char *)yytext);
-                         return IDENTIFIER;
-                       }
-[ \t]+                 ;
-\n             {
-               struct ocpf_context *ctx = yyextra;
-                ++ctx->lineno; 
-               }
-.                      { 
-               struct ocpf_context *ctx = yyextra;
-               ocpf_error_message(ctx, "Ignoring char(%c)\n", *yytext); 
-               }
-%%
-
-void ocpf_error_message(struct ocpf_context *ctx, const char *format, ...)
-{
-       va_list args;
-
-       va_start(args, format);
-       fprintf(stderr, "ERROR: %s:%d: ", ctx->filename, ctx->lineno);
-       vfprintf(stderr, format, args);
-       va_end(args);
-       error_flag++;
-       fflush(0);
-}
-
-static void
-unterminated(struct ocpf_context *ctx, const char *type, unsigned int start_lineno)
-{
-    ocpf_error_message(ctx, "unterminated %s, possibly started on line %d\n", type, start_lineno);
-    fflush(0);
-}
\ No newline at end of file
diff --git a/branches/plugfest/libocpf/ocpf-documentation.doxy b/branches/plugfest/libocpf/ocpf-documentation.doxy
deleted file mode 100644 (file)
index ef25dcb..0000000
+++ /dev/null
@@ -1,934 +0,0 @@
-/**
-\mainpage OpenChange Property File (OCPF)
-
-\section ocpf OpenChange Property File (OCPF)
-
-\section Contents
-<ul>
- <li><a href="#revision">        Revision History        </a></li>
- <li><a href="#introduction"> 1. Introduction            </a></li>
- <li><a href="#purpose">      2. Purpose and Scope       </a></li>
- <li><a href="#limit">        3. Limitations and Bugs    </a></li>
- <li><a href="#syntax">       4. Syntax                  </a></li>
- <li><a href="#keywords">     5. Top Level Keywords      </a>
-   <ul>
-       <li><a href="#type">      5.1. TYPE              </a></li>
-       <li><a href="#folder">    5.2. FOLDER            </a></li>
-       <li><a href="#set">       5.3. SET               </a></li>
-       <li><a href="#oleguid">   5.4. OLEGUID           </a></li>
-       <li><a href="#recipient"> 5.5. RECIPIENT         </a></li>
-       <li><a href="#property">  5.6. PROPERTY section  </a></li>
-       <li><a href="#nproperty"> 5.7. NPROPERTY section </a></li>
-   </ul>
- </li>
- <li><a href="#properties">  6. Known Properties         </a>
-   <ul>
-       <li><a href="#propname">  6.1. Property Name     </a></li>
-       <li><a href="#proptag">   6.2. Property Tag      </a></li>
-   </ul>
- </li>
- <li><a href="#nproperties"> 7. Named Properties         </a>
-   <ul>
-       <li><a href="#OOM">         7.1. OOM             </a></li>
-       <li><a href="#MNID_ID">     7.2. MNID_ID         </a></li>
-       <li><a href="#MNID_STRING"> 7.3. MNID_STRING     </a></li>
-   </ul>
- </li>
- <li><a href="#proptype">    8. Supported Property Types </a>
-   <ul>
-       <li><a href="#boolean">    8.1. PT_BOOLEAN        </a></li>
-       <li><a href="#short">      8.2. PT_SHORT          </a></li>
-        <li><a href="#long">       8.3. PT_LONG           </a></li>
-        <li><a href="#longlong">   8.4. PT_I8             </a></li>
-        <li><a href="#double">     8.5. PT_DOUBLE         </a></li>
-        <li><a href="#string8">    8.6. PT_STRING8        </a></li>
-       <li><a href="#unicode">    8.7. PT_UNICODE        </a></li>
-        <li><a href="#systime">    8.8. PT_SYSTIME        </a></li>
-        <li><a href="#mv_string8"> 8.9. PT_MV_STRING8     </a></li>
-       <li><a href="#mv_unicode"> 8.10. PT_MV_UNICODE     </a></li>
-       <li><a href="#binary">     8.11. PT_BINARY         </a></li>
-       <li><a href="#mv_binary">  8.12. PT_MV_BINARY     </a></li>
-       <li><a href="#mv_long">    8.13. PT_MV_LONG       </a></li>
-   </ul>
- </li>
- <li><a href="#comments">    9. Comments                  </a>
- </li>
- <li><a href="#tools">       10. OCPF and openchangeclient </a>
-   <ul>
-       <li><a href="#syntax">      10.1. ocpf_syntax       </a></li>
-       <li><a href="#sender">      10.2. ocpf_sender       </a></li>
-       <li><a href="#dump">        10.3  ocpf_dump         </a></li>
-   </ul>
- </li>
-</ul>
-<br/>
-
-<a name="revision"></a><h2>Revision History</h2>
-<table align="center" width="80%">
-       <tr>
-          <td style="text-align:center"><strong>Date</strong></td>
-          <td style="text-align:center"><strong>Revision Number</strong></td>
-          <td style="text-align:center"><strong>Author</strong></td>
-          <td style="text-align:center"><strong>Revision Content</strong></td>
-       </tr>
-       <tr>
-          <td style="text-align:center">27/11/10</td>
-          <td style="text-align:center"><strong>0.7</strong></td>
-          <td style="text-align:center">Brad Hards</td>
-          <td style="text-align:center">Add PT_DOUBLE support. Update PT_I8 description.</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">27/11/10</td>
-          <td style="text-align:center"><strong>0.6.1</strong></td>
-          <td style="text-align:center">Brad Hards</td>
-          <td style="text-align:center">Update bug tracker link, minor rewording</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">25/06/10</td>
-          <td style="text-align:center"><strong>0.6</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Add PT_MV_BINARY, PT_MV_LONG
-          and PT_MV_UNICODE support. Update PT_BINARY
-          description.</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">01/04/08</td>
-          <td style="text-align:center"><strong>0.5</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Add RECIPIENT support</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">29/03/08</td>
-          <td style="text-align:center"><strong>0.4</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Add PT_UNICODE support and ocpf_dump option</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">06/03/08</td>
-          <td style="text-align:center"><strong>0.3</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Add PT_BINARY and Streams support</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">05/03/08</td>
-          <td style="text-align:center"><strong>0.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Improve PT_MV_STRING8 support</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">03/03/08</td>
-          <td style="text-align:center"><strong>0.1</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Initial Revision</td>
-       </tr>
-</table>
-<br/>
-
-<a name="introduction"></a><h2>1. Introduction</h2>
-
-OCPF stands for OpenChange Property Files. This is a tiny file format
-designed for scripting and which facilitates third-party applications
-interaction and developers work using OpenChange. The main objective
-of OCPF is to offer the possibility to go beyond OpenChange tools
-default properties and create a custom message with user-defined
-fields.
-<br/>
-
-<a name="purpose"></a><h2>2. Purpose and Scope</h2>
-
-OCPF is designed to be used in various kind of applications and for
-different purposes:
-<ul>
-
-  <li><strong>Research on properties</strong>: OpenChange developers
-  have often requested for an easy way to test properties and
-  properties values. Prior to OCPF, developers had to write an application
-  linked with libmapi and compile it so that they could test
-  properties. Moreover, adding new named properties in trunk required
-  commit permission to OpenChange source repository. OCPF solves this issue and
-  allow developers to write OCPF files with custom properties that they can
-  send using OpenChange tools. Furthermore OCPF will provide the
-  community a convenient way to agree on a particular property.</li>
-
-  <li><strong>Web Applications</strong>: OCPF offers a scripted
-  language with substitution variables which makes it possible to use OCPF
-  templates and use OCPF in conjunction with Web Forms. Since OCPF API
-  supports the parsing of multiple files, developers can plan to have
-  a file with variable declarations and a separate OCPF template that just
-  specifies variables.</li>
-
-  <li><strong>Backup/Restore</strong>: OCPF format may offer an easy
-  way for a restore/backup application to dump to the local filesystem
-  and restore messages on Exchange server. Furthermore, substitution of
-  variables can possibly be used to maintain the new hierarchy, such
-  as changing folders ID across Exchange servers and help migrating
-  database from a server to another.</li>
-
-</ul>
-<br/>
-
-
-<a name="limit"></a><h2>3. Limitations and Bugs </a></h2>
-
-OCPF is a pretty new library and it currently has a some limitations:
-<ul>
-    <li> It only supports a very limited set of property types </li>
-    <li> It doesn't support attachment yet </li>
-</ul>
-
-These limitations will be removed in later versions of OCPF.
-
-If you find bugs, limitations or encounter issues while using the OCPF
-library, please consider reporting them on <a
-href="http://tracker.openchange.org">http://tracker.openchange.org</a>.
-(Note: registration is required to create new tickets).
-
-For questions about its usage or about libocpf development, please
-post on the <a href="http://mailman.openchange.org/listinfo/devel">
-OpenChange devel mailing-list.</a>
-<br/>
-
-
-<a name="syntax"></a><h2>4. Syntax</h2>
-
-The general OCPF syntax is pretty basic. It mostly consists of
-top-level keywords, sections and properties types.
-<br/>
-
-
-<a name="keywords"></a><h2>5. Top Level Keywords</h2>
-
-<a name="type"></a><h3>5.1 TYPE </h3>
-<ul>
-  <li><strong>Format:</strong> 
-\code
-      TYPE STRING
-\endcode
-  </li>
-
-  <li><strong>Description:</strong> 
-
-  This keyword specifies the message class of the message. Users can
-  either specify their custom type or use on of the following standard
-  values:
-      <ul>
-       <li>"IPM.Appointment"</li>
-       <li>"IPM.Contact"</li>
-       <li>"IPM.Journal"</li>
-       <li>"IPM.Note"</li>
-       <li>"IPM.StickyNote"</li>
-       <li>"IPM.Task"</li>
-       <li>"IPM.Post"</li>
-      </ul>
-  </li>
-  <li><strong>Note:</strong> 
-
-  TYPE can only be defined once and takes a string value as
-  parameter. String values must be quoted otherwise a <I>syntax
-  error</I> will be displayed on output.
-  </li>
-  <li><strong>Example:</strong>
-\code 
-      TYPE "IPM.Appointment" 
-\endcode 
-  </li>
-</ul>
-<br/>
-
-<a name="folder"></a><h3>5.2 FOLDER </h3>
-<ul>
-  <li><strong>Format:</strong>
-\code
-      FOLDER STRING
-      FOLDER PT_I8
-      FOLDER VAR
-\endcode
-  </li>
-  <li><strong>Description:</strong>
-
-  This keyword defines the destination folder of the message. Users
-  can either specify a default folder using the string value or a
-  custom folder ID using its PR_FID value. It is also possible
-  to substitute the value with a variable, but it is limited to PT_I8
-  values.
-
-  When FOLDER is set with a PT_I8 custom value and the ocpf_OpenFolder
-  public function used, it can be set to any folder identifier within
-  the message store. The function will loop over mailbox folders until
-  it finds the folder with the given folder ID and opens it.
-
-  Possible STRING values:
-  <ul>
-       <li> olFolderTopInformationStore </li>
-       <li> olFolderDeletedItems </li>
-       <li> olFolderOutbox </li>
-       <li> olFolderSentMail </li>
-       <li> olFolderInbox</li>
-       <li> olFolderCommonView</li>
-       <li> olFolderCalendar </li>
-       <li> olFolderContacts </li>
-       <li> olFolderJournal </li>
-       <li> olFolderNotes </li>
-       <li> olFolderTasks </li>
-  </ul>
-  </li>
-  <li><strong>Note:</strong> 
-
-  FOLDER can only be defined once.
-  </li>
-  <li><strong>Examples:</strong>
-\code 
-FOLDER "olFolderCalendar"
-\endcode
-
-or
-
-\code
-FOLDER D0x9504000000000001
-\endcode
-
-or
-
-\code
-SET    $folder_id = D0x9504000000000001
-FOLDER $folder_id
-\endcode
-  </li>
-</ul>
-<br/>
-
-<a name="set"></a><h3>5.3. SET</h3>
-<ul>
-  <li><strong>Format:</strong>
-\code
-      SET VAR = PROPVALUE
-\endcode
-  </li>
-  <li><strong>Description:</strong>
-
-  This keyword registers a variable named VAR and sets its value to
-  PROPVALUE. Variables must be prefixed with a dollar sign ($) and their
-  value can be set to any supported property type. See section on
-  property values for further information.
-  </li>
-
-  <li><strong>Note:</strong> 
-
-  SET can be used as many times as needed by the user, however VAR
-  name must remain unique. When a variable name is registered for the
-  second time, the OCPF parser displays a warning on the standard output
-  and skips the assignment.
-  </li>
-
-  <li><strong>Example:</strong>
-\code
-     SET $var1 = 0xdeadbeef
-     SET $var2 = "Hello World"
-     SET $var3 = T2008-03-06 23:30:00
-\endcode
-</ul>
-<br/>
-
-<a name="oleguid"></a><h3>5.4. OLEGUID</h3>
-<ul>
-    <li><strong>Format:</strong>
-\code
-      OLEGUID IDENTIFIER STRING
-\endcode
-    </li>
-    <li><strong>Description:</strong>
-
-    This keyword registers an OLEGUID couple (IDENTIFIER and STRING
-    value) that can then be used when declaring named properties (see
-    NPROPERTY). OLEGUID keyword takes two parameters: first the name,
-    used with named properties (PSETID_Appointment, PS_PUBLIC_STRINGS
-    etc.) and secondly a string representing a GUID value.
-    </li>
-    <li><strong>Note:</strong>
-
-    OLEGUID are identified by their IDENTIFIER and STRING. Users can't
-    register the same OLEGUID IDENTIFIER or STRING twice. If such case
-    occurs, a warning message will be displayed on stdout.
-    </li>
-    <li><strong>Example:</strong>
-\code
-      OLEGUID PSETID_Appointment "00062002-0000-0000-c000-000000000046"
-
-      [...]
-
-NPROPERTY {
-         OOM:Label:PSETID_Appointment = T2008-03-06 23:30:00
-         [...]
-\endcode
-    </li>
-</ul>
-<br/>
-
-<a name="recipient"></a><h3>5.5. RECIPIENT </h3>
-<ul>
-  <li><strong>Format:</strong>
-\code
-      RECIPIENT TO STRING;STRING;STRING
-      RECIPIENT CC STRING;STRING
-      RECIPIENT BCC STRING
-\endcode
-  </li>
-  <li><strong>Description:</strong>
-
-  This keyword declares recipients. RECIPIENT is followed by a
-  recipient type (TO, CC or BCC) and a set of STRING (recipients)
-  separated with semicolon.
-  </li>
-  <li><strong>Example:</strong>
-\code
-      RECIPIENT TO "recipient1";"recipient2";"recipient3"
-      RECIPIENT CC "recipient4"
-      RECIPIENT BCC "recipient5@remote.corp";"recipient6"
-\endcode
-  </li>
-</ul>
-<br/>
-
-<a name="property"></a><h3>5.6. PROPERTY section</h3>
-<ul>
-  <li><strong>Format:</strong>
-\code
-      PROPERTY {
-              [...]
-      };
-\endcode
-  </li>
-  <li><strong>Description:</strong>
-
-  This keyword declares a <i>known property</i> section. PROPERTY is
-  followed by an opening brace, a set of property declarations and
-  is ended with a closing brace and semicolon. This section only
-  recognizes properties as described in <a href="#properties">6. Known
-  properties</a>.
-  </li>
-  <li><strong>Note:</strong>
-
-  While we suggest keeping a single PROPERTY section, nothing prevents
-  the user from declaring as many PROPERTY sections as needed.
-  </li>
-  <li><strong>Example:</strong>
-\code
-     PROPERTY {
-              PR_SUBJECT = "Hello World"
-              0x1000001e = "Sample body content"
-     };
-\endcode
-  </li>
-</ul>
-<br/>
-
-
-<a name="nproperty"></a><h3>5.7. NPROPERTY section</h3>
-<ul>
-  <li><strong>Format:</strong>
-\code
-      NPROPERTY {
-                 [...]
-                };
-\endcode
-  </li>
-  <li><strong>Description:</strong>
-
-  This keyword declares a <i>named property</i> section. NPROPERTY is
-  followed by an opening brace, a set of named properties declarations
-  and is ended with a closing brace and semicolon. This section
-  only recognizes named properties as described in <a
-  href="#nproperties">7. Named Properties</a>.
-
-  </li>
-  <li><strong>Note:</strong>
-
-  While we suggest keeping a single NPROPERTY section, nothing
-  prevents the user from declaring as many NPROPERTY sections as
-  needed.
-  </li>
-  <li><strong>Example:</strong>
-\code
-      NPROPERTY {
-                OOM:Start:PSETID_Appointment = T2008-03-06 22:00:00
-                OOM:Location:PSETID_Appointment = "Home Sweet Home"
-                /* Meeting Status */
-                MNID_ID:0x8217:PSETID_Appointment = 0;
-      };
-\endcode
-  </li>
-</ul>
-<br/>
-<br/>
-
-
-<a name="properties"></a><h2>6. Known Properties</h2>
-
-A known properties is any property where the value doesn't change
-across Exchange servers and versions. Known properties can only be
-registered within a PROPERTY section (See <a href="#property">5.6
-PROPERTY section</a>). Known properties have the same general syntax:
-
-\code
-      IDENTIFIER = [PROPVALUE | VAR]
-      INTEGER    = [PROPVALUE | VAR]
-\endcode
-
-OCPF lets the user define <i>known properties</i> using two different
-methods: property names or property tags.
-
-Please note that OCPF doesn't check whether the value associated with
-the property matches the property type. For the moment it is the
-developer's responsibility to ensure that the property type matches
-its value.
-<br/>
-
-<a name="propname"></a><h3>6.1. Property Names</h3>
-
-       Property Names are defined with an IDENTIFIER which must match
-       one already registered in libmapi/conf/mapi-properties. For
-       example:
-\code
-      PR_SUBJECT      = "Hello World"
-      PR_START_DATE   = T2008-03-06 22:00:00
-      PR_PRIORITY     = 2
-\endcode
-<br/>
-
-<a name="proptag"></a><h3>6.2. Property Tags</h3>
-
-       Property Tags are the other way to set a property. This is an
-       integer value represented using hexadecimal notation and
-       which has two parts: the upper 16 bits are the property ID and
-       the lower 16 bits are the property type.
-
-       While users may prefer to use the property name notation for
-       declaration, libmapi/conf/mapi-properties remains incomplete
-       and there may be cases where you need to use the property tag
-       notation. The example below sets properties described in
-       previous example using their property tag notation.
-\code
-      0x0037001e     = "Hello World"
-      0x00600040     = T2008-03-06 22:00:00
-      0x00260003     = 2
-\endcode.
-<br/>
-
-
-<a name="nproperties"></a><h2>7. Named Properties</h2>
-
-The OCPF syntax for different kind of named properties is quite
-generic. It supports each of the three kinds of property
-(OOM, MNID_ID, MNID_STRING) and can set known named properties
-(those listed in libmapi/conf/mapi-named-properties) or register
-new named properties (except OOM properties).
-
-The types of properties, and how they can be used, are described
-below.
-<br/>
-
-<a name="OOM"></a><h3>7.1. OOM</h3>
-
-OOM stands for Outlook Object Model and is a friendly name associated
-to a named property. It has no meaning to Exchange, but it can
-be useful for OpenChange or MAPI developers.
-
-OOM are human readable shortcuts for most named
-properties and OOM values are are considered reliable. This is the
-reason why OOM can only be used if it exists in
-libmapi/conf/mapi-named-properties. This method - in our opinion - is
-the best method to guarantee developers a common and validated
-mapi-named-properties file.
-
-Theorically, property names can have the same OOM, property ID
-(MNID_ID) or name (MNID_STRING). The only way to guarantee named
-property uniqueness is to associate its value with a OLEGUID.
-
-OLEGUID needs to be registered before they can be used with named
-properties. See <a href="#oleguid">5.4 OLEGUID</a> for more
-information on how to register a OLEGUID.
-
-OOM named properties have the following syntax:
-\code
-      OOM:IDENTIFIER:IDENTIFIER = [PROPVALUE | VAR]
-\endcode
-
-The first IDENTIFIER represents the OOM value while the second one
-represents the OLEGUID. Note that identifiers are not enclosed with
-quotes. Below are some OOM assignments examples:
-
-\code
-      OOM:Label:PSETID_Appointment = 9
-      OOM:End:PSETID_Appointment = $end_date
-      OOM:Private:PSETID_Common = B"true"
-\endcode
-<br/>
-
-<a name="MNID_ID"></a><h3>7.2. MNID_ID</h3>
-
-Named properties that Exchange converts using their property ID (16
-bits) are known as MNID_ID named property kind. OCPF provides two
-different ways to define MNID_ID. It can either be a new named
-property or an existing one which wouldn't have any associated OOM.
-
-MNID_ID named property kind has the following syntax:
-\code
-      MNID_ID:INTEGER:PROPTYPE:IDENTIFIER  = [PROPVALUE | VAR]
-      MNID_ID:INTEGER:IDENTIFIER          = [PROPVALUE | VAR]
-\endcode
-
-If the MNID_ID named property doesn't exist within
-libmapi/conf/mapi-named-property then you must specify its property
-type.
-
-As described in the example below, the main difference between known
-and custom MNID_ID named properties is whether or not we specify its
-property type. If your MNID_ID property has not been referenced within
-libmapi/conf/mapi-named-property, then you must supply its property
-type, otherwise you can skip it.
-
-Note: PROPTYPE can be any of the values described in <a
-href="#proptype"> 8. Supported Property Types </a>.
-
-\code
-      MNID_ID:0x8501:PT_LONG:PSETID_Common = $reminder /* Reminder      */
-      MNID_ID:0x8217:PSETID_Appointment    = 0         /* MeetingStatus */
-\endcode
-<br/>
-
-<a name="MNID_STRING"></a><h3>7.3. MNID_STRING</h3>
-
-Exchange also supports named properties which do not have a
-property ID but are described using property names. These named
-properties are known as MNID_STRING named property kind and Exchange
-maps these names to a temporary property type.
-
-MNID_STRING named property kind has the following syntax:
-\code
-      MNID_STRING:STRING:IDENTIFIER          = [PROPVALUE | VAR]
-      MNID_STRING:STRING:PROPTYPE:IDENTIFIER = [PROPVALUE | VAR]
-\endcode
-
-MNID_STRING difference between known and custom is the same as
-MNID_ID one. If the MNID_STRING property doesn't exist in
-libmapi/conf/mapi-named-properties, then users have to supply its
-PROPTYPE.
-
-NOTE: PROPTYPE can be any of the value described in <a
-href="#proptype"> 8. Supported Property Types </a>.
-
-Considering the behavior described above, we could set the "Keywords"
-MNID_STRING named property using any of the following example:
-\code
-       MNID_STRING:"Keywords":PS_PUBLIC_STRINGS               = {"one", "two" , "three" }
-       MNID_STRING:"Keywords":PT_MV_STRING8:PS_PUBLIC_STRINGS = {"one", "two" , "three" }
-\endcode
-
-<br/>
-
-<a name="proptype"></a><h2>8. Supported Property Types</h2>
-<a name="boolean"></a><h3>8.1. PT_BOOLEAN</h3>
-
-OCPF uses the following format for BOOLEAN values:
-\code
-      B"true"
-      B"false"
-\endcode
-<br/>
-
-<a name="short"></a><h3>8.2. PT_SHORT</h3>
-OCPF can use any of the following formats for SHORT values:
-\code
-     S0x1234
-     S32
-\endcode
-
-The short integer can either be in hexadecimal of decimal notation but
-must be prefixed with a "S" to specify this is a short integer
-value. If you omit to specify the "S", mismatch property type/value
-errors will occur while sending the message.
-
-<a name="long"></a><h3>8.3. PT_LONG</h3>
-OCPF can use any of the following formats for PT_LONG values:
-\code
-      0xdeadbeef
-      L0xdeadbeef
-      32
-\endcode
-
-The integer can either be in hexadecimal or decimal notation or
-prefixed with a "L" to specify this is long value. If you use the
-hexadecimal notation consider using the 'L' prefixed form since other form
-may disappear in further versions.
-<br/>
-
-<a name="longlong"></a><h3>8.4. PT_I8</h3>
-OCPF uses the following format for PT_I8 (uint64_t) values:
-\code
-      D0x9504000000000001
-\endcode
-<br/>
-
-<a name="double"></a><h3>8.5. PT_DOUBLE</h3>
-OCPF uses an exponent format for floating point (double) number, as shown
-in this example:
-\code
-      F3.1415e+03
-\endcode
-<br/>
-
-<a name="string8"></a><h3>8.6. PT_STRING8</h3>
-
-OCPF defines a string as a set of characters (A-Za-z0-9_) enclosed
-with double quotes:
-\code
-      "I am a STRING"
-\endcode
-<br/>
-
-<a name="unicode"></a><h3>8.7. PT_UNICODE</h3>
-
-OCPF defines a unicode string as a set of characters enclosed with
-double quotes and prefixed with <strong>W</strong>:
-\code
-      W"I am a UNICODE string"
-\endcode
-<br/>
-
-<a name="systime"></a><h3>8.8. PT_SYSTIME</h3>
-
-OCPF defines date using the following format string:
-\code
-      TYYYY-MM-DD HH:MM:SS
-\endcode
-
-Dates are prefixed with a 'T' character and its content is represented
-with the syntax below:
-
-<ul>
-       <li> YYYY: year </li>
-       <li> MM: month </li>
-       <li> DD: day </li>
-       <li> HH: hours </li>
-       <li> MM: minutes </li>
-       <li> SS: seconds </li>
-</ul>
-
-\code
-       T2008-03-06 22:30:00 /* 2008, 6th of March 10:30:00PM */
-\endcode
-<br/>
-
-<a name="mv_string8"></a><h3>8.9. PT_MV_STRING8</h3>
-
-PT_MV_STRING8 are arrays ("multiple values") of strings. OCPF defines PT_MV_STRING8
-property values as STRING property values separated by commas and enclosed within
-braces.
-
-\code
-      { STRING, STRING, ..., STRING }  
-\endcode
-
-At least one STRING property value is required to create a valid
-PT_MV_STRING8 property. If two or more STRING property values are set,
-then they must be separated with comma.
-
-\code
-      { "single multi-string value" }
-      { "one" , "two", "three", "owned" }
-\endcode
-<br/>
-
-<a name="mv_unicode"></a><h3>8.10. PT_MV_UNICODE</h3>
-
-PT_MV_UNICODE are arrays ("multiple values") of unicode strings. OCPF
-defines PT_MV_UNICODE property values as UNICODE property values
-separated by commas and enclosed within braces.
-
-\code
-      { UNICODE, UNICODE, ..., UNICODE }
-\endcode
-
-At least one UNICODE property value is required to create a valid
-PT_MV_UNICODE property. If two or more UNICODE property values are
-set, then they must be separated with comma.
-
-\code
-      { W"single multi-unicode value" }
-      { W"four", W"five", W"six" }
-\endcode
-<br/>
-
-<a name="binary"></a><h3>8.11. PT_BINARY</h3>
-
-PT_BINARY are blobs of data. OCPF defines PT_BINARY property values
-using two different methods. This can either be raw/inline blob of
-data or filename/external.
-
-If users wish to add raw data blob for a given property, they need to
-enclose UINT8 (from 0x00 to 0xFF) values within braces. However many
-cases occur where the data blob is large (such as HTML content;
-PR_HTML has PT_BINARY property type). In such cases, users may rather
-prefer to write an external file and specify a filename.
-
-\code
-       { UINT8 UINT8 [...] UINT8 }
-       < STRING >
-\endcode
-
-Note that if the blob of data (raw or pointed by filename) is too
-large to fit in the property values array, then OCPF will
-automatically open a stream for the property and write its data in the
-stream.
-
-\code
-       PR_HTML = { 0x48 0x65 0x6c 0x6c 0x6f } /* Hello */
-       PR_HTML = <"/tmp/sample.html">
-\endcode
-<br/>
-
-<a name="mv_binary"></a><h3>8.12. PT_MV_BINARY</h3>
-
-PT_MV_BINARY are arrays ("multiple values") of PT_BINARY blobs. OCPF
-defines PT_MV_BINARY propery values as PT_BINARY property values
-separated by commas and encloses within braces.
-
-\code
-       { PT_BINARY, PT_BINARY, PT_BINARY }
-\endcode
-
-At least one PT_BINARY property value is required to create a valid
-PT_MV_BINARY property. If two or more PT_BINARY are set, then they
-must be separated with comma.
-
-\code
-       { {0x48 0x65 0x6c 0x6c 0x6f}, {0x77 0x6f 0x72 0x6c 0x64}, { 0x21 } } /* Hello world ! */
-\endcode
-
-Note that current implementation does not support the following PT_BINARY format:
-\code
-< STRING >
-\endcode
-<br/>
-
-<a name="mv_long"></a><h3>8.13. PT_MV_LONG</h3>
-
-PT_MV_LONG are arrays ("multiple values") of integers. OCPF defines
-PT_MV_LONG property values as INTEGER property values separated by
-commas and enclosed within braces.
-
-\code
-      { INTEGER, INTEGER, INTEGER }
-\endcode
-
-At least one INTEGER property value is required to create a valid
-PT_MV_LONG property. If two or more INTEGER property values are set,
-then they must be separated with comma.
-
-Also note that PT_MV_LONG are very similar to PT_BINARY in their
-syntax. The main difference lies in the representation of UINT8 and
-INTEGER values.
-
-\code
-     { 1, 2, 3 }
-     { L0x1, 0x123456, 42 }
-\endcode
-
-<br/>
-
-<a name="comments"></a><h2>9. Comments</h2>
-
-OCPF files can contain comments embedded in normal C-style comment
-markers. That is, a comment starts with a combination of / followed by *,
-and ends with combination of * followed by /.
-
-Anything contained with in comment markers is ignored by the OCPF tools,
-and is only for the convenience of human readers.
-
-\code
-/* This is a comment */
-\endcode
-
-<a name="tools"></a><h2>10. OCPF and openchangeclient</h2>
-
-OCPF support has been added to the openchangeclient utility.
-It now has the ability to parse and process OCPF files. Two different 
-options are supported; you can either check an OCPF files' syntax
-(--ocpf_syntax) or process the files (--ocpf_sender).
-
-Users can set OCPF files using --ocpf-file=filename. Note that you can
-specify --ocpf-file multiple times if you have split the OCPF contents
-into different files. However the whole OCPF files you specify must
-only represent a single message.
-
-Sample OCPF files are provided in the distribution (libocpf/examples),
-and can also be browsed from the <a href="examples.html">Examples section</a>
-of this documentation:
-<ul>
-  <li> <a href="sample__appointment_8ocpf-example.html">sample_appointment.ocpf</a> </li>
-  <li> <a href="sample__task_8ocpf-example.html">sample_task.ocpf</a> </li>
-</ul>
-
-<a name="syntax"></a><h2>10.1 ocpf_syntax</h2>
-Process specified OCPF files, display syntax errors if detected and dump
-OCPF context content on standard output.
-
-\code
-openchangeclient --ocpf-syntax \
-                --ocpf-file=libocpf/examples/sample_appointment.ocpf 
-\endcode
-
-<a name="sender"></a><h2>10.2. ocpf_sender</h2>
-
-Process specified OCPF files and create/send a message using OCPF context
-contents.
-
-\code
-openchangeclient --ocpf_sender \
-                --ocpf-file=libocpf/examples/sample_appointment.ocpf
-\endcode
-
-<a name="dump"></a><h2>10.3 ocpf_dump</h2>
-Process specified MAPI message and generates the corresponding OCPF
-file on the filesystem.
-
-\code
-openchangeclient --fetch-items=Appointment
-MAILBOX (1 messages)
-|== test ==| : AA13000000000001/20C140000000003
-        Location: paris
-        Start time     :   Sat Mar 29 09:00:00 2008 CET
-        End time       :   Sat Mar 29 09:30:00 2008 CET
-        Timezone: (GMT+01:00) Brussels, Copenhagen, Madrid, Paris
-        Private: False
-        Status: Completed
-    fetchitems               : MAPI_E_SUCCESS (0x0)
-
-openchangeclient --ocpf-dump=AA13000000000001/20C140000000003
-OCPF output file: 20c140000000003.ocpf
-    OCPF Dump                : MAPI_E_SUCCESS (0x0)
-\endcode
-
-*/
-
-/** \example sample_appointment.ocpf
-    
-This example shows a sample OCPF file designed to create a calendar
-with the following details:
-- Event starting the 6th of March at 10:00PM and ending at 11:45PM
-- Reminder set 45 minutes before the beginning of event
-- Label set to Anniversary
-- Subject, Body, Location and Private flag set
-
-*/
-
-/** \example sample_task.ocpf
-
-This example shows a sample OCPF file designed to create a task with
-the following details:
-- Task starting the 6th of March at 8:00PM and ending at 11:00PM
-- Importance set to High
-- Waiting for someone else
-- Subject, Body and Private flag set
-
-*/
diff --git a/branches/plugfest/libocpf/ocpf.h b/branches/plugfest/libocpf/ocpf.h
deleted file mode 100644 (file)
index eb8adc4..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __OCPF_H_
-#define        __OCPF_H_
-
-#include "libmapi/libmapi.h"
-
-#define        OCPF_SUCCESS    0x0
-#define        OCPF_ERROR      0x1
-#define        OCPF_E_EXIST    0x2
-
-#define        OCPF_FLAGS_RDWR                 0
-#define        OCPF_FLAGS_READ                 1
-#define        OCPF_FLAGS_WRITE                2
-#define        OCPF_FLAGS_CREATE               3
-
-enum ocpf_recipClass {
-       OCPF_MAPI_TO = 0x1,
-       OCPF_MAPI_CC,
-       OCPF_MAPI_BCC
-};
-
-extern struct ocpf     *ocpf;
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
-__BEGIN_DECLS
-
-/* The following public definitions come from libocpf/ocpf_public.c */
-int ocpf_init(void);
-int ocpf_release(void);
-int ocpf_new_context(const char *, uint32_t *, uint8_t);
-int ocpf_del_context(uint32_t);
-int ocpf_parse(uint32_t);
-struct SRowSet *ocpf_get_recipients(TALLOC_CTX *, uint32_t);
-enum MAPISTATUS        ocpf_set_SPropValue(TALLOC_CTX *, uint32_t, mapi_object_t *, mapi_object_t *);
-struct SPropValue *ocpf_get_SPropValue(uint32_t, uint32_t *);
-enum MAPISTATUS ocpf_OpenFolder(uint32_t, mapi_object_t *, mapi_object_t *);
-enum MAPISTATUS ocpf_set_Recipients(TALLOC_CTX *, uint32_t, mapi_object_t *);
-
-/* The following public definitions come from libocpf/ocpf_server.c */
-enum MAPISTATUS ocpf_server_set_type(uint32_t, const char *);
-enum MAPISTATUS ocpf_server_set_SPropValue(TALLOC_CTX *, uint32_t);
-enum MAPISTATUS ocpf_server_add_SPropValue(uint32_t, struct SPropValue *);
-enum MAPISTATUS ocpf_server_sync(uint32_t);
-
-/* The following public definitions come from libocpf/ocpf_dump.c */
-void ocpf_dump_type(uint32_t);
-void ocpf_dump_folder(uint32_t);
-void ocpf_dump_recipients(uint32_t);
-void ocpf_dump_oleguid(uint32_t);
-void ocpf_dump_variable(uint32_t);
-void ocpf_dump_property(uint32_t);
-void ocpf_dump_named_property(uint32_t);
-void ocpf_dump(uint32_t);
-
-/* The following public definitions come from libocpf/ocpf_write.c */
-int ocpf_write_init(uint32_t, mapi_id_t);
-int ocpf_write_auto(uint32_t, mapi_object_t *, struct mapi_SPropValue_array *);
-int ocpf_write_commit(uint32_t);
-
-__END_DECLS
-
-#endif /* ! __OCPF_H_ */
diff --git a/branches/plugfest/libocpf/ocpf.y b/branches/plugfest/libocpf/ocpf.y
deleted file mode 100644 (file)
index 180500e..0000000
+++ /dev/null
@@ -1,613 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-%{
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-#include "libocpf/lex.h"
-
-int ocpf_yylex(void *, void *);
-void yyerror(struct ocpf_context *, void *, char *);
-
-%}
-
-%pure_parser
-%parse-param {struct ocpf_context *ctx}
-%parse-param {void *scanner}
-%lex-param {yyscan_t *scanner}
-%name-prefix="ocpf_yy"
-
-%union {
-       uint8_t                         i;
-       uint8_t                         b;
-       uint16_t                        s;
-       uint32_t                        l;
-       uint64_t                        d;
-       double                          dbl;
-       char                            *name;
-       char                            *nameW;
-       char                            *date;
-       char                            *var;
-       struct LongArray_r              MVl;
-       struct StringArray_r            MVszA;
-       struct WStringArray_r           MVszW;
-       struct BinaryArray_r            MVbin;
-}
-
-%token <i> UINT8
-%token <b> BOOLEAN
-%token <s> SHORT
-%token <l> INTEGER
-%token <d> I8
-%token <dbl> DOUBLE
-%token <name> IDENTIFIER
-%token <name> STRING
-%token <nameW> UNICODE
-%token <date> SYSTIME
-%token <var> VAR
-
-%token kw_TYPE
-%token kw_FOLDER
-%token kw_OLEGUID
-%token kw_SET
-%token kw_PROPERTY
-%token kw_NPROPERTY
-%token kw_RECIPIENT
-%token kw_TO
-%token kw_CC
-%token kw_BCC
-%token kw_OOM
-%token kw_MNID_ID
-%token kw_MNID_STRING
-
-%token kw_PT_BOOLEAN
-%token kw_PT_STRING8
-%token kw_PT_UNICODE
-%token kw_PT_SHORT
-%token kw_PT_LONG
-%token kw_PT_I8
-%token kw_PT_DOUBLE
-%token kw_PT_SYSTIME
-%token kw_PT_MV_LONG
-%token kw_PT_MV_BINARY
-%token kw_PT_MV_STRING8
-%token kw_PT_MV_UNICODE
-%token kw_PT_BINARY
-
-%token OBRACE
-%token EBRACE
-%token COMMA
-%token SEMICOLON
-%token COLON
-%token LOWER
-%token GREATER
-%token EQUAL
-
-%start keywords
-
-%%
-
-keywords       : | keywords kvalues
-               {
-                       memset(&ctx->lpProp, 0, sizeof (union SPropValue_CTR));
-               }
-               ;
-
-kvalues                : Type
-               | Folder
-               | OLEGUID
-               | Set
-               | Property
-               | NProperty
-               | Recipient
-               ;
-
-Type           : 
-               kw_TYPE STRING
-               {
-                       if (!ctx->typeset) {
-                         ocpf_type_add(ctx,$2);
-                               ctx->typeset++;
-                       } else {
-                               ocpf_error_message(ctx, "%s", "duplicated TYPE\n");
-                               return -1;
-                       }
-               }
-               ;
-
-Folder         :
-               kw_FOLDER STRING
-               {
-                       if (ctx->folderset == false) {
-                               ocpf_folder_add(ctx, $2, 0, NULL);
-                               ctx->folderset = true;
-                       } else {
-                               ocpf_error_message(ctx, "%s", "duplicated FOLDER\n");
-                       }
-               }
-               | kw_FOLDER I8
-               {
-                       if (ctx->folderset == false) {
-                               ocpf_folder_add(ctx, NULL, $2, NULL);
-                               ctx->folderset = true;
-                       } else {
-                               ocpf_error_message(ctx,"%s", "duplicated FOLDER\n");
-                       }
-               }
-               | kw_FOLDER VAR
-               {
-                       if (ctx->folderset == false) {
-                               ocpf_folder_add(ctx, NULL, 0, $2);
-                               ctx->folderset = true;
-                       } else {
-                               ocpf_error_message(ctx,"%s", "duplicated FOLDER\n");
-                       }
-               }
-               ;
-
-OLEGUID                : 
-               kw_OLEGUID IDENTIFIER STRING
-               { 
-                       char *name;
-                       char *guid;
-                       
-                       name = talloc_strdup(ctx, $2);
-                       guid = talloc_strdup(ctx, $3);
-
-                       ocpf_oleguid_add(ctx, name, guid);
-               }
-               ;
-
-Set            :
-               kw_SET VAR EQUAL propvalue
-               {
-                       ocpf_variable_add(ctx, $2, ctx->lpProp, ctx->ltype, true);
-                       memset(&ctx->lpProp, 0, sizeof (union SPropValue_CTR));
-               }
-               ;
-
-Property       :
-               kw_PROPERTY OBRACE pcontent EBRACE SEMICOLON
-               {
-               }
-
-pcontent               : | pcontent content
-               {
-                       memset(&ctx->lpProp, 0, sizeof (union SPropValue_CTR));
-               }
-               ;
-
-content                :
-               IDENTIFIER EQUAL propvalue
-               {
-                       ocpf_propvalue_s(ctx, $1, ctx->lpProp, ctx->ltype, true);
-                       ocpf_propvalue_free(ctx->lpProp, ctx->ltype);
-               }
-               | INTEGER EQUAL propvalue
-               {
-                       ocpf_propvalue(ctx, $1, ctx->lpProp, ctx->ltype, true);
-                       ocpf_propvalue_free(ctx->lpProp, ctx->ltype);
-               }
-               | IDENTIFIER EQUAL VAR
-               {
-                       ocpf_propvalue_var(ctx, $1, 0x0, $3, true);
-               }
-               | INTEGER EQUAL VAR
-               {
-                       ocpf_propvalue_var(ctx, NULL, $1, $3, true);
-               }
-               ;
-
-propvalue      : STRING        
-               { 
-                       ctx->lpProp.lpszA = talloc_strdup(ctx, $1); 
-                       ctx->ltype = PT_STRING8; 
-               }
-               | UNICODE
-               {
-                       ctx->lpProp.lpszW = talloc_strdup(ctx, $1);
-                       ctx->ltype = PT_UNICODE;
-               }
-               | SHORT         { ctx->lpProp.i = $1; ctx->ltype = PT_SHORT; }
-               | INTEGER       { ctx->lpProp.l = $1; ctx->ltype = PT_LONG; }
-               | BOOLEAN       { ctx->lpProp.b = $1; ctx->ltype = PT_BOOLEAN; }
-               | I8            { ctx->lpProp.d = $1; ctx->ltype = PT_I8; }
-               | DOUBLE        { ctx->lpProp.dbl = $1, ctx->ltype = PT_DOUBLE; }
-               | SYSTIME
-               {
-                       ocpf_add_filetime($1, &ctx->lpProp.ft);
-                       ctx->ltype = PT_SYSTIME;
-               }
-               | OBRACE mvlong_contents INTEGER EBRACE
-               {
-                       TALLOC_CTX      *mem_ctx;
-
-                       if (!ctx->lpProp.MVl.cValues) {
-                               ctx->lpProp.MVl.cValues = 0;
-                               ctx->lpProp.MVl.lpl = talloc_array(ctx, uint32_t, 2);
-                       } else {
-                               ctx->lpProp.MVl.lpl = talloc_realloc(NULL, ctx->lpProp.MVl.lpl,
-                                                                    uint32_t,
-                                                                    ctx->lpProp.MVl.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVl.lpl;
-                       ctx->lpProp.MVl.lpl[ctx->lpProp.MVl.cValues] = $3;
-                       ctx->lpProp.MVl.cValues += 1;
-
-                       ctx->ltype = PT_MV_LONG;
-               }
-               | OBRACE mvstring_contents STRING EBRACE
-               {
-                       TALLOC_CTX      *mem_ctx;
-
-                       if (!ctx->lpProp.MVszA.cValues) {
-                               ctx->lpProp.MVszA.cValues = 0;
-                               ctx->lpProp.MVszA.lppszA = talloc_array(ctx, const char *, 2);
-                       } else {
-                               ctx->lpProp.MVszA.lppszA = talloc_realloc(NULL, ctx->lpProp.MVszA.lppszA, 
-                                                                         const char *,
-                                                                         ctx->lpProp.MVszA.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVszA.lppszA;
-                       ctx->lpProp.MVszA.lppszA[ctx->lpProp.MVszA.cValues] = talloc_strdup(mem_ctx, $3);
-                       ctx->lpProp.MVszA.cValues += 1;
-
-                       ctx->ltype = PT_MV_STRING8;
-               }
-               | OBRACE mvunicode_contents UNICODE EBRACE
-               {
-                       TALLOC_CTX      *mem_ctx;
-                       
-                       if (!ctx->lpProp.MVszW.cValues) {
-                               ctx->lpProp.MVszW.cValues = 0;
-                               ctx->lpProp.MVszW.lppszW = talloc_array(ctx, const char *, 2);
-                       } else {
-                               ctx->lpProp.MVszW.lppszW = talloc_realloc(NULL, ctx->lpProp.MVszW.lppszW,
-                                                                         const char *,
-                                                                         ctx->lpProp.MVszW.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVszW.lppszW;
-                       ctx->lpProp.MVszW.lppszW[ctx->lpProp.MVszW.cValues] = talloc_strdup(mem_ctx, $3);
-                       ctx->lpProp.MVszW.cValues += 1;
-
-                       ctx->ltype = PT_MV_UNICODE;
-               }
-               | OBRACE binary_contents EBRACE
-               {
-                       ctx->lpProp.bin.cb = ctx->bin.cb;
-                       ctx->lpProp.bin.lpb = talloc_memdup(ctx, ctx->bin.lpb, ctx->bin.cb);
-
-                       talloc_free(ctx->bin.lpb);
-                       ctx->bin.cb = 0;
-
-                       ctx->ltype = PT_BINARY;
-               }
-               | OBRACE mvbin_contents OBRACE binary_contents EBRACE EBRACE
-               {
-                       TALLOC_CTX      *mem_ctx;
-
-                       if (!ctx->lpProp.MVbin.cValues) {
-                               ctx->lpProp.MVbin.cValues = 0;
-                               ctx->lpProp.MVbin.lpbin = talloc_array(ctx, struct Binary_r, 2);
-                       } else {
-                               ctx->lpProp.MVbin.lpbin = talloc_realloc(NULL, ctx->lpProp.MVbin.lpbin,
-                                                                        struct Binary_r,
-                                                                        ctx->lpProp.MVbin.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVbin.lpbin;
-                       ctx->lpProp.MVbin.lpbin[ctx->lpProp.MVbin.cValues].cb = ctx->bin.cb;
-                       ctx->lpProp.MVbin.lpbin[ctx->lpProp.MVbin.cValues].lpb = talloc_memdup(mem_ctx,
-                                                                                              ctx->bin.lpb, 
-                                                                                              ctx->bin.cb);
-                       ctx->lpProp.MVbin.cValues += 1;
-                       talloc_free(ctx->bin.lpb);
-                       ctx->bin.cb = 0;
-
-                       ctx->ltype = PT_MV_BINARY;
-               }
-               | LOWER STRING GREATER
-               {
-                       int     ret;
-
-                       ret = ocpf_binary_add(ctx, $2, &ctx->lpProp.bin);
-                       ctx->ltype = (ret == OCPF_SUCCESS) ? PT_BINARY : PT_ERROR;
-               }
-               ;
-
-mvlong_contents: | mvlong_contents mvlong_content
-
-mvlong_content :  INTEGER COMMA
-               {
-                       if (!ctx->lpProp.MVl.cValues) {
-                               ctx->lpProp.MVl.cValues = 0;
-                               ctx->lpProp.MVl.lpl = talloc_array(ctx, uint32_t, 2);
-                       } else {
-                               ctx->lpProp.MVl.lpl = talloc_realloc(NULL, ctx->lpProp.MVl.lpl, uint32_t,
-                                                                    ctx->lpProp.MVl.cValues + 2);
-                       }
-                       ctx->lpProp.MVl.lpl[ctx->lpProp.MVl.cValues] = $1;
-                       ctx->lpProp.MVl.cValues += 1;
-               }
-               ;
-
-
-mvstring_contents: | mvstring_contents mvstring_content
-
-
-mvstring_content  : STRING COMMA
-                 {
-                       TALLOC_CTX      *mem_ctx;
-
-                       if (!ctx->lpProp.MVszA.cValues) {
-                               ctx->lpProp.MVszA.cValues = 0;
-                               ctx->lpProp.MVszA.lppszA = talloc_array(ctx, const char *, 2);
-                       } else {
-                               ctx->lpProp.MVszA.lppszA = talloc_realloc(NULL, ctx->lpProp.MVszA.lppszA, 
-                                                                         const char *,
-                                                                         ctx->lpProp.MVszA.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVszA.lppszA;
-                       ctx->lpProp.MVszA.lppszA[ctx->lpProp.MVszA.cValues] = talloc_strdup(mem_ctx, $1);
-                       ctx->lpProp.MVszA.cValues += 1;
-                 }
-                 ;
-
-mvunicode_contents: | mvunicode_contents mvunicode_content
-
-mvunicode_content: UNICODE COMMA
-               {
-                       TALLOC_CTX *mem_ctx;
-
-                       if (!ctx->lpProp.MVszW.cValues) {
-                               ctx->lpProp.MVszW.cValues = 0;
-                               ctx->lpProp.MVszW.lppszW = talloc_array(ctx, const char *, 2);
-                       } else {
-                               ctx->lpProp.MVszW.lppszW = talloc_realloc(NULL, ctx->lpProp.MVszW.lppszW,
-                                                                         const char *,
-                                                                         ctx->lpProp.MVszW.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVszW.lppszW;
-                       ctx->lpProp.MVszW.lppszW[ctx->lpProp.MVszW.cValues] = talloc_strdup(mem_ctx, $1);
-                       ctx->lpProp.MVszW.cValues += 1;
-               }
-               ;
-
-binary_contents: | binary_contents binary_content
-
-binary_content : UINT8
-               {
-                       if ($1 > 0xFF) {
-                               ocpf_error_message(ctx,"Invalid Binary constant: 0x%x > 0xFF\n", $1);
-                       }
-
-                       if (!ctx->bin.cb) {
-                               ctx->bin.cb = 0;
-                               ctx->bin.lpb = talloc_array(ctx, uint8_t, 2);
-                       } else {
-                               ctx->bin.lpb = talloc_realloc(NULL, ctx->bin.lpb, uint8_t,
-                                                                    ctx->bin.cb + 2);
-                       }
-                       ctx->bin.lpb[ctx->bin.cb] = $1;
-                       ctx->bin.cb += 1;
-               }
-               ;
-
-mvbin_contents: | mvbin_contents mvbin_content
-
-mvbin_content  : OBRACE binary_contents EBRACE COMMA
-               {
-                       TALLOC_CTX      *mem_ctx;
-
-                       if (!ctx->lpProp.MVbin.cValues) {
-                               ctx->lpProp.MVbin.cValues = 0;
-                               ctx->lpProp.MVbin.lpbin = talloc_array(ctx, struct Binary_r, 2);
-                       } else {
-                               ctx->lpProp.MVbin.lpbin = talloc_realloc(NULL, ctx->lpProp.MVbin.lpbin,
-                                                                        struct Binary_r,
-                                                                        ctx->lpProp.MVbin.cValues + 2);
-                       }
-                       mem_ctx = (TALLOC_CTX *) ctx->lpProp.MVbin.lpbin;
-                       ctx->lpProp.MVbin.lpbin[ctx->lpProp.MVbin.cValues].cb = ctx->bin.cb;
-                       ctx->lpProp.MVbin.lpbin[ctx->lpProp.MVbin.cValues].lpb = talloc_memdup(mem_ctx,
-                                                                                              ctx->bin.lpb,
-                                                                                              ctx->bin.cb);
-                       ctx->lpProp.MVbin.cValues += 1;
-
-                       ctx->bin.cb = 0;
-               }
-               ;
-
-NProperty      :
-               kw_NPROPERTY OBRACE npcontent EBRACE SEMICOLON
-               {
-               }
-
-npcontent      : | npcontent ncontent
-               {
-                       memset(&ctx->lpProp, 0, sizeof (union SPropValue_CTR));
-               }
-               ;
-
-ncontent       : kind EQUAL propvalue
-               {
-                       ocpf_nproperty_add(ctx, &ctx->nprop, ctx->lpProp, NULL, ctx->ltype, true);
-               }
-               | known_kind EQUAL propvalue
-               {
-                       ocpf_nproperty_add(ctx, &ctx->nprop, ctx->lpProp, NULL, ctx->ltype, true);
-               }
-               | kind EQUAL VAR
-               {
-                       ocpf_nproperty_add(ctx, &ctx->nprop, ctx->lpProp, $3, ctx->ltype, true);
-               }
-               | known_kind EQUAL VAR
-               {
-                       ocpf_nproperty_add(ctx, &ctx->nprop, ctx->lpProp, $3, ctx->ltype, true);
-               }
-               ;
-
-kind           : kw_OOM COLON IDENTIFIER COLON IDENTIFIER
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.OOM = talloc_strdup(ctx, $3);
-                       ctx->nprop.guid = $5;
-               }
-               | kw_MNID_ID COLON INTEGER COLON proptype COLON IDENTIFIER
-               {
-                       ctx->nprop.registered = false;
-                       ctx->nprop.mnid_id = $3;
-                       ctx->nprop.guid = $7;
-               }
-               | kw_MNID_STRING COLON STRING COLON proptype COLON IDENTIFIER
-               {
-                       ctx->nprop.registered = false;
-                       ctx->nprop.mnid_string = talloc_strdup(ctx, $3);
-                       ctx->nprop.guid = $7;
-               }
-               ;
-
-proptype       : kw_PT_STRING8 
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_STRING8; 
-               }
-               | kw_PT_UNICODE
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_UNICODE; 
-               }
-               | kw_PT_SHORT
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_SHORT;
-               }
-               | kw_PT_LONG 
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_LONG; 
-               }
-               | kw_PT_DOUBLE
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_DOUBLE;
-               }
-               | kw_PT_I8
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_I8;
-               }
-               | kw_PT_BOOLEAN
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_BOOLEAN;
-               }
-               | kw_PT_SYSTIME
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_SYSTIME; 
-               }
-               | kw_PT_MV_LONG
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_MV_LONG;
-               }
-               | kw_PT_MV_STRING8
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_MV_STRING8;
-               }
-               | kw_PT_MV_UNICODE
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_MV_UNICODE;
-               }
-               | kw_PT_BINARY
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_BINARY;
-               }
-               | kw_PT_MV_BINARY
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.propType = PT_MV_BINARY;
-               }
-               ;
-
-known_kind     : kw_MNID_ID COLON INTEGER COLON IDENTIFIER
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.registered = true;
-                       ctx->nprop.mnid_id = $3;
-                       ctx->nprop.guid = $5;
-               }
-               | kw_MNID_STRING COLON STRING COLON IDENTIFIER
-               {
-                       memset(&ctx->nprop, 0, sizeof (struct ocpf_nprop));
-                       ctx->nprop.registered = true;
-                       ctx->nprop.mnid_string = talloc_strdup(ctx, $3);
-                       ctx->nprop.guid = $5;
-               }
-               ;
-
-Recipient      : 
-               kw_RECIPIENT recipClass recipients STRING
-               {
-                       char    *recipient = NULL;
-
-                       recipient = talloc_strdup(ctx, $4);
-                       ocpf_recipient_add(ctx, ctx->recip_type, recipient);
-                       talloc_free(recipient);
-
-                       ctx->recip_type = 0;
-               }
-               ;
-
-recipClass     : kw_TO
-               {
-                       ctx->recip_type = MAPI_TO;
-               }
-               | kw_CC
-               {
-                       ctx->recip_type = MAPI_CC;
-               }
-               | kw_BCC
-               {
-                       ctx->recip_type = MAPI_BCC;
-               }
-               ;
-
-recipients     : | recipients recipient
-
-recipient      : STRING SEMICOLON
-               {
-                       char    *recipient = NULL;
-
-                       recipient = talloc_strdup(ctx, $1);
-                       ocpf_recipient_add(ctx, ctx->recip_type, recipient);
-                       talloc_free(recipient);
-               }
-
-%%
-
-void yyerror(struct ocpf_context *ctx, void *scanner, char *s)
-{
-       printf("%s: %d\n", s, ctx->lineno);
-       fflush(0);
-}
diff --git a/branches/plugfest/libocpf/ocpf_api.c b/branches/plugfest/libocpf/ocpf_api.c
deleted file mode 100644 (file)
index d591157..0000000
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-
-/**
-   \file ocpf_api.c
-
-   \brief ocpf Private API
- */
-
-
-void ocpf_do_debug(struct ocpf_context *ctx, const char *format, ...)
-{
-       va_list ap;
-       char    *s = NULL;
-       int     ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               printf("%s:%d: [Debug dump failure]\n", ctx->filename, ctx->lineno);
-               fflush(0);
-               return;
-       }
-       if (ctx) {
-               printf("%s:%d: %s\n", ctx->filename, ctx->lineno, s);
-               fflush(0);
-       } else {
-               printf("%s\n", s);
-               fflush(0);
-       }
-       free(s);
-}
-
-
-int ocpf_propvalue_var(struct ocpf_context *ctx,
-                      const char *propname, 
-                      uint32_t proptag, 
-                      const char *variable, 
-                      bool unescape)
-{
-       struct ocpf_var         *vel;
-       struct ocpf_property    *element;
-       uint32_t                aulPropTag;
-
-       if (!ocpf || !ocpf->mem_ctx) return -1;
-       if (!propname && !proptag) return -1;
-       if (propname && proptag) return -1;
-
-       /* Sanity check: do not insert the same property twice */
-       if (proptag) {
-               aulPropTag = proptag;
-       } else {
-               aulPropTag = get_proptag_value(propname);
-       }
-
-       for (element = ctx->props; element->next; element = element->next) {
-               OCPF_RETVAL_IF(element->aulPropTag == aulPropTag, ctx, OCPF_WARN_PROP_REGISTERED, NULL);
-       }
-
-       for (vel = ctx->vars; vel->next; vel = vel->next) {
-               if (vel->name && !strcmp(vel->name, variable)) {
-                       OCPF_RETVAL_IF(vel->propType != (aulPropTag & 0xFFFF), ctx, OCPF_WARN_PROPVALUE_MISMATCH, NULL);
-                       element = NULL;
-                       element = talloc_zero(ctx->vars, struct ocpf_property);
-                       element->aulPropTag = aulPropTag;
-                       if (unescape && (((aulPropTag & 0xFFFF) == PT_STRING8) || 
-                                        ((aulPropTag & 0xFFFF) == PT_UNICODE))) {
-                               element->value = ocpf_write_unescape_string(ctx, vel->value);
-                       } else {
-                               element->value = vel->value;
-                       }
-                       DLIST_ADD(ctx->props, element);
-                       return OCPF_SUCCESS;
-               }
-       }
-
-       OCPF_RETVAL_IF(1, ctx, OCPF_WARN_VAR_NOT_REGISTERED, NULL);
-}
-
-
-int ocpf_set_propvalue(TALLOC_CTX *mem_ctx, 
-                      struct ocpf_context *ctx,
-                      const void **value, 
-                      uint16_t proptype, 
-                      uint16_t sproptype, 
-                      union SPropValue_CTR lpProp, 
-                      bool unescape)
-{
-       char    *str = NULL;
-
-       OCPF_RETVAL_IF(proptype != sproptype, ctx, OCPF_WARN_PROPVALUE_MISMATCH, NULL);
-
-       switch (proptype) {
-       case PT_STRING8:
-               if (unescape) {
-                       str = ocpf_write_unescape_string(ctx, lpProp.lpszA);
-               } else {
-                       str = talloc_strdup(ctx, lpProp.lpszA);
-               }
-               *value = talloc_memdup(ctx, str, strlen(str) + 1);
-               talloc_free(str);
-               return OCPF_SUCCESS;
-       case PT_UNICODE:
-               if (unescape) {
-                       str = ocpf_write_unescape_string(ctx, lpProp.lpszW);
-               } else {
-                       str = talloc_strdup(ctx, lpProp.lpszW);
-               }
-               *value = talloc_memdup(ctx, str, strlen(str) + 1);
-               talloc_free(str);
-               return OCPF_SUCCESS;
-       case PT_SHORT:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.i, sizeof (uint16_t));
-               return OCPF_SUCCESS;
-       case PT_LONG:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.l, sizeof (uint32_t));
-               return OCPF_SUCCESS;
-       case PT_DOUBLE:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.dbl, sizeof (uint64_t));
-               return OCPF_SUCCESS;
-       case PT_BOOLEAN:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.b, sizeof (uint8_t));
-               return OCPF_SUCCESS;
-       case PT_ERROR:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.err, sizeof (uint32_t));
-               return OCPF_SUCCESS;
-       case PT_I8:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.d, sizeof (uint64_t));
-               return OCPF_SUCCESS;
-       case PT_SYSTIME:
-               *value = talloc_memdup(ctx, (const void *)&lpProp.ft, sizeof (struct FILETIME));
-               return OCPF_SUCCESS;
-       case PT_BINARY:
-               *value = (const void *)talloc_zero(ctx, struct Binary_r);
-               ((struct Binary_r *)*value)->cb = lpProp.bin.cb;
-               ((struct Binary_r *)*value)->lpb = talloc_memdup(ctx, (const void *)lpProp.bin.lpb, lpProp.bin.cb);
-               return OCPF_SUCCESS;
-       case PT_MV_LONG:
-               *value = (const void *)talloc_zero(ctx, struct LongArray_r);
-               ((struct LongArray_r *)*value)->cValues = lpProp.MVl.cValues;
-               ((struct LongArray_r *)*value)->lpl = talloc_array(ctx, uint32_t, lpProp.MVl.cValues);
-               {
-                       uint32_t        i;
-                       
-                       for (i = 0; i < lpProp.MVl.cValues; i++) {
-                               ((struct LongArray_r *)*value)->lpl[i] = lpProp.MVl.lpl[i];
-                       }
-                       return OCPF_SUCCESS;
-               }
-       case PT_MV_STRING8:
-               *value = (const void *)talloc_zero(ctx, struct StringArray_r);
-               ((struct StringArray_r *)*value)->cValues = lpProp.MVszA.cValues;
-               ((struct StringArray_r *)*value)->lppszA = talloc_array(ctx, const char *, lpProp.MVszA.cValues);
-               {
-                       uint32_t        i;
-
-                       for (i = 0; i < lpProp.MVszA.cValues; i++) {
-                               if (unescape) {
-                                       str = ocpf_write_unescape_string(ctx, lpProp.MVszA.lppszA[i]);
-                               } else {
-                                       str = (char *)lpProp.MVszA.lppszA[i];
-                               }
-                               ((struct StringArray_r *)*value)->lppszA[i] = talloc_strdup(ctx, str);
-                               talloc_free(str);
-                       }
-               }
-               return OCPF_SUCCESS;
-       case PT_MV_UNICODE:
-               *value = (const void *)talloc_zero(ctx, struct WStringArray_r);
-               ((struct WStringArray_r *)*value)->cValues = lpProp.MVszW.cValues;
-               ((struct WStringArray_r *)*value)->lppszW = talloc_array(ctx, const char *, lpProp.MVszW.cValues);
-               {
-                       uint32_t        i;
-
-                       for (i = 0; i < lpProp.MVszW.cValues; i++) {
-                               if (unescape) {
-                                       str = ocpf_write_unescape_string(ctx, lpProp.MVszW.lppszW[i]);
-                               } else {
-                                       str = (char *)lpProp.MVszW.lppszW[i];
-                               }
-                               ((struct WStringArray_r *)*value)->lppszW[i] = talloc_strdup(ctx, str);
-                               talloc_free(str);
-                       }
-               }
-               return OCPF_SUCCESS;
-       case PT_MV_BINARY:
-               *value = (const void *)talloc_zero(ctx, struct BinaryArray_r);
-               ((struct BinaryArray_r *)*value)->cValues = lpProp.MVbin.cValues;
-               ((struct BinaryArray_r *)*value)->lpbin = talloc_array(ctx, struct Binary_r, lpProp.MVbin.cValues);
-               {
-                       uint32_t        i;
-
-                       for (i = 0; i < lpProp.MVbin.cValues; i++) {
-                               ((struct BinaryArray_r *)*value)->lpbin[i].cb = lpProp.MVbin.lpbin[i].cb;
-                               ((struct BinaryArray_r *)*value)->lpbin[i].lpb = talloc_memdup(((struct BinaryArray_r *)*value)->lpbin,
-                                                                                              lpProp.MVbin.lpbin[i].lpb, lpProp.MVbin.lpbin[i].cb);
-                       }
-               }
-               return OCPF_SUCCESS;
-       default:
-               ocpf_do_debug(ctx, "%s (0x%.4x)", OCPF_WARN_PROP_TYPE, proptype);
-               return OCPF_ERROR;
-       }
-}
-
-int ocpf_propvalue_free(union SPropValue_CTR lpProp, uint16_t proptype)
-{
-       switch (proptype) {
-       case PT_STRING8:
-               talloc_free((char *)lpProp.lpszA);
-               break;
-       case PT_UNICODE:
-               talloc_free((char *)lpProp.lpszW);
-               break;
-       case PT_MV_LONG:
-               talloc_free(lpProp.MVl.lpl);
-               break;
-       case PT_MV_STRING8:
-               talloc_free(lpProp.MVszA.lppszA);
-               break;
-       case PT_MV_UNICODE:
-               talloc_free(lpProp.MVszW.lppszW);
-               break;
-       case PT_MV_BINARY:
-               talloc_free(lpProp.MVbin.lpbin);
-               break;
-       }
-       return OCPF_SUCCESS;
-}
-
-int ocpf_propvalue(struct ocpf_context *ctx,
-                  uint32_t aulPropTag, 
-                  union SPropValue_CTR lpProp, 
-                  uint16_t proptype, 
-                  bool unescape)
-{
-       struct ocpf_property    *element;
-       int                     ret;
-
-       if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
-
-       /* Sanity check: do not insert the same property twice */
-       for (element = ctx->props; element->next; element = element->next) {
-               OCPF_RETVAL_IF(element->aulPropTag == aulPropTag, ctx, OCPF_WARN_PROP_REGISTERED, NULL);
-       }
-
-       element = NULL;
-       element = talloc_zero(ctx->props, struct ocpf_property);
-       element->aulPropTag = aulPropTag;
-       ret = ocpf_set_propvalue((TALLOC_CTX *)element, ctx, &element->value, 
-                                (uint16_t)aulPropTag & 0xFFFF, proptype, lpProp, unescape);
-       if (ret == -1) {
-               talloc_free(element);
-               return OCPF_ERROR;
-       }
-
-       DLIST_ADD(ctx->props, element);
-       return OCPF_SUCCESS;
-}
-
-
-void ocpf_propvalue_s(struct ocpf_context *ctx,
-                     const char *propname, 
-                     union SPropValue_CTR lpProp, 
-                     uint16_t proptype, 
-                     bool unescape)
-{
-       uint32_t        aulPropTag;
-
-       aulPropTag = get_proptag_value(propname);
-       ocpf_propvalue(ctx, aulPropTag, lpProp, proptype, unescape);
-}
-
-
-/**
-   \details Add a named property
-
-   This function adds either a custom or a known named property and
-   supplies either the lpProp value or substitute with registered
-   variable.
-
-   \param nprop pointer on a ocpf named property entry
-   \param lpProp named property value
-   \param var_name variable name
-   \param proptype variable property type
-   \param unescape whether the property value should be escaped
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR.
- */
-int ocpf_nproperty_add(struct ocpf_context *ctx,
-                      struct ocpf_nprop *nprop, 
-                      union SPropValue_CTR lpProp,
-                      const char *var_name, 
-                      uint16_t proptype, 
-                      bool unescape)
-{
-       enum MAPISTATUS         retval;
-       int                     ret = 0;
-       struct ocpf_nproperty   *element;
-       struct ocpf_nproperty   *el;
-       struct ocpf_var         *vel;
-
-       if (!ocpf || !ocpf->mem_ctx) return -1;
-
-       element = talloc_zero(ctx, struct ocpf_nproperty);
-
-       if (nprop->guid) {
-               ret = ocpf_oleguid_check(ctx, nprop->guid, &element->oleguid);
-               OCPF_RETVAL_IF(ret == -1, ctx, OCPF_WARN_OLEGUID_UNREGISTERED, element);
-       }
-
-       if (nprop->OOM) {
-               /*
-                * Sanity check: do not insert twice the same
-                * (OOM,oleguid) couple
-                */
-               for (el = ctx->nprops; el->next; el = el->next) {
-                       OCPF_RETVAL_IF((el->OOM && !strcmp(el->OOM, nprop->OOM)) &&
-                                      (el->oleguid && nprop->guid && !strcmp(el->oleguid, nprop->guid)),
-                                      ctx, OCPF_WARN_OOM_REGISTERED, element);
-               }
-
-               element->kind = OCPF_OOM;
-               element->OOM = nprop->OOM;
-               retval = mapi_nameid_OOM_lookup(element->OOM, element->oleguid,
-                                               &element->propType);
-               OCPF_RETVAL_IF(retval != MAPI_E_SUCCESS, ctx, OCPF_WARN_OOM_UNKNOWN, element);
-       } else if (nprop->mnid_string) {
-               /* 
-                * Sanity check: do not insert twice the same
-                * (mnid_string,oleguid) couple 
-                */
-               for (el = ctx->nprops; el->next; el = el->next) {
-                       OCPF_RETVAL_IF((el->mnid_string && !strcmp(el->mnid_string, nprop->mnid_string)) &&
-                                      (el->oleguid && nprop->guid && !strcmp(el->oleguid, nprop->guid)),
-                                      ctx, OCPF_WARN_STRING_REGISTERED, element);
-               }
-
-               element->kind = OCPF_MNID_STRING;
-               element->mnid_string = nprop->mnid_string;
-               if (nprop->registered == true) {
-                       retval = mapi_nameid_string_lookup(element->mnid_string, 
-                                                          element->oleguid,
-                                                          &element->propType);
-                       OCPF_RETVAL_IF(retval != MAPI_E_SUCCESS, ctx, OCPF_WARN_STRING_UNKNOWN, element);
-               } else {
-                       element->propType = nprop->propType;
-               }
-       } else if (nprop->mnid_id) {
-               /* 
-                * Sanity check: do not insert twice the same
-                * (mnid_id-oleguid) couple 
-                */
-               for (el = ctx->nprops; el->next; el = el->next) {
-                       OCPF_RETVAL_IF((el->mnid_id == nprop->mnid_id) && 
-                                      (el->oleguid && nprop->guid && !strcmp(el->oleguid, nprop->guid)),
-                                      ctx, OCPF_WARN_LID_REGISTERED, element);
-               }
-               element->kind = OCPF_MNID_ID;
-               element->mnid_id = nprop->mnid_id;
-               if (nprop->registered == true) {
-                       retval = mapi_nameid_lid_lookup(element->mnid_id,
-                                                       element->oleguid,
-                                                       &element->propType);
-                       OCPF_RETVAL_IF(retval != MAPI_E_SUCCESS, ctx, OCPF_WARN_LID_UNKNOWN, element);
-               } else {
-                       element->propType = nprop->propType;
-               }
-       }
-
-       if (var_name) {
-               for (vel = ctx->vars; vel->next; vel = vel->next) {
-                       if (vel->name && !strcmp(vel->name, var_name)) {
-                               OCPF_RETVAL_IF(element->propType != vel->propType, ctx, OCPF_WARN_PROPVALUE_MISMATCH, element);
-                               element->value = vel->value;
-                       }
-               }
-               OCPF_RETVAL_IF(!element->value, ctx, OCPF_WARN_VAR_NOT_REGISTERED, element);
-       } else {
-               ret = ocpf_set_propvalue((TALLOC_CTX *)element, ctx, &element->value, 
-                                        element->propType, proptype, lpProp, unescape);
-               if (ret == -1) {
-                       talloc_free(element);
-                       return OCPF_ERROR;
-               }
-       }
-
-       DLIST_ADD(ctx->nprops, element);
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Register OCPF message type
-   
-   Register OCPF message type
-
-   \param type message type to register
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-int ocpf_type_add(struct ocpf_context *ctx, const char *type)
-{
-       if (!ocpf || !ocpf->mem_ctx || !type) return OCPF_ERROR;
-
-       if (ctx->type) {
-               talloc_free((void *)ctx->type);
-               ctx->type = NULL;
-       }
-       ctx->type = talloc_strdup(ctx, type);
-
-       return OCPF_SUCCESS;
-}
-
-
-/* WARNING: This array doesn't hold all possible values */
-static struct ocpf_olfolder olfolders[] = {
-       { olFolderTopInformationStore,  "olFolderTopInformationStore"   },
-       { olFolderDeletedItems,         "olFolderDeletedItems"          },
-       { olFolderOutbox,               "olFolderOutbox"                },
-       { olFolderSentMail,             "olFolderSentMail"              },
-       { olFolderInbox,                "olFolderInbox"                 },
-       { olFolderCommonView,           "olFolderCommonView"            },
-       { olFolderCalendar,             "olFolderCalendar"              },
-       { olFolderContacts,             "olFolderContacts"              },
-       { olFolderJournal,              "olFolderJournal"               },
-       { olFolderNotes,                "olFolderNotes"                 },
-       { olFolderTasks,                "olFolderTasks"                 },
-       { 0, NULL }
-};
-
-static int ocpf_folder_name_to_id(const char *name, uint64_t *id)
-{
-       uint32_t        i;
-
-       if (!name) return OCPF_ERROR;
-
-       for (i = 0; olfolders[i].name; i++) {
-               if (olfolders[i].name && !strcmp(olfolders[i].name, name)) {
-                       *id =  olfolders[i].id;
-                       return OCPF_SUCCESS;
-               }
-       }
-       /* not found */
-       return OCPF_ERROR;
-}
-
-/**
-   \details Register OCPF folder
-
-   Register the folder where the OCPF message needs to be saved
-
-   \param name the name of the default folder if specified
-   \param id the folder id of the message if specified
-   \param var_name the substitution variable to use for folder ID if
-   specified
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-int ocpf_folder_add(struct ocpf_context *ctx, 
-                   const char *name, 
-                   uint64_t id, 
-                   const char *var_name)
-{
-       struct ocpf_var         *element;
-
-       /* Sanity check */
-       if ((name && id) || (name && var_name) || (id && var_name)) return OCPF_ERROR;
-       if (!name && !id && !var_name) return OCPF_ERROR;
-
-       if (name) {
-               int res = ocpf_folder_name_to_id(name, &(ctx->folder));
-               OCPF_RETVAL_IF(res == OCPF_ERROR, ctx, OCPF_WARN_FOLDER_ID_UNKNOWN, NULL);
-       } else if (id) {
-               ctx->folder = id;
-       } else if (var_name) {
-               for (element = ctx->vars; element->next; element = element->next) {
-                       if (element->name && !strcmp(element->name, var_name)) {
-                               /* WARNING: we assume var data is double */
-                               ctx->folder = *((uint64_t *)element->value);
-                       }
-               }
-       }
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Register new OLEGUID in ocpf context
-
-   This function registers a OLEGUID couple name, value in ocpf.
-
-   \param name the OLEGUID name
-   \param oleguid the guid string value
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-int ocpf_oleguid_add(struct ocpf_context *ctx,
-                    const char *name, 
-                    const char *oleguid)
-{
-       NTSTATUS                status;
-       struct ocpf_oleguid     *element;
-       struct GUID             guid;
-
-       /* Sanity checks */
-       if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
-       if (!name) return OCPF_ERROR;
-
-       /* Sanity check: Do not insert twice the same name or guid */
-       for (element = ctx->oleguid; element->next; element = element->next) {
-               OCPF_RETVAL_IF(element->name && !strcmp(element->name, name),
-                              ctx, OCPF_WARN_OLEGUID_N_REGISTERED, NULL);
-
-               OCPF_RETVAL_IF(element->guid && !strcmp(element->guid, oleguid),
-                              ctx, OCPF_WARN_OLEGUID_G_REGISTERED, NULL);
-       }
-
-       element = talloc_zero(ctx->oleguid, struct ocpf_oleguid);
-
-       status = GUID_from_string(oleguid, &guid);
-       OCPF_RETVAL_IF(!NT_STATUS_IS_OK(status), ctx, OCPF_WARN_OLEGUID_INVALID, element);
-
-       element->name = talloc_strdup(element, name);
-       element->guid = talloc_strdup(element, oleguid);
-
-       DLIST_ADD(ctx->oleguid, element);
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Check if the given OLEGUID has been registered
-
-   \param name the OLEGUID to check
-   \param guid pointer on pointer to the guid result
-
-   \result OCPF_SUCCESS on success, otherwise OCPF_ERROR;
- */
-int ocpf_oleguid_check(struct ocpf_context *ctx,
-                      const char *name, 
-                      const char **guid)
-{
-       struct ocpf_oleguid     *element;
-
-       for (element = ctx->oleguid; element->next; element = element->next) {  
-               if (element->name && !strcmp(element->name, name)) {
-                       *guid = element->guid;
-                       return OCPF_SUCCESS;
-               }
-       }
-
-       return OCPF_ERROR;
-}
-
-
-/**
-   \details convert a string to FILETIME structure
-
-   This function converts a string - representing a date under the
-   following format "Tyyy-mm-dd hh:mm:ss" - into a FILETIME structure.
-
-   \param date the date to convert
-   \param ft pointer on the converted date
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-int ocpf_add_filetime(const char *date, struct FILETIME *ft)
-{
-       NTTIME          nt;
-       struct tm       tm;
-
-       memset(&tm, 0, sizeof(struct tm));
-       if (!strptime(date, DATE_FORMAT, &tm)) {
-               printf("Invalid data format: Tyyy-mm-dd hh:mm:ss (e.g.: T2008-03-06 23:30:00");
-               return OCPF_ERROR;
-       }
-       
-       unix_to_nt_time(&nt, mktime(&tm));
-       ft->dwLowDateTime = (nt << 32) >> 32;
-       ft->dwHighDateTime = (nt >> 32);
-
-       return OCPF_SUCCESS;
-}
-
-
-int ocpf_variable_add(struct ocpf_context *ctx,
-                     const char *name, 
-                     union SPropValue_CTR lpProp, 
-                     uint16_t propType, 
-                     bool unescape)
-{
-       struct ocpf_var         *element;
-       int                     ret;
-
-       if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
-       if (!name) return OCPF_ERROR;
-
-       /* Sanity check: Do not insert twice the same variable */
-       for (element = ctx->vars; element->next; element = element->next) {
-               OCPF_RETVAL_IF(element->name && !strcmp(element->name, name),
-                              ctx, OCPF_WARN_VAR_REGISTERED, NULL);
-       }
-
-       element = talloc_zero(ctx->vars, struct ocpf_var);
-       element->name = talloc_strdup((TALLOC_CTX *)element, name);
-       element->propType = propType;
-
-       ret = ocpf_set_propvalue((TALLOC_CTX *)element, ctx, &element->value, propType, 
-                                propType, lpProp, unescape);
-       OCPF_RETVAL_IF(ret == -1, ctx, OCPF_WARN_VAR_TYPE, element);
-
-       DLIST_ADD(ctx->vars, element);
-
-       return OCPF_SUCCESS;
-}
-
-
-int ocpf_binary_add(struct ocpf_context *ctx, const char *filename, struct Binary_r *bin)
-{
-       int             fd;
-       struct stat     sb;
-
-       fd = open(filename, O_RDONLY);
-       OCPF_RETVAL_IF(fd == -1, ctx, OCPF_WARN_FILENAME_INVALID, NULL);
-       OCPF_RETVAL_IF(fstat(fd, &sb), ctx, OCPF_WARN_FILENAME_STAT, NULL);
-       
-       bin->lpb = talloc_size(ctx, sb.st_size);
-       bin->cb = read(fd, bin->lpb, sb.st_size);
-
-       close(fd);
-
-       return OCPF_SUCCESS;
-}
-
-int ocpf_recipient_add(struct ocpf_context *ctx, uint8_t recipClass, char *recipient)
-{
-       struct ocpf_recipients  *element;
-
-       if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
-       if (!recipient) return OCPF_ERROR;
-
-       element = talloc_zero(ctx->recipients, struct ocpf_recipients);
-       element->name = talloc_strdup((TALLOC_CTX *)element, recipient);
-       element->class = recipClass;
-
-       DLIST_ADD(ctx->recipients, element);
-
-       return OCPF_SUCCESS;
-}
diff --git a/branches/plugfest/libocpf/ocpf_api.h b/branches/plugfest/libocpf/ocpf_api.h
deleted file mode 100644 (file)
index 6a4d05b..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __OCPF_API_H_
-#define        __OCPF_API_H_
-
-#include "libmapi/libmapi.h"
-
-struct ocpf_var
-{
-       struct ocpf_var         *prev;
-       struct ocpf_var         *next;
-       const char              *name;
-       const void              *value;
-       uint16_t                propType;
-};
-
-struct ocpf_oleguid
-{
-       struct ocpf_oleguid     *prev;
-       struct ocpf_oleguid     *next;
-       const char              *name;
-       const char              *guid;
-};
-
-struct ocpf_property
-{
-       struct ocpf_property    *prev;
-       struct ocpf_property    *next;
-       uint32_t                aulPropTag;
-       const void              *value;
-};
-
-struct ocpf_nprop
-{
-       const char      *OOM;
-       const char      *mnid_string;
-       uint16_t        mnid_id;
-       uint16_t        propType;
-       const char      *guid;
-       bool            registered;
-};
-
-enum ocpf_ntype {
-       OCPF_OOM = 0x1,
-       OCPF_MNID_ID,
-       OCPF_MNID_STRING
-};
-
-struct ocpf_nproperty
-{
-       struct ocpf_nproperty   *prev;
-       struct ocpf_nproperty   *next;
-       enum ocpf_ntype         kind;
-       const char              *OOM;
-       const char              *mnid_string;
-       uint16_t                mnid_id;
-       uint16_t                propType;
-       const char              *oleguid;
-       const void              *value;
-};
-
-struct ocpf_recipients
-{
-       struct ocpf_recipients  *prev;
-       struct ocpf_recipients  *next;
-       char                    *name;
-       enum ocpf_recipClass    class;
-};
-
-struct ocpf_olfolder
-{
-       int                     id;
-       const char              *name;
-};
-
-struct ocpf_context
-{
-       /* lexer internal data */
-       int                     typeset;
-       bool                    folderset;
-       uint8_t                 recip_type;
-       uint16_t                ltype;
-       union SPropValue_CTR    lpProp;
-       struct Binary_r         bin;
-       struct ocpf_nprop       nprop;
-       unsigned int            lineno;
-       int                     result;
-       /* ocpf */
-       const char              *type;
-       struct ocpf_var         *vars;
-       struct ocpf_oleguid     *oleguid;
-       struct ocpf_property    *props;
-       struct ocpf_nproperty   *nprops;
-       struct ocpf_recipients  *recipients;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       uint64_t                folder;
-       /* context */
-       FILE                    *fp;
-       const char              *filename;
-       uint32_t                ref_count;
-       uint32_t                context_id;
-       uint8_t                 flags;
-       struct ocpf_context     *prev;
-       struct ocpf_context     *next;
-};
-
-struct ocpf_freeid
-{
-       uint32_t                context_id;
-       struct ocpf_freeid      *prev;
-       struct ocpf_freeid      *next;
-};
-
-struct ocpf
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ocpf_context     *context;
-       struct ocpf_freeid      *free_id;
-       uint32_t                last_id;
-};
-
-
-#include "libocpf/ocpf_private.h"
-
-/**
- * Defines
- */
-#define        OCPF_WARN(c,x) (ocpf_do_debug(c, x))                            
-
-#define        OCPF_RETVAL_IF(x, c, msg, mem_ctx)                      \
-do {                                                           \
-       if (x) {                                                \
-               ocpf_do_debug(c, "%s", msg);                    \
-               if (mem_ctx) {                                  \
-                       talloc_free(mem_ctx);                   \
-               }                                               \
-               return OCPF_ERROR;                              \
-       }                                                       \
-} while (0);
-
-#define        OCPF_RETVAL_TYPE(x, c, msg, t, mem_ctx)                 \
-do {                                                           \
-       if (x) {                                                \
-               ocpf_do_debug(c, "%s", msg);                    \
-               if (mem_ctx) {                                  \
-                       talloc_free(mem_ctx);                   \
-               }                                               \
-               return t;                                       \
-       }                                                       \
-} while (0);
-
-#define        OCPF_INITIALIZED                "OCPF context has already been initialized"
-#define        OCPF_NOT_INITIALIZED            "OCPF context has not been initialized"
-#define        OCPF_INVALID_CONTEXT            "Invalid OCPF context"
-
-#define        OCPF_WRITE_NOT_INITIALIZED      "OCPF write context has not been initialized"
-
-#define        OCPF_FATAL_ERROR                "Fatal error encountered"
-#define        OCPF_WARN_FILENAME_INVALID      "Invalid filename"
-#define        OCPF_WARN_FILENAME_EXIST        "filename already exists"
-#define        OCPF_WARN_FILENAME_STAT         "Unable to stat file"
-
-#define        OCPF_WARN_PROP_REGISTERED       "Property already registered"
-#define        OCPF_WARN_PROP_TYPE             "Property type not supported"
-#define        OCPF_WARN_PROP_UNKNOWN          "Property Unknown"
-
-#define        OCPF_WARN_OOM_UNKNOWN           "Unknown OOM"
-#define        OCPF_WARN_OOM_REGISTERED        "OOM already registered"
-
-#define        OCPF_WARN_LID_UNKNOWN           "Unknown MNID_ID"
-#define        OCPF_WARN_LID_REGISTERED        "MNID_ID already registered"
-
-#define        OCPF_WARN_STRING_UNKNOWN        "Unknown MNID_STRING"
-#define        OCPF_WARN_STRING_REGISTERED     "MNID_STRING already registered"
-
-
-#define        OCPF_WARN_OLEGUID_N_REGISTERED  "OLEGUID name already registered"
-#define        OCPF_WARN_OLEGUID_G_REGISTERED  "OLEGUID GUID already registered"
-#define        OCPF_WARN_OLEGUID_UNREGISTERED  "OLEGUID unregistered"
-#define        OCPF_WARN_OLEGUID_INVALID       "OLEGUID invalid"
-
-#define        OCPF_WARN_VAR_REGISTERED        "Variable already registered"
-#define        OCPF_WARN_VAR_NOT_REGISTERED    "Unknown variable"
-#define        OCPF_WARN_VAR_TYPE              "Variable property type not supported"
-
-#define        OCPF_WARN_FOLDER_ID_UNKNOWN     "Unknown Folder"
-
-#define        OCPF_WARN_PROPVALUE_MISMATCH    "Property type and value mismatch"
-
-#define        OCPF_INVALID_PROPARRAY          "Invalid property array"
-#define        OCPF_INVALID_FILEHANDLE         "Invalid file handle"
-
-
-#define        OCPF_PROPERTY_BEGIN             "PROPERTY {\n"
-#define        OCPF_NPROPERTY_BEGIN            "NPROPERTY {\n"
-#define        OCPF_END                        "};\n"
-#define        OCPF_NEWLINE                    "\n"
-#define        OCPF_RECIPIENT_TO               "RECIPIENT TO "
-#define        OCPF_RECIPIENT_CC               "RECIPIENT CC "
-#define        OCPF_RECIPIENT_BCC              "RECIPIENT BCC "
-
-#define        DATE_FORMAT     "%Y-%m-%d %H:%M:%S"
-
-#endif /* __OCPF_API_H_ */
diff --git a/branches/plugfest/libocpf/ocpf_bison.supp b/branches/plugfest/libocpf/ocpf_bison.supp
deleted file mode 100644 (file)
index 3468e69..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-   ocpf_bison1
-   Memcheck:Addr1
-   fun:__GI_strlen
-   fun:talloc_strdup
-   ...
-   fun:ocpf_yyparse
-   fun:ocpf_parse
-}
-{
-   ocpf_bison2
-   Memcheck:Addr1
-   fun:memcpy
-   fun:__talloc_strlendup
-   ...
-   fun:ocpf_yyparse
-   fun:ocpf_parse
-}
diff --git a/branches/plugfest/libocpf/ocpf_context.c b/branches/plugfest/libocpf/ocpf_context.c
deleted file mode 100644 (file)
index 721bc17..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-   \file ocpf_context.c
-
-   \brief OCPF context API
- */
-
-#include <sys/stat.h>
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-
-#include <sys/stat.h>
-
-/**
-   \details Initialize a new OCPF context
-
-   \param mem_ctx pointer to the memory context
-   \param filename the OCPF filename used for this context
-   \param flags Flags controlling how the OCPF should be opened
-   \param context_id the identifier representing the context
-   \param context_id the context identifier to use for this context
-
-   \return new allocated OCPF context on success, otherwise NULL
- */
-struct ocpf_context *ocpf_context_init(TALLOC_CTX *mem_ctx, 
-                                      const char *filename,
-                                      uint8_t flags,
-                                      uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct stat             sb;
-
-       OCPF_RETVAL_TYPE(!mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL, NULL);
-       OCPF_RETVAL_TYPE(!context_id, NULL, OCPF_INVALID_CONTEXT, NULL, NULL);
-       OCPF_RETVAL_TYPE(!filename, NULL, OCPF_WARN_FILENAME_INVALID, NULL, NULL);
-
-       switch (flags) {
-       case OCPF_FLAGS_RDWR:
-       case OCPF_FLAGS_READ:
-       case OCPF_FLAGS_WRITE:
-               OCPF_RETVAL_TYPE((stat(filename, &sb) == -1), NULL, OCPF_WARN_FILENAME_INVALID, NULL, NULL)
-               break;
-       case OCPF_FLAGS_CREATE:
-               OCPF_RETVAL_TYPE(!(stat(filename, &sb)), NULL, OCPF_WARN_FILENAME_EXIST, NULL, NULL);
-               break;
-               
-       }
-
-       /* Initialize the context */
-       ctx = talloc_zero(mem_ctx, struct ocpf_context);
-
-       /* Initialize ocpf context parameters */
-       ctx->vars = talloc_zero(ctx, struct ocpf_var);
-       ctx->oleguid = talloc_zero(ctx, struct ocpf_oleguid);
-       ctx->props = talloc_zero(ctx, struct ocpf_property);
-       ctx->nprops = talloc_zero(ctx, struct ocpf_nproperty);
-       ctx->recipients = talloc_zero(ctx, struct ocpf_recipients);
-       ctx->lpProps = NULL;
-       ctx->cValues = 0;
-       ctx->folder = 0;
-
-       /* Initialize ocpf internal context parameters */
-       ctx->flags = flags;
-       ctx->filename = talloc_strdup(ctx, filename);
-       ctx->ref_count = 0;
-       ctx->context_id = context_id;
-
-       /* Initialize lexer parameters */
-       ctx->lineno = 1;
-       ctx->typeset = 0;
-       ctx->folderset = false;
-       ctx->recip_type = 0;
-       ctx->type = 0;
-
-       switch (flags) {
-       case OCPF_FLAGS_RDWR:
-               ctx->fp = fopen(filename, "r+");
-               break;
-       case OCPF_FLAGS_READ:
-               ctx->fp = fopen(filename, "r");
-               break;
-       case OCPF_FLAGS_WRITE:
-               ctx->fp = fopen(filename, "w");
-               break;
-       case OCPF_FLAGS_CREATE:
-         /* defer fopen to ocpf_write_commit */
-         ctx->fp = NULL;
-               break;
-       }
-
-       OCPF_RETVAL_TYPE(!ctx->fp && flags != OCPF_FLAGS_CREATE, NULL, OCPF_WARN_FILENAME_INVALID, NULL, ctx);
-
-       return ctx;
-}
-
-/**
-   \details Add an OCPF context to the list
-
-   \param ocpf_ctx pointer to the global ocpf context
-   \param filename pointer to the 
-   \param context_id pointer to the context_id the function returns
-   \param flags Flags controlling how the OCPF should be opened
-   \param existing boolean returned by the function to specify if the
-   context was already existing or not
-
-   \return valid ocpf context pointer on success, otherwise NULL
- */
-struct ocpf_context *ocpf_context_add(struct ocpf *ocpf_ctx, 
-                                     const char *filename,
-                                     uint32_t *context_id,
-                                     uint8_t flags,
-                                     bool *existing)
-{
-       struct ocpf_context     *el;
-       struct ocpf_freeid      *elf;
-       bool                    found = false;
-
-       /* Sanity checks */
-       if (!ocpf_ctx) return NULL;
-       if (!filename) return NULL;
-       if (!context_id) return NULL;
-
-       /* Search for an existing context */
-       for (el = ocpf_ctx->context; el; el = el->next)  {
-               if (el->filename && !strcmp(el->filename, filename)) {
-                       *context_id = el->context_id;
-                       el->ref_count += 1;
-                       *existing = true;
-                       return el;
-               }
-       }
-
-       /* Search for an available free context_id, otherwise generate one */
-       for (elf = ocpf_ctx->free_id; elf; elf = elf->next) {
-               if (elf && elf->context_id) {
-                       found = true;
-                       break;
-               }
-       }
-
-       if (found == true) {
-               *context_id = elf->context_id;
-               DLIST_REMOVE(ocpf_ctx->free_id, elf);
-               talloc_free(elf);
-       } else {
-               *context_id = ocpf_ctx->last_id;
-               ocpf_ctx->last_id += 1;
-       }
-
-       /* Initialize the new context */
-       *existing = false;
-       el = ocpf_context_init(ocpf_ctx->mem_ctx, filename, flags, *context_id);
-       /* handle the case where file couldn't be opened */
-
-       return el;
-}
-
-
-/**
-   \details Delete an OCPF context
-
-   \param ocpf_ctx pointer to the global ocpf context
-   \param ctx pointer to the OCPF context to delete
-
-   \return 0 on success, 1 if there were still a ref_count, otherwise
-   -1 on errors.
- */
-int ocpf_context_delete(struct ocpf *ocpf_ctx, 
-                       struct ocpf_context *ctx)
-{
-       struct ocpf_freeid      *el;
-       uint32_t                context_id;
-
-       /* Sanity checks */
-       if (!ocpf_ctx) return -1;
-       if (!ctx) return -1;
-
-       /* If we still have a reference counter, do nothing */
-       if (ctx->ref_count) {
-               ctx->ref_count -= 1;
-               return 1;
-       }
-
-       /* Close the file */
-       if (ctx->fp) {
-               fclose(ctx->fp);
-       }
-
-       /* Remove the context from the list and free it */
-       context_id = ctx->context_id;
-       DLIST_REMOVE(ocpf_ctx->context, ctx);
-       talloc_free(ctx);
-
-       /* Add the context identifier to the free list */
-       el = talloc_zero(ocpf_ctx->mem_ctx, struct ocpf_freeid);
-       el->context_id = context_id;
-       DLIST_ADD_END(ocpf_ctx->free_id, el, struct ocpf_freeid *);
-
-       return 0;
-}
-
-
-/**
-   \details Search a context given its filename
-
-   \param ctx pointer to the ocpf context list
-   \param filename the filename to use for search
-
-   \return pointer to valid ocpf context on success, otherwise NULL
- */
-struct ocpf_context *ocpf_context_search_by_filename(struct ocpf_context *ctx,
-                                                    const char *filename)
-{
-       struct ocpf_context     *el;
-
-       /* Sanity checks */
-       if (!ctx) return NULL;
-       if (!filename) return NULL;
-
-       for (el = ctx; el; el = el->next) {
-               if (el->filename && !strcmp(el->filename, filename)) {
-                       return el;
-               }
-       }
-
-       return NULL;
-}
-
-
-/**
-   \details Search a context given its context identifier
-
-   \param ctx pointer to the ocpf context list
-   \param context_id the context identifier to use for search
-
-   \return pointer to valid ocpf context on success, otherwise NULL
- */
-struct ocpf_context *ocpf_context_search_by_context_id(struct ocpf_context *ctx,
-                                                      uint32_t context_id)
-{
-       struct ocpf_context     *el;
-
-       /* Sanity checks */
-       if (!ctx) return NULL;
-       if (!context_id) return NULL;
-
-       for (el = ctx; el; el = el->next) {
-               if (el->context_id == context_id) {
-                       return el;
-               }
-       }
-
-       return NULL;
-}
diff --git a/branches/plugfest/libocpf/ocpf_dump.c b/branches/plugfest/libocpf/ocpf_dump.c
deleted file mode 100644 (file)
index 99b9f9e..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-#include "libocpf/ocpf_dump.h"
-
-/**
-   \file ocpf_dump.c
-
-   \brief ocpf Dump API
- */
-
-static void ocpf_do_dump(const char *format, ...)
-{
-       va_list ap;
-       char    *s = NULL;
-       int     ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               printf("[Dump failure]\n");
-       } else {
-               printf("%s\n", s);
-       }
-       free(s);
-}
-
-
-/**
-   \details Dump OCPF Type
-
-   Dump OCPF Registered Type
-*/
-_PUBLIC_ void ocpf_dump_type(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "TYPE", OCPF_DUMP_TOPLEVEL);
-       indent++;
-       
-       INDENT();
-       OCPF_DUMP(("* %s", ctx->type ? ctx->type : "Undefined"));
-       indent--;
-}
-
-
-/**
-   \details Dump OCPF Destination Folder
-
-   Dump OCPF Registered Destination Folder
- */
-_PUBLIC_ void ocpf_dump_folder(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "FOLDER", OCPF_DUMP_TOPLEVEL);
-       indent++;
-
-       INDENT();
-       OCPF_DUMP(("* 0x%llx", ctx->folder ? ctx->folder : 0xFFFFFFFF));
-       indent--;
-}
-
-
-/**
-   \details Dump OCPF Recipients
-
-   Dump OCPF Recipients
- */
-_PUBLIC_ void ocpf_dump_recipients(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct ocpf_recipients  *element;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "RECIPIENTS", OCPF_DUMP_TOPLEVEL);
-       indent++;
-
-       INDENT();
-       printf("* To: ");
-       for (element = ctx->recipients; element->next; element = element->next) {
-               if (element->class == OCPF_MAPI_TO) {
-                       printf("%s;", element->name);
-               }
-       }
-       printf("\n");
-
-       INDENT();
-       printf("* Cc: ");
-       for (element = ctx->recipients; element->next; element = element->next) {
-               if (element->class == OCPF_MAPI_CC) {
-                       printf("%s;", element->name);
-               }
-       }
-       printf("\n");
-
-       INDENT();
-       printf("* Bcc: ");
-       for (element = ctx->recipients; element->next; element = element->next) {
-               if (element->class == OCPF_MAPI_BCC) {
-                       printf("%s;", element->name);
-               }
-       }
-       printf("\n");
-}
-
-
-/**
-   \details Dump OCPF OLEGUID
-
-   Dump OCPF Registered OLEGUID
-*/
-_PUBLIC_ void ocpf_dump_oleguid(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct ocpf_oleguid     *element;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "OLEGUID", OCPF_DUMP_TOPLEVEL);
-       indent++;
-       for (element = ctx->oleguid; element->next; element = element->next) {
-               INDENT();
-               printf("%-25s: %s\n", element->name, element->guid);
-       }
-       indent--;
-}
-
-
-_PUBLIC_ void ocpf_dump_variable(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct ocpf_var         *element;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "VARIABLE", OCPF_DUMP_TOPLEVEL);
-       indent++;
-       for (element = ctx->vars; element->next; element = element->next) {
-               INDENT();
-               printf("%s\n", element->name);
-       }
-       indent--;
-}
-
-_PUBLIC_ void ocpf_dump_property(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct ocpf_property    *element;
-       const char              *proptag;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "PROPERTIES", OCPF_DUMP_TOPLEVEL);
-       indent++;
-       for (element = ctx->props; element->next; element = element->next) {
-               INDENT();
-               proptag = (const char *)get_proptag_name(element->aulPropTag);
-               printf("0x%.8x = %s\n", element->aulPropTag,
-                      (char *)(proptag ? proptag : "UNKNOWN"));
-       
-       }
-       indent--;
-}
-
-
-_PUBLIC_ void ocpf_dump_named_property(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-       struct ocpf_nproperty   *element;
-
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return;
-
-       OCPF_DUMP_TITLE(indent, "NAMED PROPERTIES", OCPF_DUMP_TOPLEVEL);
-       indent++;
-
-       OCPF_DUMP_TITLE(indent, "OOM", OCPF_DUMP_SUBLEVEL);
-       indent++;
-       for (element = ctx->nprops; element->next; element = element->next) {
-               if (element->kind == OCPF_OOM) {
-                       INDENT();
-                       printf("* %s\n", element->OOM);
-               }
-       }
-       indent--;
-
-       OCPF_DUMP_TITLE(indent, "MNID_ID", OCPF_DUMP_SUBLEVEL);
-       indent++;
-       for (element = ctx->nprops; element->next; element = element->next) {
-               if (element->kind == OCPF_MNID_ID) {
-                       INDENT();
-                       printf("* 0x%.4x\n", element->mnid_id);
-               }
-       }
-       indent--;
-
-       OCPF_DUMP_TITLE(indent, "MNID_STRING", OCPF_DUMP_SUBLEVEL);
-       indent++;
-       for (element = ctx->nprops; element->next; element = element->next) {
-               if (element->kind == OCPF_MNID_STRING) {
-                       INDENT();
-                       printf("* %s\n", element->mnid_string);
-               }
-       }
-       indent--;
-
-       indent--;
-}
-
-
-_PUBLIC_ void ocpf_dump(uint32_t context_id)
-{
-       indent = 0;
-       ocpf_dump_type(context_id);
-       ocpf_dump_folder(context_id);
-       ocpf_dump_oleguid(context_id);
-       ocpf_dump_recipients(context_id);
-       ocpf_dump_variable(context_id);
-       ocpf_dump_property(context_id);
-       ocpf_dump_named_property(context_id);
-}
diff --git a/branches/plugfest/libocpf/ocpf_dump.h b/branches/plugfest/libocpf/ocpf_dump.h
deleted file mode 100644 (file)
index 51737e7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __OCPF_DUMP_H_
-#define        __OCPF_DUMP_H_
-
-#define        INDENT()                        \
-do {                                   \
-       uint32_t        i;              \
-                                       \
-       for (i = 0; i < indent; i++) {  \
-               printf("\t");           \
-       }                               \
-} while (0);
-
-
-#define        OCPF_DUMP(x) (ocpf_do_dump x)
-
-#define        OCPF_DUMP_TITLE(indent, txt, type)              \
-do {                                                   \
-       size_t  odt_i;                                  \
-       size_t  txt_len;                                \
-                                                       \
-       printf("\n");                                   \
-       INDENT();                                       \
-       printf("%s:\n", txt);                           \
-                                                       \
-       INDENT();                                       \
-       txt_len = strlen(txt) + 1;                      \
-       for (odt_i = 0; odt_i < txt_len; odt_i++) {     \
-               printf("%c", type ? '-' : '=');         \
-       }                                               \
-       printf("\n");                                   \
-} while (0);
-
-
-#define        OCPF_DUMP_TOPLEVEL      0
-#define        OCPF_DUMP_SUBLEVEL      1
-
-
-unsigned int indent;
-
-
-
-#endif /* ! __OCPF_DUMP_H_ */
diff --git a/branches/plugfest/libocpf/ocpf_private.h b/branches/plugfest/libocpf/ocpf_private.h
deleted file mode 100644 (file)
index d15abe1..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2009.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __OCPF_PRIVATE_H_
-#define        __OCPF_PRIVATE_H_
-
-#include "config.h"
-#include <stdlib.h>
-
-#ifndef HAVE_COMPARISON_FN_T
-#define HAVE_COMPARISON_FN_T
-typedef int (*comparison_fn_t)(const void *, const void *);
-#else
-# ifndef comparison_fn_t
-typedef __compar_fn_t comparison_fn_t;
-# endif
-#endif
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-/* The following private definitions from from libocpf/ocpf_api.c */
-void ocpf_do_debug(struct ocpf_context *, const char *, ...);
-int ocpf_propvalue_var(struct ocpf_context *, const char *, uint32_t, const char *, bool);
-int ocpf_set_propvalue(TALLOC_CTX *, struct ocpf_context *, const void **, uint16_t, uint16_t, union SPropValue_CTR, bool);
-int ocpf_propvalue_free(union SPropValue_CTR, uint16_t);
-int ocpf_propvalue(struct ocpf_context *, uint32_t, union SPropValue_CTR, uint16_t, bool);
-void ocpf_propvalue_s(struct ocpf_context *, const char *, union SPropValue_CTR, uint16_t, bool);
-int ocpf_nproperty_add(struct ocpf_context *, struct ocpf_nprop *, union SPropValue_CTR, const char *, uint16_t, bool);
-int ocpf_type_add(struct ocpf_context *, const char *);
-int ocpf_folder_add(struct ocpf_context *, const char *, uint64_t, const char *);
-int ocpf_oleguid_add(struct ocpf_context *, const char *, const char *);
-int ocpf_oleguid_check(struct ocpf_context *, const char *, const char **);
-int ocpf_add_filetime(const char *, struct FILETIME *);
-int ocpf_variable_add(struct ocpf_context *, const char *, union SPropValue_CTR, uint16_t, bool);
-int ocpf_binary_add(struct ocpf_context *, const char *, struct Binary_r *);
-int ocpf_recipient_add(struct ocpf_context *, uint8_t, char *);
-
-/* The following private definitions come from libocpf/ocpf_write.c */
-char *ocpf_write_unescape_string(TALLOC_CTX *, const char *);
-
-/* The following private definitions come from libocpf/ocpf_context.c */
-struct ocpf_context *ocpf_context_init(TALLOC_CTX *, const char *, uint8_t, uint32_t);
-struct ocpf_context *ocpf_context_add(struct ocpf *, const char *, uint32_t *, uint8_t, bool *);
-int ocpf_context_delete(struct ocpf *, struct ocpf_context *);
-struct ocpf_context *ocpf_context_search_by_filename(struct ocpf_context *, const char *);
-struct ocpf_context *ocpf_context_search_by_context_id(struct ocpf_context *, uint32_t);
-
-__END_DECLS
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2)
-
-#endif /* ! __OCPF_PRIVATE_H_ */
diff --git a/branches/plugfest/libocpf/ocpf_public.c b/branches/plugfest/libocpf/ocpf_public.c
deleted file mode 100644 (file)
index 2030be9..0000000
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-   \file ocpf_public.c
-
-   \brief public OCPF API
- */
-
-#include <sys/stat.h>
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-
-int ocpf_yylex_init(void *);
-int ocpf_yylex_init_extra(struct ocpf_context *, void *);
-void ocpf_yyset_in(FILE *, void *);
-int ocpf_yylex_destroy(void *);
-int ocpf_yyparse(struct ocpf_context *, void *);
-
-struct ocpf    *ocpf;
-int            error_flag;
-
-
-/**
-   \details Initialize OCPF context
-
-   Initialize ocpf context and allocate memory for internal structures
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa ocpf_release, ocpf_parse
- */
-_PUBLIC_ int ocpf_init(void)
-{
-       TALLOC_CTX      *mem_ctx;
-       
-       OCPF_RETVAL_IF(ocpf, NULL, OCPF_INITIALIZED, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "ocpf");
-       ocpf = talloc_zero(mem_ctx, struct ocpf);
-       ocpf->mem_ctx = mem_ctx;
-
-       ocpf->context = talloc_zero(mem_ctx, struct ocpf_context);
-       ocpf->free_id = talloc_zero(mem_ctx, struct ocpf_freeid);
-       ocpf->last_id = 1;
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Uninitialize OCPF context
-
-   Uninitialize the global OCPF context and release memory.
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa ocpf_init
- */
-_PUBLIC_ int ocpf_release(void)
-{
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);      
-
-       talloc_free(ocpf->mem_ctx);
-       ocpf = NULL;
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Create a new OCPF context
-
-   \param filename the filename to process
-   \param context_id pointer to the context identifier the function
-   \param flags Flags controlling how the OCPF should be opened
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-_PUBLIC_ int ocpf_new_context(const char *filename, uint32_t *context_id, uint8_t flags)
-{
-       struct ocpf_context     *ctx;
-       bool                    existing = false;
-
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);
-
-       ctx = ocpf_context_add(ocpf, filename, context_id, flags, &existing);
-       if (!ctx) {
-               return OCPF_ERROR;
-       }
-
-       if (existing == false) {
-               DLIST_ADD_END(ocpf->context, ctx, struct ocpf_context *);
-               return OCPF_SUCCESS;
-       } 
-
-       return OCPF_E_EXIST;
-}
-
-
-/**
-   \details Delete an OCPF context
-
-   \param context_id context identifier referencing the context to
-   delete
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
- */
-_PUBLIC_ int ocpf_del_context(uint32_t context_id)
-{
-       int                     ret;
-       struct ocpf_context     *ctx;
-
-       /* Sanity checks */
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);
-
-       /* Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       ret = ocpf_context_delete(ocpf, ctx);
-       if (ret == -1) return OCPF_ERROR;
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Parse OCPF file
-
-   Parse and process the given ocpf file.
-
-   \param context_id the identifier of the context holding the file to
-   be parsed
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa ocpf_init
- */
-_PUBLIC_ int ocpf_parse(uint32_t context_id)
-{
-       int                     ret;
-       struct ocpf_context     *ctx;
-       void                    *scanner;
-
-       /* Sanity checks */
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);
-
-       /* Step 1. Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       ret = ocpf_yylex_init(&scanner);
-       ret = ocpf_yylex_init_extra(ctx, &scanner);
-       ocpf_yyset_in(ctx->fp, scanner);
-       ret = ocpf_yyparse(ctx, scanner);
-       ocpf_yylex_destroy(scanner);
-
-       return ret;
-}
-
-
-#define        MAX_READ_SIZE   0x1000
-
-static enum MAPISTATUS ocpf_stream(TALLOC_CTX *mem_ctx,
-                                  mapi_object_t *obj_parent,
-                                  uint32_t aulPropTag,
-                                  struct Binary_r *bin)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_stream;
-       DATA_BLOB               stream;
-       uint32_t                access_flags = 2;       /* MAPI_MODIFY by default */
-       uint32_t                size;
-       uint32_t                offset;
-       uint16_t                read_size;
-
-       mapi_object_init(&obj_stream);
-
-       /* Step1. Open the Stream */
-       retval = OpenStream(obj_parent, aulPropTag, access_flags, &obj_stream);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       /* Step2. Write the Stream */
-       size = MAX_READ_SIZE;
-       offset = 0;
-       while (offset <= bin->cb) {
-               stream.length = size;
-               stream.data = talloc_size(mem_ctx, size);
-               memcpy(stream.data, bin->lpb + offset, size);
-               
-               retval = WriteStream(&obj_stream, &stream, &read_size);
-               talloc_free(stream.data);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-
-               /* Exit when there is nothing left to write */
-               if (!read_size) return MAPI_E_SUCCESS;
-               
-               offset += read_size;
-
-               if ((offset + size) > bin->cb) {
-                       size = bin->cb - offset;
-               }
-       }
-
-       mapi_object_release(&obj_stream);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Build a SRowSet array with recipients from ocpf context
-
-   This function builds s SRowSet structure of recipient names and
-   type from the ocpf context and information stored.
-
-   \param mem_ctx pointer to the memory context to use for memory
-   allocation
-   \param context_id identifier of the context to use for building a
-   SRowSet array of recipients
-
-   \return Pointer to an allocated SRowSet structure on success,
-   otherwise NULL
- */
-_PUBLIC_ struct SRowSet *ocpf_get_recipients(TALLOC_CTX *mem_ctx,
-                                         uint32_t context_id)
-{
-       struct SRowSet          *SRowSet;
-       struct ocpf_context     *ctx;
-       struct ocpf_recipients  *recipient;
-       int                     i;
-
-       /* Sanity checks */
-       if (!ocpf) return NULL;
-
-       /* Step 1. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       if (!ctx) return NULL;
-
-       /* Step 2. Allocate SRow */
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       SRowSet->cRows = 0;
-
-       /* Count the number of recipients and allocate memory for aRow */
-       for (recipient = ctx->recipients; recipient->next; recipient = recipient->next) {
-               SRowSet->cRows += 1;
-       }
-       SRowSet->aRow = talloc_array(SRowSet, struct SRow, SRowSet->cRows + 1);
-
-       for (i = 0, recipient = ctx->recipients; recipient->next; recipient = recipient->next, i++) {
-               SRowSet->aRow[i].ulAdrEntryPad = 0;
-               SRowSet->aRow[i].cValues = 2;
-               SRowSet->aRow[i].lpProps = talloc_array(SRowSet->aRow, struct SPropValue, 3);
-               
-               SRowSet->aRow[i].lpProps[0].ulPropTag = PR_RECIPIENT_TYPE;
-               SRowSet->aRow[i].lpProps[0].value.l = recipient->class;
-               
-               SRowSet->aRow[i].lpProps[1].ulPropTag = PR_DISPLAY_NAME;
-               SRowSet->aRow[i].lpProps[1].value.lpszA = talloc_strdup(SRowSet->aRow[i].lpProps, 
-                                                                       recipient->name);
-       }
-
-       return SRowSet;
-}
-
-
-/**
-   \details Build a SPropValue array from ocpf context
-
-   This function builds a SPropValue array from the ocpf context and
-   information stored.
-
-   \param mem_ctx the memory context to use for memory allocation
-   \param context_id identifier of the context to build a SPropValue
-   array for
-   \param obj_folder pointer the folder object we use for internal
-   MAPI operations
-   \param obj_message pointer to the message object we use for
-   internal MAPI operations
-
-   \return MAPI_E_SUCCESS on success, otherwise -1.
-
-   \note Developers should call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
-
-   \sa ocpf_get_SPropValue
- */
-
-_PUBLIC_ enum MAPISTATUS ocpf_set_SPropValue(TALLOC_CTX *mem_ctx,
-                                            uint32_t context_id,
-                                            mapi_object_t *obj_folder,
-                                            mapi_object_t *obj_message)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_nameid      *nameid;
-       struct SPropTagArray    *SPropTagArray;
-       struct ocpf_property    *pel;
-       struct ocpf_nproperty   *nel;
-       struct ocpf_context     *ctx;
-       uint32_t                i;
-
-       /* sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       /* Step 0. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       if (!mem_ctx) {
-               mem_ctx = (TALLOC_CTX *) ctx;
-       }
-
-       /* Step 1. Allocate SPropValue */
-       ctx->cValues = 0;
-       ctx->lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       /* Step2. build the list of named properties we want to set */
-       if (ctx->nprops && ctx->nprops->next) {
-               nameid = mapi_nameid_new(mem_ctx);
-               for (nel = ctx->nprops; nel->next; nel = nel->next) {
-                       if (nel->OOM) {
-                               mapi_nameid_OOM_add(nameid, nel->OOM, nel->oleguid);
-                       } else if (nel->mnid_id) {
-                               mapi_nameid_custom_lid_add(nameid, nel->mnid_id, nel->propType, nel->oleguid);
-                       } else if (nel->mnid_string) {
-                               mapi_nameid_custom_string_add(nameid, nel->mnid_string, nel->propType, nel->oleguid);
-                       }
-               }
-               
-               /* Step3. GetIDsFromNames and map property types */
-               SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj_folder, nameid->count, 
-                                        nameid->nameid, 0, &SPropTagArray);
-               if (retval != MAPI_E_SUCCESS) {
-                       MAPIFreeBuffer(SPropTagArray);
-                       MAPIFreeBuffer(nameid);
-                       return retval;
-               }
-               mapi_nameid_SPropTagArray(nameid, SPropTagArray);
-               MAPIFreeBuffer(nameid);
-
-
-               /* Step4. Add named properties */
-               for (nel = ctx->nprops, i = 0; SPropTagArray->aulPropTag[i] && nel->next; nel = nel->next, i++) {
-                       if (SPropTagArray->aulPropTag[i]) {
-                               if (((SPropTagArray->aulPropTag[i] & 0xFFFF) == PT_BINARY) && 
-                                   (((struct Binary_r *)nel->value)->cb > MAX_READ_SIZE)) {
-                                       retval = ocpf_stream(mem_ctx, obj_message, SPropTagArray->aulPropTag[i], 
-                                                            (struct Binary_r *)nel->value);
-                                       MAPI_RETVAL_IF(retval, retval, NULL);
-                               } else {
-                                       ctx->lpProps = add_SPropValue(mem_ctx, ctx->lpProps, &ctx->cValues,
-                                                                      SPropTagArray->aulPropTag[i], nel->value);
-                               }
-                       }
-               }
-               MAPIFreeBuffer(SPropTagArray);
-       }
-
-       /* Step5. Add Known properties */
-       if (ctx->props && ctx->props->next) {
-               for (pel = ctx->props; pel->next; pel = pel->next) {
-                       if (((pel->aulPropTag & 0xFFFF) == PT_BINARY) && 
-                           (((struct Binary_r *)pel->value)->cb > MAX_READ_SIZE)) {
-                               retval = ocpf_stream(mem_ctx, obj_message, pel->aulPropTag, 
-                                                    (struct Binary_r *)pel->value);
-                               MAPI_RETVAL_IF(retval, retval, NULL);
-                       } else {
-                               ctx->lpProps = add_SPropValue(mem_ctx, ctx->lpProps, &ctx->cValues, 
-                                                              pel->aulPropTag, pel->value);
-                       }
-               }
-       }
-       /* Step 6. Add message class */
-       if (ctx->type) {
-               ctx->lpProps = add_SPropValue(mem_ctx, ctx->lpProps, &ctx->cValues,
-                                              PR_MESSAGE_CLASS, (const void *)ctx->type);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the OCPF SPropValue array
-
-   This function is an accessor designed to return the SPropValue
-   structure created with ocpf_set_SPropValue.
-
-   \param context_id identifier of the context to retrieve SPropValue
-   from
-   \param cValues pointer on the number of SPropValue entries
-
-   \return NULL on error, otherwise returns an allocated lpProps pointer
-
-   \sa ocpf_set_SPropValue
- */
-_PUBLIC_ struct SPropValue *ocpf_get_SPropValue(uint32_t context_id, uint32_t *cValues)
-{
-       struct ocpf_context     *ctx;
-
-       OCPF_RETVAL_TYPE(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL, NULL);
-
-       /* Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_TYPE(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL, NULL);
-
-       OCPF_RETVAL_TYPE(!ctx->lpProps || !ctx->cValues, ctx, OCPF_INVALID_PROPARRAY, NULL, NULL);
-
-       *cValues = ctx->cValues;
-
-       return ctx->lpProps;
-}
-
-
-static enum MAPISTATUS ocpf_folder_lookup(TALLOC_CTX *mem_ctx,
-                                         uint64_t sfid,
-                                         mapi_object_t *obj_parent,
-                                         mapi_id_t folder_id,
-                                         mapi_object_t *obj_ret)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                i;
-       const uint64_t          *fid;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(obj_parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_FID);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND && SRowSet.cRows)) {
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&SRowSet.aRow[i], PR_FID);
-                       if (fid && *fid == sfid) {
-                               retval = OpenFolder(&obj_folder, *fid, obj_ret);
-                               mapi_object_release(&obj_htable);
-                               mapi_object_release(&obj_folder);
-                               return MAPI_E_SUCCESS;
-                       } else if (fid) {
-                               retval = ocpf_folder_lookup(mem_ctx, sfid, &obj_folder, *fid, obj_ret);
-                               if (retval == MAPI_E_SUCCESS) {
-                                       mapi_object_release(&obj_htable);
-                                       mapi_object_release(&obj_folder);
-                                       return MAPI_E_SUCCESS;
-                               }
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&obj_folder);
-
-       errno = MAPI_E_NOT_FOUND;
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Open OCPF folder
-
-   This function opens the folder associated with the ocpf folder
-   global context value.
-   
-   \param context_id identifier of the context to open the folder for
-   \param obj_store the store object
-   \param obj_folder the folder to open
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND.
-
-   \note Developers should call GetLastError() to retrieve the last
-   MAPI error code. Possible MAPI error codes are:
-   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
-   - MAPI_E_INVALID_PARAMETER: obj_store is undefined
-   - MAPI_E_NOT_FOUND: The specified folder could not be found or is
-     not yet supported.
-
-     \sa ocpf_init, ocpf_parse
- */
-_PUBLIC_ enum MAPISTATUS ocpf_OpenFolder(uint32_t context_id,
-                                        mapi_object_t *obj_store,
-                                        mapi_object_t *obj_folder)
-{
-       enum MAPISTATUS         retval;
-       struct ocpf_context     *ctx;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_tis;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!obj_store, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       MAPI_RETVAL_IF(!ctx, MAPI_E_INVALID_PARAMETER, NULL);
-       MAPI_RETVAL_IF(!ctx->folder, MAPI_E_NOT_FOUND, NULL);
-
-       mapi_object_init(obj_folder);
-       if (ctx->folder >= 1 && ctx->folder <= 26) {
-               retval = GetDefaultFolder(obj_store, &id_folder, ctx->folder);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-
-               retval = OpenFolder(obj_store, id_folder, obj_folder);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-
-       } else {
-               retval = GetDefaultFolder(obj_store, &id_tis, olFolderTopInformationStore);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-
-               retval = ocpf_folder_lookup((TALLOC_CTX *)ctx, ctx->folder, 
-                                           obj_store, id_tis, obj_folder);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
- * We set external recipients at the end of aRow
- */
-static bool set_external_recipients(TALLOC_CTX *mem_ctx, struct SRowSet *SRowSet, const char *username, enum ulRecipClass RecipClass)
-{
-       uint32_t                last;
-       struct SPropValue       SPropValue;
-
-       SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 2);
-       last = SRowSet->cRows;
-       SRowSet->aRow[last].cValues = 0;
-       SRowSet->aRow[last].lpProps = talloc_zero(mem_ctx, struct SPropValue);
-       
-       /* PR_OBJECT_TYPE */
-       SPropValue.ulPropTag = PR_OBJECT_TYPE;
-       SPropValue.value.l = MAPI_MAILUSER;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_DISPLAY_TYPE */
-       SPropValue.ulPropTag = PR_DISPLAY_TYPE;
-       SPropValue.value.l = 0;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_GIVEN_NAME */
-       SPropValue.ulPropTag = PR_GIVEN_NAME;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_DISPLAY_NAME */
-       SPropValue.ulPropTag = PR_DISPLAY_NAME;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_7BIT_DISPLAY_NAME */
-       SPropValue.ulPropTag = PR_7BIT_DISPLAY_NAME;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_SMTP_ADDRESS */
-       SPropValue.ulPropTag = PR_SMTP_ADDRESS;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_ADDRTYPE */
-       SPropValue.ulPropTag = PR_ADDRTYPE;
-       SPropValue.value.lpszA = "SMTP";
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       SetRecipientType(&(SRowSet->aRow[last]), RecipClass);
-
-       SRowSet->cRows += 1;
-       return true;
-}
-
-
-/**
-   \details Set the message recipients from ocpf context
-
-   This function sets the recipient (To, Cc, Bcc) from the ocpf
-   context and information stored.
-
-   \param mem_ctx the memory context to use for memory allocation
-   \param context_id identifier to the context to set recipients for
-   \param obj_message pointer to the message object we use for
-   internal MAPI operations
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR.
-
-   \sa ocpf
- */
-_PUBLIC_ enum MAPISTATUS ocpf_set_Recipients(TALLOC_CTX *mem_ctx,
-                                            uint32_t context_id,
-                                            mapi_object_t *obj_message)
-{
-       enum MAPISTATUS                 retval;
-       struct ocpf_context             *ctx;
-       struct ocpf_recipients          *element;
-       struct SPropTagArray            *SPropTagArray;
-       struct SPropValue               SPropValue;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       char                            **usernames = NULL;
-       int                             *recipClass = NULL;
-       uint32_t                        count;
-       uint32_t                        counter;
-       uint32_t                        i;
-
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       MAPI_RETVAL_IF(!ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       MAPI_RETVAL_IF(!ctx->recipients->next, MAPI_E_NOT_FOUND, NULL);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x8,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_7BIT_DISPLAY_NAME,
-                                         PR_DISPLAY_NAME,
-                                         PR_SMTP_ADDRESS,
-                                         PR_GIVEN_NAME,
-                                         PR_EMAIL_ADDRESS,
-                                         PR_ADDRTYPE);
-
-       /* Step 1. Group recipients and run ResolveNames */
-       usernames = talloc_array(mem_ctx, char *, 2);
-       recipClass = talloc_array(mem_ctx, int, 2);
-       for (element = ctx->recipients, count = 0; element->next; element = element->next, count ++) {
-               usernames = talloc_realloc(mem_ctx, usernames, char *, count + 2);
-               recipClass = talloc_realloc(mem_ctx, recipClass, int, count + 2);
-               usernames[count] = talloc_strdup((TALLOC_CTX *)usernames, element->name);
-               recipClass[count] = element->class;
-       }
-       usernames[count] = 0;
-
-       retval = ResolveNames(mapi_object_get_session(obj_message), (const char **)usernames, 
-                             SPropTagArray, &SRowSet, &flaglist, 0);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, retval, usernames);
-
-       /* Step2. Associate resolved recipients to their respective recipClass */
-       if (!SRowSet) {
-               SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       }
-
-       count = 0;
-       counter = 0;
-       for (i = 0; usernames[i]; i++) {
-               if (flaglist->aulPropTag[count] == MAPI_UNRESOLVED) {
-                       set_external_recipients(mem_ctx, SRowSet, usernames[i], recipClass[i]);
-               }
-               if (flaglist->aulPropTag[count] == MAPI_RESOLVED) {
-                       SetRecipientType(&(SRowSet->aRow[counter]), recipClass[i]);
-                       counter++;
-               }
-               count++;
-       }
-
-       /* Step3. Finish to build the ModifyRecipients SRowSet */
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       SRowSet_propcpy(mem_ctx, SRowSet, SPropValue);
-
-       /* Step4. Call ModifyRecipients */
-       retval = ModifyRecipients(obj_message, SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       MAPIFreeBuffer(usernames);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libocpf/ocpf_server.c b/branches/plugfest/libocpf/ocpf_server.c
deleted file mode 100644 (file)
index 89f796f..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-
-/**
-   \file ocpf_server.c
-
-   \brief ocpf public API for server side. Do not perform any libmapi
-   calls and trust incoming data. Most of these functions have
-   equivalent in ocpf_public.c or ocpf_api.c
- */
-
-/**
-   \details Set the message class (type) associated to an OCPF file.
-
-   \param context_id identifier of the context to set type for
-   \param type pointer to the type's string to set
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI/OCPF error
- */
-_PUBLIC_ enum MAPISTATUS ocpf_server_set_type(uint32_t context_id,
-                                             const char *type)
-{
-       struct ocpf_context     *ctx;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* Step 1. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       return ocpf_type_add(ctx, type);
-}
-
-/**
-   \details Build a SPropValue array from ocpf context
-
-   This function builds a SPropValue array from the ocpf context and
-   information stored.
-   
-   \param mem_ctx pointer to the memory context to use for memory
-   allocation
-   \param context_id identifier of the context to build a SPropValue
-   array for
-
-   \note This function is a server-side convenient function only. It
-   doesn't handle named properties and its scope is much more limited
-   than ocpf_set_SpropValue. Developers working on a client-side
-   software/library must use ocpf_set_SPropValue instead.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI/OCPF error
-
-   \sa ocpf_get_SPropValue
- */
-_PUBLIC_ enum MAPISTATUS ocpf_server_set_SPropValue(TALLOC_CTX *mem_ctx, 
-                                                   uint32_t context_id)
-{
-       struct ocpf_property    *pel;
-       struct ocpf_context     *ctx;
-
-       /* sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* Step 1. Search for the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       /* Step 2. Allocate SPropValue */
-       ctx->cValues = 0;
-       ctx->lpProps = talloc_array(ctx, struct SPropValue, 2);
-
-       /* Step 3. Add Known properties */
-       if (ctx->props && ctx->props->next) {
-               for (pel = ctx->props; pel->next; pel = pel->next) {
-                       switch (pel->aulPropTag) {
-                       case PR_MESSAGE_CLASS:
-                       case PR_MESSAGE_CLASS_UNICODE:
-                               ocpf_server_set_type(context_id, (const char *)pel->value);
-                               ctx->lpProps = add_SPropValue(ctx, ctx->lpProps, &ctx->cValues, 
-                                                             pel->aulPropTag, pel->value);
-                               break;
-                       default:
-                               ctx->lpProps = add_SPropValue(ctx, ctx->lpProps, &ctx->cValues, 
-                                                             pel->aulPropTag, pel->value);
-                       }
-               }
-       }
-       /* Step 4. Add message class */
-       if (ctx->type) {
-               ctx->lpProps = add_SPropValue(ctx, ctx->lpProps, &ctx->cValues,
-                                             PR_MESSAGE_CLASS, (const void *)ctx->type);
-       }
-       
-       return MAPI_E_SUCCESS;  
-}
-
-
-/**
-   \details Add a SPropValue structure to the context
-
-   This functions adds a SPropValue to the ocpf context. This property
-   must be part of the known property namespace. If the property
-   already exists in the list, it is automatically replaced with the
-   new one.
-
-   \param context_id identifier of the ocpf context
-   \param lpProps pointer to the SPropValue structure to add to the context
-
-   \return MAPI_E_SUCCESS on success, otheriwse MAPI/OCPF error
-
-   \sa ocpf_server_add_named_SPropValue
- */
-_PUBLIC_ enum MAPISTATUS ocpf_server_add_SPropValue(uint32_t context_id, 
-                                                   struct SPropValue *lpProps)
-{
-       int                     ret;
-       struct ocpf_context     *ctx;
-       struct ocpf_property    *pel;
-       struct ocpf_property    *element;
-       bool                    found = false;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-       MAPI_RETVAL_IF(!lpProps, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-
-       if (ctx->props && ctx->props->next) {
-               for (pel = ctx->props; pel->next; pel = pel->next) {
-                       if (pel->aulPropTag == lpProps->ulPropTag) {
-                               talloc_free((void *)pel->value);
-                               ret = ocpf_set_propvalue((TALLOC_CTX *)pel, ctx, &pel->value,
-                                                        (uint16_t)(pel->aulPropTag & 0xFFFF),
-                                                        (uint16_t)(pel->aulPropTag & 0xFFFF),
-                                                        lpProps->value, true);
-                               if (ret == -1) {
-                                       return OCPF_ERROR;
-                               }
-                               found = true;
-                               break;
-                       }
-               }
-       } 
-
-       /* Add the element if not found */
-       if (found == false) {
-               element = NULL;
-               element = talloc_zero(ctx->props, struct ocpf_property);
-               element->aulPropTag = lpProps->ulPropTag;
-               ret = ocpf_set_propvalue((TALLOC_CTX *)element, ctx, &element->value,
-                                        (uint16_t)(lpProps->ulPropTag & 0xFFFF),
-                                        (uint16_t)(lpProps->ulPropTag & 0xFFFF),
-                                        lpProps->value, true);
-               if (ret == -1) {
-                       talloc_free(element);
-                       return OCPF_ERROR;
-               }
-               DLIST_ADD(ctx->props, element);
-       }
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Synchronize data on filesystem
-
-   \param context_id identifier of the ocpf context
-
-   \return MAPI_E_SUCCESS on success, otherwise otheriwse MAPI/OCPF error
- */
-_PUBLIC_ enum MAPISTATUS ocpf_server_sync(uint32_t context_id)
-{
-       struct ocpf_context     *ctx;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!ocpf, MAPI_E_NOT_INITIALIZED, NULL);
-
-       /* Step 1. Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL); 
-
-       if (ctx->flags == OCPF_FLAGS_CREATE) {
-               ctx->flags = OCPF_FLAGS_RDWR;
-       }
-
-       if (ctx->fp) {
-               fclose(ctx->fp);
-       }
-       
-       switch (ctx->flags) {
-       case OCPF_FLAGS_RDWR:
-               ctx->fp = fopen(ctx->filename, "r+");
-               break;
-       case OCPF_FLAGS_READ:
-               ctx->fp = fopen(ctx->filename, "r");
-               break;
-       case OCPF_FLAGS_WRITE:
-               ctx->fp = fopen(ctx->filename, "w");
-               break;
-       }
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/libocpf/ocpf_write.c b/branches/plugfest/libocpf/ocpf_write.c
deleted file mode 100644 (file)
index b1bfbae..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Copyright (C) Julien Kerihuel 2008-2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-   \file ocpf_write.c
-
-   \brief public OCPF write API
- */
-
-#include <time.h>
-
-#include "libocpf/ocpf.h"
-#include "libocpf/ocpf_api.h"
-#include "libmapi/libmapi_private.h"
-#include "libmapi/mapidefs.h"
-
-struct ocpf_guid {
-       char            *name;
-       const char      *oleguid;
-};
-
-static const struct ocpf_guid ocpf_guid[] = {
-       { "PSETID_Appointment",         PSETID_Appointment },
-       { "PSETID_Task",                PSETID_Task },
-       { "PSETID_Address",             PSETID_Address },
-       { "PSETID_Common",              PSETID_Common },
-       { "PSETID_Note",                PSETID_Note },
-       { "PSETID_Log",                 PSETID_Log },
-       { "PSETID_Sharing",             PSETID_Sharing },
-       { "PSETID_PostRss",             PSETID_PostRss },
-       { "PSETID_UnifiedMessaging",    PSETID_UnifiedMessaging },
-       { "PSETID_Meeting",             PSETID_Meeting },
-       { "PSETID_Airsync",             PSETID_AirSync },
-       { "PSETID_Messaging",           PSETID_Messaging },
-       { "PSETID_Attachment",          PSETID_Attachment },
-       { "PSETID_CalendarAssistant",   PSETID_CalendarAssistant },
-       { "PS_PUBLIC_STRINGS",          PS_PUBLIC_STRINGS },
-       { "PS_INTERNET_HEADERS",        PS_INTERNET_HEADERS },
-       { "PS_MAPI",                    PS_MAPI },
-       { NULL,                  NULL                                   }
-};
-
-static char *ocpf_write_get_guid_name(struct ocpf_context *ctx, const char *oleguid)
-{
-       uint32_t                        i;
-       static int                      idx = 0;
-       static struct ocpf_oleguid      *guid = NULL;
-       struct ocpf_oleguid             *element;
-       char                            *name;
-
-       if (!oleguid) return NULL;
-
-       if (!guid) {
-               guid = talloc_zero(ctx, struct ocpf_oleguid);
-       }
-
-       for (i = 0; ocpf_guid[i].oleguid; i++) {
-               if (!strcmp(oleguid, ocpf_guid[i].oleguid)) {
-                       return ocpf_guid[i].name;
-               }
-       }
-
-       for (element = guid; element->next; element = element->next) {
-               if (!strcmp(oleguid, element->guid)) {
-                       return (char *)element->name;
-               }
-       }
-
-       element->name = talloc_asprintf(ctx, "PSETID_Custom_%d", idx);
-       element->guid = talloc_strdup(ctx, oleguid);
-       DLIST_ADD(guid, element);
-       name = talloc_strdup(ctx, element->name);
-       idx++;
-
-       return name;
-}
-
-struct ocpf_proptype {
-       uint16_t        type;
-       const char      *name;
-};
-
-static const struct ocpf_proptype ocpf_proptype[] = {
-       { 0x2,          "PT_SHORT"      },
-       { 0x3,          "PT_LONG"       },
-       { 0x4,          "PT_FLOAT"      },
-       { 0x5,          "PT_DOUBLE"     },
-       { 0x6,          "PT_CURRENCY"   },
-       { 0x7,          "PT_APPTIME"    },
-       { 0xa,          "PT_ERROR"      },
-       { 0xb,          "PT_BOOLEAN"    },
-       { 0xd,          "PT_OBJECT"     },
-       { 0x14,         "PT_I8"         },
-       { 0x1e,         "PT_STRING8"    },
-       { 0x1f,         "PT_UNICODE"    },
-       { 0x40,         "PT_SYSTIME"    },
-       { 0x48,         "PT_CLSID"      },
-       { 0x102,        "PT_BINARY"     },
-       { 0x1002,       "PT_MV_SHORT"   },
-       { 0x1003,       "PT_MV_LONG"    },
-       { 0x101e,       "PT_MV_STRING8" },
-       { 0x101f,       "PT_MV_UNICODE" },
-       { 0,            NULL}
-};
-
-static const char *ocpf_write_get_proptype_name(uint16_t type)
-{
-       uint32_t        i;
-
-       for (i = 0; ocpf_proptype[i].name; i++) {
-               if (type == ocpf_proptype[i].type) {
-                       return ocpf_proptype[i].name;
-               }
-       }
-       return NULL;
-}
-
-static void ocpf_write_propname(struct ocpf_context *ctx, FILE *fp, uint32_t ulPropTag)
-{
-       const char      *propname;
-       char            *line;
-       ssize_t         len;
-
-       propname = get_proptag_name(ulPropTag);
-       if (propname) {
-               line = talloc_asprintf(ctx, "\t%s = ", propname);
-       } else {
-               line = talloc_asprintf(ctx, "\t0x%x = ", ulPropTag);
-       }
-       len = fwrite(line, strlen(line), 1, fp);
-       talloc_free(line);
-}
-
-static char *ocpf_write_systime(struct ocpf_context *ctx, const struct FILETIME *ft)
-{
-       char            *line;
-       char            tempTime[60];
-       NTTIME          nt;
-       time_t          t;
-       struct tm       *tm;
-
-       nt = ft->dwHighDateTime;
-       nt = (nt << 32) | ft->dwLowDateTime;
-       t = nt_time_to_unix(nt);
-       tm = localtime(&t);
-
-       strftime(tempTime, sizeof(tempTime)-1, "T%Y-%m-%d %H:%M:%S\n", tm);
-       line = talloc_strdup(ctx, tempTime);
-
-       return line;
-}
-
-static char *ocpf_write_binary(struct ocpf_context *ctx, const struct Binary_r *bin)
-{
-       uint32_t        i;
-       char            *line;
-       
-       line = talloc_asprintf(ctx, "{");
-       for (i = 0; i < bin->cb; i++) {
-               line = talloc_asprintf_append(line, " 0x%.2x", bin->lpb[i]);
-       }
-       line = talloc_asprintf_append(line, " }\n");
-
-       return line;
-}
-
-static char *ocpf_write_mv_binary(struct ocpf_context *ctx, const struct BinaryArray_r *value)
-{
-       uint32_t        i;
-       uint32_t        j;
-       char            *line;
-
-       line = talloc_asprintf(ctx, "{");
-       for (i = 0; i < value->cValues; i++) {
-               line = talloc_asprintf_append(line, " {");
-               for (j = 0; j < value->lpbin[i].cb; j++) {
-                       line = talloc_asprintf_append(line, " 0x%.2x", value->lpbin[i].lpb[j]);
-               }
-               if (i != value->cValues - 1) {
-                       line = talloc_asprintf_append(line, " },");
-               } else {
-                       line = talloc_asprintf_append(line, " }");
-               }
-       }
-       line = talloc_asprintf_append(line, " }\n");
-
-       return line;
-}
-
-static char *ocpf_write_mv_long(struct ocpf_context *ctx, const struct LongArray_r *value)
-{
-       char            *str = NULL;
-       uint32_t        i;
-
-       str = talloc_asprintf(ctx, "{ ");
-       for (i = 0; i < value->cValues; i++) {
-               if (i != value->cValues - 1) {
-                       str = talloc_asprintf_append_buffer(str, "%d, ", value->lpl[i]);
-               } else {
-                       str = talloc_asprintf_append_buffer(str, "%d }", value->lpl[i]);
-               }
-       }
-
-       return str;
-}
-
-static char *ocpf_write_escape_string(struct ocpf_context *ctx, const char *value)
-{
-       char    *str = NULL;
-       char    *stmp = NULL;
-       int     value_len;
-       int     len = 0;
-       int     tmp = 0;
-
-       value_len = strlen(value);
-       tmp = strcspn(value, "\\\"");
-
-       if (tmp == value_len) {
-               str = talloc_strdup(ctx, value);
-               return str;
-       } else {
-               str = talloc_strndup(ctx, value, tmp);
-               str = talloc_asprintf_append_buffer(str, "\\%c", value[tmp]);
-       }
-       len += tmp + 1;
-
-       while (len < value_len) {
-               tmp = strcspn(value + len, "\\\"");
-               
-               if ((tmp + len) == value_len) {
-                       str = talloc_asprintf_append_buffer(str, "%s", value + len);
-                       break;
-               } else {
-                       stmp = talloc_strndup(ctx, value + len, tmp);
-                       str = talloc_asprintf_append_buffer(str, "%s\\%c", stmp, value[len + tmp]);
-                       talloc_free(stmp);
-                       len += tmp + 1;
-               }
-       }
-
-       return str;
-}
-
-char *ocpf_write_unescape_string(TALLOC_CTX *mem_ctx, const char *value)
-{
-       char    *str = NULL;
-       char    *stmp = NULL;
-       int     value_len;
-       int     len = 0;
-       int     tmp = 0;
-
-       value_len = strlen(value);
-       tmp = strcspn(value, "\\");
-
-       if (tmp == value_len) {
-               str = talloc_strdup(mem_ctx, value);
-               return str;
-       }
-       
-       str = talloc_strndup(mem_ctx, value, tmp + 1);
-       if (value[tmp + 1] && value[tmp + 1] == '\\') {
-               len += tmp + 2;
-       } else {
-               len += tmp + 1;
-       }
-
-       while (len < value_len) {
-               tmp = strcspn(value + len, "\\");
-               
-               if ((tmp + len) == value_len) {
-                       str = talloc_asprintf_append(str, "%s", value + len);
-                       break;
-               }
-                       
-               stmp = talloc_strndup(mem_ctx, value + len, tmp + 1);
-               str = talloc_asprintf_append(str, "%s", stmp);
-               if (value[len + tmp + 1] && 
-                   (value[len + tmp + 1] == '\\' || value[len + tmp + 1] == '"')) {
-                       len += tmp + 2;
-               } else {
-                       len += tmp + 1;
-               }
-               talloc_free(stmp);
-       }
-
-       return str;
-}
-
-static char *ocpf_write_mv_string8(struct ocpf_context *ctx, const struct StringArray_r *value)
-{
-       char            *str = NULL;
-       char            *tmp = NULL;
-       uint32_t        i;
-
-       str = talloc_asprintf(ctx, "{ ");
-       for (i = 0; i < value->cValues; i++) {
-               tmp = ocpf_write_escape_string(ctx, (const char *)value->lppszA[i]);
-               if (i != value->cValues - 1) {
-                       str = talloc_asprintf_append_buffer(str, "\"%s\", ", tmp);
-               } else {
-                       str = talloc_asprintf_append_buffer(str, "\"%s\" }", tmp);
-               }
-               talloc_free(tmp);
-       }
-
-       return str;
-}
-
-
-static char *ocpf_write_mv_unicode(struct ocpf_context *ctx, const struct WStringArray_r *value)
-{
-       char            *str = NULL;
-       char            *tmp = NULL;
-       uint32_t        i;
-
-       str = talloc_asprintf(ctx, "{ ");
-       for (i = 0; i < value->cValues; i++) {
-               tmp = ocpf_write_escape_string(ctx, (const char *)value->lppszW[i]);
-               if (i != value->cValues - 1) {
-                       str = talloc_asprintf_append_buffer(str, "\"%s\", ", tmp);
-               } else {
-                       str = talloc_asprintf_append_buffer(str, "\"%s\" }", tmp);
-               }
-               talloc_free(tmp);
-       }
-
-       return str;     
-}
-
-static char *ocpf_write_property(struct ocpf_context *ctx, bool *found, uint32_t ulPropTag, const void *value)
-{
-       char    *line = NULL;
-       char    *str = NULL;
-
-       switch (ulPropTag & 0xFFFF) {
-       case PT_STRING8:
-               str = ocpf_write_escape_string(ctx, (const char *)value);
-               line = talloc_asprintf(ctx, "\"%s\"\n", str);
-               talloc_free(str);
-               *found = true;
-               break;
-       case PT_UNICODE:
-               str = ocpf_write_escape_string(ctx, (const char *)value);
-               line = talloc_asprintf(ctx, "W\"%s\"\n", str);
-               talloc_free(str);
-               *found = true;
-               break;
-       case PT_SHORT:
-               line = talloc_asprintf(ctx, "S%d\n", *((const uint16_t *)value));
-               *found = true;
-               break;
-       case PT_LONG:
-               line = talloc_asprintf(ctx, "%d\n", *((const uint32_t *)value));                        
-               *found = true;
-               break;
-       case PT_DOUBLE:
-               line = talloc_asprintf(ctx, "F%e\n", *((const double *)value));
-               *found = true;
-               break;
-       case PT_BOOLEAN:
-               line = talloc_asprintf(ctx, "B\"%s\"\n", (*((const uint8_t *)value) == true) ? "true" : "false");
-               *found = true;
-               break;
-       case PT_I8:
-               line = talloc_asprintf(ctx, "D0x%.16"PRIx64"\n", *(const uint64_t *)value);
-               *found = true;
-               break;
-       case PT_SYSTIME:
-               line = ocpf_write_systime(ctx, (const struct FILETIME *)value);
-               *found = true;
-               break;
-       case PT_BINARY:
-               line = ocpf_write_binary(ctx, (const struct Binary_r *)value);
-               *found = true;
-               break;
-       case PT_MV_LONG:
-               line = ocpf_write_mv_long(ctx, (const struct LongArray_r *)value);
-               *found = true;
-               break;
-       case PT_MV_STRING8:
-               line = ocpf_write_mv_string8(ctx, (const struct StringArray_r *)value);
-               *found = true;
-               break;
-       case PT_MV_UNICODE:
-               line = ocpf_write_mv_unicode(ctx, (const struct WStringArray_r *)value);
-               *found = true;
-               break;
-       case PT_MV_BINARY:
-               line = ocpf_write_mv_binary(ctx, (const struct BinaryArray_r *)value);
-               *found = true;
-               break;
-       }
-
-       return line;
-}
-
-
-static char *ocpf_write_recipients(struct ocpf_context *ctx, enum ocpf_recipClass recipClass)
-{
-       struct ocpf_recipients  *element;
-       char                    *line = NULL;
-       bool                    found = false;
-
-       line = talloc_zero(ctx, char);
-       for (element = ctx->recipients, found = false; element->next; element = element->next) {
-               if (found && element->class == recipClass) {
-                       line = talloc_asprintf_append(line, ";");
-                       found = false;
-               }
-               if (element->class == recipClass) {
-                       line = talloc_asprintf_append(line, "\"%s\"", element->name);
-                       found = true;
-               }
-       }
-       return line;
-}
-
-
-static int ocpf_write_add_recipients(struct ocpf_context *ctx,
-                                    enum ocpf_recipClass recipClass, 
-                                    const char *recipients)
-{
-       char            *tmp = NULL;
-       uint32_t        i = 0;
-
-       if (!recipients) return OCPF_ERROR;
-
-       if ((tmp = strtok((char *)recipients, ";")) == NULL) {
-               return OCPF_ERROR;
-       }
-
-       ocpf_recipient_add(ctx, recipClass, tmp);
-
-       for (i = 1; (tmp = strtok(NULL, ";")) != NULL; i++) {
-               ocpf_recipient_add(ctx, recipClass, tmp);
-       }
-
-       return OCPF_SUCCESS;
-}
-
-static bool ocpf_write_exclude_property(uint32_t ulPropTag)
-{
-       uint32_t        i;
-       uint32_t        propArray[] = { PR_DISPLAY_TO, 
-                                       PR_DISPLAY_CC, 
-                                       PR_DISPLAY_BCC, 
-                                       0};
-
-       for (i = 0; propArray[i]; i++) {
-               if (propArray[i] == ulPropTag) {
-                       return true;
-               }
-       }
-
-       return false;
-}
-
-/**
-   \details Specify the OCPF file name to write
-   Specify the ocpf file to create
-
-   \param context_id the identifier representing the context
-   \param folder_id the folder 
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa ocpf_init
- */
-_PUBLIC_ int ocpf_write_init(uint32_t context_id, 
-                            mapi_id_t folder_id)
-{
-       struct ocpf_context     *ctx;
-
-       OCPF_RETVAL_IF(!folder_id, NULL, OCPF_WRITE_NOT_INITIALIZED, NULL);
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);
-
-       /* Search the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL); 
-
-       ctx->folder = folder_id;
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Create the OCPF structure required for the commit
-   operation
-
-   This function process properties and named properties from the
-   specified mapi_SPropValue_array and generates an OCPF structure
-   with all the attributes required to create an OCPF file in the
-   commit operation.
-
-   \param context_id the identifier representing the context
-   \param obj_message the message object
-   \param mapi_lpProps the array of mapi properties returned by
-   GetPropsAll
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa GetPropsAll, ocpf_write_commit
- */
-_PUBLIC_ int ocpf_write_auto(uint32_t context_id,
-                            mapi_object_t *obj_message,
-                            struct mapi_SPropValue_array *mapi_lpProps)
-{
-       enum MAPISTATUS         retval;
-       struct ocpf_context     *ctx;
-       uint32_t                i;
-       uint16_t                propID;
-       struct SPropValue       lpProps;
-       const char              *type;
-       const char              *recipient;
-       char                    *tmp_guid;
-       const char              *guid;
-       struct MAPINAMEID       *nameid;
-       uint16_t                count;
-       struct ocpf_nprop       nprop;
-
-       OCPF_RETVAL_IF(!ocpf || !ocpf->mem_ctx, NULL, OCPF_NOT_INITIALIZED, NULL);
-       OCPF_RETVAL_IF(!mapi_lpProps, NULL, OCPF_INVALID_PROPARRAY, NULL);
-       
-       /* Find the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-       OCPF_RETVAL_IF(!ctx->filename, ctx, OCPF_WRITE_NOT_INITIALIZED, NULL);
-
-       /* store message type */
-       type = (const char *) find_mapi_SPropValue_data(mapi_lpProps, PR_MESSAGE_CLASS);
-       ocpf_type_add(ctx, type);
-
-       /* store recipients */
-       recipient = (const char *) find_mapi_SPropValue_data(mapi_lpProps, PR_DISPLAY_TO);
-       ocpf_write_add_recipients(ctx, OCPF_MAPI_TO, recipient);
-
-       recipient = (const char *) find_mapi_SPropValue_data(mapi_lpProps, PR_DISPLAY_CC);
-       ocpf_write_add_recipients(ctx, OCPF_MAPI_CC, recipient);
-
-       recipient = (const char *) find_mapi_SPropValue_data(mapi_lpProps, PR_DISPLAY_BCC);
-       ocpf_write_add_recipients(ctx, OCPF_MAPI_BCC, recipient);
-
-       /* store properties and OLEGUID in OCPF context */
-       for (i = 0; i < mapi_lpProps->cValues; i++) {
-               propID = mapi_lpProps->lpProps[i].ulPropTag >> 16;
-               cast_SPropValue(ctx, &mapi_lpProps->lpProps[i], &lpProps);
-               
-               if (propID < 0x8000) {
-                       if (ocpf_write_exclude_property(lpProps.ulPropTag) == false) {
-                               /* HACK: replace PR_CONVERSATION_TOPIC with PR_SUBJECT */
-                               if (lpProps.ulPropTag == PR_CONVERSATION_TOPIC) {
-                                       lpProps.ulPropTag = PR_SUBJECT;
-                                       ocpf_propvalue(ctx, lpProps.ulPropTag, lpProps.value, 
-                                                      lpProps.ulPropTag & 0xFFFF, false);
-                                       cast_SPropValue(ctx, &mapi_lpProps->lpProps[i], &lpProps);
-                               }
-                               ocpf_propvalue(ctx, mapi_lpProps->lpProps[i].ulPropTag, 
-                                              lpProps.value, mapi_lpProps->lpProps[i].ulPropTag & 0xFFFF, false);
-                       }
-               } else {
-                       nameid = talloc_zero(ctx, struct MAPINAMEID);
-                       retval = GetNamesFromIDs(obj_message, ((lpProps.ulPropTag & 0xFFFF0000) | PT_NULL),
-                                                &count, &nameid);
-                       memset(&nprop, 0, sizeof (struct ocpf_nprop));
-                       switch (nameid->ulKind) {
-                       case MNID_ID:
-                               nprop.mnid_id = nameid->kind.lid;
-                               break;
-                       case MNID_STRING:
-                               nprop.mnid_string = talloc_strdup(ctx, nameid->kind.lpwstr.Name);
-                               break;
-                       }
-                       nprop.propType = lpProps.ulPropTag & 0xFFFF;
-                       tmp_guid = GUID_string(ctx, &nameid->lpguid);
-                       nprop.guid = ocpf_write_get_guid_name(ctx, tmp_guid);
-
-                       /* OLEGUID has to be inserted prior named properties */
-                       if (ocpf_oleguid_check(ctx, nprop.guid, &guid) != OCPF_SUCCESS)
-                               ocpf_oleguid_add(ctx, nprop.guid, tmp_guid);
-                       
-                       nprop.registered = false;
-                       ocpf_nproperty_add(ctx, &nprop, lpProps.value, NULL, nprop.propType, false);
-
-                       talloc_free(nameid);
-               }
-       }
-
-       return OCPF_SUCCESS;
-}
-
-
-/**
-   \details Write OCPF structure to OCPF file
-
-   This function dumps the OCPF structure content into the OCPF file
-   defined in ocpf_write_init.
-
-   \param context_id the identifier representing the context
-
-   \return OCPF_SUCCESS on success, otherwise OCPF_ERROR
-
-   \sa ocpf_write_init, ocpf_write_auto
- */
-_PUBLIC_ int ocpf_write_commit(uint32_t context_id)
-{
-       FILE                    *fp;
-       struct ocpf_context     *ctx;
-       struct ocpf_property    *element;
-       struct ocpf_nproperty   *nelement;
-       struct ocpf_oleguid     *nguid;
-       char                    *line;
-       bool                    found = false;
-       char                    *definition = NULL;
-       ssize_t                 len;
-
-       /* Find the context */
-       ctx = ocpf_context_search_by_context_id(ocpf->context, context_id);
-       OCPF_RETVAL_IF(!ctx, NULL, OCPF_INVALID_CONTEXT, NULL);
-       OCPF_RETVAL_IF(!ctx->filename, ctx, OCPF_WRITE_NOT_INITIALIZED, NULL);
-       OCPF_RETVAL_IF(ctx->flags == OCPF_FLAGS_READ, ctx, OCPF_WRITE_NOT_INITIALIZED, NULL);
-
-       if (ctx->flags == OCPF_FLAGS_CREATE) {
-               ctx->fp = fopen(ctx->filename, "w+");
-       } 
-
-       /* Position the file at the beginning of the stream */
-       fseek(ctx->fp, 0, SEEK_SET);
-
-       fp = ctx->fp;
-       OCPF_RETVAL_IF(!fp, ctx, OCPF_INVALID_FILEHANDLE, NULL);
-
-       /* message type */
-       line = talloc_asprintf(ctx, "TYPE   \"%s\"\n\n", ctx->type);
-       len = fwrite(line, strlen(line), 1, fp);
-       talloc_free(line);
-
-       /* folder id */
-       line = talloc_asprintf(ctx, "FOLDER D0x%.16"PRIx64"\n\n", ctx->folder);
-       len = fwrite(line, strlen(line), 1, fp);
-       talloc_free(line);
-
-       /* OLEGUID */
-       for (nguid = ctx->oleguid; nguid->next; nguid = nguid->next) {
-               line = talloc_asprintf(ctx, "OLEGUID %-25s \"%s\"\n", nguid->name, nguid->guid);
-               len = fwrite(line, strlen(line), 1, fp);
-               talloc_free(line);
-       }
-       len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-
-       /* RECIPIENT TO */
-       line = ocpf_write_recipients(ctx, OCPF_MAPI_TO);
-       if (line && strlen(line)) {
-               len = fwrite(OCPF_RECIPIENT_TO, strlen(OCPF_RECIPIENT_TO), 1, fp);
-               len = fwrite(line, strlen(line), 1, fp);
-               len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-               talloc_free(line);
-       }
-
-       /* RECIPIENT CC */
-       line = ocpf_write_recipients(ctx, OCPF_MAPI_CC);
-       if (line && strlen(line)) {
-               len = fwrite(OCPF_RECIPIENT_CC, strlen(OCPF_RECIPIENT_CC), 1, fp);
-               len = fwrite(line, strlen(line), 1, fp);
-               len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-               talloc_free(line);
-       }
-
-       /* RECIPIENT BCC */
-       line = ocpf_write_recipients(ctx, OCPF_MAPI_BCC);
-       if (line && strlen(line)) {
-               len = fwrite(OCPF_RECIPIENT_BCC, strlen(OCPF_RECIPIENT_BCC), 1, fp);
-               len = fwrite(line, strlen(line), 1, fp);
-               len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-               talloc_free(line);
-       }
-
-       len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-
-       /* known properties */
-       len = fwrite(OCPF_PROPERTY_BEGIN, strlen(OCPF_PROPERTY_BEGIN), 1, fp);
-       for (element = ctx->props; element->next; element = element->next) {
-               line = ocpf_write_property(ctx, &found, element->aulPropTag, element->value);
-               if (found == true) {
-                       ocpf_write_propname(ctx, fp, element->aulPropTag);
-                       len = fwrite(line, strlen(line), 1, fp);
-                       talloc_free(line);
-                       found = false;
-               }
-       }
-       len = fwrite(OCPF_END, strlen(OCPF_END), 1, fp);
-       len = fwrite(OCPF_NEWLINE, strlen(OCPF_NEWLINE), 1, fp);
-
-       /* named properties */
-       len = fwrite(OCPF_NPROPERTY_BEGIN, strlen(OCPF_NPROPERTY_BEGIN), 1, fp);
-       for (nelement = ctx->nprops; nelement->next; nelement = nelement->next) {
-               line = ocpf_write_property(ctx, &found, nelement->propType, nelement->value);
-               if (found == true) {
-                       if (nelement->mnid_id) {
-                               definition = talloc_asprintf(ctx, "\tMNID_ID:0x%.4x:%s:%s = ",
-                                                            nelement->mnid_id,
-                                                            ocpf_write_get_proptype_name(nelement->propType),
-                                                            ocpf_write_get_guid_name(ctx, nelement->oleguid));
-                       } else if (nelement->mnid_string) {
-                               definition = talloc_asprintf(ctx, "\tMNID_STRING:\"%s\":%s:%s = ",
-                                                            nelement->mnid_string,
-                                                            ocpf_write_get_proptype_name(nelement->propType),
-                                                            ocpf_write_get_guid_name(ctx, nelement->oleguid));
-                       }
-                       
-                       if (definition) {
-                               len = fwrite(definition, strlen(definition), 1, fp);
-                               talloc_free(definition);
-                       }
-
-                       len = fwrite(line, strlen(line), 1, fp);
-                       talloc_free(line);
-                       found = false;
-               }
-       }
-       len = fwrite(OCPF_END, strlen(OCPF_END), 1, fp);
-
-       return OCPF_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/Doxyfile.in b/branches/plugfest/mapiproxy/Doxyfile.in
deleted file mode 100644 (file)
index 6d4946c..0000000
+++ /dev/null
@@ -1,1504 +0,0 @@
-# Doxyfile 1.5.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = MAPIProxy
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, 
-# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), 
-# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, 
-# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, 
-# Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter 
-# and setter methods for a property. Setting this option to YES (the default) 
-# will make doxygen to replace the get and set methods by a property in the 
-# documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is 
-# probably good enough. For larger projects a too small cache size can cause 
-# doxygen to be busy swapping symbols to and from disk most of the time 
-# causing a significant performance penality. 
-# If the system has enough physical memory increasing the cache will improve the 
-# performance by keeping more symbols in memory. Note that the value works on 
-# a logarithmic scale so increasing the size by one will rougly double the 
-# memory usage. The cache size is given by this formula: 
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the 
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
-# Namespaces page.  This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
-# doxygen. The layout file controls the global structure of the generated output files 
-# in an output format independent way. The create the layout file that represents 
-# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
-# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
-# of the layout file.
-
-LAYOUT_FILE            = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = mapiproxy \
-                         mapiproxy/documentation \
-                         mapiproxy/modules \
-                         mapiproxy/libmapiproxy \
-                         mapiproxy/libmapiserver \
-                         mapiproxy/libmapistore \
-                         mapiproxy/servers/default/emsmdb \
-                         mapiproxy/servers/default/nspi \
-                         mapiproxy/servers/default/rfr
-
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS          = *.h \
-                         *.c \
-                         *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c \
-                         *_private.h \
-                         ocpf_api.*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/ mapiproxy/documentation/pictures
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed                                                  \
-                       -e '20,40s/.*\<libmapi\/proto_private.h\>//'            \
-                       -e '20,40s/.*\<gen_ndr\/ndr_exchange.h\>//'             \
-                       -e '20,40s/.*\<param.h\>//'                             \
-                       -e '20,40s/.*\<errno.h\>//'                             \
-                       -e '20,40s/.*\<core\/error.h\>//'                       \
-                       -e '20,40s/.*\<credentials.h\>//'                       \
-                       -e '20,40s/.*\<ldb.h\>//'                               \
-                       -e '20,40s/.*\<ldb_errors.h\>//'                        \
-                       -e '20,40s/.*\<libmapi\/dlinklist.h\>//'                \
-                       -e '20,40s/.*\<libmapi\/defs_private.h\>//'             \
-                       -e '20,40s/.*\<libmapi\/mapi_nameid.h\>//'              \
-                       -e '20,40s/.*\<libmapi\/mapi_nameid_private.h\>//'      \
-                       -e '20,40s/.*\<libocpf\/proto_private.h\>//'            \
-                       -e '20,40s/.*\<libocpf\/ocpf_api.h\>//'                 \
-                       -e '20,40s/.*\<libocpf\/ocpf.tab.h\>//'                 \
-                       -e '20,40s/.*\<libgen.h\>//'                            \
-                       -e '20,40s/.*\<time.h\>//'                              \
-                       -e '20,40s/.*\<sys\/*\>//'                              \
-                       -e '20,40s/_PUBLIC_//'"
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/mapiproxy
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup. 
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
-# are set, an additional index file will be generated that can be used as input for 
-# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
-# HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
-# be used to specify the file name of the resulting .qch file. 
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               = 
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
-# be used to specify the location of Qt's qhelpgenerator. 
-# If non-empty doxygen will try to run qhelpgenerator on the generated 
-# .qhp file .
-
-QHG_LOCATION           = 
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to FRAME, a side panel will be generated
-# containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature. Other possible values 
-# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list;
-# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
-# disables this behavior completely. For backwards compatibility with previous
-# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
-# respectively.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# Use this tag to change the font size of Latex formulas included 
-# as images in the HTML documentation. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = YES
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
-# default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# By default doxygen will write a font called FreeSans.ttf to the output 
-# directory and reference it in all dot files that doxygen generates. This 
-# font does not include all possible unicode characters however, so when you need 
-# these (or just want a differently looking font) you can specify the font name 
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
-# which can be done by putting it in a standard location or by setting the 
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
-# containing the font.
-
-DOT_FONTNAME           = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the output directory to look for the 
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
-# different font using DOT_FONTNAME you can set the path where dot 
-# can find it using this tag.
-
-DOT_FONTPATH           = 
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, because dot on Windows does not 
-# seem to support this out of the box. Warning: Depending on the platform used, 
-# enabling this option may lead to badly anti-aliased labels on the edges of 
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy.c b/branches/plugfest/mapiproxy/dcesrv_mapiproxy.c
deleted file mode 100644 (file)
index fada1cd..0000000
+++ /dev/null
@@ -1,740 +0,0 @@
-/*
-   MAPI Proxy
-
-   This proxy is based on dcesrv_remote.c code from Stefan Metzemacher
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-#include <dlinklist.h>
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <util/debug.h>
-
-/**
-   \file dcesrv_mapiproxy.c
-
-   \brief mapiproxy main file
- */
-
-
-static NTSTATUS mapiproxy_op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       DEBUG(5, ("mapiproxy::mapiproxy_op_reply\n"));
-       return NT_STATUS_OK;
-}
-
-static NTSTATUS mapiproxy_op_connect(struct dcesrv_call_state *dce_call, 
-                                    const struct ndr_interface_table *table,
-                                    const char *binding)
-{
-       NTSTATUS                                status;
-       struct dcesrv_mapiproxy_private         *private_data;
-       const char                              *user;
-       const char                              *pass;
-       const char                              *domain;
-       struct cli_credentials                  *credentials;
-       bool                                    acquired_creds = false;
-       bool                                    machine_account;
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_connect\n"));
-
-       /* Retrieve the binding string from parametric options if undefined */
-       if (!binding) {
-               binding = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "binding");
-               if (!binding) {
-                       DEBUG(0, ("You must specify a DCE/RPC binding string\n"));
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-       }
-
-       /* Retrieve parametric options */
-       machine_account = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "use_machine_account", false);
-       user = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "username");
-       pass = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "password");
-       domain = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "domain");
-
-       /* Retrieve private mapiproxy data */
-       private_data = (struct dcesrv_mapiproxy_private *) dce_call->context->private_data;
-
-       if (user && pass) {
-               DEBUG(5, ("dcerpc_mapiproxy: RPC proxy: Using specified account\n"));
-               credentials = cli_credentials_init(private_data);
-               if (!credentials) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-
-               cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
-               cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
-               if (domain) {
-                       cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
-               }
-               cli_credentials_set_password(credentials, pass, CRED_SPECIFIED);
-       } else if (machine_account) {
-               DEBUG(5, ("dcerpc_mapiproxy: RPC proxy: Using machine account\n"));
-               credentials = cli_credentials_init(private_data);
-               if (!credentials) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-               cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
-               if (domain) {
-                       cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
-               }
-               status = cli_credentials_set_machine_account(credentials, dce_call->conn->dce_ctx->lp_ctx);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-       } else if (dce_call->conn->auth_state.session_info->credentials) {
-               DEBUG(5, ("dcerpc_mapiproxy: RPC proxy: Using delegated credentials\n"));
-               credentials = dce_call->conn->auth_state.session_info->credentials;
-               acquired_creds = true;
-       } else if (private_data->credentials) {
-               DEBUG(5, ("dcerpc_mapiproxy: RPC proxy: Using acquired deletegated credentials\n"));
-               credentials = private_data->credentials;
-               acquired_creds = true;
-       } else {
-               DEBUG(1, ("dcerpc_mapiproxy: RPC proxy: You must supply binding, user and password or have delegated credentials\n"));
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       if (((dce_call->pkt.ptype == DCERPC_PKT_BIND) && dce_call->pkt.u.bind.assoc_group_id) ||
-           ((dce_call->pkt.ptype == DCERPC_PKT_ALTER) && dce_call->pkt.u.alter.assoc_group_id)) {
-               struct dcerpc_binding           *b;
-               struct composite_context        *pipe_conn_req;
-
-               /* parse binding string to the structure */
-               status = dcerpc_parse_binding(dce_call->context, binding, &b);
-               if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(0, ("Failed to parse dcerpc binding '%s'\n", binding));
-                       return status;
-               }
-               
-               DEBUG(3, ("Using binding %s\n", dcerpc_binding_string(dce_call->context, b)));
-               
-               switch (dce_call->pkt.ptype) {
-               case DCERPC_PKT_BIND:
-                       b->assoc_group_id = dce_call->pkt.u.bind.assoc_group_id;
-                       break;
-               case DCERPC_PKT_ALTER:
-                       b->assoc_group_id = dce_call->pkt.u.alter.assoc_group_id;
-                       break;
-               default:
-                       break;
-               }
-               
-               pipe_conn_req = dcerpc_pipe_connect_b_send(dce_call->context, b, table,
-                                                          credentials, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx);
-               status = dcerpc_pipe_connect_b_recv(pipe_conn_req, dce_call->context, &(private_data->c_pipe));
-
-               if (acquired_creds == false) {
-                       talloc_free(credentials);
-               }
-
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-               dce_call->context->assoc_group->id = private_data->c_pipe->assoc_group_id;
-               
-       } else {
-               status = dcerpc_pipe_connect(dce_call->context,
-                                            &(private_data->c_pipe), binding, table,
-                                            credentials, dce_call->event_ctx,
-                                            dce_call->conn->dce_ctx->lp_ctx);
-               
-               if (acquired_creds == false) {
-                       talloc_free(credentials);
-               }
-
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-               dce_call->context->assoc_group->id = private_data->c_pipe->assoc_group_id;
-       }
-
-       private_data->connected = true;
-
-       DEBUG(5, ("dcerpc_mapiproxy: RPC proxy: CONNECTED\n"));
-
-       return NT_STATUS_OK;
-}
-
-static NTSTATUS mapiproxy_op_bind_proxy(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
-{
-       NTSTATUS                                status = NT_STATUS_OK;
-       const struct ndr_interface_table        *table;
-       struct dcesrv_mapiproxy_private         *private_data;
-       bool                                    delegated;
-
-       /* Retrieve private mapiproxy data */
-       private_data = (struct dcesrv_mapiproxy_private *)dce_call->context->private_data;
-
-       table = ndr_table_by_uuid(&iface->syntax_id.uuid);
-       if (!table) {
-               dce_call->fault_code = DCERPC_FAULT_UNK_IF;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       if (dce_call->conn->auth_state.session_info->credentials) {
-               private_data->credentials = dce_call->conn->auth_state.session_info->credentials;
-               DEBUG(5, ("dcerpc_mapiproxy: Delegated credentials acquired\n"));
-       }
-
-       delegated = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "delegated_auth", false);
-       if (delegated == false) {
-               status = mapiproxy_op_connect(dce_call, table, NULL);
-       }
-
-       return status;
-}
-
-
-/**
-   \details This function is called when the client binds to one of
-   the interfaces mapiproxy handles.
-
-   \param dce_call pointer to the session context
-   \param iface pointer to the dcesrv interface structure with
-   function hooks
-   \param if_version the version of the pipe
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-static NTSTATUS mapiproxy_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
-{
-       struct dcesrv_mapiproxy_private         *private_data;
-       bool                                    server_mode;
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_bind: [session = 0x%x] [session server id = 0x%"PRIx64" 0x%x 0x%x]\n", dce_call->context->context_id,
-                 dce_call->conn->server_id.id, dce_call->conn->server_id.id2, dce_call->conn->server_id.node));
-
-       /* Retrieve server mode parametric option */
-       server_mode = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
-
-       /* Initialize private structure */
-       private_data = talloc(dce_call->context, struct dcesrv_mapiproxy_private);
-       if (!private_data) {
-               return NT_STATUS_NO_MEMORY;
-       }
-       
-       private_data->c_pipe = NULL;
-       private_data->exchname = NULL;
-       private_data->server_mode = server_mode;
-       private_data->connected = false;
-
-       dce_call->context->private_data = private_data;
-
-       if (server_mode == false) {
-         return mapiproxy_op_bind_proxy(dce_call, iface, if_version);
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Called when the client disconnects from one of the
-   endpoints managed by mapiproxy.
-
-   \param context pointer to the connection context
-   \param iface pointer to the dcesrv interface structure with
-   function hooks
- */
-static void mapiproxy_op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
-{
-       struct dcesrv_mapiproxy_private *private_data = (struct dcesrv_mapiproxy_private *) context->private_data;
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_unbind\n"));
-
-       mapiproxy_module_unbind(context->conn->server_id, context->context_id);
-       mapiproxy_server_unbind(context->conn->server_id, context->context_id);
-
-       if (private_data) {
-               talloc_free(private_data->c_pipe);
-               talloc_free(private_data);
-       }
-
-       talloc_free(context);
-
-       return;
-}
-
-
-/**
-   \details This is the function called when mapiproxy receives a
-   request. The request has already been extracted and its information
-   filled into structures
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param pull pointer on pointer to the ndr_pull structure
-   \param r generic pointer on pointer to the pulled ndr content
-
-   \return NT_STATUS_OK on success, other NTSTATUS error
- */
-static NTSTATUS mapiproxy_op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
-{
-       NTSTATUS                                status;
-       enum ndr_err_code                       ndr_err;
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-       struct dcesrv_mapiproxy_private         *private_data;
-
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_ndr_pull\n"));
-
-       private_data = (struct dcesrv_mapiproxy_private *)dce_call->context->private_data;
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       dce_call->fault_code = 0;
-
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(0, ("User is not authenticated, cannot process\n"));
-               dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       /* If remote connection bind/auth has been delayed */
-       if (private_data->connected == false && private_data->server_mode == false) {
-               status = mapiproxy_op_connect(dce_call, table, NULL);
-
-               if (!NT_STATUS_IS_OK(status)) {
-                       dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
-                       return NT_STATUS_NET_WRITE_FAULT;
-               }
-       }
-
-       if (opnum >= table->num_calls) {
-               dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       *r = talloc_size(mem_ctx, table->calls[opnum].struct_size);
-       if (!*r) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       /* directly alter the pull struct before it got pulled from ndr */
-       mapiproxy_module_ndr_pull(dce_call, mem_ctx, pull);
-
-       ndr_err = table->calls[opnum].ndr_pull(pull, NDR_IN, *r);
-
-       mapiproxy_module_pull(dce_call, mem_ctx, *r);
-
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               DEBUG(0, ("mapiproxy: mapiproxy_ndr_pull: ERROR\n"));
-               dcerpc_log_packet(dce_call->conn->packet_log_dir, table, opnum, NDR_IN, 
-                                 &dce_call->pkt.u.request.stub_and_verifier);
-               dce_call->fault_code = DCERPC_FAULT_NDR;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details This is the function called when mapiproxy receive a
-   response. The response has already been extracted and its
-   information filled into structures
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param push pointer to the ndr_push structure
-   \param r generic pointer to the data pushed
-
-   \return NT_STATUS_OK on success, otherwise a NTSTATUS error
- */
-static NTSTATUS mapiproxy_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
-{
-       struct dcesrv_mapiproxy_private         *private_data;
-       enum ndr_err_code                       ndr_err;
-       const struct ndr_interface_table        *table;
-       const struct ndr_interface_call         *call;
-       uint16_t                                opnum;
-       const char                              *name;
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_ndr_push\n"));
-
-       private_data = (struct dcesrv_mapiproxy_private *)dce_call->context->private_data;
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       name = table->calls[opnum].name;
-       call = &table->calls[opnum];
-
-       dce_call->fault_code = 0;
-
-       if (private_data->server_mode == false) {
-               /* NspiGetProps binding strings replacement */
-               if ((mapiproxy_server_loaded(NDR_EXCHANGE_NSP_NAME) == false) &&
-                   table->name && !strcmp(table->name, NDR_EXCHANGE_NSP_NAME)) {
-                       switch (opnum) {
-                       case NDR_NSPIGETPROPS:
-                               mapiproxy_NspiGetProps(dce_call, (struct NspiGetProps *)r);
-                               break;
-                       case NDR_NSPIQUERYROWS:
-                               mapiproxy_NspiQueryRows(dce_call, (struct NspiQueryRows *)r);
-                               break;
-                       default:
-                               break;
-                       }
-               }
-
-               /* RfrGetNewDSA FQDN replacement */
-               if ((mapiproxy_server_loaded(NDR_EXCHANGE_DS_RFR_NAME) == false) &&
-                   table->name && !strcmp(table->name, NDR_EXCHANGE_DS_RFR_NAME)) {
-                       switch (opnum) {
-                       case NDR_RFRGETNEWDSA:
-                               mapiproxy_RfrGetNewDSA(dce_call, (struct RfrGetNewDSA *)r);
-                               break;
-                       default:
-                               DEBUG(0, ("exchange_ds_rfr: OTHER DS-RFR CALL DETECTED!\n"));
-                               break;
-                       }
-               }
-       }
-
-       mapiproxy_module_push(dce_call, mem_ctx, (void *)r);
-
-       ndr_err = table->calls[opnum].ndr_push(push, NDR_OUT, r);
-
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               DEBUG(0, ("mapiproxy: mapiproxy_ndr_push: ERROR\n"));
-               dce_call->fault_code = DCERPC_FAULT_NDR;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details This function is called after the pull but before the
-   push. Moreover it is called before the request is forward to the
-   remote endpoint.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r generic pointer to the call mapped data
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-static NTSTATUS mapiproxy_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       struct dcesrv_mapiproxy_private         *private_data;
-       struct ndr_push                         *push;
-       enum ndr_err_code                       ndr_err;
-       struct mapiproxy                        mapiproxy;
-       const struct ndr_interface_table        *table;
-       const struct ndr_interface_call         *call;
-       uint16_t                                opnum;
-       const char                              *name;
-       NTSTATUS                                status;
-
-       private_data = (struct dcesrv_mapiproxy_private *)dce_call->context->private_data;
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       name = table->calls[opnum].name;
-       call = &table->calls[opnum];
-
-       mapiproxy.norelay = false;
-       mapiproxy.ahead = false;
-
-       if (!private_data) {
-               dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       DEBUG(5, ("mapiproxy::mapiproxy_op_dispatch: %s(0x%x): %zd bytes\n",
-                 table->calls[opnum].name, opnum, table->calls[opnum].struct_size));
-
-       if (private_data->server_mode == false) {
-               if (private_data->c_pipe->conn->flags & DCERPC_DEBUG_PRINT_IN) {
-                       ndr_print_function_debug(call->ndr_print, name, NDR_IN | NDR_SET_VALUES, r);
-               }
-
-               private_data->c_pipe->conn->flags |= DCERPC_NDR_REF_ALLOC;
-       }
-
-       if ((private_data->server_mode == true) || (mapiproxy_server_loaded(NDR_EXCHANGE_NSP_NAME) == true)) {
-               ndr_print_function_debug(call->ndr_print, name, NDR_IN | NDR_SET_VALUES, r);
-               status = mapiproxy_server_dispatch(dce_call, mem_ctx, r, &mapiproxy);
-               ndr_print_function_debug(call->ndr_print, name, NDR_OUT | NDR_SET_VALUES, r);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return NT_STATUS_NET_WRITE_FAULT;
-               }
-       } else {
-               if (table->name && !strcmp(table->name, NDR_EXCHANGE_NSP_NAME)) {
-                       if (opnum == NDR_NSPIDNTOMID) {
-                               mapiproxy_NspiDNToMId(dce_call, (struct NspiDNToMId *)r);
-                       }
-               }
-       }
-
-       if (private_data->server_mode == false) {
-       ahead:
-               if (mapiproxy.ahead == true) {
-                       push = ndr_push_init_ctx(dce_call);
-                       NT_STATUS_HAVE_NO_MEMORY(push);
-                       ndr_err = call->ndr_push(push, NDR_OUT, r);
-                       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-                               DEBUG(0, ("mapiproxy: mapiproxy_op_dispatch:push: ERROR\n"));
-                               dce_call->fault_code = DCERPC_FAULT_NDR;
-                               return NT_STATUS_NET_WRITE_FAULT;
-                       }
-               }
-               
-               status = mapiproxy_module_dispatch(dce_call, mem_ctx, r, &mapiproxy);
-               if (!NT_STATUS_IS_OK(status)) {
-                       private_data->c_pipe->last_fault_code = dce_call->fault_code;
-                       return NT_STATUS_NET_WRITE_FAULT;
-               }
-               
-               private_data->c_pipe->last_fault_code = 0;
-               if (mapiproxy.norelay == false) {
-                       status = dcerpc_ndr_request(private_data->c_pipe, NULL, table, opnum, mem_ctx, r);
-               }
-               
-               dce_call->fault_code = private_data->c_pipe->last_fault_code;
-               if (dce_call->fault_code != 0 || !NT_STATUS_IS_OK(status)) {
-                       DEBUG(0, ("mapiproxy: call[%s] failed with %s! (status = %s)\n", name, 
-                                 dcerpc_errstr(mem_ctx, dce_call->fault_code), nt_errstr(status)));
-                       return NT_STATUS_NET_WRITE_FAULT;
-               }
-               
-               if ((dce_call->fault_code == 0) && 
-                   (private_data->c_pipe->conn->flags & DCERPC_DEBUG_PRINT_OUT) && mapiproxy.norelay == false) {
-                       ndr_print_function_debug(call->ndr_print, name, NDR_OUT | NDR_SET_VALUES, r);
-               }
-               
-               if (mapiproxy.ahead == true) goto ahead;
-       }
-       
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Register an endpoint
-
-   \param dce_ctx pointer to the dcerpc context
-   \param iface pointer to the dcesrv interface with function hooks
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-static NTSTATUS mapiproxy_register_one_iface(struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface)
-{
-       const struct ndr_interface_table        *table = (const struct ndr_interface_table *) iface->private_data;
-       uint32_t                                i;
-
-       for (i = 0; i < table->endpoints->count; i++) {
-               NTSTATUS        ret;
-               const char      *name = table->endpoints->names[i];
-
-               ret = dcesrv_interface_register(dce_ctx, name, iface, NULL);
-               if (!NT_STATUS_IS_OK(ret)) {
-                       DEBUG(1,("mapiproxy_op_init_server: failed to register endpoint '%s'\n", name));
-                       return ret;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initializes the server and register emsmdb,nspi and rfr
-   interfaces
-
-   \param dce_ctx pointer to the dcesrv context
-   \param ep_server pointer to the endpoint server list
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-static NTSTATUS mapiproxy_op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
-{
-       NTSTATUS                ret;
-       struct dcesrv_interface iface;
-       char                    **ifaces;
-       uint32_t                i;
-       static bool             initialized = false;
-
-       if (initialized == true) return NT_STATUS_OK;
-
-       /* Register mapiproxy modules */
-       ret = mapiproxy_module_init(dce_ctx);
-       NT_STATUS_NOT_OK_RETURN(ret);
-
-       /* Register mapiproxy servers */
-       ret = mapiproxy_server_init(dce_ctx);
-       NT_STATUS_NOT_OK_RETURN(ret);
-
-       ifaces = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "interfaces"), NULL);
-
-       for (i = 0; ifaces[i]; i++) {
-               /* Register the interface */
-               if (!ep_server->interface_by_name(&iface, ifaces[i])) {
-                       DEBUG(0, ("mapiproxy_op_init_server: failed to find interface '%s'\n", ifaces[i]));
-                       return NT_STATUS_UNSUCCESSFUL;
-               }
-
-               ret = mapiproxy_register_one_iface(dce_ctx, &iface);
-               if (!NT_STATUS_IS_OK(ret)) {
-                       DEBUG(0, ("mapiproxy_op_init_server: failed to register interface '%s'\n", ifaces[i]));
-                       return ret;
-               }
-       }
-
-       initialized = true;
-       return NT_STATUS_OK;
-}
-
-
-static bool mapiproxy_fill_interface(struct dcesrv_interface *iface, const struct ndr_interface_table *tbl)
-{
-       iface->name = tbl->name;
-       iface->syntax_id = tbl->syntax_id;
-       
-       iface->bind = mapiproxy_op_bind;
-       iface->unbind = mapiproxy_op_unbind;
-       
-       iface->ndr_pull = mapiproxy_op_ndr_pull;
-       iface->dispatch = mapiproxy_op_dispatch;
-       iface->reply = mapiproxy_op_reply;
-       iface->ndr_push = mapiproxy_op_ndr_push;
-
-       iface->private_data = tbl;
-
-       return true;
-}
-
-
-static bool mapiproxy_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
-{
-       const struct ndr_interface_list *l;
-
-       for (l = ndr_table_list(); l; l = l->next) {
-               if (l->table->syntax_id.if_version == if_version &&
-                   GUID_equal(&l->table->syntax_id.uuid, uuid) == 0) {
-                       return mapiproxy_fill_interface(iface, l->table);
-               }
-       }
-
-       return false;
-}
-
-
-static bool mapiproxy_op_interface_by_name(struct dcesrv_interface *iface, const char *name)
-{
-       const struct ndr_interface_table        *tbl;
-
-       tbl = ndr_table_by_name(name);
-
-       if (tbl) {
-               return mapiproxy_fill_interface(iface, tbl);
-       }
-
-       return false;
-}
-
-
-/**
-   \details register the mapiproxy endpoint server.
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS dcerpc_server_mapiproxy_init(void)
-{
-       NTSTATUS                        ret;
-       struct dcesrv_endpoint_server   ep_server;
-
-       ZERO_STRUCT(ep_server);
-
-       /* Fill in our name */
-       ep_server.name = "mapiproxy";
-
-       /* Fill in all the operations */
-       ep_server.init_server = mapiproxy_op_init_server;
-
-       ep_server.interface_by_uuid = mapiproxy_op_interface_by_uuid;
-       ep_server.interface_by_name = mapiproxy_op_interface_by_name;
-
-       /* Register ourselves with the DCE/RPC subsystem */
-       ret = dcerpc_register_ep_server(&ep_server);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register 'mapiproxy' endpoint server!"));
-               return ret;
-       }
-
-       /* Full DCE/RPC interface table needed */
-       ndr_table_init();
-       
-       return ret;
-}
-
-/**
-   \details Register mapiproxy dynamic shared object modules
-
-   This function registers mapiproxy modules located
- */
-
-/**
-   \details Entry point of mapiproxy dynamic shared object.
-
-   This function first registers exchange endpoints and ndr tables,
-   then attempts to register the mapiproxy interface.
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL;
- */
-NTSTATUS samba_init_module(void)
-{
-       NTSTATUS status;
-
-       /* Step1. Register Exchange endpoints */
-       status = dcerpc_server_exchange_emsmdb_init();
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       status = dcerpc_server_exchange_nsp_init();
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       status = dcerpc_server_exchange_ds_rfr_init();
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       /* Step2. Register Exchange ndr tables */
-       status = ndr_table_register(&ndr_table_exchange_emsmdb);
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       status = ndr_table_register(&ndr_table_exchange_nsp);
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       status = ndr_table_register(&ndr_table_exchange_ds_rfr);
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       /* Step3. Finally register mapiproxy endpoint */
-       status = dcerpc_server_mapiproxy_init();
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       return NT_STATUS_OK;
-}
-
-/* include server boiler template */
-#include "gen_ndr/ndr_exchange_s.c"
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy.h b/branches/plugfest/mapiproxy/dcesrv_mapiproxy.h
deleted file mode 100644 (file)
index 558b086..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __DCESRV_MAPIPROXY_H__
-#define        __DCESRV_MAPIPROXY_H__
-
-#ifndef        _GNU_SOURCE
-#define        _GNU_SOURCE 1
-#endif
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-
-#include <talloc.h>
-#include <dcerpc.h>
-#include <samba/session.h>
-
-#include <dcerpc_server.h>
-#include <util.h>
-#include <param.h>
-#include <credentials.h>
-
-#include "gen_ndr/exchange.h"
-#include "gen_ndr/ndr_exchange.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-
-struct dcesrv_mapiproxy_private {
-       struct dcerpc_pipe                      *c_pipe;
-       char                                    *exchname;
-       bool                                    server_mode;
-       bool                                    connected;
-       struct cli_credentials                  *credentials;
-};
-
-enum exchange_handle {
-       EXCHANGE_HANDLE_NSP,
-       EXCHANGE_HANDLE_EMSMDB,
-       EXCHANGE_HANDLE_DS_RFR
-};
-
-/* Forward declarations */
-struct composite_context;
-
-#define MAXHOSTNAMELEN 255
-#define        SERVERNAME      "/cn=Servers/cn="
-
-#endif /* !__DCESRV_MAPIPROXY_H__ */
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy_nspi.c b/branches/plugfest/mapiproxy/dcesrv_mapiproxy_nspi.c
deleted file mode 100644 (file)
index e241838..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
-   MAPI Proxy - NSPI
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-
-/**
-   \file dcesrv_mapiproxy_nspi.c
-
-   \brief NSPI hook functions
- */
-
-/**
-   \details Retrieve the servername from a DN string
-   \param dn the DN string
-
-   \return a talloc'd server name
- */
-static char *x500_get_servername(const char *dn)
-{
-       char *pdn;
-       char *servername;
-
-       if (!dn) {
-               return NULL;
-       }
-
-       pdn = strcasestr(dn, SERVERNAME);
-       if (pdn == NULL) return NULL;
-
-       pdn += strlen(SERVERNAME);
-       servername = strsep(&pdn, "/");
-
-       return (talloc_strdup(NULL, servername));
-}
-
-
-/**
-   \details This function replaces network address from the binding
-   strings returned by Exchange for the PR_EMS_AB_NETWORK_ADDRESS
-   property and limit the binding strings scope to ncacn_ip_tcp.
-
-   \param dce_call pointer to the session context
-   \param r pointer to the NspiGetProps structure
-
-   \return true on success, otherwise false
- */
-bool mapiproxy_NspiGetProps(struct dcesrv_call_state *dce_call, struct NspiGetProps *r)
-{
-       uint32_t                i;
-       uint32_t                propID = -1;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SRow             *SRow;
-       struct StringArray_r    *slpstr;
-       struct SPropValue       *lpProp;
-
-       /* Sanity checks */
-       if (!r->out.ppRows) return false;
-       if (!(*r->out.ppRows)->cValues) return false;
-
-       /* Step 1. Find PR_EMS_AB_NETWORK_ADDRESS index */
-       propID = -1;
-       SPropTagArray = r->in.pPropTags;
-       for (i = 0; i < SPropTagArray->cValues; i++) {
-               if (SPropTagArray->aulPropTag[i] == PR_EMS_AB_NETWORK_ADDRESS) {
-                       propID = i;
-                       break;
-               }
-       }
-       if (propID == -1) return false;
-
-       /* Step 2. Retrieve the SLPSTRArray */
-       SRow = *r->out.ppRows;
-       lpProp = &SRow->lpProps[propID];
-
-       if (!lpProp) return false;
-       if (lpProp->ulPropTag != PR_EMS_AB_NETWORK_ADDRESS) return false;
-
-       slpstr = &(lpProp->value.MVszA);
-
-       /* Step 3. Modify Exchange binding strings and only return ncacn_ip_tcp */
-       slpstr->cValues = 1;
-       slpstr->lppszA[0] = talloc_asprintf(dce_call, "ncacn_ip_tcp:%s.%s", 
-                                           lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
-                                           lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
-       strlower_m((char *)slpstr->lppszA[0]);
-
-       return true;
-}
-
-
-/**
-   \details This function replaces the Exchange server name with
-   mapiproxy netbios name for the PR_EMS_AB_HOME_MDB property and
-   saves the original name in a global variable for further usage -
-   such as mapiproxy_NspiDNToMId.
-
-   \param dce_call pointer to the session context
-   \param r pointer to the NspiQueryRows structure
-
-   \sa mapiproxy_NspiDNToMId
-*/
-bool mapiproxy_NspiQueryRows(struct dcesrv_call_state *dce_call, struct NspiQueryRows *r)
-{
-       struct dcesrv_mapiproxy_private *private;
-       uint32_t                i;
-       uint32_t                propID = -1;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SRowSet          *SRowSet;
-       struct SPropValue       *lpProp;
-       char                    *lpszA;
-       char                    *exchname;
-
-       private = dce_call->context->private_data;
-
-       /* Sanity checks */
-       if (!r->out.ppRows) return false;
-       if (!(*r->out.ppRows)->cRows) return false;
-       if (!r->in.pPropTags) return false;
-
-       /* Step 1. Find PR_EMS_AB_HOME_MDB index */
-       propID = -1;
-       SPropTagArray = r->in.pPropTags;
-       for (i = 0; i < SPropTagArray->cValues; i++) {
-               if (SPropTagArray->aulPropTag[i] == PR_EMS_AB_HOME_MDB) {
-                       propID = i;
-                       break;
-               }
-       }
-       if (propID == -1) return false;
-
-       /* Retrieve the lpszA */
-       SRowSet = *r->out.ppRows;
-       lpProp = &(SRowSet->aRow->lpProps[propID]);
-
-       if (!lpProp) return false;
-       if (lpProp->ulPropTag != PR_EMS_AB_HOME_MDB) return false;
-
-       if (private->exchname) {
-               if (strstr(lpProp->value.lpszA, private->exchname)) {
-                       lpProp->value.lpszA = string_sub_talloc((TALLOC_CTX *) dce_call, lpProp->value.lpszA, private->exchname, 
-                                                               lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx));   
-               }
-       } else {
-               lpszA = talloc_strdup(dce_call, lpProp->value.lpszA);
-               if ((exchname = x500_get_servername(lpszA))) {
-                       private->exchname = talloc_strdup(NULL, exchname);
-                       lpProp->value.lpszA = string_sub_talloc((TALLOC_CTX *) dce_call, lpProp->value.lpszA, exchname, 
-                                                               lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx));
-                       talloc_free(exchname);
-               }
-               talloc_free(lpszA);
-       }
-
-       return true;
-}
-
-
-/**
-   \details This function looks if the server DN string in the request
-   holds the mapiproxy netbios name and replaces it with the original
-   Exchange server one fetched from NspiQueryRows or NspiGetProps.
-
-   \param dce_call pointer to the session context
-   \param r pointer to the NspiDNToMId structure
-
-   \return true on success or false if no occurrence of the mapiproxy
-   netbios name was found.
-*/
-bool mapiproxy_NspiDNToMId(struct dcesrv_call_state *dce_call, struct NspiDNToMId *r)
-{
-       struct dcesrv_mapiproxy_private *private;
-       const char                      *proxyname;
-       uint32_t                        i;
-
-       private = dce_call->context->private_data;
-       proxyname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
-
-       if (!private->exchname) return false;
-
-       for (i = 0; i < r->in.pNames->Count; i++) {
-               if (strstr(r->in.pNames->Strings[i], proxyname)) {
-                       r->in.pNames->Strings[i] = string_sub_talloc((TALLOC_CTX *) dce_call, r->in.pNames->Strings[i], proxyname, private->exchname);
-                       return true;
-               }
-       }
-
-       return false;
-}
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy_proto.h b/branches/plugfest/mapiproxy/dcesrv_mapiproxy_proto.h
deleted file mode 100644 (file)
index c9a3da0..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __DCESRV_MAPIPROXY_PROTO_H__
-#define        __DCESRV_MAPIPROXY_PROTO_H__
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-/* definitions from dcesrv_mapiproxy.c */
-NTSTATUS dcerpc_server_mapiproxy_init(void);
-NTSTATUS samba_init_module(void);
-
-NTSTATUS dcerpc_server_exchange_nsp_init(void);
-NTSTATUS dcerpc_server_exchange_emsmdb_init(void);
-
-/* definitions from dcesrv_mapiproxy_nspi.c */
-bool mapiproxy_NspiGetProps(struct dcesrv_call_state *, struct NspiGetProps *);
-bool mapiproxy_NspiQueryRows(struct dcesrv_call_state *, struct NspiQueryRows *);
-bool mapiproxy_NspiDNToMId(struct dcesrv_call_state *, struct NspiDNToMId *);
-
-/* definitions from dcesrv_mapiproxy_rfr.c */
-bool mapiproxy_RfrGetNewDSA(struct dcesrv_call_state *, struct RfrGetNewDSA *);
-
-/* init functions definitions from gen_ndr/ndr_exchange_s.c */
-
-NTSTATUS dcerpc_server_exchange_store_admin3_init(void);
-NTSTATUS dcerpc_server_exchange_store_admin2_init(void);
-NTSTATUS dcerpc_server_exchange_store_admin1_init(void);
-NTSTATUS dcerpc_server_exchange_ds_rfr_init(void);
-NTSTATUS dcerpc_server_exchange_sysatt_cluster_init(void);
-NTSTATUS dcerpc_server_exchange_system_attendant_init(void);
-NTSTATUS dcerpc_server_exchange_mta_init(void);
-NTSTATUS dcerpc_server_exchange_drs_init(void);
-NTSTATUS dcerpc_server_exchange_xds_init(void);
-NTSTATUS dcerpc_server_exchange_mta_qadmin_init(void);
-NTSTATUS dcerpc_server_exchange_store_information_init(void);
-NTSTATUS dcerpc_server_exchange_nsp_init(void);
-NTSTATUS dcerpc_server_exchange_emsmdb_init(void);
-NTSTATUS dcerpc_server_exchange_async_emsmdb_init(void);
-NTSTATUS dcerpc_server_exchange_unknown_init(void);
-
-/* definitions from samba4: librpc/ndr/ndr_table.c */
-NTSTATUS                               ndr_table_init(void);
-NTSTATUS                               ndr_table_register(const struct ndr_interface_table *);
-const struct ndr_interface_table       *ndr_table_by_uuid(const struct GUID *);
-const struct ndr_interface_list                *ndr_table_list(void);
-const struct ndr_interface_table       *ndr_table_by_name(const char *);
-
-/* The following definitions come from dcesrv_mapiproxy_unused.c  */
-void dcesrv_ec_store_admin3_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct ec_store_admin3_dummy *);
-void dcesrv_ec_store_admin2_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct ec_store_admin2_dummy *);
-void dcesrv_ec_store_admin1_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct ec_store_admin1_dummy *);
-enum MAPISTATUS dcesrv_RfrGetNewDSA(struct dcesrv_call_state *, TALLOC_CTX *,struct RfrGetNewDSA *);
-enum MAPISTATUS dcesrv_RfrGetFQDNFromLegacyDN(struct dcesrv_call_state *, TALLOC_CTX *,struct RfrGetFQDNFromLegacyDN *);
-void dcesrv_sysatt_cluster_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct sysatt_cluster_dummy *);
-void dcesrv_sysatt_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct sysatt_dummy *);
-void dcesrv_MtaBind(struct dcesrv_call_state *, TALLOC_CTX *,struct MtaBind *);
-void dcesrv_MtaBindAck(struct dcesrv_call_state *, TALLOC_CTX *,struct MtaBindAck *);
-void dcesrv_ds_abandon(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_abandon *);
-void dcesrv_ds_add_entry(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_add_entry *);
-void dcesrv_ds_bind(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_bind *);
-void dcesrv_ds_compare(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_compare *);
-void dcesrv_ds_list(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_list *);
-void dcesrv_ds_modify_entry(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_modify_entry *);
-void dcesrv_ds_modify_rdn(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_modify_rdn *);
-void dcesrv_ds_read(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_read *);
-void dcesrv_ds_receive_result(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_receive_result *);
-void dcesrv_ds_remove_entry(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_remove_entry *);
-void dcesrv_ds_search(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_search *);
-void dcesrv_ds_unbind(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_unbind *);
-void dcesrv_ds_wait(struct dcesrv_call_state *, TALLOC_CTX *,struct ds_wait *);
-void dcesrv_dra_replica_add(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_replica_add *);
-void dcesrv_dra_replica_delete(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_replica_delete *);
-void dcesrv_dra_replica_synchronize(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_replica_synchronize *);
-void dcesrv_dra_reference_update(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_reference_update *);
-void dcesrv_dra_authorize_replica(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_authorize_replica *);
-void dcesrv_dra_unauthorize_replica(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_unauthorize_replica *);
-void dcesrv_dra_adopt(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_adopt *);
-void dcesrv_dra_set_status(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_set_status *);
-void dcesrv_dra_modify_entry(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_modify_entry *);
-void dcesrv_dra_delete_subref(struct dcesrv_call_state *, TALLOC_CTX *,struct dra_delete_subref *);
-void dcesrv_xds_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct xds_dummy *);
-void dcesrv_exchange_mta_qadmin(struct dcesrv_call_state *, TALLOC_CTX *,struct exchange_mta_qadmin *);
-void dcesrv_exchange_store_information_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct exchange_store_information_dummy *);
-
-
-/* NSPI protocol functions */
-enum MAPISTATUS dcesrv_NspiBind(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiBind *);
-enum MAPISTATUS dcesrv_NspiUnbind(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiUnbind *);
-enum MAPISTATUS dcesrv_NspiUpdateStat(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiUpdateStat *);
-enum MAPISTATUS dcesrv_NspiQueryRows(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiQueryRows *);
-enum MAPISTATUS dcesrv_NspiSeekEntries(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiSeekEntries *);
-enum MAPISTATUS dcesrv_NspiGetMatches(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetMatches *);
-enum MAPISTATUS dcesrv_NspiResortRestriction(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiResortRestriction *);
-enum MAPISTATUS dcesrv_NspiDNToMId(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiDNToMId *);
-enum MAPISTATUS dcesrv_NspiGetPropList(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetPropList *);
-enum MAPISTATUS dcesrv_NspiGetProps(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetProps *);
-enum MAPISTATUS dcesrv_NspiCompareMIds(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiCompareMIds *);
-enum MAPISTATUS  dcesrv_NspiModProps(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiModProps *);
-enum MAPISTATUS dcesrv_NspiGetSpecialTable(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetSpecialTable *);
-enum MAPISTATUS dcesrv_NspiGetTemplateInfo(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetTemplateInfo *);
-enum MAPISTATUS dcesrv_NspiModLinkAtt(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiModLinkAtt *);
-enum MAPISTATUS dcesrv_NspiDeleteEntries(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiDeleteEntries *);
-enum MAPISTATUS dcesrv_NspiQueryColumns(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiQueryColumns *);
-enum MAPISTATUS dcesrv_NspiGetNamesFromIDs(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetNamesFromIDs *);
-enum MAPISTATUS dcesrv_NspiGetIDsFromNames(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiGetIDsFromNames *);
-enum MAPISTATUS dcesrv_NspiResolveNames(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiResolveNames *);
-enum MAPISTATUS dcesrv_NspiResolveNamesW(struct dcesrv_call_state *, TALLOC_CTX *,struct NspiResolveNamesW *);
-
-/* EMSMDB protocol functions */
-enum MAPISTATUS dcesrv_EcDoConnect(struct dcesrv_call_state *, TALLOC_CTX *,struct EcDoConnect *);
-enum MAPISTATUS dcesrv_EcDoDisconnect(struct dcesrv_call_state *, TALLOC_CTX *,struct EcDoDisconnect *);
-enum MAPISTATUS dcesrv_EcDoRpc(struct dcesrv_call_state *, TALLOC_CTX *,struct EcDoRpc *);
-void dcesrv_EcGetMoreRpc(struct dcesrv_call_state *, TALLOC_CTX *,struct EcGetMoreRpc *);
-enum MAPISTATUS dcesrv_EcRRegisterPushNotification(struct dcesrv_call_state *, TALLOC_CTX *,struct EcRRegisterPushNotification *);
-enum MAPISTATUS dcesrv_EcRUnregisterPushNotification(struct dcesrv_call_state *, TALLOC_CTX *,struct EcRUnregisterPushNotification *);
-void dcesrv_EcDummyRpc(struct dcesrv_call_state *, TALLOC_CTX *,struct EcDummyRpc *);
-void dcesrv_EcRGetDCName(struct dcesrv_call_state *, TALLOC_CTX *,struct EcRGetDCName *);
-void dcesrv_EcRNetGetDCName(struct dcesrv_call_state *, TALLOC_CTX *,struct EcRNetGetDCName *);
-void dcesrv_EcDoRpcExt(struct dcesrv_call_state *, TALLOC_CTX *,struct EcDoRpcExt *);
-enum MAPISTATUS dcesrv_EcDoConnectEx(struct dcesrv_call_state *, TALLOC_CTX *, struct EcDoConnectEx *);
-enum MAPISTATUS dcesrv_EcDoRpcExt2(struct dcesrv_call_state *, TALLOC_CTX *, struct EcDoRpcExt2 *);
-void dcesrv_EcUnknown0xC(struct dcesrv_call_state *, TALLOC_CTX *, struct EcUnknown0xC *);
-void dcesrv_EcUnknown0xD(struct dcesrv_call_state *, TALLOC_CTX *, struct EcUnknown0xD *);
-enum MAPISTATUS dcesrv_EcDoAsyncConnectEx(struct dcesrv_call_state *, TALLOC_CTX *, struct EcDoAsyncConnectEx *);
-void dcesrv_unknown_dummy(struct dcesrv_call_state *, TALLOC_CTX *,struct unknown_dummy *);
-
-/* AsyncEMSMDB protocol function */
-enum MAPISTATUS dcesrv_EcDoAsyncWaitEx(struct dcesrv_call_state *, TALLOC_CTX *, struct EcDoAsyncWaitEx *);
-
-__END_DECLS
-
-#endif /* ! __DCESRV_MAPIPROXY_PROTO_H__ */
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy_rfr.c b/branches/plugfest/mapiproxy/dcesrv_mapiproxy_rfr.c
deleted file mode 100644 (file)
index bc8fde4..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-   MAPI Proxy - RFR
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-
-/**
-   \file dcesrv_mapiproxy_rfr.c
-
-   \brief NSPI Referral hook functions
- */
-
-
-/**
-   \details This function replaces the Exchange server FQDN with
-   mapiproxy one.
-
-   \return true on success, otherwise false
- */
-bool mapiproxy_RfrGetNewDSA(struct dcesrv_call_state *dce_call, struct RfrGetNewDSA *r)
-{
-       /* Sanity checks */
-       if (!r->out.ppszServer) return false;
-
-       *r->out.ppszServer = talloc_asprintf(dce_call, "%s.%s", 
-                                            lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
-                                            lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
-       strlower_m((char *)*r->out.ppszServer);
-
-       return true;
-}
diff --git a/branches/plugfest/mapiproxy/dcesrv_mapiproxy_unused.c b/branches/plugfest/mapiproxy/dcesrv_mapiproxy_unused.c
deleted file mode 100644 (file)
index 96913f6..0000000
+++ /dev/null
@@ -1,822 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#define        _GNU_SOURCE 1
-
-#include "config.h"
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-
-#include <talloc.h>
-#include <dcerpc.h>
-
-#include "gen_ndr/exchange.h"
-
-#include <dcerpc_server.h>
-#include <util.h>
-#include <param.h>
-
-#include "gen_ndr/ndr_exchange.h"
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-
-#include <sys/types.h>
-
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-/*
-   endpoint server for the exchange_store_admin3 pipe
-*/
-
-/*
-  ec_store_admin3_dummy
-*/
-void dcesrv_ec_store_admin3_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ec_store_admin3_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-   endpoint server for the exchange_store_admin2 pipe
-*/
-
-/*
-  ec_store_admin2_dummy
-*/
-void dcesrv_ec_store_admin2_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ec_store_admin2_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-   endpoint server for the exchange_store_admin1 pipe
-*/
-
-/*
-  ec_store_admin1_dummy
-*/
-void dcesrv_ec_store_admin1_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ec_store_admin1_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-   endpoint server for the exchange_ds_rfr pipe
-*/
-
-/*
-  RfrGetNewDSA
-*/
-enum MAPISTATUS dcesrv_RfrGetNewDSA(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                   struct RfrGetNewDSA *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  RfrGetFQDNFromLegacyDN
-*/
-enum MAPISTATUS dcesrv_RfrGetFQDNFromLegacyDN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                             struct RfrGetFQDNFromLegacyDN *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_sysatt_cluster pipe
-*/
-
-/*
-  sysatt_cluster_dummy
-*/
-void dcesrv_sysatt_cluster_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct sysatt_cluster_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_system_attendant pipe
-*/
-
-/*
-  sysatt_dummy
-*/
-void dcesrv_sysatt_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct sysatt_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_mta pipe
-*/
-
-/*
-  MtaBind
-*/
-void dcesrv_MtaBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct MtaBind *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  MtaBindAck
-*/
-void dcesrv_MtaBindAck(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct MtaBindAck *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_drs pipe
-*/
-
-/*
-  ds_abandon
-*/
-void dcesrv_ds_abandon(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_abandon *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_add_entry
-*/
-void dcesrv_ds_add_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_add_entry *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_bind
-*/
-void dcesrv_ds_bind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_bind *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_compare
-*/
-void dcesrv_ds_compare(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_compare *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_list
-*/
-void dcesrv_ds_list(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_list *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_modify_entry
-*/
-void dcesrv_ds_modify_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_modify_entry *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_modify_rdn
-*/
-void dcesrv_ds_modify_rdn(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_modify_rdn *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_read
-*/
-void dcesrv_ds_read(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_read *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_receive_result
-*/
-void dcesrv_ds_receive_result(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_receive_result *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_remove_entry
-*/
-void dcesrv_ds_remove_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_remove_entry *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_search
-*/
-void dcesrv_ds_search(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_search *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_unbind
-*/
-void dcesrv_ds_unbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_unbind *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  ds_wait
-*/
-void dcesrv_ds_wait(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct ds_wait *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_replica_add
-*/
-void dcesrv_dra_replica_add(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_replica_add *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_replica_delete
-*/
-void dcesrv_dra_replica_delete(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_replica_delete *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_replica_synchronize
-*/
-void dcesrv_dra_replica_synchronize(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_replica_synchronize *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_reference_update
-*/
-void dcesrv_dra_reference_update(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_reference_update *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_authorize_replica
-*/
-void dcesrv_dra_authorize_replica(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_authorize_replica *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_unauthorize_replica
-*/
-void dcesrv_dra_unauthorize_replica(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_unauthorize_replica *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_adopt
-*/
-void dcesrv_dra_adopt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_adopt *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_set_status
-*/
-void dcesrv_dra_set_status(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_set_status *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_modify_entry
-*/
-void dcesrv_dra_modify_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_modify_entry *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
-  dra_delete_subref
-*/
-void dcesrv_dra_delete_subref(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct dra_delete_subref *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_xds pipe
-*/
-
-/*
-  xds_dummy
-*/
-void dcesrv_xds_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct xds_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_mta_qadmin pipe
-*/
-
-/*
-  exchange_mta_qadmin
-*/
-void dcesrv_exchange_mta_qadmin(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct exchange_mta_qadmin *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   endpoint server for the exchange_store_information pipe
-*/
-
-/*
-  exchange_store_information_dummy
-*/
-void dcesrv_exchange_store_information_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct exchange_store_information_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/* 
-   endpoint server for the exchange_nsp pipe
-*/
-
-/* 
-  NspiBind 
-*/
-
-enum MAPISTATUS dcesrv_NspiBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiBind *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiUnbind 
-*/
-enum MAPISTATUS dcesrv_NspiUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiUnbind *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiUpdateStat 
-*/
-enum MAPISTATUS dcesrv_NspiUpdateStat(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiUpdateStat *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiQueryRows 
-*/
-enum MAPISTATUS dcesrv_NspiQueryRows(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiQueryRows *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiSeekEntries 
-*/
-enum MAPISTATUS dcesrv_NspiSeekEntries(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                      struct NspiSeekEntries *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetMatches 
-*/
-enum MAPISTATUS dcesrv_NspiGetMatches(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                     struct NspiGetMatches *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiResortRestriction 
-*/
-enum MAPISTATUS dcesrv_NspiResortRestriction(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                            struct NspiResortRestriction *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiDNToMId
-*/
-enum MAPISTATUS dcesrv_NspiDNToMId(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                  struct NspiDNToMId *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetPropList 
-*/
-enum MAPISTATUS dcesrv_NspiGetPropList(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                      struct NspiGetPropList *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetProps 
-*/
-enum MAPISTATUS dcesrv_NspiGetProps(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                   struct NspiGetProps *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiCompareMIds 
-*/
-enum MAPISTATUS dcesrv_NspiCompareMIds(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                      struct NspiCompareMIds *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiModProps 
-*/
-enum MAPISTATUS dcesrv_NspiModProps(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                   struct NspiModProps *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetSpecialTable 
-*/
-enum MAPISTATUS dcesrv_NspiGetSpecialTable(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiGetSpecialTable *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetTemplateInfo 
-*/
-enum MAPISTATUS dcesrv_NspiGetTemplateInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiGetTemplateInfo *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiModLInkAtt 
-*/
-enum MAPISTATUS dcesrv_NspiModLinkAtt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                     struct NspiModLinkAtt *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiDeleteEntries 
-*/
-enum MAPISTATUS dcesrv_NspiDeleteEntries(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                        struct NspiDeleteEntries *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiQueryColumns 
-*/
-enum MAPISTATUS dcesrv_NspiQueryColumns(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiQueryColumns *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetNamesFromIDs 
-*/
-enum MAPISTATUS dcesrv_NspiGetNamesFromIDs(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                          struct NspiGetNamesFromIDs *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiGetIDsFromNames 
-*/
-enum MAPISTATUS dcesrv_NspiGetIDsFromNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                          struct NspiGetIDsFromNames *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiResolveNames 
-*/
-enum MAPISTATUS dcesrv_NspiResolveNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiResolveNames *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  NspiResolveNamesW 
-*/
-enum MAPISTATUS dcesrv_NspiResolveNamesW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct NspiResolveNamesW *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/* 
-   endpoint server for the exchange_emsmdb pipe
-*/
-
-/* 
-  EcDoConnect 
-*/
-enum MAPISTATUS dcesrv_EcDoConnect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDoConnect *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcDoDisconnect 
-*/
-enum MAPISTATUS dcesrv_EcDoDisconnect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDoDisconnect *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcDoRpc 
-*/
-enum MAPISTATUS dcesrv_EcDoRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDoRpc *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcGetMoreRpc 
-*/
-void dcesrv_EcGetMoreRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcGetMoreRpc *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcRRegisterPushNotification 
-*/
-enum MAPISTATUS dcesrv_EcRRegisterPushNotification(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcRRegisterPushNotification *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcRUnregisterPushNotification 
-*/
-enum MAPISTATUS dcesrv_EcRUnregisterPushNotification(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcRUnregisterPushNotification *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcDummyRpc 
-*/
-void dcesrv_EcDummyRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDummyRpc *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcRGetDCName 
-*/
-void dcesrv_EcRGetDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcRGetDCName *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcRNetGetDCName 
-*/
-void dcesrv_EcRNetGetDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcRNetGetDCName *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/* 
-  EcDoRpcExt 
-*/
-void dcesrv_EcDoRpcExt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDoRpcExt *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/* 
-  EcDoConnect Ex
-*/
-enum MAPISTATUS dcesrv_EcDoConnectEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct EcDoConnectEx *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-   EcDoRpcExt2
- */
-enum MAPISTATUS dcesrv_EcDoRpcExt2(struct dcesrv_call_state  *dce_call, TALLOC_CTX *mem_ctx,
-                                  struct EcDoRpcExt2 *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-  EcDoUnknown0xc
- */
-void dcesrv_EcUnknown0xC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                       struct EcUnknown0xC *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-  EcDoAsyncConnectEx
- */
-void dcesrv_EcUnknown0xD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                        struct EcUnknown0xD *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-  EcDoAsyncConnectEx
- */
-enum MAPISTATUS dcesrv_EcDoAsyncConnectEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                         struct EcDoAsyncConnectEx *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/*
-  endpoint server for the exchange_async_emsmdb pipe
- */
-enum MAPISTATUS dcesrv_EcDoAsyncWaitEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                                      struct EcDoAsyncWaitEx *r)
-{
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/* 
-   endpoint server for the exchange_unknown pipe
-*/
-
-/* 
-  unknown_dummy 
-*/
-void dcesrv_unknown_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct unknown_dummy *r)
-{
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
diff --git a/branches/plugfest/mapiproxy/documentation/Mainpage.doxy b/branches/plugfest/mapiproxy/documentation/Mainpage.doxy
deleted file mode 100644 (file)
index 5ec0210..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/** @mainpage The OpenChange Server Reference
-
-<h2>Introduction</h2>
-
-This is the online reference for configuring mapiproxy and
-developing with the OpenChange server code:
-- Users will find documentation on how to setup mapiproxy, mapiproxy
-  modules, openchange server, how to provision samba4 and
-  openchange. User's documentation is tagged with the user icon.
-
-- Developers will find documentation on OpenChange server internals,
-  design, architecture, implementation and API references. Developer's
-  documentation is tagged with the box icon.
-
-<h2>MAPIProxy documentation</h2>
-
-<table style="clear:both; width:100%; text-align: justify; background-color:#ffffff; border:0px; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-    <img src="mapiproxy_logo.png"/>
-</td>
-<td style="border:none;">
-MAPIProxy is an endpoint server for Samba4 which proxies ExchangeRPC
-traffic from MAPI clients (Outlook, openchangeclient, etc.) to
-Microsoft Exchange Server (and back). It can either act as a
-transparent proxy, for hacking, monitoring or debugging purposes or
-modify traffic on the fly and so provide new features. It is primarily
-developed for - but not limited to - third-party implementors looking
-for a development framework they can use for MAPI acceleration
-purposes.
-</td>
-</tr>
-<tr style="border:none;">
-<td style="border:none;">
-<table style="clear:both; width:100%; text-align: left; background-color:#ffffff; border:0px; padding:5px;">
-       <tr style="border:none;">
-                  <td style="border:none;">
-              <img src="userdoc.png"/>
-          </td>
-          <td style="border:none;">
-              <img src="devdoc.png"/>
-          </td>
-      </tr>
-</table>
-</td>
-<td style="border:none;"><b><a href="mapiproxy-documentation.html">Link to MAPIProxy documentation</a></b>:</td>
-</tr>
-</table>
-
-
-<h2>MAPIStore documentation</h2>
-
-<table style="clear:both; width:100%; text-align: justify; background-color:#ffffff; border:0px; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-    <img src="mapistore_logo.png"/>
-</td>
-<td style="border:none;">
-
-MAPIStore is the SAL component of OpenChange server. SAL stands for
-Storage Abstraction Layer. It is the component used by OpenChange
-Server to push/get information (messages, folders) to/from storage
-backends. The following document intends to describe the
-overall/theoretical SAL behavior and contraints we need to consider
-when dealing with MAPI/EMSMDB. It also describes the semantics and
-inner working of its storage backends.
-
-</td>
-</tr>
-<tr style="border:none;">
-<td style="border:none;">
-<table style="clear:both; width:100%; text-align: left; background-color:#ffffff; border:0px; padding:5px;">
-       <tr style="border:none;">
-          <td style="border:none;">
-              <img src="devdoc.png"/>
-          </td>
-      </tr>
-</table>
-</td>
-<td style="border:none;"><b><a href="mapistore-documentation.html">Link to MAPIStore documentation</a></b>:</td>
-</tr>
-</table>
-
-*/
\ No newline at end of file
diff --git a/branches/plugfest/mapiproxy/documentation/mapiproxy-documentation.doxy b/branches/plugfest/mapiproxy/documentation/mapiproxy-documentation.doxy
deleted file mode 100644 (file)
index 4d088d4..0000000
+++ /dev/null
@@ -1,1489 +0,0 @@
-/**
-\page mapiproxy-documentation
-
-<center><img src="mapiproxy.png"></center>
-
-\section Contents
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<ul>
- <li><a href="#revision">        Revision History        </a></li>
- <li><a href="#introduction"> 1. Introduction            </a>
-  <ul>
-    <li><a href="#purpose"> 1.1. Purpose and Scope</a></li>
-    <li><a href="#overview">1.2. General Overview</a></li>
-    <li><a href="#bugs">    1.3. Bugs and Limitations </a></li>
-  </ul>
- </li>
- <li><a href="#install">  2. Installation</a>
-  <ul>
-    <li><a href="#download">  2.1. Download MAPIProxy</a></li>
-    <li><a href="#samba4">    2.2. Samba4 installation</a></li>
-    <li><a href="#mpinstall"> 2.3. MAPIProxy installation</a></li>
-  </ul>
- </li>
- <li><a href="#config"> 3. Configuration</a>
-  <ul>
-    <li><a href="#minute">    3.1. 5-Minute Configuration</a></li>
-  </ul>
- </li>
- <li><a href="#concepts"> 4. Technical Concepts</a>
-   <ul>
-    <li><a href="#bindings">   4.1. NSPI Bindings Replacement</a></li>
-    <li><a href="#rfr">        4.2. NSPI Referral FQDN Replacement</a></li>
-    <li><a href="#retrograde"> 4.3. Force EMSMDB Protocol Version</a></li>
-    <li><a href="#idl">        4.4. OpenChange IDL file</a></li>
-   </ul>
- </li>
- <li><a href="#mod_dev"> 5. Stackable Modules </a>
-   <ul>
-    <li><a href="#mpm_overview"> 5.1. General Overview</a></li>
-    <li><a href="#mpm_ep">       5.2. Module entry point</a></li>
-    <li><a href="#mpm_hooks">    5.3. Module Hooks</a></li>
-    <li><a href="#mpm_mapiproxy">5.4. mapiproxy structure</a></li>
-   </ul>
- </li>
- <li><a href="#modules"> 6. Available Modules </a>
-   <ul>
-    <li><a href="#mod_downgrade"> 6.1. Downgrade Module</a></li>
-    <li><a href="#mod_pack">      6.2. Pack Module</a></li>
-    <li><a href="#mod_cache">     6.3. Cache Module</a></li>
-   </ul>
- </li>
- <li><a href="#server_mode"> 7. Server Mode </a>
-   <ul>
-    <li><a href="#server_conf">     7.1. 5-Minute Configuration</a></li>
-    <li><a href="#server_overview"> 7.2. General Overview </a></li>
-   </ul>
- </li>
- <li><a href="#faq">8. Frequently Asked Questions</a>
-  <ul>
-   <li><a href="#notcompleted"> 8.1. The action could not be completed</a></li>
-   <li><a href="#cantopen">    8.2. Profile creation goes fine, but Outlook can't open your default e-mail folders</a></li>
-   <li><a href="#dc">           8.3. Does MAPIProxy need to be domain controller?</a></li>
-   <li><a href="#gnutls">       8.4. Generating Samba's private keys takes infinite time</a></li>
-   <li><a href="#gmake">       8.5. On Ubuntu <i>make samba-git</i> exits with <i>gmake: not found</i></a></li>
-  </ul>
- </li>
-</ul>
-</td>
-</tr>
-</table>
-<br/>
-
-<a name="revision"></a><h2>Revision History</h2>
-<table align="center" width="80%">
-       <tr>
-          <td style="text-align:center"><strong>Date</strong></td>
-          <td style="text-align:center"><strong>Revision Number</strong></td>
-          <td style="text-align:center"><strong>Author</strong></td>
-          <td style="text-align:center"><strong>Revision Content</strong></td>
-       </tr>
-       <tr>
-          <td style="text-align:center">27/11/2010</td>
-          <td style="text-align:center"><strong>0.6.3</strong></td>
-          <td style="text-align:center">Brad Hards</td>
-          <td style="text-align:left">Fix tracker link and a couple of typos.</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">03/03/09</td>
-          <td style="text-align:center"><strong>0.6.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Add configuration info for server mode.</td>
-       </tr>   
-       <tr>
-          <td style="text-align:center">01/02/09</td>
-          <td style="text-align:center"><strong>0.6.1</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Add configuration info for server mode.</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">04/01/09</td>
-          <td style="text-align:center"><strong>0.6</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">server mode documented, update
-          mapiproxy naming to MAPIProxy.</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">29/12/08</td>
-          <td style="text-align:center"><strong>0.5.5</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Add 3 new questions to FAQ section</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">09/12/08</td>
-          <td style="text-align:center"><strong>0.5.4</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Add dcesrv:assoc group checking
-          to smb.conf configuration requirements</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">10/07/08</td>
-          <td style="text-align:center"><strong>0.5.3</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Rename smbd process to samba
-          session API and update documentation</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">08/26/08</td>
-          <td style="text-align:center"><strong>0.5.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">documentation update on NSPI
-          replacement and new FAQ question added</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">08/26/08</td>
-          <td style="text-align:center"><strong>0.5.1</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">documentation on NSPI referral added</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">08/11/08</td>
-          <td style="text-align:center"><strong>0.5</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">unbind hook added, cache
-          module documentation and scenario added </td>
-       </tr>
-       <tr>
-          <td style="text-align:center">07/23/08</td>
-          <td style="text-align:center"><strong>0.4</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">MAPIProxy API hooks, IDL
-          update, mapiproxy structure description and documentation
-          added for the cache module</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">06/25/08</td>
-          <td style="text-align:center"><strong>0.3.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Minor installation update</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">06/04/08</td>
-          <td style="text-align:center"><strong>0.3.1</strong></td>
-          <td style="text-align:center">Brad Hards</td>
-          <td style="text-align:left">Minor edits</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">05/27/08</td>
-          <td style="text-align:center"><strong>0.3</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Available modules section
-          added</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">05/24/08</td>
-          <td style="text-align:center"><strong>0.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">EMSMDB protocol version
-          subsection updated, modules system section added, 5-minute
-          configuration updated</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">05/15/08</td>
-          <td style="text-align:center"><strong>0.1</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:center">Initial Revision</td>
-       </tr>
-</table>
-<br/>
-
-<a name="introduction"></a><h2>1. Introduction</h2>
-
-<a name="purpose"></a><h3>1.1. Purpose and Scope</h3>
-
-MAPIProxy is an endpoint server for Samba4 which proxies ExchangeRPC
-traffic from MAPI clients (Outlook, openchangeclient, etc.) to
-Microsoft Exchange Server (and back). It can either act as a
-transparent proxy, for hacking, monitoring or debugging purposes or
-modify traffic on the fly and so provide new features. It is primarily
-developed for - but not limited to - third-party implementors looking
-for a development framework they can use for MAPI acceleration
-purposes.
-
-This project is originally based on dcerpc_remote.c code from Stefan
-Metzemacher (Samba4 trunk) and is released under GPLv3 or later. It
-creates a dynamic shared object file which is loaded into samba and 
-uses the Samba configuration file (smb.conf) to set common options.
-
-<br/>
-<a name="overview"></a><h3>1.2. General overview</h3>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_overview.png" />
-</td>
-</tr>
-</table>
-<center>Figure 1. General MAPIProxy network overview</center>
-
-The MAPIProxy traffic can be divided into 3 different parts as
-described in the figure above:
-
-<ul>
-<li style="text-align:justify;"><strong>[1] clients to
-MAPIProxy:</strong><br/>The origin of a client connect does not 
-have much importance: it can either be an incoming connection from a
-real MAPI client, a connection relayed from another third-party
-proxy or another MAPIProxy instance. MAPIProxy runs as an endpoint
-server registered when samba starts. When the Samba4 endpoint mapper
-receives an incoming connection asking for one of the ExchangeRPC
-endpoints: NSPI (Name Service Provider Interface - Address Book) or
-EMSMDB (Exchange Message Store), the endpoint mapper redirects
-ExchangeRPC traffic to MAPIProxy which will pull, push and dispatch
-MAPI operations.</li>
-
-<li style="text-align:justify;"><strong>[2] MAPIProxy to
-MAPIProxy:</strong><br/>The main objective of MAPIProxy is not to
-directly connect to the remote message server, but rather to relay
-some kind of modified MAPI traffic to the next MAPIProxy hop. This
-configuration can be used to add a compression layer between MAPIProxy
-instances, or to send specific third-party vendor information.
-However, a proxied connection directly from a MAPI client to an 
-Exchange server (i.e. <i>client-MAPIProxy-server</i> is possible and
-such a configuration could be used for many other purposes.<br/></li>
-
-<li><strong>[3] MAPIProxy to server:</strong><br/>This last node is
-responsible for restoring MAPI contents and pushing it to the real
-Exchange server. </li> 
-</ul>
-<br/>
-
-<a name="bugs"></a><h2>1.3. Bugs and Limitations</h2></a>
-
-If you find bugs, limitations or have features you would like to see
-included in MAPIProxy, please register on the <a
-href="http://tracker.openchange.org">OpenChange Tracker System</a>
-and create new tickets.
-<br/>
-
-
-<a name="install"></a><h2>2. Installation</h2>
-<a name="download"></a><h3>2.1. Download MAPIProxy</h3>
-
-MAPIProxy is only available through SVN at the moment. A tarball 
-release will only be made when we have a stabilized API with a
-preliminary set of useful features. You will need a <a
-href="http://subversion.tigris.org/">SVN client</a> to download
-openchange (including  MAPIProxy).
-
-\code
- $ svn co https://svn.openchange.org/openchange/trunk openchange
-\endcode
-
-<a name="samba4"></a><h3>2.2. Samba4 installation</h3>
-
-The MAPIProxy implementation requires a very recent Samba4 version
-in order to run properly. If Samba4 is planned to be installed
-from scratch for MAPIProxy only, please use the <i>make samba-git</i>
-compilation rule provided in the build system. This command will
-automate most part of the samba4 installation process. The only
-requirement for this step is to have an up to date <a
-href="http://git.or.cz/">GIT version</a> installed on the system.
-
-\code
-  # make samba-git
-\endcode
-
-When the installation process is finished, a running samba4
-installation will be located in <i>/usr/local/samba/</i>. You will possibly be
-required to run <i>ldconfig</i> before you move to next steps. Please
-refer to <i>doc/howto.txt</i> for further information on openchange
-compilation.
-<br/>
-
-<a name="mpinstall"></a><h3>2.3. MAPIProxy installation</h3>
-
-If you have existing OpenChange DSO in the
-<i>/usr/local/samba/modules/dcerpc_server/</i> folder, such as
-<i>dcesrv_exchange.so</i>, <strong>please remove them prior loading
-samba with MAPIProxy.</strong>
-
-\code
-  $ ./autogen.sh
-  $ ./configure --prefix=/usr/local/samba
-  $ make
-  # make install
-  # rm -rf /usr/local/samba/modules/dcerpc_server/dcesrv_exchange.so
-\endcode
-
-<br/>
-
-
-<a name="config"></a><h2>3. Configuration</h2>
-<a name="minute"></a><h3>3.1. 5-Minute Configuration</h3>
-
-This 5-Minute configuration will help you set up a minimal MAPIProxy
-using specified credentials and relaying traffic from Outlook clients
-to a remote Exchange server. This configuration will be performed in three
-steps:
-
-<ul>
-<li><strong>[1] Provision Samba</strong>:<br/>From samba4/source4
-directory, run under the root account:
-\code
-# ./setup/provision --realm=OPENCHANGE.LOCAL --domain=OPENCHANGE \
-                    --adminpass=openchange --server-role='domain controller'
-\endcode
-
-If you don't have DNS resolution and your realm can't be resolved,
-samba will be unable to authenticate the user in its user database. You
-must specify a realm which MAPI clients and MAPIProxy can resolve.
-
-If everything works fine, the provisioning script will have created
-all the databases, populated the AD (Active Directory) and generated a
-valid smb.conf file.
-</li>
-
-<li><strong>[2] Add a user account</strong>:<br/>
-
-In this configuration, we'll set the same credentials both for the
-user in the windows domain and on the Samba4 server. Let say there is
-already a user named <i>testuser</i> with its password set to
-<i>openchange</i> on the Exchange server:
-\code
-# ./setup/newuser testuser
-New Password: openchange
-\endcode
-</li>
-
-<li><strong>[3] Configure MAPIProxy options</strong>:<br/>
-
-In this final step, we only need to customize a small set of parameters:
-<ul>
-
- <li style="text-align:justify;"><strong>dcerpc endpoint
- servers</strong>:<br/> MUST include epmapper and mapiproxy separated
- with comma.</li>
-
- <li
- style="text-align:justify;"><strong>dcerpc_mapiproxy:binding</strong>:<br/>
- This is the binding string used to connect to the remote Exchange
- server. The format of this string is: transport:address[flags]. In the
- example below, we'll be using the TCP over IP transport, connect on
- 192.168.1.1 and add the print flag so MAPI packets get dissected on
- samba stdout (or logfile).</li>
-
- <li
- style="text-align:justify;"><strong>dcerpc_mapiproxy:username</strong>
- and <strong>dcerpc_mapiproxy:password</strong>:<br/>The specified
- credentials we will be using to connect to the remote Exchange
- server.</li>
-
- <li
- style="text-align:justify;"><strong>dcerpc_mapiproxy:domain</strong>:<br/>
- The Windows domain the remote Exchange server belongs to.</li>
-
- <li
- style="text-align:justify;"><strong>dcerpc_mapiproxy:interfaces</strong>:<br/>
- In our case, we want to relay the whole ExchangeRPC traffic, so we
- need to load both the EMSMDB and NSP interface. In the meantime,
- people interested in NSPI proxy only would only have to load the
- exchange_nsp interface.</li>
-
-<li
-style="text-align:justify;"><strong>dcerpc_mapiproxy:modules</strong>:<br/>
-MAPIProxy provides a stackable modular system which primary objective
-is to provide developers an API for modules development. In our case
-we want to activate the <i>downgrade</i> module responsible for the
-EcDoConnect/EcDoRpc EMSMDB RPC functions negotiation.</li>
-
-</ul>
-
-\code
-[globals]
-        netbios name    = MAPIPROXY
-        workgroup       = OPENCHANGE
-        realm           = OPENCHANGE.LOCAL
-        server role     = domain controller
-
-       ### Configuration required by mapiproxy ###
-       dcesrv:assoc group checking = false
-        dcerpc endpoint servers = epmapper, mapiproxy
-
-        dcerpc_mapiproxy:binding = ncacn_ip_tcp:192.168.1.1[print]
-        dcerpc_mapiproxy:username = testuser
-        dcerpc_mapiproxy:password = openchange
-        dcerpc_mapiproxy:domain = EXCHANGE
-        dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
-       dcerpc_mapiproxy:modules = downgrade
-       ### Configuration required by mapiproxy ###
-
-
-[netlogon]
-        path = /usr/local/samba/var/locks/sysvol/openchange.local/scripts
-        read only = no
-
-[sysvol]
-        path = /usr/local/samba/var/locks/sysvol
-        read only = no
-\endcode
-</li>
-</ul>
-
-We are now ready to run samba:
-\code
- # samba -d5 -i -M single
-\endcode
-
-If everything works properly, the following lines should be displayed
-in samba output:
-\code
-DCERPC endpoint server 'exchange_emsmdb' registered
-DCERPC endpoint server 'exchange_nsp' registered
-DCERPC endpoint server 'exchange_ds_rfr' registered
-DCERPC endpoint server 'mapiproxy' registered
-dcesrv_interface_register: interface 'epmapper' registered on endpoint 'ncacn_np:[\pipe\epmapper]'
-dcesrv_interface_register: interface 'epmapper' registered on endpoint 'ncacn_ip_tcp:[135]'
-dcesrv_interface_register: interface 'epmapper' registered on endpoint 'ncalrpc:[EPMAPPER]'
-MAPIPROXY module 'downgrade' registered
-MAPIPROXY module 'downgrade' loaded
-mapiproxy_module_load 'downgrade' (Downgrade EMSMDB protocol version EcDoConnect/EcDoRpc)
-dcesrv_interface_register: interface 'exchange_emsmdb' registered on endpoint 'ncacn_np:[\pipe\lsass]'
-dcesrv_interface_register: interface 'exchange_emsmdb' registered on endpoint 'ncacn_np:[\pipe\protected_storage]'
-dcesrv_interface_register: interface 'exchange_emsmdb' registered on endpoint 'ncacn_ip_tcp:'
-dcesrv_interface_register: interface 'exchange_nsp' registered on endpoint 'ncacn_np:[\pipe\lsass]'
-dcesrv_interface_register: interface 'exchange_nsp' registered on endpoint 'ncacn_np:[\pipe\protected_storage]'
-dcesrv_interface_register: interface 'exchange_nsp' registered on endpoint 'ncacn_ip_tcp:[]'
-dcesrv_interface_register: interface 'exchange_ds_rfr' registered on endpoint 'ncacn_np:[\pipe\lsass]'
-dcesrv_interface_register: interface 'exchange_ds_rfr' registered on endpoint 'ncacn_np:[\pipe\protected_storage]'
-dcesrv_interface_register: interface 'exchange_ds_rfr' registered on endpoint 'ncacn_ip_tcp:[]'
-\endcode
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<strong>You should now be able to configure Outlook to use 
-an Exchange account with the proxy IP address and run Outlook
-seamlessly (both online or cached exchange mode).</strong>
-</td>
-</tr>
-</table>
-<br/>
-
-<a name="concepts"></a><h2>4. Technical Concepts</h2>
-<a name="bindings"></a><h3>4.1. NSPI Bindings Replacement</h3>
-
-When Outlook sets up an Exchange account using either the mail applet
-from the configuration panel or the account editor within Outlook, it
-uses the NSPI protocol (Name Service Provider Interface, effectively
-the address book provider). In this case, NSPI is used to resolve the
-Exchange username and fetch from Exchange server all information
-needed by Outlook to initiate direct connection to the EMSMDB pipe 
-(effectively the message store) the next time it connects to the server.
-<br/>
-
-At some point of the profile's creation process, Outlook queries
-Exchange for some specific connection information using the
-<strong>NspiGetProps (0x9) RPC operation </strong>. More specifically,
-when Outlook requests for the
-<strong>PR_EMS_AB_NETWORK_ADDRESS</strong> MAPI property, Exchange
-returns a list <strong>binding strings</strong>. Outlook next stores
-these binding strings at some location - associated to the Outlook
-profile - in the windows registry and uses them for future
-connections.<br/>
-
-Outlook can also rely on other information returned by NSPI functions
-and connect to the real Exchange server rather than MAPIProxy. Such
-case occurs when Outlook is able to resolve the exchange server using
-its hostname. This reference to the original Exchange server can be
-found when Outlook requests for the
-<strong>PR_EMS_AB_HOME_MDB</strong> MAPI property during the
-<strong>NspiQueryRows (0x3) RPC operation</strong>. MAPIProxy replaces
-the Exchange server name with its own netbios name and forward the
-reply to the client.<br/>
-
-In the meantime, this information is next used by Outlook to query a
-minimal entry ID for a distinguished name using this server
-name. MAPIProxy needs to substitute the server name in the inbound
-request string with the original exchange one.<br/>
-
-MAPIProxy needs to avoid Outlook clients being aware of this remote
-server address and trying to communicate directly with the remote server
-instead of using the proxy. In order to do this, MAPIProxy alters the
-Outlook-Exchange MAPI traffic and replaces these binding strings with
-the MAPIProxy FQDN and netbios name.
-
-<br/>
-<a name="rfr"></a><h3>4.2. NSPI Referral Replacement</h3>
-
-The Address Book Name Service Provider Interface (NSPI) Referral
-Service is a service used by Outlook to retrieve the name of an NSPI
-server. No NSPI connection should be initiated without first querying
-for the correct NSPI server. In this case, RFR returns the fully
-qualified domain name of the real Exchange server and starts using it
-if available. <br/>
-
-MAPIProxy needs to avoid Outlook clients being aware of this server
-address and trying to communicate directly with the remote server
-instead of using the proxy. In order to do this, MAPIProxy alters the
-Outlook-Exchange MAPI traffic and replaces the server DN returned by
-<strong>RfrGetNewDSA (0x0) RPC operation</strong> with the MAPIProxy
-realm as specified in smb.conf.
-
-<br/>
-<a name="retrograde"></a><h3>4.3. Force EMSMDB Protocol Version</h3>
-
-When Outlook starts and presumably calls MapiLogonEx, it first opens a
-connection to the Exchange server on the NSPI pipe, then on the EMSMDB
-pipe. Under Outlook 2003, the very first EMSMDB RPC call Outlook makes
-can be considered as a kind of <i>protocol version
-negotiation</i>. Depending on which version of Outlook is used, and how
-the Exchange server replies to the EMSMDB connect request, Outlook will
-either keep using the same pool of RPC calls or downgrade.
-
-For example Outlook 2003 (default behavior) tests if the remote server
-supports the 2 new EMSMDB calls (EcDoConnectEx/EcDoRpcExt2) introduced
-in Exchange 2003. If Exchange replies to the EcDoConnectEx request
-with a dcerpc_fault, it means the server does not support the RPC
-operation, presumably has a version before 2003, and Outlook needs to
-downgrade its version in order to communicate with the server:
-<ul>
-  <li>EcDoConnectEx (0xa) call
-    <ul>
-       <li>On success, Outlook will use EcDoRpcExt2 (0xb) to handle MAPI traffic</li>
-       <li>On failure (dcerpc_fault: nca_op_rng_error), Outlook calls
-       EcDoConnect (0x0) and use EcDoRpc (0x2) to handle MAPI
-       traffic</li>
-   </ul> 
-  </li>
-</ul>
-
-If MAPIProxy runs in an environment with Outlook clients and
-Exchange servers using a version above 2003, a last step is required
-to successfully use Outlook. The EcDoConnect RPC reply returns the Exchange
-server version (as an array of 3 short integers). When Outlook detects this
-particular server version, it automatically closes the connection and keep
-requesting indefinitely for EcDoConnectEx. To deal with this, MAPIProxy 
-modifies  the EcDoConnect reply sent by Exchange and replaces the server version
-with a one equal to that sent by Exchange 2000.
-
-In the meantime, if we reproduce this test with Outlook 2000 which
-doesn't support these 2 new RPC calls, Outlook will directly call
-EcDoConnect.
-
-The main difference between the EcDoConnectEx/EcDoRpcExt2 operations and
-the EcDoConnect/EcDoRpc operations is that the former use 
-both XOR 0xA5 obfuscation and LZ77 compression/Direct2 encoding;
-while the latter only use the XOR obfuscation to handle MAPI content.
-If MAPIProxy wants to act as an intelligent proxy (for example, to 
-be able to analyze MAPI content on the fly, compress MAPI data etc),
-receiving non compressed MAPI traffic would probably improve the
-overall process.
-
-Below is a list of Exchange/Outlook pairs and the EMSMDB connect
-function they will use by default:
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
- <tr style="border:none">
-  <td style="border:none"><strong>Exchange version</strong></td>
-  <td style="border:none"><strong>Outlook version</strong></td>
-  <td style="border:none"><strong>EMSMDB connect function</strong></td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0;">5.5/2000</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0;">any</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0;">EcDoConnect (0x0)</td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2003</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2000</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">EcDoConnect (0x0)</td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2007</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2000</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">EcDoConnect
-  (0x0)<br/>Microsoft officially says it is unsupported</td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2003</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2003-2007</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">EcDoConnectEx (0xa)</td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2007</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2003</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">EcDoConnectEx (0xa)</td>
- </tr>
- <tr>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2007</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">2007</td>
-  <td style="border:none;border-bottom:1px solid #e0e0e0">EcDoConnectEx (0xa)</td>
- </tr>
-</table>
-
-MAPIProxy reproduces the Exchange 2000 behavior and prevents Outlook
-from communicating with the Exchange server using the
-EcDoConnectEx/EcDoRpcExt2 as described in Figure 2 below. When Outlook
-sends an EcDoConnectEx request, MAPIProxy does not relay the request to
-the remote Exchange server and immediately returns a dcerpc_fault to
-Outlook. Outlook, assuming the server doesn't support this call uses
-EcDoConnect instead. From this call, MAPIProxy relay the information
-to Exchange.
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_emsmdb_graph.png" width="75%" height="75%" />
-</td>
-</tr>
-</table>
-<center>Figure 2. MAPIProxy behavior on Outlook EMSMDB connection</center>
-
-From the Exchange side, the server will analyze this EcDoConnect
-request as a call sent by Outlook 2000 or below version. Exchange
-works fine using this protocol version unless Exchange 2007 SP1 which
-appears to introduce client version restrictions <i>by default</i>. In
-the meantime, existing tests demonstrate similar restrictions would
-apply to Outlook 2003 connection (without MAPIProxy) and prevent
-Outlook version before 2007 connecting to Exchange 2007. Further information
-and solution is available at the following addresses:
-<ul>
-  <li><a href="http://support.microsoft.com/kb/555851">Earlier Outlook clients cant connect to Exchange 2007 Server</a></li>
-  <li><a href="http://msexchangeteam.com/archive/2006/02/20/419994.aspx">Exchange 12 and Public Folders</a></li>
-</ul>
-<br/>
-
-<a name="idl"></a><h3> 4.4. OpenChange IDL File </h3>
-
-IDL stands for Interface Definition Language and OpenChange uses this
-format to describe ExchangeRPC communications. This file is processed
-by pidl (Perl IDL compiler provided by Samba4) which turns this
-protocol description into C-code dealing with the push, pull and print
-operations.
-
-OpenChange development policy in trunk used to push a new MAPI call in
-the IDL only when the associated libmapi implementation and mapitest
-unit is developed, but this was preventing from distributing MAPIProxy
-with further openchange releases. Furthermore, the OpenChange IDL is
-now almost complete and merging back to the trunk helps improving
-libmapi reliability.
-
-<br/>
-
-
-<a name="mod_dev"></a><h2>5. Stackable Modules</h2>
-<a name="mpm_overview"></a><h3>5.1. General Overview</h3>
-
-The MAPIProxy stackable modules system provides implementers a
-development framework to add new features. This stackable mechanism
-allows developers to write modules with a very specific scope of 
-which modifications will transparently be relayed to the next module
-until it is finally pushed by MAPIProxy to
-the next hop (Figure 3.).
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mpm_stack.png" width="75%" height="75%" />
-</td>
-</tr>
-</table>
-<center>Figure 3. MAPIProxy module stack and EcDoRpc interaction </center>
-
-With this system, developers can focus their effort on ExchangeRPC
-traffic - or any other protocol samba supports - interception,
-modification, analysis and avoid spending time on implementing a new
-endpoint server. Furthermore it provides an easier way for
-implementers to divide the work in smaller units and develop each of
-them in a separated module.
-<br/>
-
-MAPIProxy modules are dynamic shared objects with an entry point and a
-limited set of hooks. These modules have to be installed in the
-<i>dcerpc_mapiproxy</i> folder within the samba4 modules directory
-(e.g. <i>/usr/local/samba/modules</i>). MAPIProxy modules specified
-in the Samba configuration file (smb.conf) will be loaded into MAPIProxy
-at runtime and interact with each other in the same order they were
-defined:
-
-\code
-       dcerpc_mapiproxy:modules = downgrade,dummy
-\endcode
-
-All MAPIProxy modules will be registered but only those specified on
-the <strong>dcerpc_mapiproxy:modules</strong> parametric option line
-will be added to the chained list of effective modules.
-<br/><br/>
-
-
-<a name="mpm_ep"></a><h3>5.2. Module entry point</h3>
-
-MAPIProxy modules must have an entry point function named
-<strong>samba_init_module</strong>. This function needs to set general
-information about the module, specify the module's hooks and finally
-call the <strong>mapiproxy_module_register</strong> function to
-register itself in the MAPIProxy module subsystem.
-
-\code
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module module;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       module.name        = "sample";
-       module.description = "A sample module";
-       module.endpoint    = "any";
-
-       /* Fill in all the operations */
-       module.init     = sample_init;
-       module.push     = sample_push;
-       module.ndr_pull = sample_ndr_pull;
-       module.pull     = sample_pull;
-       module.dispatch = NULL;
-       module.unbind   = NULL;
-
-       /* Register ourselves with the MAPIPROXY subsytem */
-       ret = mapiproxy_module_register(&module);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register 'sample' mapiproxy module!\n"));
-               return ret;
-       }
-
-       return ret;
-}
-\endcode
-
-<ul>
-    <li><strong>module.name</strong>:<br/>
-    This is the module name. This name will be used by
-    dcerpc_mapiproxy:modules in smb.conf to load the module</li>
-
-    <li><strong>module.description</strong>:<br/> 
-    This field lets developers specify a brief module description for
-    information purpose only.</li>
-
-    <li><strong>module.endpoint</strong>:<br/> 
-    This field defines the interface which this module is designed to
-    work with. The primary objective is to avoid calling the module
-    hooks if the module doesn't have any impact on the requests or
-    replies. For example, a module only interacting with the EcDoRpc
-    function should define <i>exchange_emsmdb</i>.
-
-    In the meantime, it can happen that a module requires to interact
-    with more than a single interface. In such case, use the
-    '<strong>any</strong>' keyword which will call the modules functions
-    with any endpoints proxied by MAPIProxy.</li>
-</ul>
-
-
-<a name="mpm_hooks"></a><h3> 5.3. Module Hooks</h3>
-
-MAPIProxy offers a set of hooks which modules can implement to
-modify/change/alter client to server MAPI traffic. The figure below
-shows how and when hooks are called during a request/response
-lifetime.
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_hook_life.png" />
-</td>
-</tr>
-</table>
-<center> Figure 4. Usage of MAPIProxy Hooks during a request/response life time </center>
-
-<ul>
-
-<li><strong>init</strong>: This is the initialization function for the
-module which is only called once - when the module is loaded. It is
-generally used to retrieve smb.conf parametric options for the module
-and initialize some global structures</li>
-
-<li><strong>pull</strong>: This is the function called when MAPIProxy
-receives a MAPI request. The request has already been extracted and
-its information filled into MAPI structures
-
-<li><strong>push</strong>: This is the function called when MAPIProxy
-receive a MAPI response. The response has already been extracted and
-its information filled into MAPI structures</li>
-
-<li><strong>dispatch</strong>: Similarly to the MAPIProxy
-top-level dispatch function, it is used to dispatch the
-information. This function is called after the pull but before the
-push. Moreover it is called before the request is forward to the
-remote endpoint.</li>
-
-<li><strong>ndr_pull</strong>: This is the function called before
-data from a request is extracted from the NDR blob.</li>
-
-<li><strong>ndr_push</strong>: This is the function called before
-data from a response is extracted from the NDR blob.</li>
-
-<li><strong>unbind</strong>: This is the function called when the
-connection closes. It can be used to free data associated to a given
-session and stored within a module global list.</li>
-
-</ul>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<strong>Please note that the module API is still under development and
-is likely to change in further revisions.</strong>
-</td>
-</tr>
-</table>
-
-
-<a name="mpm_mapiproxy"></a><h3> 5.4. mapiproxy structure </h3>
-MAPIProxy uses a structure modules can modify in their dispatch routine
-and which impact on the general MAPIProxy behavior.
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_struct.png" />
-</td>
-</tr>
-</table>
-<center> Figure 5. overview of mapiproxy structure variables scope </center>
-
-<ul> 
-
-<li><strong>norelay</strong>: This boolean variable can be used by
-modules to tell MAPIProxy not to relay the incoming
-<strong>request</strong> to the remote server through
-<i>dcerpc_ndr_request()</i> but directly jump to the push (response)
-MAPIProxy code. This variable is for example in use within the cache
-module when we read stream from the local filesystem and play it back
-to MAPI clients.</li>
-
-<li><strong>ahead</strong>: This boolean variable can be used by
-modules to tell MAPIProxy not to relay the incoming
-<strong>response</strong> to the client through the <i>push</i> and
-<i>dcerpc_ndr_request</i> routine but loop over the dispatch
-routine. This variable is for example in use within the cache module
-when we want to read a stream ahead from Exchange server to the remote
-MAPIProxy instance.</li>
-
-</ul>
-
-<br/>
-
-
-
-<a name="modules"></a><h2> 6. Available Modules </h2>
-<a name="mod_downgrade"></a><h3> 6.1. Downgrade Module</h3>
-
-The <strong>downgrade</strong> module implements the
-EcDoConnect/EcDoRpc negotiation as described in <a
-href="#retrograde">section 4.2</a>. It ensures Outlook will not send
-compressed information or use functions other than EcDoRpc for
-EMSMDB transport. In order to use the downgrade module, edit smb.conf
-and add <i>downgrade</i> to <i>dcerpc_mapiproxy:modules</i>.
-
-\code
-       dcerpc_mapiproxy:modules = downgrade
-\endcode
-
-<br/>
-
-<a name="mod_pack"></a><h3> 6.2. Pack Module </h3>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<strong>Note that this module only works with an infrastructure using two or
-more instances of MAPIProxy as described in <a href="#overview">Figure
-1</a></strong>
-</td>
-</tr>
-</table>
-
-The <strong>pack</strong> module implements routines designed to
-manipulate and factorize MAPI content between different MAPIProxy
-instances. It also offers a developer overview on how to manipulate
-mapi requests. Last but not least, it provides data which can next be
-used by subsequent MAPIProxy modules for example to compress or
-encrypt this proxypack blob.
-
-<ul>
-
-<li>First, MAPIProxy extracts and removes specific MAPI calls from the
-request, pack them within the proxypack MAPI call data blob, prefix
-them with their real offset in the array of mapi requests and finally
-append this custom call at the end of the mapi requests array (Figure
-4).</li>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mpm_pack_pack.png" />
-</td>
-</tr>
-</table>
-<center> Figure 6. Pack process </center>
-
-<li>Final MAPIProxy hop will seek the mapi requests array looking for
-the proxypack call. If found, it unpacks MAPI data and restore these
-calls at their initial location within the mapi requests array (Figure
-6).</li>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mpm_pack_unpack.png" />
-</td>
-</tr>
-</table>
-<center> Figure 7. Unpack process </center>
-
-</ul>
-
-
-This module has two configuration options:
-<ul>
- <li><strong>mpm_pack:opnums</strong><br/>
- This option takes a list of MAPI calls to pack into the proxypack
- data blob. It can take one or more MAPI opnums, each of them
- separated with a comma.</li>
-
- <li><strong>mpm_pack:lasthop</strong><br/>
- This options takes either <i>true</i> or <i>false</i>.the lasthop
- option defines whether this is a MAPIProxy directly connected to
- Outlook/Exchange or yet another proxy inserted within the MAPIProxy
- chain of hops. If this MAPIProxy instance is not a last hop, then it
- will skip the pack/unpack operations and forward the request to the
- next one.</li>
-</ul>
-
-\code
-        mpm_pack:opnums = 0x70,0x75,0x76,0x77,0xa
-        mpm_pack:lasthop = true
-\endcode
-
-In order to use the pack module, edit smb.conf and add <i>pack</i> to
-<i>dcerpc_mapiproxy:modules</i>.
-
-\code
-       dcerpc_mapiproxy:modules = downgrade,pack
-\endcode
-
-<br/>
-
-
-<a name="mod_cache"></a><h3> 6.3. Cache Module </h3>
-
-The <strong>cache</strong> module implements a cache mechanism for
-streams related to messages or attachments. This module reduces
-communication latency between MAPI clients (using <i>online</i> mode)
-and Exchange. When configured with online mode, MAPI clients retrieve
-data from Exchange each time they access a message and don't have any
-offline storage mechanisms enabled - data are downloaded and stored
-within a <i>temporary files</i> folder. This module also offers a
-preliminary synchronization mechanism which can be used to transfer
-files between different MAPIProxy instances and use different
-protocols than MAPI for data transfer (such as rsync or wget).
-
-The cache module is designed to cover different cases:
-
-<h4>Scenario 1: Replay attachments</h4>
-
-This scenario only requires a single MAPIProxy instance and requires a
-single configuration option:
-\code
-       mpm_cache:path = /tmp/cache
-\endcode
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mpm_cache_case_one.png" />
-</td>
-</tr>
-</table>
-<center> Figure 8. Replay stream scenario </center>
-
-<ul>
-
- <li style="text-align:justify;"><strong>1. Outlook reads a stream for the first time</strong>:<br/>
- MAPIProxy monitors the Outlook-Exchange traffic and store the
- attachment on the local filesystem. </li>
-
- <li style="text-align:justify;"><strong>2. Outlook requests this stream again</strong>:<br/>
- MAPIProxy looks over its cache, find the requested stream and
-directly communicate with Outlook without forwarding requests to the
-remote server.</li>
-
-</ul><br/>
-
-<h4>Scenario 2: Read stream ahead</h4>
-
-This scenario requires two MAPIProxy instances and requires different
-configuration options for local and remote MAPIProxy:
-
-<ul>
-<li><strong>local MAPIProxy smb.conf sample</strong>:<br/>
-\code
-       mpm_cache:path = /tmp/cache
-       mpm_cache:ahead = false
-       mpm_cache:sync = true
-       mpm_cache:sync_cmd = /usr/bin/rsync -z mapiproxy@192.168.102.2:__FILE__  __FILE__
-\endcode
-</li>
-
-<li><strong>remote MAPIProxy smb.conf sample</strong>:<br/>
-\code
-       mpm_cache:path = /tmp/cache
-       mpm_cache:ahead = true
-       mpm_cache:sync = false
-\endcode
-</li>
-
-</ul>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mpm_cache_case_two.png" />
-</td>
-</tr>
-</table>
-<center> Figure 9. Read ahead scenario with synchronization mechanism </center>
-
-<ul>
-
-<li style="text-align:justify;"><strong>This scenario uses 2 MAPIProxy instances</strong>. We call
-<i>remote MAPIProxy</i>, the MAPIProxy instance connected to the
-Exchange server network and <i>local MAPIProxy</i> the instance
-connected to the MAPI clients network.</li>
-
-<li style="text-align:justify;"><strong>1. Outlook wants to read an attachment for the first
-time</strong>:<br/> The remote MAPIProxy monitors the first ReadStream
-request and read the full stream ahead on its own and stores it on its
-local filesystem.</li>
-
-<li style="text-align:justify;"><strong>2. remote MAPIProxy replies to local MAPIProxy and local
-MAPIProxy runs the synchronization mechanism.</strong> The current
-implementation provides a fork/execve/waitpid process which allows to
-run any command with parameters. When local MAPIProxy finishes to
-store the file locally through the synchronization mechanism, it marks
-the stream as being cached.</li>
-
-<li style="text-align:justify;"><strong>3. local MAPIProxy plays the attachment back to the client
-from cache</strong>.</li>
-
-</ul>
-
-
-The module monitors OpenMessage, OpenAttach, OpenStream, ReadStream
-and Release MAPI calls and stores streams on the local filesystem with
-indexation in a TDB database. Note that the module doesn't yet provide
-semantics needed to remove entries from the TDB database.
-
-
-This module has different configuration options and modes:
-<ul>
- <li style="text-align:justify;"><strong>mpm_cache:path</strong><br/>
- This option takes the full path to an existing folder on the
- filesystem. This folder will be the storage root path for the cache
- module and will hold the TDB store, a folder hierarchy and stream
- files.
-
-\code
-       mpm_cache:path = /tmp/cache
-\endcode
-</li>
-
-<li style="text-align:justify;"><strong>mpm_cache:ahead</strong><br/>
-This option takes a boolean value (true or false) and defines whether
-the ahead mechanism should be enabled or not. This mode should only be
-enabled on the remote MAPIProxy instance. It can be enabled on local
-MAPIProxy instance, however there won't be any benefit but Outlook
-unexpectedly falling in some time out mode and close the connection.
-
-\code
-       mpm_cache:ahead = true
-\endcode
-</li>
-
-<li style="text-align:justify;"><strong>mpm_cache:sync</strong><br/>
-This option takes a boolean value (true or false) and defines whether
-the synchronization mechanism should be enabled or not. This mode only
-makes sense on the local MAPIProxy instance and
-<strong>mpm_cache:sync_cmd</strong> must also be configured.
-
-\code
-       mpm_cache:sync = true
-\endcode
-</li>
-
-<li
-style="text-align:justify;"><strong>mpm_cache:sync_cmd</strong><br/>
-This option takes the command line to execute for the synchronization
-process. A preliminary substitution variable mechanism is available
-but should be improved over time. For the moment, the cache module
-only provides <strong>__FILE__</strong> which will be substituted by
-the full path to the cached file. The synchronization process
-currently assumes local and remote MAPIProxy instances have the same
-storage path (<i>mpm_cache:path</i>).
-
-\code
-       mpm_cache:sync_cmd = /usr/bin/rsync -z mapiproxy@192.168.102.2:__FILE__  __FILE__
-\endcode
-
-</li>
-
-</ul>
-
-In order to use the cache module, edit smb.conf and add <i>cache</i>
-to <i>dcerpc_mapiproxy:modules</i>.
-
-\code
-       dcerpc_mapiproxy:modules = downgrade,cache
-\endcode
-<br/>
-
-<h4>Notes</h4>
-
-<ul>
-<li style="text-align:justify;">While the cache module implements a
-preliminary <i>session</i> mechanism (multiple clients support), this
-mode is currently only implemented up to 50%. Multiple clients will
-work for files already cached, but will cause unexpected behaviors
-while synchronizing a remote file at the same moment from different
-session. This bug should be fixed when the streaming and lock
-mechanism will be implemented.</li>
-
-<li style="text-align:justify;">The synchronization mechanism is yet
-experimental and we have deliberately changed the storage path
-permissions from 0700 to 0777 for trivial setup. File permissions will
-become parametric smb.conf options in the future.</li>
-
-</ul>
-
-<br/>
-
-
-<a name="server_mode"></a><h2>7. Server Mode</h2>
-
-<a name="server_conf"></a><h3>7.1. 5-Minute Configuration</h3>
-
-This 5-Minute configuration will help you set up a preliminary
-OpenChange server. This configuration will be performed in three
-steps. Before running these commands, make sure you have followed
-<strong>step 1 (Provision Samba)</strong> and <strong>step 2 (Add a
-user account)</strong> in <a href="#minute">MAPIProxy 5-Minute
-configuration section</a>.
-
-<ul>
-
-<li><strong>[1] Provision OpenChange</strong>:<br/>From openchange
-root directory, run under the root account:
-\code
-# ./setup/openchange_provision
-\endcode
-
-This script will extends Samba4 Active Directory with Exchange classes
-and attributes needed to run OpenChange server. Note that this
-operation may require several minutes to complete.
-</li>
-
-<li><strong>[2] Create the Exchange user account</strong>:<br/>
-OpenChange <strong>does not create</strong> the user account the way
-Samba does. It only extends existing users from the SAM database and
-add attributes required to access OpenChange server. The underlying
-concept is that system administrators may want to give access to Samba
-shares to a specific user but do not want him to access OpenChange
-server.<strong>The user must have been created using the Samba4 
-<i>samba-tool newuser</i> script</strong> before you run this command.
-Run under the root account:
-\code
-# ./setup/openchange_newuser --create <username>
-\endcode
-where username is the user account you want to give access to
-OpenChange server
-</li>
-
-<li><strong>[3] Create the OpenChange Dispatcher database</strong>:<br/>
-OpenChange uses a dispatcher database designed to store generic and
-top-level information about user mailbox. The following command will
-create a blank openchangedb ldb database:
-\code
-# ./setup/openchange_provision --openchangedb
-\endcode
-</li>
-
-<li><strong>[4] Create a mailbox for the user in the OpenChange
-Dispatcher database</strong>:<br/>
-Run under the root account:
-\code
-# ./setup/openchange_newuser --mailbox <username>
-\endcode
-</li>
-
-<li><strong>[5] Configure OpenChange server options</strong>:<br/>
-OpenChange server only requires a very limited set of options to be
-added to <i>smb.conf</i> in order to run. Note that the following
-configuration also works with existing MAPIProxy configuration. This
-configuration will turn MAPIProxy into OpenChange server only and no
-remote connection to Exchange server will be made:
-
-\code
-[globals]
-        netbios name    = MAPIPROXY
-        workgroup       = OPENCHANGE
-        realm           = OPENCHANGE.LOCAL
-        server role     = domain controller
-
-       ### Configuration required by OpenChange server ###
-       dcerpc endpoint servers = epmapper, mapiproxy
-       dcerpc_mapiproxy:server = true
-       dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
-       ### Configuration required by OpenChange server ###
-
-[netlogon]
-        path = /usr/local/samba/var/locks/sysvol/openchange.local/scripts
-        read only = no
-
-[sysvol]
-        path = /usr/local/samba/var/locks/sysvol
-        read only = no
-\endcode
-</li>
-</ul>
-
-<br/><br/>
-<a name="server_overview"></a><h3>7.2. General Overview</h3>
-
-Although <a href="#purpose">section 1.1</a> only describes MAPIProxy
-as a proxy, recent work makes it possible to turn MAPIProxy either into a
-<strong>complete and real stand-alone server</strong> or server/proxy
-hybrid.
-
-MAPIProxy behaviour is controlled through the <i>dcerpc_mapiproxy:server</i>
-parametric option. To use MAPIProxy as an independent server, set
-
-\code
-       dcerpc_mapiproxy:server = true
-\endcode
-
-<ul>
-  <li style="text-align:justify"><strong>dcerpc_mapiproxy:server = true</strong><br/>
-  When this parametric option is set to true, MAPIProxy will not initiate
-  connections to a remote server, but instead will direct client connections to
-  its own default NSPI, RFR and EMSMDB servers and work as a
-  stand-alone server.<br/>
-  </li>
-
-  <li style="text-align:justify"><strong>dcerpc_mapiproxy:server = false</strong><br/>
-  If this option is unset or set to false (default behavior),
-  MAPIProxy will work in proxy mode only and initiates a connection to
-  a remote server using the binding/credentials configuration as
-  specified in <a href="#minute">section 3.1</a> (5-Minute
-  Configuration).
-  </li>
-</ul>
-<br/>
-
-In addition to the server mode described above, MAPIProxy provides an
-additional set of configuration options which makes possible to
-override and customize MAPIProxy behavior. The server mode has been
-designed to supply a modular mechanism somewhat similar to the modules
-one described in <a href="#mod_dev">section 5</a>. While MAPIProxy
-modules are stackable and can be chained, server modules only
-support a single module for a given endpoint:
-<ul>
-
-  <li style="text-align:justify">When dcerpc_mapiproxy:server is set
-  to true, MAPIProxy registers dynamic shared object stored at a
-  specific location (modules/dcerpc_mapiproxy_servers) and load server
-  modules tagged with the <strong>MAPIPROXY_DEFAULT</strong>
-  status. For each of the endpoints MAPIProxy can handle
-  (exchange_nsp, exchange_emsmdb, exchange_ds_rfr), the associated
-  default server will be loaded. These default servers are located
-  within mapiproxy/servers/modules. (Figure 10.)<br/>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="dcerpc_mapiproxy_server_true.png"/>
-</td>
-</tr>
-</table>
-<center>Figure 10. Server mode enabled</center>
-</li>
-
-  <li style="text-align:justify">When dcerpc_mapiproxy:server is set
-to false, MAPIProxy still registers server dynamic shared objects but
-does not load any of them, which means that ExchangeRPC traffic will be
-relayed to remote server.</li> 
-</ul>
-
-However there may be some cases where developers would like to run a
-custom server they have developed, or handle a limited set of
-ExchangeRPC traffic on their own for a given endpoint. This
-configuration is made possible through 3 parametric options:
-
-\code
-       dcerpc_mapiproxy:nspi_server   = nspi_server
-       dcerpc_mapiproxy:emsmdb_server = emsmdb_server
-       dcerpc_mapiproxy:rfr_server    = exchange_ds_rfr
-\endcode
-
-Each of these options specifies the server module name to be loaded
-for a given endpoint. Note that these options override the
-dcerpc_mapiproxy:server state:
-<ul>
-
-  <li style="text-align:justify">If dcerpc_mapiproxy:server is set to
-  true, specifying one or all of these options will override default
-  servers with your own custom servers. For example Figure 11 shows a
-  mapiproxy configuration where server mode is enabled but where the
-  NSPI server has been replaced with a custom one.
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="dcerpc_mapiproxy_server_true_custom_nspi.png"/>
-</td>
-</tr>
-</table>
-<center>Figure 11. Server mode enabled but custom NSPI server loaded</center>
-</li>
-
-  <li style="text-align:justify">If dcerpc_mapiproxy:server is set to
-false, specifying one or all of these options will force MAPIProxy to
-relay the associated traffic to default or custom server. For example,
-Figure 12 shows a mapiproxy configuration where NSPI traffic is
-handled by OpenChange NSPI server while EMSMDB and RFR traffic is
-relayed to the remote server.
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="dcerpc_mapiproxy_server_false_nspi.png"/>
-</td>
-</tr>
-</table>
-<center>Figure 12. Server mode disabled but NSPI server loaded</center>
-</li> </ul>
-
-<br/>
-
-<a name="faq"></a><h2>8. Frequently Asked Questions</h2>
-<a name="notcompleted"></a><h3>8.1. The action could not be completed</h3>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_error_001.png"/>
-</td>
-</tr>
-</table>
-<center>Figure 13. Outlook error: The action could not be completed</center>
-
-If you have followed the <a href="#minute">5-Minute Configuration</a>
-instructions and the above error message box (Figure 13) is displayed
-each time you click the <i>Check Name</i> button, then you need to:
-<ul>
-<li>Click on <strong>More Settings</strong></li>
-<li>Open the security Tab</li>
-<li>Tick the <strong>Always prompt for username and password</strong>
-checkbox in the User Configuration section (Figure 14)</li>
-</ul>
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_error_001_fix.png" />
-</td>
-</tr>
-</table>
-<center>Figure 14. Resolution: Always prompt for username and password</center>
-
-Next time you click on <i>Check Name</i>, Outlook will prompt for
-username and password. A similar credentials dialog will be displayed
-each time Outlook is launched.
-
-<br/>
-
-<a name="cantopen"></a><h3>8.2. Profile creation goes fine, but Outlook can't open your default e-mail folders</h3>
-
-The profile was properly created using the mail applet from the
-configuration panel (or using Outlook wizard). However when I launch
-Outlook, I keep having the following error message:
-
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<img src="mapiproxy_error_002.png"/>
-</td>
-</tr>
-</table>
-<center>Figure 15. Outlook error: Unable to Open your default e-mail folders</center>
-
-This probably means Outlook is unable to lookup the resolved name of
-your MAPIProxy/samba4 server. You can either:
-<ul>
-  <li>1. Make your Windows workstation points to a domain name server
-  able to resolve MAPIProxy fully qualified name.</li>
-
-  <li>2. Open \code C:\WINDOWS\system32\etc\drivers\hosts \endcode file and
-  add an entry for mapiproxy. For example if I have
-  mapiproxy.openchange.local pointing at 192.168.102.2, then hosts
-  file should hold the following line:
-  \code
-  192.168.102.2 mapiproxy.openchange.local mapiproxy
-  \endcode
-  </li>
-</ul>
-
-<br/>
-
-<a name="dc"></a><h3>8.3. Does MAPIProxy need to be domain controller?</h3>
-
-No it doesn't. MAPIProxy works fine as a member server of a Windows
-domain. However, since delegated credentials and forwarded kerberos
-credentials don't yet work, you'll need to force samba to rely on the
-local SAM database. To force this behavior, add to smb.conf within the
-global section:
-
-\code
-       server role               = member server
-       aux_methods:member server = sam
-\endcode
-
-<br/>
-
-<a name="gnutls"></a><h3>8.4. Generating Samba's private keys takes infinite time</h3>
-
-For some configuration, the private keys generation process at Samba
-startup can be very long. In case private keys are not generated
-within a couple of minutes, it is suggested to recompile Samba with
-gnutls disabled as in the example below:
-
-\code
-       $ ./configure.developer --enable-debug --disable-gnutls
-       $ gmake idl_full
-       $ gmake
-       $ sudo gmake install
-\endcode
-
-<br/>
-
-<a name="gmake"></a><h3>8.5. On Ubuntu <i>make samba-git</i> exits with <i>gmake: not found</i></h3>
-
-On Ubuntu, I have the following output while trying to install samba4 from OpenChange sources:
-
-\code
-       To build Samba, run /usr/bin/make
-       Step2: Compile Samba4 (IDL)
-       ./script/installsamba4.sh: 332: gmake: not found
-       Step3: Compile Samba4 (Source)
-       ./script/installsamba4.sh: 332: gmake: not found
-       Error in Step3 (error code 127)
-\endcode
-
-gmake is make on Ubuntu. Creating the following symbolic link will fix
-the issue:
-
-\code
-       $ sudo ln -s /usr/bin/make /usr/bin/gmake
-\endcode
-
-*/
diff --git a/branches/plugfest/mapiproxy/documentation/mapistore-documentation.doxy b/branches/plugfest/mapiproxy/documentation/mapistore-documentation.doxy
deleted file mode 100644 (file)
index a1a6742..0000000
+++ /dev/null
@@ -1,515 +0,0 @@
-/**
-\page mapistore-documentation
-
-
-<center><img src="mapistore.png"></center>
-
-\section Contents
-<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#ffffff; border:2px solid #e0e0e0; padding:5px;">
-<tr style="border:none;">
-<td style="border:none;">
-<ul>
- <li><a href="#revision">        Revision History        </a></li>
- <li><a href="#introduction"> 1. Introduction            </a>
-  <ul>
-    <li><a href="#purpose"> 1.1. Purpose and Scope</a></li>
-    <li><a href="#overview">1.2. General Overview</a></li>
-  </ul>
- </li>
- <li><a href="#mapi_cond"> 2. Technical / MAPI Considerations</a>
-  <ul>
-   <li><a href="#mapi_objects"> 2.1. MAPI objects</a></li>
-   <li><a href="#mapi_tables"> 2.2. MAPI tables</a></li>
-   <li><a href="#mapi_props"> 2.3. MAPI properties and mapping</a></li>
-   <li><a href="#mapi_namedprops"> 2.4. Named properties vs known properties</a></li>
-  </ul>
- </li>
- <li><a href="#arch">      3. MAPIStore architecture</a>
-  <ul>
-   <li><a href="#interface_layer"> 3.1. INTERFACE layer</a></li>
-   <li><a href="#processing_layer"> 3.2. PROCESSING layer</a></li>
-   <li><a href="#backends_layer"> 3.3. BACKENDS layer</a></li>
-   <li><a href="#ocldb"> 3.4. Relationship to OpenChange Dispatcher database</a></li>
-   <li><a href="#mapping"> 3.5. Object mapping</a></li>
-  </ul>
- </li>
- <li><a href="#api"> 4. MAPIStore API</a>
-  <ul>
-    <li><a href="#api_init">4.1. Initialization</a></li>
-    <li><a href="#api_conn">4.2. Backend contexts</a></li>
-  </ul>
- </li>
- <li><a href="#fsocpf"> 5. FSOCPF backend</a>
-  <ul>
-   <li><a href="#fsocpf_def"> 5.1. Definition </a></li>
-   <li><a href="#fsocpf_attrs"> 5.2. Namespace and Attributes </a></li>
-   <li><a href="#fsocpf_overview"> 5.3. Overview </a></li>
-   <li><a href="#fsocpf_refs">5.4. Documentation and References</a></li>
-  </ul>
- </li>
-</ul>
-</table>
-
-<a name="revision"></a><h2>Revision History</h2>
-<table align="center" width="80%">
-       <tr>
-          <td style="text-align:center"><strong>Date</strong></td>
-          <td style="text-align:center"><strong>Revision Number</strong></td>
-          <td style="text-align:center"><strong>Author</strong></td>
-          <td style="text-align:center"><strong>Revision Content</strong></td>
-       </tr>
-       <tr>
-          <td style="text-align:center">21/05/10</td>
-          <td style="text-align:center"><strong>0.3</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Add API documentation for
-          initialization, backend connection contexts and add
-          programming samples</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">21/05/10</td>
-          <td style="text-align:center"><strong>0.2</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Merge initial Wiki document and add FSOCPF section</td>
-       </tr>
-       <tr>
-          <td style="text-align:center">20/05/10</td>
-          <td style="text-align:center"><strong>0.1</strong></td>
-          <td style="text-align:center">Julien Kerihuel</td>
-          <td style="text-align:left">Draft document.</td>
-       </tr>
-</table>
-<br/>
-
-<a name="introduction"></a><h2>1. Introduction</h2>
-
-<a name="purpose"></a><h3>1.1. Purpose and Scope</h3>
-
-MAPIStore is the SAL component of OpenChange server. SAL stands for
-Storage Abstraction Layer. It is the component used by OpenChange
-Server to push/get information (messages, folders) to/from storage
-backends. The following document intends to describe the
-overall/theoretical SAL behavior and constraints we need to consider
-when dealing with MAPI/EMSMDB. It also describes the semantics and
-inner working of its storage backends.
-
-<br/>
-<a name="overview"></a><h3>1.2. General overview</h3>
-
-The main objective of mapistore is to provide an interface layer with
-a common set of atomic functions (operations) used to trigger and
-dispatch data and commands to the appropriate backend. MAPIStore
-relies on a backend mechanism specifically designed to transparently
-handle some of the MAPI semantics required by any Exchange compatible
-server.
-
-The initial idea was to provide to OpenChange a highly customizable
-storage backend mechanism which would fit in any situation and any
-environments. One of the greatest limitation we have found with
-existing groupware is the storage layer which is generally limited to
-a single solution, service or format and is neither scalable nor
-modifiable when user requirements evolve upon time.
-
-MAPIStore solves this problem and go beyond classical limitations. It
-is not a revolutionary concept, but the way openchange uses it makes
-the whole difference and offer administrators an innovative way to
-customize storage.
-
-MAPIStore allows you to:
-- <b>use a different backend for any top-folder</b>
-- <b>transparently move/copy data across backends</b>
-- develop new backends quickly
-- access all the different backends through an unique API
-
-For example (assuming all associated backends were developed) a user
-could have the following storage organization for his mailbox:
-- Mails stored using an IMAP backend (Cyrus-IMAP or dovecot)
-- Calendar items stored in CalDAV or pushed in Google calendar
-- Sent emails and archives/backup stored in a compression backend
-- Tasks stored in a MySQL database
-- Notes stored on the filesystem
-
-If the user is not satisfied with one of the backend's performance, they
-would just have to use an administration tool, change the backend,
-wait for the replication, synchronization to finish and there data will
-be available from the new backend.
-
-Information can be completely decentralized, stored on one of several
-servers and still be accessible transparently from OpenChange
-server.
-
-<br/>
-<a name="mapi_cond"></a><h2>2. Technical / MAPI Considerations</h2>
-
-<a name="mapi_objects"></a><h3> 2.1. MAPI objects</h3>
-
-An object is a physical (message, folder) or temporary (table) but
-generic entity which can be represented as a 2 columns fixed array
-with <i>n</i> rows, where each row contains a property of that entity.
-One column repesents the property tags (names), and the other represents
-the property value (or values). 
-
-From a MAPI perspective (network layer), opening an object means:
-
-- opening either a <b>private mailbox</b> or <b>public folder
-  store</b>. These are referenced by <b>EssDN and not IDs</b>
-- opening a <b>message</b> given its <b>PR_MID</b> (Message identifier)
-- opening a <b>folder/container</b> given its <b>PR_FID</b> (Folder
-  identifier)
-
-<a name="mapi_tables"></a><h3> 2.2. MAPI tables</h3>
-
-Another category of MAPI objects are tables (also known as
-<i>views</i>) created with MAPI ROPs such as <i>GetContentsTable</i>,
-<i>GetHierarchyTable</i>, <i>GetAttachmentTable</i> or
-<i>GetRulesTable</i>. Views are temporary representation of the elements
-that a
-container holds at a specific moment. It can be represented as a list
-of <i>n</i> rows (elements) with <i>n</i> columns (property values):
-- <i>GetContentsTables</i> creates a view listing all messages
-  available within a container
-- <i>GetHierarchyTable</i> creates a view listing all containers
-  within a container
-- <i>GetAttachmentTable</i> creates a view listing all the attachment
-  of a message
-- <i>GetRulesTable</i> creates a view listing all permissions
-  associated to a container
-
-Tables are customized through the <i>SetColumns</i> MAPI ROP which
-will define the property identifiers to be retrieved. The
-<i>QueryRows</i> MAPI ROP can then be called to sequentially retrieve
-rows and associated property values. A table is similar to a MAPI
-object except it is virtual, created on demand to represent a list
-of objects rather than a unique object.
-
-<a name="mapi_props"></a><h3>2.3. MAPI properties and mapping</h3>
-
-There is a large set of fixed and known MAPI properties available. If
-appropriate backends are developed, there can be a 1-1 mapping between
-MAPI properties and backend properties for some of them. This mapping
-may even be enough for common purposes. However there will still be a
-set of MAPI properties which won't fit in this process.
-
-There are different way to workaround this issue. For example, Kolab
-is using a Cyrus/IMAP backend and associate/store MAPI properties to
-the message using ANNOTATE-MORE within a XML file format.
-
-OpenChange provides similar mechanism with its OCPF file format.
-
-<a name="mapi_namedprops"></a><h3>2.4. Named properties vs known properties</h3>
-
-OpenChange server needs to support named properties. An initial set of
-named properties can be defined at provisioning time, but this list
-must not be static. Users must be able to add, delete, change new
-entries and create their own set of custom named properties as required.
-
-<br/>
-<a name="arch"></a><h2>3. MAPIStore Architecture</h2>
-
-Given that objects representation are similar to SQL database records,
-an architecture like the sqlite one makes sense for our purpose:
-
-<table>
-<tr>
-<td><b>Component</b></td>
-<td><b>Brief description</b></td>
-</tr>
-<tr>
-<td>INTERFACE</td>
-<td>convenient top-level functions (Public API) accessed through EMSMDB providers</td>
-</tr>
-<tr>
-<td>PROCESSING</td>
-<td>set of atomic operations (open, read, write, close, mkdir, rmdir etc.)</td>
-</tr>
-<tr>
-<td>BACKENDS</td>
-<td>The code which <i>does things</i> in the specified storage system (mysql, fsocpf, imap etc.)</td>
-</tr>
-</table>
-
-<a name="interface_layer"></a><h3>3.1. INTERFACE layer</h3> 
-The interface layer doesn't have any knowledge about mapistore
-internals, how or where objects are stored. The interface uses MAPI
-data structure, supplies PR_FID and PR_MID values and assumes the
-interface layer will return a pack of data it can directly use without
-further or significant modifications. The interface layer functions
-should also have (as a parameter) a pointer to a mapistore context
-with private/opaque set of information (void *) about the object.
-
-<a name="processing_layer"></a><h3>3.2. PROCESSING layer</h3>
-The processing layer is responsible for:
-- mapping OpenChange objects identifiers (PR_FID, PR_MID) to unique
-  backends object identifiers (on purpose, depending on the kind of
-  backend).
-- format input/output data: glue between INTERFACE and BACKENDS
-- relay input requests to the correct backend through atomic operations
-- maintain mapistore's integrity
-
-<a name="backends_layer"></a><h3>3.3. BACKENDS layer</h3>
-The backends layer has a list of modules identified at mapistore
-initialization and available across user sessions, which means unique
-initialization at server start-up. Each module is a backend (fsocpf,
-sqlite, imap, etc.) and similarly to many other openchange components
-is loaded as a DSO object (dynamic shared object)
-
-<a name="ocldb"></a><h3>3.4. Relationship to OpenChange Dispatcher database</h3>
-
-MAPIStore and the openchange "dispatcher" database (openchange.ldb)
-are completely unrelated. MAPIStore is a standalone API and developers
-can use it independently from OpenChange server.
-
-However, the mapistore API has initially been designed to be used by OpenChange
-server, and OpenChange server is using a tiny indexing database which
-describes user mailboxes top level containers. In openchange.ldb the
-mapistore_uri attribute is attached to top level containers and its value
-points to a valid mapistore URI (namespace + path). Note that a single user
-can have several different types of mapistore databases in use (one for each
-of the top level containers).
-
-The is the only relationship between the database and the store: The
-database points to store locations. 
-
-<a name="mapping"></a><h3>3.5. Object mapping</h3> 
-
-MAPIStore needs to maintain a hash database linking unique OpenChange
-identifiers to unique backend identifiers. This hash table can be
-stored within a TDB database.
-
-MAPIStore is responsible for managing IDs mapping between OpenChange
-objects and backend specific objects. It maintains a list of free
-identifiers which it reallocates on demand whenever a backend needs
-(mapistore_register_id()) one or where it wants to release one
-(mapistore_unregister_id()).
-
-<br/>
-<a name="api"></a><h2>4. MAPIStore API</h2>
-MAPIStore relies on the talloc library for memory allocation.
-
-<a name="api_init"></a><h3>4.1. Initialization</h3>
-If there was a "hello mapistore" program, it would only require to make 2 calls:
-- <b>mapistore_init</b>:<br/>The initialization routine initializes
-  the mapistore general context used along all mapistore calls, the
-  mapping context databases (described below) and finally load all the
-  backends available (DSO). When this operation is successful,
-  developers are ready to make mapistore calls.
-- <b>mapistore_release</b>:<br/>The release operation uninitializes the
-  mapistore general context, closes connections to database and
-  frees the remaining allocated memory.
-
-<b>mapistore_sample1.c</b>
-\code
-#include <mapistore/mapistore.h>
-
-int main(int ac, const char *av[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistore_context        *mstore_ctx;
-       int                             retval;
-
-       /* Step 1. Create the talloc memory context */
-       mem_ctx = talloc_named(NULL, 0, "mapistore_sample1");
-
-       /* Step 2. Initialize mapistore system */
-       mstore_ctx = mapistore_init(mem_ctx, NULL);
-       if (!mstore_ctx) {
-               exit (1);
-       }
-
-       /* Step 3. Uninitialize mapistore system */
-       retval = mapistore_release(mstore_ctx);
-       if (retval != MAPISTORE_SUCCESS) {
-               exit (1);
-       }
-
-       return 0;
-}
-\endcode
-
-\code
-$ export PKG_CONFIG_PATH=/usr/local/samba/lib/pkgconfig
-$ gcc mapistore_sample1.c -o mapistore_sample1 `pkg-config --cflags --libs libmapistore`
-$ ./mapistore_sample1
-$
-\endcode
-
-<br/>
-<a name="api_conn"></a><h3>4.2. Backend contexts</h3>
-
-MAPIStore registers and loads its backends upon initialization. It
-means they are only instantiated/initialized one time during the whole
-server lifetime and the same code is used for all users and all
-mapistore folders.
-
-These backend contexts (or connection contexts) are identified by a
-<b>context id</b>, which is an unsigned 32 bit integer which references the
-context during its lifetime. If OpenChange is used in a very large
-environment with many top folders (which implies the same number of
-mapistore contexts), or if OpenChange server has an incredibly long
-uptime, it would be possible to run out of available context
-identifiers.
-
-In order to prevent this situation from happening, mapistore
-implements context databases where it stores available/free/used
-context identifiers:
-- <b>mapistore_id_mapping_used.tdb</b>: TDB database with used IDs
-- <b>mapistore_id_mapping_free.tdb</b>: TDB database with available pool of IDs
-
-MAPIStore provides a convenient set of functions to manage backend
-contexts:
-- <b>mapistore_set_mapping_path</b>: Defines the path where context
-  databases are stored. Call to this function is optional and default
-  path would be used instead. However if a call to this function has
-  to be made, it must be done before any call to mapistore (even
-  mapistore_init).
-- <b>mapistore_add_context</b>: Add a new connection context to mapistore
-- <b>mapistore_del_context</b>: Delete a connection context from mapistore
-
-<b>mapistore_sample2.c</b>:
-\code
-#include <mapistore/mapistore.h>
-
-int main(int ac, const char *av[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistore_context        *mstore_ctx;
-       int                             retval;
-       uint32_t                        context_id = 0;
-       uint32_t                        context_id2 = 0;
-
-       /* Step 1. Create the talloc memory context */
-       mem_ctx = talloc_named(NULL, 0, "mapistore_sample1");
-
-       /* Step 2. Set the mapping path to /tmp */
-       retval = mapistore_set_mapping_path("/tmp");
-       if (retval != MAPISTORE_SUCCESS) {
-               exit (1);
-       }
-
-       /* Step 3. Initialize mapistore system */
-       mstore_ctx = mapistore_init(mem_ctx, NULL);
-       if (!mstore_ctx) {
-               exit (1);
-       }
-
-       /* Step 4. Add connection contexts */
-       retval = mapistore_add_context(mstore_ctx, "fsocpf:///tmp/Inbox", &context_id);
-       if (retval != MAPISTORE_SUCCESS) {
-               exit (1);
-       }
-
-       retval = mapistore_add_context(mstore_ctx, "fsocpf:///tmp/Sent Items", &context_id2);
-       if (retval != MAPISTORE_SUCCESS) {
-               exit (1);
-       }
-
-       /* Step 5. Release connection contexts */
-       retval = mapistore_del_context(mstore_ctx, context_id);
-       retval = mapistore_del_context(mstore_ctx, context_id2);
-
-       /* Step 6. Uninitialize mapistore system */
-       retval = mapistore_release(mstore_ctx);
-       if (retval != MAPISTORE_SUCCESS) {
-               exit (1);
-       }
-
-       return 0;
-}
-\endcode
-
-\code
-$ ./mapistore_sample2
-sqlite3 backend initialized
-fsocpf backend initialized
-namespace is fsocpf:// and backend_uri is '/tmp/Inbox'
-[fsocpf_create_context:49]
-namespace is fsocpf:// and backend_uri is '/tmp/Sent Items'
-[fsocpf_create_context:49]
-$
-\endcode
-
-<br/>
-<a name="fsocpf"></a><h2>5. FSOCPF Backend</h2>
-
-<a name="fsocpf_def"></a><h3> 5.1. Definition</h3>
-
-FSOCPF stands for FileSystem and OpenChange Property Files.  It is a
-backend designed to help developers testing OpenChange server code
-easily. The main idea is to have a backend we can manipulate, analyze
-and modify from the Linux console without having to develop a specific
-tool. This backend uses the UNIX filesystem for folder semantics and
-the OCPF file format as a way to store MAPI objects easily.
-
-<a name="fsocpf_attrs"></a><h3>5.2. Namespace and Attributes</h3>
-
-The namespace for this backend is: \code fsocpf:// \endcode
-
-The mapistore_uri attribute for the folder definition in
-openchange.ldb must be a valid path where the last part of the URI
-is the FSOCPF container folder to create on the filesystem.
-
-<a name="fsocpf_overview"></a><h3>5.3. Overview</h3>
-
-\code
-
-[+] Private user storage space
- |
- +-[+] Top-MAPIStore folder (Inbox)
-    |
-    +-[+] 0xf1000001 (mapistore folder1)
-    |  |
-    |  +-[+] .properties (OCPF)
-    |  |
-    |  +-[+] 0xe10000001.ocpf (message - OCPF)
-    |  |
-    |  +-[+] 0xe10000001 (attachment folder)
-    |     |
-    |     +-[+] 1.ocpf (PR_ATTACH_NUM)
-    |     |
-    |     +-[+] 1.data (attachment / stream data)
-    |
-    +-[+] 0xf2000001 (mapistore folder2)
-       |
-       +-[+] .properties (OCPF)
-
-\endcode
-
-The figure above exposes the storage architecture of the FSOCPF
-backend using a real-world example. In this use case, we have decided
-to associate the FSOCPF backend to the Inbox folder. It means that any
-folder created under Inbox or any message stored within Inbox at any
-level of depth is stored and retrieved from the path defined in
-openchange.ldb.
-
-In openchange.ldb, the mapistore_uri attribute of the Inbox record
-points to: \code fsocpf://Private user storage space/Inbox \endcode
-where <i>Private user storage space</i> can for example be
-\code /usr/local/samba/private/mapistore/$username \endcode
-
-Under Inbox, we have created 2 folders:
-- 0xf1000001 folder1
-- 0xf2000001 folder2
-
-These folders are identified/named using their FID. Since they are
-classical filesystem folders, we can't associate attributes to them
-such as a folder comment, or the container class. All these attributes
-with the displayable name are stored into the <b>.properties</b> file
-within the folder.
-
-Inside 0xf1000001 folder, we have 1 message named 0xe10000001.ocpf
-stored in the OCPF file format (property/value pair). Any properties
-associated to the message (subject, recipient, body) are stored within
-this file.
-
-This message also has attachments. Attachments are stored within a
-directory at the same level named 0xe10000001 (message name without
-OCPF extension). Within this directory, we find the attachments named
-using the PR_ATTACH_NUM property value and the OCPF file
-extension. The content of the attachment is stored in
-\$PR_ATTACH_NUM.data - in this case 1.data.
-
-<br/>
-<a name="fsocpf_refs"></a><h3>5.4. Documentation and References</h3>
-- <a href="../libocpf/index.html">OpenChange Property File format (OCPF) documentation</a>
-
-*/
\ No newline at end of file
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_false_nspi.png b/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_false_nspi.png
deleted file mode 100644 (file)
index 99a5a6a..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_false_nspi.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true.png b/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true.png
deleted file mode 100644 (file)
index 7fd14b4..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true_custom_nspi.png b/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true_custom_nspi.png
deleted file mode 100644 (file)
index b9da8db..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/dcerpc_mapiproxy_server_true_custom_nspi.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/devdoc.png b/branches/plugfest/mapiproxy/documentation/pictures/devdoc.png
deleted file mode 100644 (file)
index 144b926..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/devdoc.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy.png
deleted file mode 100644 (file)
index 2cfec5f..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_emsmdb_graph.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_emsmdb_graph.png
deleted file mode 100644 (file)
index 5e2d1f6..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_emsmdb_graph.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001.png
deleted file mode 100644 (file)
index 217db1f..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001_fix.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001_fix.png
deleted file mode 100644 (file)
index f476ee0..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_001_fix.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_002.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_002.png
deleted file mode 100644 (file)
index cf269b9..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_error_002.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_hook_life.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_hook_life.png
deleted file mode 100644 (file)
index 6d41fde..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_hook_life.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_logo.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_logo.png
deleted file mode 100644 (file)
index 2940065..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_logo.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_overview.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_overview.png
deleted file mode 100644 (file)
index c5a3fd4..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_overview.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_struct.png b/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_struct.png
deleted file mode 100644 (file)
index 6a50f3d..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapiproxy_struct.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapistore.png b/branches/plugfest/mapiproxy/documentation/pictures/mapistore.png
deleted file mode 100644 (file)
index 5a61832..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapistore.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mapistore_logo.png b/branches/plugfest/mapiproxy/documentation/pictures/mapistore_logo.png
deleted file mode 100644 (file)
index 6420204..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mapistore_logo.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_one.png b/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_one.png
deleted file mode 100644 (file)
index 9ef5b2a..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_one.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_two.png b/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_two.png
deleted file mode 100644 (file)
index 135361d..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mpm_cache_case_two.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_pack.png b/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_pack.png
deleted file mode 100644 (file)
index 18bf5c0..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_pack.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_unpack.png b/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_unpack.png
deleted file mode 100644 (file)
index afd32f6..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mpm_pack_unpack.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/mpm_stack.png b/branches/plugfest/mapiproxy/documentation/pictures/mpm_stack.png
deleted file mode 100644 (file)
index ff4eb5b..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/mpm_stack.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/documentation/pictures/userdoc.png b/branches/plugfest/mapiproxy/documentation/pictures/userdoc.png
deleted file mode 100644 (file)
index 027a512..0000000
Binary files a/branches/plugfest/mapiproxy/documentation/pictures/userdoc.png and /dev/null differ
diff --git a/branches/plugfest/mapiproxy/libmapiproxy.pc.in b/branches/plugfest/mapiproxy/libmapiproxy.pc.in
deleted file mode 100644 (file)
index efcab3e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: MAPIPROXY
-Description: MAPI Proxy and Server Module Library
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmapiproxy
-Libs.private: @LIBS@
-Cflags: -I${includedir}
-Requires: talloc dcerpc ndr ldb
-Requires.private: samba-hostconfig
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_module.c b/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_module.c
deleted file mode 100644 (file)
index c01dc73..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "libmapiproxy.h"
-#include <util/debug.h>
-
-/**
-   \file dcesrv_mapiproxy_module.c
-
-   \brief mapiproxy modules management
- */
-
-static struct mp_module {
-       struct mapiproxy_module *mp_module;
-} *mp_modules = NULL;
-
-int                                    num_mp_modules;
-static struct mapiproxy_module_list    *mpm_list = NULL;
-
-
-NTSTATUS mapiproxy_module_push(struct dcesrv_call_state *dce_call,
-                              TALLOC_CTX *mem_ctx, void *r)
-{
-       struct mapiproxy_module_list            *mpm;
-       const struct ndr_interface_table        *table;
-       NTSTATUS                                status;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-
-       for (mpm = mpm_list; mpm; mpm = mpm->next) {
-               if (mpm->module->endpoint && 
-                   ((strcmp(mpm->module->endpoint, "any") == 0) ||
-                    (table->name && (strcmp(table->name, mpm->module->endpoint) == 0)))) {
-                       if (mpm->module->push) {
-                               status = mpm->module->push(dce_call, mem_ctx, r);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS mapiproxy_module_ndr_pull(struct dcesrv_call_state *dce_call,
-                                  TALLOC_CTX *mem_ctx, struct ndr_pull *pull)
-{
-       struct mapiproxy_module_list            *mpm;
-       const struct ndr_interface_table        *table;
-       NTSTATUS                                status;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-
-       for (mpm = mpm_list; mpm; mpm = mpm->next) {
-               if (mpm->module->endpoint && 
-                   ((strcmp(mpm->module->endpoint, "any") == 0) ||
-                    (table->name && (strcmp(table->name, mpm->module->endpoint) == 0)))) {
-                       if (mpm->module->ndr_pull) {
-                               status = mpm->module->ndr_pull(dce_call, mem_ctx, pull);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS mapiproxy_module_pull(struct dcesrv_call_state *dce_call,
-                              TALLOC_CTX *mem_ctx, void *r)
-{
-       struct mapiproxy_module_list            *mpm;
-       const struct ndr_interface_table        *table;
-       NTSTATUS                                status;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-
-       for (mpm = mpm_list; mpm; mpm = mpm->next) {
-               if (mpm->module->endpoint && 
-                   ((strcmp(mpm->module->endpoint, "any") == 0) ||
-                    (table->name && (strcmp(table->name, mpm->module->endpoint) == 0)))) {
-                       if (mpm->module->pull) {
-                               status = mpm->module->pull(dce_call, mem_ctx, r);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS mapiproxy_module_dispatch(struct dcesrv_call_state *dce_call,
-                                  TALLOC_CTX *mem_ctx, void *r, 
-                                  struct mapiproxy *mapiproxy)
-{
-       struct mapiproxy_module_list            *mpm;
-       const struct ndr_interface_table        *table;
-       NTSTATUS                                status;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-
-       for (mpm = mpm_list; mpm; mpm = mpm->next) {
-               if (mpm->module->endpoint && 
-                   ((strcmp(mpm->module->endpoint, "any") == 0) ||
-                    (table->name && (strcmp(table->name, mpm->module->endpoint) == 0)))) {
-                       if (mpm->module->dispatch) {
-                               status = mpm->module->dispatch(dce_call, mem_ctx, r, mapiproxy);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS mapiproxy_module_unbind(struct server_id server_id, uint32_t context_id)
-{
-       struct mapiproxy_module_list    *mpm;
-       NTSTATUS                        status;
-
-       for (mpm = mpm_list; mpm; mpm = mpm->next) {
-               if (mpm->module->unbind) {
-                       status = mpm->module->unbind(server_id, context_id);
-                       NT_STATUS_NOT_OK_RETURN(status);
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-extern NTSTATUS mapiproxy_module_register(const void *_mp_module)
-{
-       const struct mapiproxy_module   *mp_module = (const struct mapiproxy_module *) _mp_module;
-
-       mp_modules = realloc_p(mp_modules, struct mp_module, num_mp_modules + 1);
-       if (!mp_modules) {
-               smb_panic("out of memory in mapiproxy_register");
-       }
-
-       mp_modules[num_mp_modules].mp_module = (struct mapiproxy_module *) smb_xmemdup(mp_module, sizeof (*mp_module));
-       mp_modules[num_mp_modules].mp_module->name = smb_xstrdup(mp_module->name);
-
-       num_mp_modules++;
-
-       DEBUG(3, ("MAPIPROXY module '%s' registered\n", mp_module->name));
-
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS mapiproxy_module_load(struct dcesrv_context *dce_ctx)
-{
-       char                            **modules;
-       struct mapiproxy_module_list    *module;
-       int                             i;
-       NTSTATUS                        status;
-
-       /* Fetch the module list from smb.conf */
-       modules = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "modules"), NULL);
-
-       /* Add modules to the list */
-       for (i = 0; modules[i]; i++) {
-               module = talloc_zero(dce_ctx, struct mapiproxy_module_list);
-               module->module = mapiproxy_module_byname(modules[i]);
-               if (module->module) {
-                       DLIST_ADD_END(mpm_list, module, struct mapiproxy_module_list *);
-                       DEBUG(3, ("MAPIPROXY module '%s' loaded\n", modules[i]));
-                       if (module->module->init) {
-                               status = module->module->init(dce_ctx);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               } else {
-                       DEBUG(0, ("MAPIPROXY module '%s' not found\n", modules[i]));
-               }
-       }
-
-       for (module = mpm_list; module; module = module->next) {
-               DEBUG(3, ("mapiproxy_module_load '%s' (%s)\n", module->module->name, module->module->description));
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-_PUBLIC_ NTSTATUS mapiproxy_module_init(struct dcesrv_context *dce_ctx)
-{
-       init_module_fn                  *mpm;
-       NTSTATUS                        ret;
-
-       mpm = load_samba_modules(NULL, dce_ctx->lp_ctx, "dcerpc_mapiproxy");
-
-       run_init_functions(mpm);
-       talloc_free(mpm);
-       
-       ret = mapiproxy_module_load(dce_ctx);
-
-       return ret;
-}
-
-const struct mapiproxy_module *mapiproxy_module_byname(const char *name)
-{
-       int     i;
-
-       if (!name) return NULL;
-
-       for (i = 0; i < num_mp_modules; i++) {
-               if (strcmp(mp_modules[i].mp_module->name, name) == 0) {
-                       return mp_modules[i].mp_module;
-               }
-       }
-
-       return NULL;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_server.c b/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_server.c
deleted file mode 100644 (file)
index 5f22ae2..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "libmapiproxy.h"
-#include <util/debug.h>
-
-/**
-   \file dcesrv_mapiproxy_server.c
-
-   \brief mapiproxy server modules management
- */
-
-static struct server_module {
-       struct mapiproxy_module *server_module;
-} *server_modules = NULL;
-
-int                                    num_server_modules;
-static struct mapiproxy_module_list    *server_list = NULL;
-
-static TDB_CONTEXT                     *emsabp_tdb_ctx = NULL;
-static void                            *openchange_ldb_ctx = NULL;
-
-NTSTATUS mapiproxy_server_dispatch(struct dcesrv_call_state *dce_call,
-                                  TALLOC_CTX *mem_ctx, void *r,
-                                  struct mapiproxy *mapiproxy)
-{
-       struct mapiproxy_module_list            *server;
-       const struct ndr_interface_table        *table;
-       NTSTATUS                                status;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-
-       for (server = server_list; server; server = server->next) {
-               if (server->module->endpoint && table->name &&
-                   !strcmp(table->name, server->module->endpoint)) {
-                       if (server->module->dispatch) {
-                               mapiproxy->norelay = true;
-                               status = server->module->dispatch(dce_call, mem_ctx, r, mapiproxy);
-                               NT_STATUS_NOT_OK_RETURN(status);
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS mapiproxy_server_unbind(struct server_id server_id, uint32_t context_id)
-{
-       struct mapiproxy_module_list            *server;
-       NTSTATUS                                status;
-
-       for (server = server_list; server; server = server->next) {
-               if (server->module->unbind) {
-                       status = server->module->unbind(server_id, context_id);
-                       NT_STATUS_NOT_OK_RETURN(status);
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-extern NTSTATUS mapiproxy_server_register(const void *_server_module)
-{
-       const struct mapiproxy_module   *server_module = (const struct mapiproxy_module *) _server_module;
-
-       server_modules = realloc_p(server_modules, struct server_module, num_server_modules + 1);
-       if (!server_modules) {
-               smb_panic("out of memory in mapiproxy_server_register");
-       }
-
-       server_modules[num_server_modules].server_module = (struct mapiproxy_module *) smb_xmemdup(server_module, sizeof (*server_module));
-       server_modules[num_server_modules].server_module->name = smb_xstrdup(server_module->name);
-
-       num_server_modules++;
-
-       DEBUG(3, ("MAPIPROXY server '%s' registered\n", server_module->name));
-
-       return NT_STATUS_OK;
-}
-
-
-_PUBLIC_ bool mapiproxy_server_loaded(const char *endpoint)
-{
-       struct mapiproxy_module_list    *server;
-       
-       if (!endpoint) return false;
-
-       for (server = server_list; server; server = server->next) {
-               if (server->module->endpoint && !strcmp(endpoint, server->module->endpoint)) {
-                       return true;
-               }
-       }
-
-       return false;
-}
-
-
-static NTSTATUS mapiproxy_server_overwrite(TALLOC_CTX *mem_ctx, const char *name, const char *endpoint)
-{
-       struct mapiproxy_module_list    *server;
-       struct mapiproxy_module_list    *server_load;
-
-       if (!name) return NT_STATUS_NOT_FOUND;
-       if (!endpoint) return NT_STATUS_NOT_FOUND;
-
-       /* Step 0. Ensure given module matches with endpoint */
-       server_load = talloc_zero(mem_ctx, struct mapiproxy_module_list);
-       server_load->module = mapiproxy_server_byname(name);
-       if (!server_load->module) {
-               DEBUG(0, ("MAPIPROXY ERROR: couldn't load server '%s'\n", name));
-               talloc_free(server_load);
-               return NT_STATUS_NOT_FOUND;
-       } else {
-               if (strcmp(server_load->module->endpoint, endpoint)) {
-                       DEBUG(0, ("MAPIPROXY ERROR: %s endpoint expected for %s but %s found!\n",
-                                 endpoint, server_load->module->name, server_load->module->endpoint));
-                       talloc_free(server_load);
-                       return NT_STATUS_NOT_FOUND;
-               }
-       }
-
-       /* Step 1. Seek if this module has already been loaded */
-       for (server = server_list; server; server = server->next) {
-               if (!strcmp(server->module->name, name) &&
-                   !strcmp(server->module->endpoint, endpoint)) {
-                       DEBUG(0, ("MAPIPROXY: server '%s' already loaded - skipped\n", name));
-                       talloc_free(server_load);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       /* Step 2. Delete any loaded server matching given endpoint */
-       for (server = server_list; server; server = server->next) {
-               if (!strcmp(server->module->endpoint, endpoint)) {
-                       DLIST_REMOVE(server_list, server);
-                       talloc_free(server);
-               }
-       }
-
-       /* Step 3. Load custom server */
-       DLIST_ADD_END(server_list, server_load, struct mapiproxy_module_list *);
-
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS mapiproxy_server_load(struct dcesrv_context *dce_ctx)
-{
-       NTSTATUS                                status;
-       struct mapiproxy_module_list            *server;
-       bool                                    server_mode;
-       int                                     i;
-       const char                              *nspi;
-       const char                              *emsmdb;
-       const char                              *rfr;
-       const char                              *server_name[] = { NDR_EXCHANGE_NSP_NAME, 
-                                                                  NDR_EXCHANGE_EMSMDB_NAME,
-                                                                  NDR_EXCHANGE_DS_RFR_NAME, NULL };
-
-       /* Check server mode */
-       server_mode = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
-       DEBUG(0, ("MAPIPROXY server mode %s\n", (server_mode == false) ? "disabled" : "enabled"));
-
-       if (server_mode == true) {
-               DEBUG(0, ("MAPIPROXY proxy mode disabled\n"));
-
-               for (i = 0; server_name[i]; i++) {
-                       server = talloc_zero(dce_ctx, struct mapiproxy_module_list);
-                       server->module = mapiproxy_server_bystatus(server_name[i], MAPIPROXY_DEFAULT);
-                       if (server->module) {
-                               DLIST_ADD_END(server_list, server, struct mapiproxy_module_list *);
-                       } else {
-                               DEBUG(0, ("MAPIPROXY ERROR: couldn't load server '%s'\n", server_name[i]));
-                       }
-               }
-       }
-
-       /* Check for override/custom NSPI server */
-       nspi = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "nspi_server");
-       mapiproxy_server_overwrite(dce_ctx, nspi, NDR_EXCHANGE_NSP_NAME);
-
-       /* Check for override/custom EMSMDB server */
-       emsmdb = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "emsmdb_server");
-       mapiproxy_server_overwrite(dce_ctx, emsmdb, NDR_EXCHANGE_EMSMDB_NAME);
-
-       /* Check for override/custom RFR server */
-       rfr = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "rfr_server");
-       mapiproxy_server_overwrite(dce_ctx, rfr, NDR_EXCHANGE_DS_RFR_NAME);
-
-       for (server = server_list; server; server = server->next) {
-               DEBUG(3, ("mapiproxy_server_load '%s' (%s)\n", 
-                         server->module->name, server->module->description));
-               if (server->module->init) {
-                       status = server->module->init(dce_ctx);
-                       NT_STATUS_NOT_OK_RETURN(status);
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize mapiproxy servers modules
-
-   \param dce_ctx pointer to the connection context
-
-   \return NT_STATUS_OK on success otherwise NT error
- */
-_PUBLIC_ NTSTATUS mapiproxy_server_init(struct dcesrv_context *dce_ctx)
-{
-       init_module_fn          *servers;
-       NTSTATUS                ret;
-
-       servers = load_samba_modules(NULL, dce_ctx->lp_ctx, "dcerpc_mapiproxy_server");
-
-       run_init_functions(servers);
-       talloc_free(servers);
-
-       ret = mapiproxy_server_load(dce_ctx);
-
-       return ret;
-}
-
-
-const struct mapiproxy_module *mapiproxy_server_bystatus(const char *name, enum mapiproxy_status status)
-{
-       int     i;
-
-       if (!name) return NULL;
-
-       for (i = 0; i < num_server_modules; i++) {
-               if ((strcmp(server_modules[i].server_module->name, name) == 0) && 
-                   (server_modules[i].server_module->status == status)) {
-                       return server_modules[i].server_module;
-               }
-       }
-
-       return NULL;
-}
-
-
-const struct mapiproxy_module *mapiproxy_server_byname(const char *name)
-{
-       int     i;
-
-       if (!name) return NULL;
-
-       for (i = 0; i < num_server_modules; i++) {
-               if ((strcmp(server_modules[i].server_module->name, name) == 0)) {
-                       return server_modules[i].server_module;
-               }
-       }
-
-       return NULL;
-}
-
-
-/**
-   \details Initialize an EMSABP TDB context available to all
-   instances when Samba is not run in single mode.
-
-   \param lp_ctx pointer to the loadparm context
-
-   \note TDB database can't be opened twice with O_RDWR flags. We
-   ensure here we have a general context initialized, which we'll
-   reopen within forked instances
-
-   return Allocated TDB context on success, otherwise NULL
- */
-_PUBLIC_ TDB_CONTEXT *mapiproxy_server_emsabp_tdb_init(struct loadparm_context *lp_ctx)
-{
-       char                    *tdb_path;
-       TALLOC_CTX              *mem_ctx;
-
-       if (emsabp_tdb_ctx) return emsabp_tdb_ctx;
-
-       mem_ctx = talloc_named(NULL, 0, "mapiproxy_server_emsabp_tdb_init");
-       if (!mem_ctx) return NULL;
-
-       /* Step 0. Retrieve a TDB context pointer on the emsabp_tdb database */
-       tdb_path = talloc_asprintf(mem_ctx, "%s/%s", lpcfg_private_dir(lp_ctx), EMSABP_TDB_NAME);
-       emsabp_tdb_ctx = tdb_open(tdb_path, 0, 0, O_RDWR|O_CREAT, 0600);
-       talloc_free(tdb_path);
-       if (!emsabp_tdb_ctx) {
-               DEBUG(3, ("[%s:%d]: %s\n", __FUNCTION__, __LINE__, strerror(errno)));
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       talloc_free(mem_ctx);
-
-       return emsabp_tdb_ctx;
-}
-
-
-/**
-   \details Initialize an openchange LDB context available to all
-   mapiproxy instances. This LDB context points on the OpenChange
-   dispatcher database used within emsmdb default provider.
-
-   \param lp_ctx pointer to the loadparm context
-
-   \note The memory context is not free'd leading and causes a loss
-   record.
-
-   \return Allocated LDB context on success, otherwise NULL
- */
-_PUBLIC_ void *mapiproxy_server_openchange_ldb_init(struct loadparm_context *lp_ctx)
-{
-       char                    *ldb_path;
-       TALLOC_CTX              *mem_ctx;
-       struct tevent_context   *ev;
-       int                     ret;
-       struct ldb_result       *res;
-       struct ldb_dn           *tmp_dn = NULL;
-       static const char       *attrs[] = {
-               "rootDomainNamingContext",
-               "defaultNamingContext",
-               NULL
-       };
-
-       /* Sanity checks */
-       if (openchange_ldb_ctx) return openchange_ldb_ctx;
-
-       ev = tevent_context_init(talloc_autofree_context());
-       if (!ev) return NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "openchange_ldb_init");
-       if (!mem_ctx) return NULL;
-
-       /* Step 0. Retrieve a LDB context pointer on openchange.ldb database */
-       ldb_path = talloc_asprintf(mem_ctx, "%s/%s", lpcfg_private_dir(lp_ctx), OPENCHANGE_LDB_NAME);
-       openchange_ldb_ctx = ldb_init(mem_ctx, ev);
-       if (!openchange_ldb_ctx) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Step 1. Connect to the database */
-       ret = ldb_connect((struct ldb_context *)openchange_ldb_ctx, ldb_path, 0, NULL);
-       talloc_free(ldb_path);
-       if (ret != LDB_SUCCESS) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Step 2. Search for the rootDSE record */
-       ret = ldb_search((struct ldb_context *)openchange_ldb_ctx, mem_ctx, &res, NULL,
-                        LDB_SCOPE_SUBTREE, attrs, "(distinguishedName=@ROOTDSE)");
-       if (ret != LDB_SUCCESS) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       if (res->count != 1) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Step 3. Set opaque naming */
-       tmp_dn = ldb_msg_find_attr_as_dn((struct ldb_context *)openchange_ldb_ctx, openchange_ldb_ctx,
-                                        res->msgs[0], "rootDomainNamingContext");
-       ldb_set_opaque((struct ldb_context *)openchange_ldb_ctx, "rootDomainNamingContext", tmp_dn);
-
-       tmp_dn = ldb_msg_find_attr_as_dn((struct ldb_context *)openchange_ldb_ctx, openchange_ldb_ctx,
-                                        res->msgs[0], "defaultNamingContext");
-       ldb_set_opaque((struct ldb_context *)openchange_ldb_ctx, "defaultNamingContext", tmp_dn);
-
-       return openchange_ldb_ctx;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.c b/branches/plugfest/mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.c
deleted file mode 100644 (file)
index ca44d7d..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "libmapiproxy.h"
-
-/**
-   \file dcesrv_mapiproxy_session.c
-
-   \brief session API for mapiproxy modules
- */
-
-
-/**
-   \details Create and return an allocated pointer to a mpm session
-
-   \param mem_ctx pointer to the memory context
-   \param serverid reference to the session context server identifier
-   structure
-   \param context_id reference to the context identifier
-
-   \return Pointer to an allocated mpm_session structure on success,
-   otherwise NULL
- */
-struct mpm_session *mpm_session_new(TALLOC_CTX *mem_ctx, 
-                                    struct server_id serverid,
-                                    uint32_t context_id)
-{
-       struct mpm_session      *session = NULL;
-
-       if (!mem_ctx) return NULL;
-
-       session = talloc_zero(mem_ctx, struct mpm_session);
-       if (!session) return NULL;
-
-       session->server_id.id = serverid.id;
-       session->server_id.id2 = serverid.id2;
-       session->server_id.node = serverid.node;
-       session->context_id = context_id;
-       session->ref_count = 0;
-       session->destructor = NULL;
-       session->private_data = NULL;
-
-       return session;
-}
-
-
-/**
-   \details Increment the ref_count associated to a session
-
-   \param session pointer to the session where to increment ref_count
-
-   \return true on success, otherwise false
- */
-bool mpm_session_increment_ref_count(struct mpm_session *session)
-{
-       if (!session) return false;
-
-       session->ref_count += 1;
-
-       return true;
-}
-
-
-/**
-   \details Create and return an allocated pointer to a mpm session
-
-   \param mem_ctx pointer to the memory context
-   \param dce_call pointer to the session context
-
-   \return Pointer to an allocated mpm_session structure on success,
-   otherwise NULL
- */
-struct mpm_session *mpm_session_init(TALLOC_CTX *mem_ctx,
-                                    struct dcesrv_call_state *dce_call)
-{
-       if (!mem_ctx) return NULL;
-       if (!dce_call) return NULL;
-       if (!dce_call->conn) return NULL;
-       if (!dce_call->context) return NULL;
-
-       return mpm_session_new(mem_ctx, dce_call->conn->server_id, 
-                              dce_call->context->context_id);
-}
-
-
-/**
-   \details Set the mpm session destructor
-
-   \param session pointer to the mpm session context
-   \param destructor pointer to the destructor function
-
-   \return true on success, otherwise false
- */
-bool mpm_session_set_destructor(struct mpm_session *session,
-                               bool (*destructor)(void *))
-{
-       if (!session) return false;
-       if (!destructor) return false;
-
-       session->destructor = destructor;
-
-       return true;
-}
-
-
-/**
-   \details Set the mpm session pointer on private data
-
-   \param session pointer to the mpm session context
-   \param private_data generic pointer on private data
-
-   \return true on success, otherwise false
- */
-bool mpm_session_set_private_data(struct mpm_session *session,
-                                 void *private_data)
-{
-       if (!session) return false;
-
-       session->private_data = private_data;
-
-       return true;
-}
-
-
-/**
-   \details Release a mapiproxy session context
-
-   \param session pointer to the mpm session context
-
-   \return true on success, otherwise false
- */
-bool mpm_session_release(struct mpm_session *session)
-{
-       bool            ret;
-
-       if (!session) return false;
-
-       if (session->ref_count) {
-               session->ref_count -= 1;
-               return false;
-       }
-
-       if (session->destructor) {
-               ret = session->destructor(session->private_data);
-               if (ret == false) return ret;
-       }
-
-       talloc_free(session);
-
-       return true;
-}
-
-
-/**
-   \details Compare the mpm session with the session context one
-
-   \param session pointer to the mapiproxy module session
-   \param sid reference to a server_id structure to compare
-   \param context_id the connection context id to compare
- */
-bool mpm_session_cmp_sub(struct mpm_session *session, 
-                        struct server_id sid,
-                        uint32_t context_id)
-{
-       if (!session) return false;
-
-       if ((session->server_id.id   == sid.id) &&
-           (session->server_id.id2  == sid.id2) &&
-           (session->server_id.node == sid.node) &&
-           (session->context_id == context_id)) {
-               return true;
-       }
-
-
-       return false;
-}
-
-
-/**
-   \details Compare the mpm session with the session context one
-
-   This function is a wrapper on mpm_session_cmp_sub
-
-   \param session pointer to the mapiproxy module session
-   \param dce_call pointer to the session context
-
-   \return true on success, otherwise false
-
-   \sa mpm_session_cmp_sub
- */
-bool mpm_session_cmp(struct mpm_session *session,
-                    struct dcesrv_call_state *dce_call)
-{
-       if (!session || !dce_call) return false;
-
-       return mpm_session_cmp_sub(session, dce_call->conn->server_id, 
-                                  dce_call->context->context_id);
-}
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/entryid.c b/branches/plugfest/mapiproxy/libmapiproxy/entryid.c
deleted file mode 100644 (file)
index 179779f..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file entryid.c
-
-   \brief EntryID convenient routines
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "libmapiproxy.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \details Build an Address Book EntryID from a legacyExchangeDN
-
-   \param mem_ctx pointer to the memory context
-   \param legacyExchangeDN the string to copy into the binary blob
-   \param bin the binary blob where the function stores results
- */
-_PUBLIC_ enum MAPISTATUS entryid_set_AB_EntryID(TALLOC_CTX *mem_ctx, 
-                                               const char *legacyExchangeDN,
-                                               struct SBinary_short *bin)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!legacyExchangeDN, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!bin, MAPI_E_INVALID_PARAMETER, NULL);
-
-       bin->cb = 28 + strlen(legacyExchangeDN) + 1;
-       bin->lpb = talloc_array(mem_ctx, uint8_t, bin->cb);
-       
-       /* Fill EntryID: FIXME we should use PermanentEntryID here */
-       memset(bin->lpb, 0, bin->cb);
-       memcpy(&bin->lpb[4], GUID_NSPI, 16);
-       bin->lpb[20] = 0x1;
-       memcpy(bin->lpb + 28, legacyExchangeDN, strlen(legacyExchangeDN));
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Build a folder EntryID
-
-   \param mem_ctx pointer to the memory context
-   \param MailboxGuid pointer to the Mailbox Guid
-   \param ReplGuid pointer to the Replica Guid
-   \param FolderType the type of folder
-   \param fid the folder identifier
-   \param rbin the Binary_r structure where the function stores results
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS entryid_set_folder_EntryID(TALLOC_CTX *mem_ctx,
-                                                   struct GUID *MailboxGuid,
-                                                   struct GUID *ReplGuid,
-                                                   uint16_t FolderType,
-                                                   uint64_t fid,
-                                                   struct Binary_r **rbin)
-{
-       struct Binary_r *bin;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!MailboxGuid, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplGuid, MAPI_E_INVALID_PARAMETER, NULL);
-
-       bin = talloc_zero(mem_ctx, struct Binary_r);
-
-       bin->cb = 46;
-       bin->lpb = talloc_array(mem_ctx, uint8_t, bin->cb);
-
-       /* 4 bytes:  EntryID flags set to 0 */
-       memset(bin->lpb, 0, bin->cb);
-
-       /* 16 bytes: MailboxGuid */
-       bin->lpb[4] = (MailboxGuid->time_low & 0xFF);
-       bin->lpb[5] = ((MailboxGuid->time_low >> 8)  & 0xFF);
-       bin->lpb[6] = ((MailboxGuid->time_low >> 16) & 0xFF);
-       bin->lpb[7] = ((MailboxGuid->time_low >> 24) & 0xFF);
-       bin->lpb[8] = (MailboxGuid->time_mid & 0xFF);
-       bin->lpb[9] = ((MailboxGuid->time_mid >> 8)  & 0xFF);
-       bin->lpb[10] = (MailboxGuid->time_hi_and_version & 0xFF);
-       bin->lpb[11] = ((MailboxGuid->time_hi_and_version >> 8) & 0xFF);
-       memcpy(&bin->lpb[12],  MailboxGuid->clock_seq, sizeof (uint8_t) * 2);
-       memcpy(&bin->lpb[14], MailboxGuid->node, sizeof (uint8_t) * 6);
-
-       /* 2 bytes: FolderType */
-       bin->lpb[20] = (FolderType & 0xFF);
-       bin->lpb[21] = ((FolderType >> 8) & 0xFF);
-
-       /* 16 bytes: ReplGuid */
-       bin->lpb[22] = (ReplGuid->time_low & 0xFF);
-       bin->lpb[23] = ((ReplGuid->time_low >> 8)  & 0xFF);
-       bin->lpb[24] = ((ReplGuid->time_low >> 16) & 0xFF);
-       bin->lpb[25] = ((ReplGuid->time_low >> 24) & 0xFF);
-       bin->lpb[26] = (ReplGuid->time_mid & 0xFF);
-       bin->lpb[27] = ((ReplGuid->time_mid >> 8)  & 0xFF);
-       bin->lpb[28] = (ReplGuid->time_hi_and_version & 0xFF);
-       bin->lpb[29] = ((ReplGuid->time_hi_and_version >> 8) & 0xFF);
-       memcpy(&bin->lpb[30],  ReplGuid->clock_seq, sizeof (uint8_t) * 2);
-       memcpy(&bin->lpb[32], ReplGuid->node, sizeof (uint8_t) * 6);
-
-       /* 6 bytes: FolderID, first two byte unset */
-       bin->lpb[38] = ((fid >> 16) & 0xFF);
-       bin->lpb[39] = ((fid >> 24) & 0xFF);
-       bin->lpb[40] = ((fid >> 32) & 0xFF);
-       bin->lpb[41] = ((fid >> 40) & 0xFF);
-       bin->lpb[42] = ((fid >> 48) & 0xFF);
-       bin->lpb[43] = ((fid >> 56) & 0xFF);
-       /* 44 and 45 are zero padding */
-
-       *rbin = bin;
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/libmapiproxy.h b/branches/plugfest/mapiproxy/libmapiproxy/libmapiproxy.h
deleted file mode 100644 (file)
index b7596bc..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-   MAPI Proxy
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __LIBMAPIPROXY_H__
-#define        __LIBMAPIPROXY_H__
-
-#include <signal.h>
-#include <dcerpc_server.h>
-#include <talloc.h>
-#include <tevent.h>
-#include <tdb.h>
-#include <ldb.h>
-#include <ldb_errors.h>
-#include <dlinklist.h>
-#include <fcntl.h>
-#include <errno.h>
-
-struct mapiproxy {
-       bool                    norelay;
-       bool                    ahead;
-};
-
-
-enum mapiproxy_status {
-       MAPIPROXY_DEFAULT       = 0x0,
-       MAPIPROXY_CUSTOM        = 0x1
-};
-
-
-struct mapiproxy_module {
-       enum mapiproxy_status   status;
-       const char              *name;
-       const char              *description;
-       const char              *endpoint;
-       NTSTATUS                (*init)(struct dcesrv_context *);
-       NTSTATUS                (*push)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
-       NTSTATUS                (*ndr_pull)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_pull *);
-       NTSTATUS                (*pull)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
-       NTSTATUS                (*dispatch)(struct dcesrv_call_state *, TALLOC_CTX *, void *, struct mapiproxy *);
-       NTSTATUS                (*unbind)(struct server_id, uint32_t);
-};
-
-
-struct mapiproxy_module_list {
-       const struct mapiproxy_module   *module;
-       struct mapiproxy_module_list    *prev;
-       struct mapiproxy_module_list    *next;
-};
-
-
-struct mpm_session {
-       struct server_id                server_id;
-       uint32_t                        context_id;
-       uint32_t                        ref_count;
-       bool                            (*destructor)(void *);
-       void                            *private_data;
-};
-
-
-struct auth_serversupplied_info 
-{
-       struct dom_sid  *account_sid;
-       struct dom_sid  *primary_group_sid;
-
-       size_t          n_domain_groups;
-       struct dom_sid  **domain_groups;
-
-       DATA_BLOB       user_session_key;
-       DATA_BLOB       lm_session_key;
-
-       const char      *account_name;
-       const char      *domain_name;
-
-       const char      *full_name;
-       const char      *logon_script;
-       const char      *profile_path;
-       const char      *home_directory;
-       const char      *home_drive;
-       const char      *logon_server;
-       
-       NTTIME          last_logon;
-       NTTIME          last_logoff;
-       NTTIME          acct_expiry;
-       NTTIME          last_password_change;
-       NTTIME          allow_password_change;
-       NTTIME          force_password_change;
-
-       uint16_t        logon_count;
-       uint16_t        bad_password_count;
-
-       uint32_t        acct_flags;
-
-       bool            authenticated;
-};
-
-
-struct mapi_handles {
-       uint32_t                handle;
-       uint32_t                parent_handle;
-       void                    *private_data;
-       struct mapi_handles     *prev;
-       struct mapi_handles     *next;
-};
-
-
-struct mapi_handles_context {
-       TDB_CONTEXT             *tdb_ctx;
-       uint32_t                last_handle;
-       struct mapi_handles     *handles;
-};
-
-
-#define        MAPI_HANDLES_RESERVED   0xFFFFFFFF
-#define        MAPI_HANDLES_ROOT       "root"
-#define        MAPI_HANDLES_NULL       "null"
-
-
-/**
-   EMSABP server defines
- */
-#define        EMSABP_TDB_NAME         "emsabp_tdb.tdb"
-
-/**
-   Represents the NSPI Protocol in Permanent Entry IDs.
- */
-static const uint8_t GUID_NSPI[] = {
-0xDC, 0xA7, 0x40, 0xC8, 0xC0, 0x42, 0x10, 0x1A, 0xB4, 0xB9,
-0x08, 0x00, 0x2B, 0x2F, 0xE1, 0x82
-};
-
-
-#define        OPENCHANGE_LDB_NAME     "openchange.ldb"
-
-#define        NTLM_AUTH_IS_OK(dce_call) \
-(dce_call->conn->auth_state.session_info->info->authenticated == true)
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-/* definitions from dcesrv_mapiproxy_module.c */
-NTSTATUS mapiproxy_module_register(const void *);
-NTSTATUS mapiproxy_module_init(struct dcesrv_context *);
-
-NTSTATUS mapiproxy_module_push(struct dcesrv_call_state *, TALLOC_CTX *, void *);
-NTSTATUS mapiproxy_module_pull(struct dcesrv_call_state *, TALLOC_CTX *, void *);
-NTSTATUS mapiproxy_module_ndr_pull(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_pull *);
-NTSTATUS mapiproxy_module_dispatch(struct dcesrv_call_state *, TALLOC_CTX *, void *, struct mapiproxy *);
-NTSTATUS mapiproxy_module_unbind(struct server_id, uint32_t);
-
-const struct mapiproxy_module *mapiproxy_module_byname(const char *);
-
-/* definitions from dcesrv_mapiproxy_server.c */
-NTSTATUS mapiproxy_server_register(const void *);
-NTSTATUS mapiproxy_server_init(struct dcesrv_context *);
-NTSTATUS mapiproxy_server_unbind(struct server_id, uint32_t);
-NTSTATUS mapiproxy_server_dispatch(struct dcesrv_call_state *, TALLOC_CTX *, void *, struct mapiproxy *);
-bool mapiproxy_server_loaded(const char *);
-
-const struct mapiproxy_module *mapiproxy_server_bystatus(const char *, enum mapiproxy_status);
-const struct mapiproxy_module *mapiproxy_server_byname(const char *);
-
-TDB_CONTEXT *mapiproxy_server_emsabp_tdb_init(struct loadparm_context *);
-void *mapiproxy_server_openchange_ldb_init(struct loadparm_context *);
-
-/* definitions from dcesrv_mapiproxy_session. c */
-struct mpm_session *mpm_session_new(TALLOC_CTX *, struct server_id, uint32_t);
-struct mpm_session *mpm_session_init(TALLOC_CTX *, struct dcesrv_call_state *);
-bool mpm_session_increment_ref_count(struct mpm_session *);
-bool mpm_session_set_destructor(struct mpm_session *, bool (*destructor)(void *));
-bool mpm_session_set_private_data(struct mpm_session *, void *);
-bool mpm_session_release(struct mpm_session *);
-bool mpm_session_cmp_sub(struct mpm_session *, struct server_id, uint32_t);
-bool mpm_session_cmp(struct mpm_session *, struct dcesrv_call_state *);
-
-/* definitions from openchangedb.c */
-enum MAPISTATUS openchangedb_get_new_folderID(void *, uint64_t *);
-enum MAPISTATUS openchangedb_get_SystemFolderID(void *, char *, uint32_t, uint64_t *);
-enum MAPISTATUS openchangedb_get_PublicFolderID(void *, uint32_t, uint64_t *);
-enum MAPISTATUS openchangedb_get_distinguishedName(TALLOC_CTX *, void *, uint64_t, char **);
-enum MAPISTATUS        openchangedb_get_MailboxGuid(void *, char *, struct GUID *);
-enum MAPISTATUS        openchangedb_get_MailboxReplica(void *, char *, uint16_t *, struct GUID *);
-enum MAPISTATUS openchangedb_get_PublicFolderReplica(void *, uint16_t *, struct GUID *);
-enum MAPISTATUS openchangedb_get_mapistoreURI(TALLOC_CTX *, void *, uint64_t, char **, bool);
-enum MAPISTATUS openchangedb_get_ReceiveFolder(TALLOC_CTX *, void *, const char *, const char *, uint64_t *, const char **);
-enum MAPISTATUS openchangedb_lookup_folder_property(void *, uint32_t, uint64_t);
-enum MAPISTATUS openchangedb_get_folder_property(TALLOC_CTX *, void *, char *, uint32_t, uint64_t, void **);
-enum MAPISTATUS openchangedb_get_folder_count(void *, uint64_t, uint32_t *);
-enum MAPISTATUS openchangedb_get_table_property(TALLOC_CTX *, void *, char *, char *, uint32_t, uint32_t, void **);
-enum MAPISTATUS openchangedb_get_fid_by_name(void *ldb_ctx, uint64_t, const char*, uint64_t *);
-enum MAPISTATUS openchangedb_set_ReceiveFolder(TALLOC_CTX *, void *ldb_ctx, const char *, const char *, uint64_t);
-
-/* definitions from auto-generated openchangedb_property.c */
-const char *openchangedb_property_get_attribute(uint32_t);
-
-/* definitions from mapi_handles.c */
-struct mapi_handles_context *mapi_handles_init(TALLOC_CTX *);
-enum MAPISTATUS        mapi_handles_release(struct mapi_handles_context *);
-enum MAPISTATUS mapi_handles_search(struct mapi_handles_context *, uint32_t, struct mapi_handles **);
-enum MAPISTATUS mapi_handles_add(struct mapi_handles_context *, uint32_t, struct mapi_handles **);
-enum MAPISTATUS mapi_handles_delete(struct mapi_handles_context *, uint32_t);
-enum MAPISTATUS mapi_handles_get_private_data(struct mapi_handles *, void **);
-enum MAPISTATUS mapi_handles_set_private_data(struct mapi_handles *, void *);
-enum MAPISTATUS mapi_handles_get_systemfolder(struct mapi_handles *, int *);
-enum MAPISTATUS mapi_handles_set_systemfolder(struct mapi_handles *, int);
-
-/* definitions from entryid.c */
-enum MAPISTATUS entryid_set_AB_EntryID(TALLOC_CTX *, const char *, struct SBinary_short *);
-enum MAPISTATUS entryid_set_folder_EntryID(TALLOC_CTX *, struct GUID *, struct GUID *, uint16_t, uint64_t, struct Binary_r **);
-
-__END_DECLS
-
-#endif /* ! __LIBMAPIPROXY_H__ */
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/mapi_handles.c b/branches/plugfest/mapiproxy/libmapiproxy/mapi_handles.c
deleted file mode 100644 (file)
index 8a6d208..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   MAPI handles API implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mapi_handles.c
-
-   \brief API for MAPI handles management
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "libmapiproxy.h"
-
-
-/**
-   \details Initialize MAPI handles context
-
-   \param mem_ctx pointer to the memory context
-
-   \return Allocated MAPI handles context on success, otherwise NULL
- */
-_PUBLIC_ struct mapi_handles_context *mapi_handles_init(TALLOC_CTX *mem_ctx)
-{
-       struct mapi_handles_context     *handles_ctx;
-
-       /* Step 1. Initialize the context */
-       handles_ctx = talloc_zero(mem_ctx, struct mapi_handles_context);
-       if (!handles_ctx) return NULL;
-
-       /* Step 2. Initialize the TDB context */
-       handles_ctx->tdb_ctx = tdb_open(NULL, 0, TDB_INTERNAL, O_RDWR|O_CREAT, 0600);
-
-       /* Step 3. Initialize the handles list */
-       handles_ctx->handles = NULL;
-
-       /* Step 4. Set last_handle to the first valid value */
-       handles_ctx->last_handle = 1;
-
-       return handles_ctx;
-}
-
-
-/**
-   \details Release MAPI handles context
-
-   \param handles_ctx pointer to the MAPI handles context
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_release(struct mapi_handles_context *handles_ctx)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-
-       tdb_close(handles_ctx->tdb_ctx);
-       talloc_free(handles_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Search for a record in the TDB database
-
-   \param handles_ctx pointer to the MAPI handles context
-   \param handle MAPI handle to lookup
-   \param rec pointer to the MAPI handle structure the function
-   returns
-   
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_search(struct mapi_handles_context *handles_ctx,
-                                            uint32_t handle, struct mapi_handles **rec)
-{
-       TALLOC_CTX              *mem_ctx;
-       TDB_DATA                key;
-       TDB_DATA                dbuf;
-       struct mapi_handles     *el;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handles_ctx->tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(handle == MAPI_HANDLES_RESERVED, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!rec, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_search");
-
-       /* Step 1. Search for the handle within TDB database */
-       key.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", handle);
-       key.dsize = strlen((const char *)key.dptr);
-
-       dbuf = tdb_fetch(handles_ctx->tdb_ctx, key);
-       talloc_free(key.dptr);
-       OPENCHANGE_RETVAL_IF(!dbuf.dptr, MAPI_E_NOT_FOUND, mem_ctx);
-       OPENCHANGE_RETVAL_IF(!dbuf.dsize, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Ensure this is not a free'd record */
-       OPENCHANGE_RETVAL_IF(!strncmp((char *)dbuf.dptr, MAPI_HANDLES_NULL, dbuf.dsize), 
-                            MAPI_E_NOT_FOUND, mem_ctx);
-       free(dbuf.dptr);
-
-       /* Step 2. Return the record within the double chained list */
-       for (el = handles_ctx->handles; el; el = el->next) {
-               if (el->handle == handle) {
-                       *rec = el;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-
-       return MAPI_E_CORRUPT_STORE;
-}
-
-
-/**
-   \details Set a TDB record data as null meaning it can be reused in
-   the future.
-
-   \param handles_ctx pointer to the MAPI handles context
-   \param handle handle key value to free
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS mapi_handles_tdb_free(struct mapi_handles_context *handles_ctx,
-                                            uint32_t handle)
-{
-       TALLOC_CTX              *mem_ctx;
-       TDB_DATA                key;
-       TDB_DATA                dbuf;
-       int                     ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handles_ctx->tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(handle == MAPI_HANDLES_RESERVED, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_tdb_free");
-       
-       key.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", handle);
-       key.dsize = strlen((const char *)key.dptr);
-
-       /* Step 1. Makes sure the record exists */
-       ret = tdb_exists(handles_ctx->tdb_ctx, key);
-       OPENCHANGE_RETVAL_IF(!ret, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Update existing record */
-       dbuf.dptr = (unsigned char *)MAPI_HANDLES_NULL;
-       dbuf.dsize = strlen(MAPI_HANDLES_NULL);
-
-       ret = tdb_store(handles_ctx->tdb_ctx, key, dbuf, TDB_MODIFY);
-       if (ret == -1) {
-               DEBUG(3, ("[%s:%d]: Unable to create 0x%x record: %s\n", __FUNCTION__, __LINE__,
-                         handle, tdb_errorstr(handles_ctx->tdb_ctx)));
-
-               talloc_free(mem_ctx);
-               return MAPI_E_CORRUPT_STORE;
-       }
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Update a TDB record
-
-   
- */
-static enum MAPISTATUS mapi_handles_tdb_update(struct mapi_handles_context *handles_ctx,
-                                              uint32_t handle, uint32_t container_handle)
-{
-       TALLOC_CTX      *mem_ctx;
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       int             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handles_ctx->tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_tdb_update");
-
-       key.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", handle);
-       key.dsize = strlen((const char *)key.dptr);
-
-       /* Step 1. Makes sure the record exists */
-       ret = tdb_exists(handles_ctx->tdb_ctx, key);
-       OPENCHANGE_RETVAL_IF(!ret, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Update record */
-       dbuf.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", container_handle);
-       dbuf.dsize = strlen((const char *)dbuf.dptr);
-
-       ret = tdb_store(handles_ctx->tdb_ctx, key, dbuf, TDB_MODIFY);
-       if (ret == -1) {
-               DEBUG(3, ("[%s:%d]: Unable to update 0x%x record: %s\n", __FUNCTION__, __LINE__,
-                         handle, tdb_errorstr(handles_ctx->tdb_ctx)));
-
-               talloc_free(mem_ctx);
-               return MAPI_E_CORRUPT_STORE;    
-       }
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Traverse TDB database and search for the first record
-   which dbuf value is "null" string.
-   \param tdb_ctx pointer to the TDB context
-   \param key the current TDB key
-   \param dbuf the current TDB value
-   \param state pointer on private data
-
-   \return 1 when a free record is found, otherwise 0
-*/
-static int mapi_handles_traverse_null(TDB_CONTEXT *tdb_ctx,
-                                     TDB_DATA key, TDB_DATA dbuf,
-                                     void *state)
-{
-       TALLOC_CTX      *mem_ctx;
-       uint32_t        *handle = (uint32_t *) state;
-       char            *handle_str = NULL;
-
-       if (dbuf.dptr && !strncmp((const char *)dbuf.dptr, MAPI_HANDLES_NULL, dbuf.dsize)) {
-               mem_ctx = talloc_named(NULL, 0, "mapi_handles_traverse_null");
-               handle_str = talloc_strndup(mem_ctx, (char *)key.dptr, key.dsize);
-               *handle = strtol((const char *) handle_str, NULL, 16);
-               talloc_free(handle_str);
-               talloc_free(mem_ctx);
-
-               return 1;
-       }
-
-       return 0;
-}
-
-
-/**
-   \details Add a handles to the database and return a pointer on
-   created record
-
-   \param handles_ctx pointer to the MAPI handles context
-   \param container_handle the container handle if available
-   \param rec pointer on pointer to the MAPI handle structure the function
-   returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_add(struct mapi_handles_context *handles_ctx,
-                                         uint32_t container_handle, struct mapi_handles **rec)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       TDB_DATA                key;
-       TDB_DATA                dbuf;
-       uint32_t                handle = 0;
-       struct mapi_handles     *el;
-       int                     ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handles_ctx->tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(handle == MAPI_HANDLES_RESERVED, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!rec, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_add");
-
-       /* Step 1. Seek the TDB database for the first free record */
-       ret = tdb_traverse(handles_ctx->tdb_ctx, mapi_handles_traverse_null, (void *)&handle);
-       if (ret > -1 && handle > 0) {
-               DEBUG(0, ("We have found free record 0x%x\n", handle));
-               retval = mapi_handles_tdb_update(handles_ctx, handle, container_handle);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               
-               el = talloc_zero((TALLOC_CTX *)handles_ctx, struct mapi_handles);
-               if (!el) {
-                       mapi_handles_tdb_free(handles_ctx, handle);
-                       OPENCHANGE_RETVAL_IF(!el, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-               }
-
-               el->handle = handle;
-               el->parent_handle = container_handle;
-               el->private_data = NULL;
-               *rec = el;
-               DLIST_ADD_END(handles_ctx->handles, el, struct mapi_handles *);
-
-               return MAPI_E_SUCCESS;
-       }
-
-       /* Step 2. If no record is available, create a new one */
-       key.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", handles_ctx->last_handle);
-       key.dsize = strlen((const char *)key.dptr);
-
-       if (container_handle) {
-               dbuf.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", container_handle);
-               dbuf.dsize = strlen((const char *)dbuf.dptr);
-       } else {
-               dbuf.dptr = (unsigned char *) MAPI_HANDLES_ROOT;
-               dbuf.dsize = strlen(MAPI_HANDLES_ROOT);
-       }
-
-       ret = tdb_store(handles_ctx->tdb_ctx, key, dbuf, TDB_INSERT);
-       if (ret == -1) {
-               DEBUG(3, ("[%s:%d]: Unable to create 0x%x record: %s\n", __FUNCTION__, __LINE__,
-                         handles_ctx->last_handle, tdb_errorstr(handles_ctx->tdb_ctx)));
-               talloc_free(mem_ctx);
-
-               return MAPI_E_CORRUPT_STORE;
-       }
-
-       el = talloc_zero((TALLOC_CTX *)handles_ctx, struct mapi_handles);
-       if (!el) {
-               mapi_handles_tdb_free(handles_ctx, handles_ctx->last_handle);
-               OPENCHANGE_RETVAL_IF(!el, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
-       }
-
-       el->handle = handles_ctx->last_handle;
-       el->parent_handle = container_handle;
-       el->private_data = NULL;
-       *rec = el;
-       DLIST_ADD_END(handles_ctx->handles, el, struct mapi_handles *);
-
-       handles_ctx->last_handle += 1;
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Get the private data associated to a MAPI handle
-
-   \param handle pointer to the MAPI handle structure
-   \param private_data pointer on pointer to the private data the
-   function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_get_private_data(struct mapi_handles *handle, void **private_data)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!private_data, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handle->private_data, MAPI_E_NOT_FOUND, NULL);
-
-       *private_data = handle->private_data;
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Set the private data associated to a MAPI handle
-
-   \param handle pointer to the MAPI handle structure
-   \param private_data pointer to the private data to associate to the
-   MAPI handle
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_set_private_data(struct mapi_handles *handle, void *private_data)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(handle->private_data, MAPI_E_UNABLE_TO_COMPLETE, NULL);
-
-       handle->private_data = private_data;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-struct mapi_handles_private {
-       struct mapi_handles_context     *handles_ctx;
-       uint32_t                        container_handle;
-};
-
-/**
-   \details Traverse TDB database and search for records
-   which dbuf value is set to state.
-   \param tdb_ctx pointer to the TDB context
-   \param key the current TDB key
-   \param dbuf the current TDB value
-   \param state pointer on private data
-
-   \return 1 when a free record is found, otherwise 0
-*/
-static int mapi_handles_traverse_delete(TDB_CONTEXT *tdb_ctx,
-                                       TDB_DATA key, TDB_DATA dbuf,
-                                       void *state)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_handles_private     *handles_private = (struct mapi_handles_private *) state;
-       uint32_t                        handle;
-       char                            *container_handle_str = NULL;
-       char                            *handle_str = NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_traverse_delete");
-       container_handle_str = talloc_asprintf(mem_ctx, "0x%x", handles_private->container_handle);
-
-       if (dbuf.dptr && !strncmp((const char *)dbuf.dptr, container_handle_str, dbuf.dsize)) {
-               handle_str = talloc_strndup(mem_ctx, (char *)key.dptr, key.dsize);
-               handle = strtol((const char *) handle_str, NULL, 16);
-               talloc_free(handle_str);
-               mapi_handles_delete(handles_private->handles_ctx, handle);
-       }
-
-       talloc_free(container_handle_str);
-       talloc_free(mem_ctx);
-
-       return 0;
-}
-
-
-
-/**
-   \details Remove the MAPI handle referenced by the handle parameter
-   from the double chained list and mark its associated TDB record as
-   null
-
-   \param handles_ctx pointer to the MAPI handles context
-   \param handle the handle to delete
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS mapi_handles_delete(struct mapi_handles_context *handles_ctx, 
-                                            uint32_t handle)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       TDB_DATA                        key;
-       struct mapi_handles             *el;
-       struct mapi_handles_private     handles_private;
-       int                             ret;
-       bool                            found = false;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!handles_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!handles_ctx->tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(handle == MAPI_HANDLES_RESERVED, MAPI_E_INVALID_PARAMETER, NULL);
-
-       DEBUG(4, ("[%s:%d]: Deleting MAPI handle 0x%x\n", __FUNCTION__, __LINE__, handle));
-
-       mem_ctx = talloc_named(NULL, 0, "mapi_handles_delete");
-
-       key.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", handle);
-       key.dsize = strlen((const char *)key.dptr);
-
-       /* Step 1. Make sure the record exists */
-       ret = tdb_exists(handles_ctx->tdb_ctx, key);
-       OPENCHANGE_RETVAL_IF(!ret, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Delete this record from the double chained list */
-       for (el = handles_ctx->handles; el; el = el->next) {
-               if (el->handle == handle) {
-                       DLIST_REMOVE(handles_ctx->handles, el);
-                       talloc_free(el);
-                       found = true;
-                       break;
-               }
-       }
-       /* This case should never occur */
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       /* Step 3. Free this record within the TDB database */
-       retval = mapi_handles_tdb_free(handles_ctx, handle);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Step 4. Delete hierarchy of children */
-       handles_private.handles_ctx = handles_ctx;
-       handles_private.container_handle = handle;
-       ret = tdb_traverse(handles_ctx->tdb_ctx, mapi_handles_traverse_delete, (void *)&handles_private);
-
-       talloc_free(mem_ctx);
-
-       DEBUG(4, ("[%s:%d]: Deleting MAPI handle 0x%x COMPLETE\n", __FUNCTION__, __LINE__, handle));
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiproxy/openchangedb.c b/branches/plugfest/mapiproxy/libmapiproxy/openchangedb.c
deleted file mode 100644 (file)
index ea3cf3e..0000000
+++ /dev/null
@@ -1,980 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file openchangedb.c
-
-   \brief OpenChange Dispatcher database routines
- */
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \details Retrieve the mailbox FolderID for given recipient from
-   openchange dispatcher database
-
-   \param _ldb_ctx pointer to the OpenChange LDB context
-   \param recipient the mailbox username
-   \param SystemIdx the system folder index
-   \param FolderId pointer to the folder identifier the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_SystemFolderID(void *_ldb_ctx,
-                                                        char *recipient, uint32_t SystemIdx,
-                                                        uint64_t *FolderId)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-       const char                      *dn;
-       struct ldb_dn                   *ldb_dn = NULL;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!FolderId, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mem_ctx = talloc_named(NULL, 0, "get_SystemFolderID");
-
-       /* Step 1. Search Mailbox Root DN */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=%s", recipient);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. If Mailbox root folder, check for FolderID within current record */
-       if (SystemIdx == 0x1) {
-               *FolderId = ldb_msg_find_attr_as_int64(res->msgs[0], "PidTagFolderId", 0);
-               OPENCHANGE_RETVAL_IF(!*FolderId, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-               talloc_free(mem_ctx);
-               return MAPI_E_SUCCESS;
-       }
-
-       dn = ldb_msg_find_attr_as_string(res->msgs[0], "distinguishedName", NULL);
-       OPENCHANGE_RETVAL_IF(!dn, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       /* Step 3. Search FolderID */
-       ldb_dn = ldb_dn_new(mem_ctx, ldb_ctx, dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn, MAPI_E_CORRUPT_STORE, mem_ctx);
-       talloc_free(res);
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_dn, LDB_SCOPE_SUBTREE, attrs, 
-                        "(&(objectClass=systemfolder)(SystemIdx=%d))", SystemIdx);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *FolderId = ldb_msg_find_attr_as_int64(res->msgs[0], "PidTagFolderId", 0);
-       OPENCHANGE_RETVAL_IF(!*FolderId, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve the public folder FolderID (fid) for a given folder type
-
-   \param _ldb_ctx pointer to the OpenChange LDB context
-   \param SystemIdx the system folder index
-   \param FolderId pointer to the folder identifier the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_PublicFolderID(void *_ldb_ctx,
-                                                        uint32_t SystemIdx,
-                                                        uint64_t *FolderId)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!FolderId, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "get_PublicFolderID");
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs,
-                        "(&(objectClass=publicfolder)(SystemIdx=%d))", SystemIdx);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, mem_ctx);
-       OPENCHANGE_RETVAL_IF(res->count != 1, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *FolderId = ldb_msg_find_attr_as_int64(res->msgs[0], "PidTagFolderId", 0);
-       OPENCHANGE_RETVAL_IF(!*FolderId, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve the distinguishedName associated to a mailbox
-   system folder.
-
-   \param parent_ctx pointer to the parent memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param fid the Folder identifier to search for
-   \param distinguishedName pointer on pointer to the
-   distinguishedName string the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_distinguishedName(TALLOC_CTX *parent_ctx, 
-                                                           void *_ldb_ctx, 
-                                                           uint64_t fid, 
-                                                           char **distinguishedName)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_distinguishedName");
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "(PidTagFolderId=0x%.16"PRIx64")", fid);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *distinguishedName = talloc_strdup(parent_ctx, ldb_msg_find_attr_as_string(res->msgs[0], "distinguishedName", NULL));
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the mailbox GUID for given recipient from
-   openchange dispatcher database
-
-   \param _ldb_ctx pointer to the OpenChange LDB context
-   \param recipient the mailbox username
-   \param MailboxGUID pointer to the mailbox GUID the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_MailboxGuid(void *_ldb_ctx,
-                                                     char *recipient,
-                                                     struct GUID *MailboxGUID)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       const char                      *guid;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!MailboxGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "get_MailboxGuid");
-
-       /* Step 1. Search Mailbox DN */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=%s", recipient);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-       
-       /* Step 2. Retrieve MailboxGUID attribute's value */
-       guid = ldb_msg_find_attr_as_string(res->msgs[0], "MailboxGUID", NULL);
-       OPENCHANGE_RETVAL_IF(!guid, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       GUID_from_string(guid, MailboxGUID);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the mailbox replica identifier and GUID for given
-   recipient from openchange dispatcher database
-
-   \param _ldb_ctx pointer to the OpenChange LDB context
-   \param recipient the mailbox username
-   \param ReplID pointer to the replica identifier the function returns
-   \param ReplGUID pointer to the replica GUID the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_MailboxReplica(void *_ldb_ctx,
-                                                        char *recipient, uint16_t *ReplID,
-                                                        struct GUID *ReplGUID)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       const char                      *guid;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplID, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "get_MailboxReplica");
-
-       /* Step 1. Search Mailbox DN */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=%s", recipient);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Retrieve ReplicaID attribute's value */
-       *ReplID = ldb_msg_find_attr_as_int(res->msgs[0], "ReplicaID", 0);
-
-       /* Step 3/ Retrieve ReplicaGUID attribute's value */
-       guid = ldb_msg_find_attr_as_string(res->msgs[0], "ReplicaGUID", 0);
-       OPENCHANGE_RETVAL_IF(!guid, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       GUID_from_string(guid, ReplGUID);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Retrieve the public folder replica identifier and GUID
-   from the openchange dispatcher database
-
-   \param _ldb_ctx pointer to the OpenChange LDB context
-   \param ReplID pointer to the replica identifier the function returns
-   \param ReplGUID pointer to the replica GUID the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_PublicFolderReplica(void *_ldb_ctx,
-                                                             uint16_t *ReplID,
-                                                             struct GUID *ReplGUID)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       const char                      *guid;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ldb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplID, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ReplGUID, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "get_PublicFolderReplica");
-
-       /* Step 1. Search for public folder container */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=publicfolders");
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Retrieve ReplicaID attribute's value */
-       *ReplID = ldb_msg_find_attr_as_int(res->msgs[0], "ReplicaID", 0);
-
-       /* Step 3. Retrieve ReplicaGUID attribute's value */
-       guid = ldb_msg_find_attr_as_string(res->msgs[0], "StoreGUID", 0);
-       OPENCHANGE_RETVAL_IF(!guid, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       GUID_from_string(guid, ReplGUID);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the mapistore URI associated to a mailbox system
-   folder.
-
-   \param parent_ctx pointer to the memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param fid the Folder identifier to search for
-   \param mapistoreURL pointer on pointer to the mapistore URI the
-   function returns
-   \param mailboxstore boolean value which defines whether the record
-   has to be searched within Public folders hierarchy or not
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_mapistoreURI(TALLOC_CTX *parent_ctx,
-                                                      void *_ldb_ctx,
-                                                      uint64_t fid,
-                                                      char **mapistoreURL,
-                                                      bool mailboxstore)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_mapistoreURI");
-
-       if (mailboxstore == true) {
-               ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                                LDB_SCOPE_SUBTREE, attrs, "(PidTagFolderId=0x%.16"PRIx64")", fid);
-       } else {
-               ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_root_basedn(ldb_ctx),
-                                LDB_SCOPE_SUBTREE, attrs, "(PidTagFolderId=0x%.16"PRIx64")", fid);
-       }
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *mapistoreURL = talloc_strdup(parent_ctx, ldb_msg_find_attr_as_string(res->msgs[0], "mapistore_uri", NULL));
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the Explicit message class and Folder identifier
-   associated to the MessageClass search pattern.
-
-   \param parent_ctx pointer to the memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param recipient pointer to the mailbox's username
-   \param MessageClass substring to search for
-   \param fid pointer to the folder identifier the function returns
-   \param ExplicitMessageClass pointer on pointer to the complete
-   message class the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_ReceiveFolder(TALLOC_CTX *parent_ctx,
-                                                       void *_ldb_ctx,
-                                                       const char *recipient,
-                                                       const char *MessageClass,
-                                                       uint64_t *fid,
-                                                       const char **ExplicitMessageClass)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       struct ldb_dn                   *dn;
-       struct ldb_message_element      *ldb_element;
-       char                            *dnstr;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-       unsigned int                    i, j;
-       size_t                          length;
-
-       mem_ctx = talloc_named(NULL, 0, "get_ReceiveFolder");
-
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, recipient: %s\n", recipient));
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, MessageClass: %s\n", MessageClass));
-
-       /* Step 1. Find mailbox DN for the recipient */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=%s", recipient);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       dnstr = talloc_strdup(mem_ctx, ldb_msg_find_attr_as_string(res->msgs[0], "distinguishedName", NULL));
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, dnstr: %s\n", dnstr));
-
-       OPENCHANGE_RETVAL_IF(!dnstr, MAPI_E_NOT_FOUND, mem_ctx);
-
-       talloc_free(res);
-
-       dn = ldb_dn_new(mem_ctx, ldb_ctx, dnstr);
-       talloc_free(dnstr);
-
-       /* Step 2A. As a special case, find the "All" target */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_SUBTREE, attrs,
-                        "(PidTagMessageClass=All)");
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || (res->count != 1), MAPI_E_NOT_FOUND, mem_ctx);
-       *fid = ldb_msg_find_attr_as_uint64(res->msgs[0], "PidTagFolderId", 0x0);
-       *ExplicitMessageClass = "";
-       DEBUG(5, ("openchangedb_get_ReceiveFolder (All target), class: %s, fid: 0x%016"PRIx64"\n",
-                 *ExplicitMessageClass, *fid));
-       if (strcmp(MessageClass, "All") == 0) {
-               /* we're done here */
-               talloc_free(mem_ctx);
-               return MAPI_E_SUCCESS;
-       }
-
-       /* Step 2B. Search for all MessageClasses within user's mailbox */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_SUBTREE, attrs, 
-                        "(PidTagMessageClass=*)");
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, res->count: %i\n", res->count));
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 3. Find the message class that has the longest matching string entry */
-       for (j = 0; j < res->count; ++j) {
-               ldb_element = ldb_msg_find_element(res->msgs[j], "PidTagMessageClass");
-               DEBUG(6, ("openchangedb_get_ReceiveFolder, checking fid: 0x%016"PRIx64"\n",
-                         ldb_msg_find_attr_as_uint64(res->msgs[j], "PidTagFolderId", 0x0)));
-               for (i = 0, length = 0; i < ldb_element[j].num_values; i++) {
-                       DEBUG(6, ("openchangedb_get_ReceiveFolder, element %i, data: %s\n", i, (char *)ldb_element->values[i].data));
-                       if (MessageClass &&
-                           !strncasecmp(MessageClass, (char *)ldb_element->values[i].data, strlen((char *)ldb_element->values[i].data)) &&
-                           strlen((char *)ldb_element->values[i].data) > length) {
-                               *fid = ldb_msg_find_attr_as_uint64(res->msgs[j], "PidTagFolderId", 0x0);
-
-                               if (*ExplicitMessageClass && strcmp(*ExplicitMessageClass, "")) {
-                                       talloc_free((char *)*ExplicitMessageClass);
-                               }
-
-                               if (MessageClass && !strcmp(MessageClass, "All")) {
-                                       *ExplicitMessageClass = "";
-                               } else {
-                                       *ExplicitMessageClass = talloc_strdup(parent_ctx, (char *)ldb_element->values[i].data);
-                               }
-                               length = strlen((char *)ldb_element->values[i].data);
-                       }
-               }
-       }
-       OPENCHANGE_RETVAL_IF(!*ExplicitMessageClass, MAPI_E_NOT_FOUND, mem_ctx);
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, fid: 0x%016"PRIx64"\n", *fid));
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the number of sub folders for a given fid
-
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param fid the folder identifier to use for the search
-   \param RowCount pointer to the returned number of results
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_folder_count(void *_ldb_ctx,
-                                                      uint64_t fid,
-                                                      uint32_t *RowCount)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_folder_count");
-       *RowCount = 0;
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, 
-                        "(PidTagParentFolderId=0x%.16"PRIx64")(PidTagFolderId=*)", fid);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *RowCount = res->count;
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Check if a property exists within an openchange dispatcher
-   database record
-
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param proptag the MAPI property tag to lookup
-   \param fid the record folder identifier
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_lookup_folder_property(void *_ldb_ctx, 
-                                                            uint32_t proptag, 
-                                                            uint64_t fid)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       const char              *PidTagAttr = NULL;
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_folder_property");
-
-       /* Step 1. Find PidTagFolderId record */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "(PidTagFolderId=0x%.16"PRIx64")", fid);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Convert proptag into PidTag attribute */
-       PidTagAttr = openchangedb_property_get_attribute(proptag);
-       OPENCHANGE_RETVAL_IF(!PidTagAttr, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 3. Search for attribute */
-       OPENCHANGE_RETVAL_IF(!ldb_msg_find_element(res->msgs[0], PidTagAttr), MAPI_E_NOT_FOUND, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve a special MAPI property from a folder record
-
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer to the OpenChange LDB context
-   \param recipient the mailbox username
-   \param res pointer to the LDB result
-   \param proptag the MAPI property tag to lookup
-   \param PidTagAttr the mapped MAPI property name
-
-   \return pointer to valid data on success, otherwise NULL
- */
-static void *openchangedb_get_folder_special_property(TALLOC_CTX *mem_ctx,
-                                                     void *ldb_ctx,
-                                                     char *recipient,
-                                                     struct ldb_result *res,
-                                                     uint32_t proptag,
-                                                     const char *PidTagAttr)
-{
-       enum MAPISTATUS         retval;
-       struct GUID             MailboxGUID;
-       struct GUID             ReplGUID;
-       uint16_t                ReplID;
-       struct Binary_r         *bin;
-       uint16_t                FolderType;
-       uint64_t                FolderId;
-       const char              *tmp;
-       uint32_t                *l;
-
-       switch (proptag) {
-       case PR_IPM_APPOINTMENT_ENTRYID:
-       case PR_IPM_CONTACT_ENTRYID:
-       case PR_IPM_JOURNAL_ENTRYID:
-       case PR_IPM_NOTE_ENTRYID:
-       case PR_IPM_TASK_ENTRYID:
-       case PR_REMINDERS_ONLINE_ENTRYID:
-       case PR_IPM_DRAFTS_ENTRYID:
-               retval = openchangedb_get_MailboxGuid(ldb_ctx, recipient, &MailboxGUID);
-               retval = openchangedb_get_MailboxReplica(ldb_ctx, recipient, &ReplID, &ReplGUID);
-               FolderType = (uint16_t) ldb_msg_find_attr_as_int(res->msgs[0], "FolderType", 0x1);
-
-               tmp = ldb_msg_find_attr_as_string(res->msgs[0], PidTagAttr, NULL);
-               FolderId = strtoul(tmp, NULL, 16);
-               retval = entryid_set_folder_EntryID(mem_ctx, &MailboxGUID, &ReplGUID, FolderType, FolderId, &bin);
-               return (void *)bin;
-               break;
-       case PR_DEPTH:
-               l = talloc_zero(mem_ctx, uint32_t);
-               *l = 0;
-               return (void *)l;
-       }
-
-       return NULL;
-}
-
-
-/**
-   \details Retrieve a MAPI property from a OpenChange LDB message
-
-   \param mem_ctx pointer to the memory context
-   \param res pointer to the LDB results
-   \param pos the LDB result index
-   \param proptag the MAPI property tag to lookup
-   \param PidTagAttr the mapped MAPI property name
-
-   \return valid data pointer on success, otherwise NULL
- */
-static void *openchangedb_get_folder_property_data(TALLOC_CTX *mem_ctx,
-                                                  struct ldb_result *res,
-                                                  uint32_t pos,
-                                                  uint32_t proptag,
-                                                  const char *PidTagAttr)
-{
-       void                    *data;
-       const char              *str;
-       uint64_t                *d;
-       uint32_t                *l;
-       int                     *b;
-
-       switch (proptag & 0xFFFF) {
-       case PT_BOOLEAN:
-               b = talloc_zero(mem_ctx, int);
-               *b = ldb_msg_find_attr_as_bool(res->msgs[pos], PidTagAttr, 0x0);
-               data = (void *)b;
-               break;
-       case PT_LONG:
-               l = talloc_zero(mem_ctx, uint32_t);
-               *l = ldb_msg_find_attr_as_int(res->msgs[pos], PidTagAttr, 0x0);
-               data = (void *)l;
-               break;
-       case PT_I8:
-               str = ldb_msg_find_attr_as_string(res->msgs[pos], PidTagAttr, 0x0);
-               d = talloc_zero(mem_ctx, uint64_t);
-               *d = strtoull(str, NULL, 16);
-               data = (void *)d;
-               break;
-       case PT_STRING8:
-       case PT_UNICODE:
-               str = ldb_msg_find_attr_as_string(res->msgs[pos], PidTagAttr, NULL);
-               data = (char *) talloc_strdup(mem_ctx, str);
-               break;
-       default:
-               talloc_free(mem_ctx);
-               DEBUG(0, ("[%s:%d] Property Type 0x%.4x not supported\n", __FUNCTION__, __LINE__, (proptag & 0xFFFF)));
-               return NULL;
-       }
-
-       return data;
-}
-
-
-/**
-   \details Return the next available FolderID
-   
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param fid pointer to the fid value the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_new_folderID(void *_ldb_ctx,
-                                                      uint64_t *fid)
-{
-       TALLOC_CTX              *mem_ctx;
-       int                     ret;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       struct ldb_message      *msg;
-       const char * const      attrs[] = { "*", NULL };
-
-       *fid = 0;
-
-       mem_ctx = talloc_named(NULL, 0, "get_new_folderID");
-
-       /* Step 1. Get the current GlobalCount */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_root_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "(objectClass=server)");
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       *fid = ldb_msg_find_attr_as_uint64(res->msgs[0], "GlobalCount", 0);
-
-       /* Step 2. Update GlobalCount value */
-       msg = ldb_msg_new(mem_ctx);
-       msg->dn = ldb_dn_copy(msg, ldb_msg_find_attr_as_dn(ldb_ctx, mem_ctx, res->msgs[0], "distinguishedName"));
-       ldb_msg_add_fmt(msg, "GlobalCount", "0x%"PRIx64, ((*fid) + 1));
-       msg->elements[0].flags = LDB_FLAG_MOD_REPLACE;
-       ret = ldb_modify(ldb_ctx, msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       *fid = (*fid << 16) + 1;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve a MAPI property value from a folder record
-
-   \param parent_ctx pointer to the memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param recipient the mailbox username
-   \param proptag the MAPI property tag to retrieve value for
-   \param fid the record folder identifier
-   \param data pointer on pointer to the data the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_folder_property(TALLOC_CTX *parent_ctx, 
-                                                         void *_ldb_ctx,
-                                                         char *recipient,
-                                                         uint32_t proptag,
-                                                         uint64_t fid,
-                                                         void **data)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       const char              *PidTagAttr = NULL;
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_folder_property");
-
-       /* Step 1. Find PidTagFolderId record */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "(PidTagFolderId=0x%.16"PRIx64")", fid);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 2. Convert proptag into PidTag attribute */
-       PidTagAttr = openchangedb_property_get_attribute(proptag);
-       OPENCHANGE_RETVAL_IF(!PidTagAttr, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 3. Ensure the element exists */
-       OPENCHANGE_RETVAL_IF(!ldb_msg_find_element(res->msgs[0], PidTagAttr), MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 4. Check if this is a "special property" */
-       *data = openchangedb_get_folder_special_property(parent_ctx, ldb_ctx, recipient, res, proptag, PidTagAttr);
-       OPENCHANGE_RETVAL_IF(*data != NULL, MAPI_E_SUCCESS, mem_ctx);
-
-       /* Step 5. If this is not a "special property" */
-       *data = openchangedb_get_folder_property_data(parent_ctx, res, 0, proptag, PidTagAttr);
-       OPENCHANGE_RETVAL_IF(*data != NULL, MAPI_E_SUCCESS, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Retrieve a MAPI property from a table (ldb search results)
-
-   \param parent_ctx pointer to the memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param recipient the mailbox username
-   \param ldb_filter the ldb search string
-   \param proptag the MAPI property tag to retrieve value for
-   \param pos the record position in search results
-   \param data pointer on pointer to the data the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_table_property(TALLOC_CTX *parent_ctx,
-                                                        void *_ldb_ctx,
-                                                        char *recipient,
-                                                        char *ldb_filter,
-                                                        uint32_t proptag,
-                                                        uint32_t pos,
-                                                        void **data)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       const char              *PidTagAttr = NULL;
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_table_property");
-
-       /* Step 1. Fetch table results */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, ldb_filter, NULL);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_INVALID_OBJECT, mem_ctx);
-
-       /* Step 2. Ensure position is within search results range */
-       OPENCHANGE_RETVAL_IF(pos >= res->count, MAPI_E_INVALID_OBJECT, NULL);
-
-       /* Step 3. Convert proptag into PidTag attribute */
-       PidTagAttr = openchangedb_property_get_attribute(proptag);
-       OPENCHANGE_RETVAL_IF(!PidTagAttr, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 4. Ensure the element exists */
-       OPENCHANGE_RETVAL_IF(!ldb_msg_find_element(res->msgs[pos], PidTagAttr), MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* Step 5. Check if this is a "special property" */
-       *data = openchangedb_get_folder_special_property(parent_ctx, ldb_ctx, recipient, res, proptag, PidTagAttr);
-       OPENCHANGE_RETVAL_IF(*data != NULL, MAPI_E_SUCCESS, mem_ctx);
-
-       /* Step 6. Check if this is not a "special property" */
-       *data = openchangedb_get_folder_property_data(parent_ctx, res, pos, proptag, PidTagAttr);
-       OPENCHANGE_RETVAL_IF(*data != NULL, MAPI_E_SUCCESS, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_NOT_FOUND;
-}
-
-/**
-   \details Retrieve the folder ID associated with a given folder name
-
-   This function looks up the specified foldername (as a PidTagDisplayName)
-   and returns the associated folder ID. Note that folder names are only
-   unique in the context of a parent folder, so the parent folder needs to
-   be provided.
-
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param parent_fid the folder ID of the parent folder 
-   \param foldername the name to look up
-   \param fid the folder ID for the folder with the specified name (0 if not found)
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_get_fid_by_name(void *_ldb_ctx,
-                                                     uint64_t parent_fid,
-                                                     const char* foldername,
-                                                     uint64_t *fid)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-
-       mem_ctx = talloc_named(NULL, 0, "get_fid_by_name");
-       *fid = 0;
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs,
-                        "(&(PidTagParentFolderId=0x%.16"PRIx64")(PidTagDisplayName=%s))",
-                        parent_fid, foldername);
-
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NOT_FOUND, mem_ctx);
-
-       /* We should only ever get 0 records or 1 record, but there is always a chance
-          that things got confused at some point, so just return one of the records */
-       OPENCHANGE_RETVAL_IF(res->count < 1, MAPI_E_NOT_FOUND, mem_ctx);
-       
-       *fid = ldb_msg_find_attr_as_uint64(res->msgs[0], "PidTagFolderId", 0);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Set the receive folder for a specific message class.
-
-   \param parent_ctx pointer to the memory context
-   \param _ldb_ctx pointer to the openchange LDB context
-   \param recipient pointer to the mailbox's username
-   \param MessageClass message class (e.g. IPM.whatever) to set
-   \param fid folder identifier for the recipient folder for the message class
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS openchangedb_set_ReceiveFolder(TALLOC_CTX *parent_ctx,
-                                                       void *_ldb_ctx,
-                                                       const char *recipient,
-                                                       const char *MessageClass,
-                                                       uint64_t fid)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct ldb_context              *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result               *res = NULL;
-       struct ldb_dn                   *dn;
-       char                            *dnstr;
-       const char * const              attrs[] = { "*", NULL };
-       int                             ret;
-
-
-       mem_ctx = talloc_named(NULL, 0, "set_ReceiveFolder");
-
-       DEBUG(5, ("openchangedb_set_ReceiveFolder, recipient: %s\n", recipient));
-       DEBUG(5, ("openchangedb_set_ReceiveFolder, MessageClass: %s\n", MessageClass));
-       DEBUG(5, ("openchangedb_set_ReceiveFolder, fid: 0x%016"PRIx64"\n", fid));
-       
-       /* Step 1. Find mailbox DN for the recipient */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "CN=%s", recipient);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-       dnstr = talloc_strdup(mem_ctx, ldb_msg_find_attr_as_string(res->msgs[0], "distinguishedName", NULL));
-       DEBUG(5, ("openchangedb_set_ReceiveFolder, dnstr: %s\n", dnstr));
-
-       OPENCHANGE_RETVAL_IF(!dnstr, MAPI_E_NOT_FOUND, mem_ctx);
-
-       talloc_free(res);
-
-       dn = ldb_dn_new(mem_ctx, ldb_ctx, dnstr);
-       talloc_free(dnstr);
-
-       /* Step 2. Search for the MessageClass within user's mailbox */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_SUBTREE, attrs, 
-                        "(PidTagMessageClass=%s)", MessageClass);
-       DEBUG(5, ("openchangedb_get_ReceiveFolder, res->count: %i\n", res->count));
-
-       /* We should never have more than one record with a specific MessageClass */
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || (res->count > 1), MAPI_E_CORRUPT_STORE, mem_ctx);
-       
-       /* Step 3. Delete the old entry if applicable */
-       if (res->count) {
-               /* we already have an entry for this message class, so delete it before creating the new one */
-               enum MAPISTATUS         retval;
-               char                    *distinguishedName;
-               struct ldb_message      *msg;
-
-               uint64_t folderid = ldb_msg_find_attr_as_uint64(res->msgs[0], "PidTagFolderId", 0x0);
-               DEBUG(6, ("openchangedb_set_ReceiveFolder, fid to delete from: 0x%016"PRIx64"\n", folderid));
-
-               retval = openchangedb_get_distinguishedName(parent_ctx, ldb_ctx, folderid, &distinguishedName);
-               DEBUG(6, ("openchangedb_set_ReceiveFolder, dn to delete from: %s\n", distinguishedName));
-               dn = ldb_dn_new(mem_ctx, ldb_ctx, distinguishedName);
-               talloc_free(distinguishedName);
-
-               msg = ldb_msg_new(mem_ctx);
-               msg->dn = ldb_dn_copy(mem_ctx, dn);
-               ldb_msg_add_string(msg, "PidTagMessageClass", MessageClass);
-               msg->elements[0].flags = LDB_FLAG_MOD_DELETE;
-
-               ret = ldb_modify(ldb_ctx, msg);
-               if (ret != LDB_SUCCESS) {
-                       DEBUG(0, ("Failed to delete old message class entry: %s\n", ldb_strerror(ret)));
-                       talloc_free(mem_ctx);
-                       return MAPI_E_NO_SUPPORT;
-               }
-       }
-       
-       /* Step 4. Create the new entry if applicable */
-       if (fid != 0x0) {
-               enum MAPISTATUS         retval;
-               char                    *distinguishedName;
-               struct ldb_message      *msg;
-
-               retval = openchangedb_get_distinguishedName(parent_ctx, ldb_ctx, fid, &distinguishedName);
-               DEBUG(6, ("openchangedb_set_ReceiveFolder, dn to create in: %s\n", distinguishedName));
-
-               dn = ldb_dn_new(mem_ctx, ldb_ctx, distinguishedName);
-               talloc_free(distinguishedName);
-
-               msg = ldb_msg_new(mem_ctx);
-               msg->dn = ldb_dn_copy(mem_ctx, dn);
-               ldb_msg_add_string(msg, "PidTagMessageClass", MessageClass);
-               msg->elements[0].flags = LDB_FLAG_MOD_ADD;
-
-               ret = ldb_modify(ldb_ctx, msg);
-               if (ret != LDB_SUCCESS) {
-                       DEBUG(0, ("Failed to add message class entry: %s\n", ldb_strerror(ret)));
-                       talloc_free(mem_ctx);
-                       return MAPI_E_NO_SUPPORT;
-               }
-       }
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver.pc.in b/branches/plugfest/mapiproxy/libmapiserver.pc.in
deleted file mode 100644 (file)
index dea6d95..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: MAPISERVER 
-Description: Server side MAPI library
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmapiserver
-Libs.private: @LIBS@
-Cflags: -I${includedir}
-Requires: talloc
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver.h b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver.h
deleted file mode 100644 (file)
index 93027ef..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __LIBMAPISERVER_H__
-#define        __LIBMAPISERVER_H__
-
-#ifndef        _GNU_SOURCE
-#define        _GNU_SOURCE 1
-#endif
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-
-#include <dcerpc.h>
-#include <param.h>
-
-#include "gen_ndr/exchange.h"
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-#define        SIZE_DFLT_MAPI_RESPONSE 6
-
-/* Rops default and static size */
-
-/**
-   \details OpenFolderRop has fixed response size for
-   -# HasRules: uint8_t
-   -# IsGhosted: uint8_t   
- */
-#define        SIZE_DFLT_ROPOPENFOLDER                 2
-
-/**
-   \details OpenMessage has fixed response size for
-   -# HasNamedProperties: uint8_t
-   -# RecipientCount: uint16_t
-   -# RowCount: uint8_t
- */
-#define        SIZE_DFLT_ROPOPENMESSAGE                4
-
-/**
-   \details GetHierarchyTableTop has fixed response size for:
-   -# RowCount: uint32_t
- */
-#define        SIZE_DFLT_ROPGETHIERARCHYTABLE          4
-
-/**
-   \details GetContentsTableRop has fixed response size for:
-   -# RowCount: uint32_t
- */
-#define        SIZE_DFLT_ROPGETCONTENTSTABLE           4
-
-/**
-   \details CreateMessageRop has fixed response size for:
-   -# HasMessageId: uint8_t
- */
-#define        SIZE_DFLT_ROPCREATEMESSAGE              1
-
-/**
-   \details GetPropertiesSpecificRop has fixed response size for:
-   -# layout: uint8_t
- */
-#define        SIZE_DFLT_ROPGETPROPERTIESSPECIFIC      1
-
-/**
-   \details: SetPropertiesRop has fixed response size for:
-   -# PropertyProblemCount: uint16_t
- */
-#define        SIZE_DFLT_ROPSETPROPERTIES              2
-
-/**
-   \details: DeletePropertiesRop has fixed response size for:
-   -# PropertyProblemCount: uint16_t
- */
-#define        SIZE_DFLT_ROPDELETEPROPERTIES           2
-
-/**
-   \details: SaveChangesMessageRop has fixed response size for:
-   -# handle_idx: uint8_t
-   -# MessageId: uint64_t
- */
-#define        SIZE_DFLT_ROPSAVECHANGESMESSAGE         9
-
-/**
-   \details ReloadCachedInformation has fixed response size for:
-   -# HasNamedProperties: uint8_t
-   -# RecipientCount: uint16_t
-   -# RowCount: uint8_t
- */
-#define        SIZE_DFLT_ROPRELOADCACHEDINFORMATION    4
-
-/**
-   \details: SetMessageReadFlagRop has fixed response size for:
-   -# ReadStatusChanged: uint8_t
- */
-#define        SIZE_DFLT_ROPSETMESSAGEREADFLAG         1
-
-/**
-   \details SetColumnsRop has fixed response size for:
-   -# TableStatus: uint8_t
- */
-#define        SIZE_DFLT_ROPSETCOLUMNS                 1
-
-/**
-   \details SortTableRop has fixed response size for:
-   -# TableStatus: uint8_t
- */
-#define        SIZE_DFLT_ROPSORTTABLE                  1
-
-/**
-   \details RestrictRop has fixed response size for:
-   -# TableStatus: uint8_t
- */
-#define        SIZE_DFLT_ROPRESTRICT                   1
-
-/**
-   \details QueryRowsRop has fixed size for:
-   -# Origin: uint8_t
-   -# RowCount: uint16_t
- */
-#define        SIZE_DFLT_ROPQUERYROWS                  3
-
-/**
-   \details QueryPositionRop has fixed response size for:
-   -# Numerator: uint32_t
-   -# Denominator: uint32_t
- */
-#define        SIZE_DFLT_ROPQUERYPOSITION              8
-
-/**
-   \details SeekRowRop has fixed response size for:
-   -# HasSought: uint8_t
-   -# RowsSought: uint32_t
- */
-#define        SIZE_DFLT_ROPSEEKROW                    5
-
-/**
-   \details CreateFolderRop has fixed response size for:
-   -# folder_id: uint64_t
-   -# isExistingFolder: uint8_t
- */
-#define        SIZE_DFLT_ROPCREATEFOLDER               9
-
-/**
-   \details DeleteFolderRop has fixed response size for:
-   -# PartialCompletion: uint8_t
- */
-#define        SIZE_DFLT_ROPDELETEFOLDER               1
-
-
-/**
-   \details OpenStreamRop has fixed response size for:
-   -# StreamSize: uint32_t
- */
-#define        SIZE_DFLT_ROPOPENSTREAM                 4
-
-/**
-   \details ReadStreamRop has fixed response size for:
-   -# DataSize: uint16_t
- */
-#define        SIZE_DFLT_ROPREADSTREAM                 2
-
-/**
-   \details WriteStreamRop has fixed response size for:
-   -# WrittenSize: uint16_t
- */
-#define        SIZE_DFLT_ROPWRITESTREAM                2
-
-/**
-   \details GetStreamSize has fixed response size for:
-   -# StreamSize: uint32_t
- */
-#define        SIZE_DFLT_ROPGETSTREAMSIZE              4
-
-/**
-   \details GetReceiveFolder has fixed response size for:
-   -# folder_id: uint64_t
- */
-#define        SIZE_DFLT_ROPGETRECEIVEFOLDER           8
-
-/**
-   \details GetAddressTypes has fixed response size for:
-   -# cValues: uint16_t
-   -# size: uint16_t
- */
-#define        SIZE_DFLT_ROPGETADDRESSTYPES            4
-
-/**
-   \details GetTransportFolder has fixed response size for:
-   -# FolderId: uint64_t
- */
-#define        SIZE_DFLT_ROPGETTRANSPORTFOLDER         8
-
-/**
-   \details OptionsData has fixed response size for:
-   -# Reserved: uint8_t
-   -# OptionsInfo: uint16_t part of SBinary_short
-   -# HelpFileSize: uint16_t
- */
-#define        SIZE_DFLT_ROPOPTIONSDATA                5
-
-/**
-   \details FindRow has fixed response size for:
-   -# RowNoLongerVisible: uint8_t
-   -# HasRowData: uint8_t
- */
-#define        SIZE_DFLT_ROPFINDROW                    2
-
-/**
-   \details GetPropertyIdsFromNames has fixed response size for:
-   -# count: uint16_t
- */
-#define        SIZE_DFLT_ROPGETPROPERTYIDSFROMNAMES    2
-
-/**
-   \details GetPropertyIdsFromNames has fixed response size for:
-   -# PropertyProblemCount: uint16_t
- */
-#define SIZE_DFLT_ROPDELETEPROPERTIESNOREPLICATE       2
-
-/**
-   \details EmptyFolder has fixed response size for:
-   -# PartialCompletion: uint8_t
- */
-#define SIZE_DFLT_ROPEMPTYFOLDER               1
-
-/**
-   \details DeleteMessage Rop has fixed response size for:
-   -# PartialCompletion: uint8_t
- */
-#define        SIZE_DFLT_ROPDELETEMESSAGE              1
-
-
-/**
-   \details GetSearchCriteria Rop has fixed response size for:
-   -# RestrictionDataSize: uint16_t
-   -# LogonId: uint8_t
-   -# FolderIdCount: uint16_t
-   -# SearchFlags: uint32_t
- */
-#define        SIZE_DFLT_ROPGETSEARCHCRITERIA          9
-
-/**
-   \details GetPerUserLongTermIds has fixed response size for:
-   -# LongTermIdCount: uint16_t
- */
-#define        SIZE_DFLT_ROPGETPERUSERLONGTERMIDS      2
-
-/**
-   \details ReadPerUserInformation has fixed response size for:
-   -# HasFinished: uint8_t
-   -# DataSize: uint16_t
- */
-#define        SIZE_DFLT_ROPREADPERUSERINFORMATION     3
-
-/**
-   \details GetPerUserGuid has fixed response size for:
-   -# DatabaseGuid: uint8_t * 16
- */
-#define        SIZE_DFLT_ROPGETPERUSERGUID             16
-
-
-/**
-   \details LogonRop has a fixed size for mailbox:
-   -# LogonFlags: uint8_t
-   -# FolderIDs: uint64_t * 13
-   -# ResponseFlags: uint8_t
-   -# MailboxGUID: sizeof (struct GUID)
-   -# ReplID: uint16_t
-   -# ReplGUID: sizeof (struct GUID)
-   -# LogonTime: uint8_t * 6 + uint16_t
-   -# GwartTime: uint64_t
-   -# StoreState: uint32_t
- */
-#define        SIZE_DFLT_ROPLOGON_MAILBOX      160
-
-/**
-   \details LogonRop has a fixed size for public folder logon:
-   -# LogonFlags: uint8_t
-   -# FolderIDs: uint64_t * 13
-   -# ReplId: uint16_t
-   -# ReplGuid: sizeof (struct GUID) = 16 bytes
-   -# PerUserGuid: sizeof (struct GUID) = 16 bytes
- */
-#define        SIZE_DFLT_ROPLOGON_PUBLICFOLDER 139
-
-/**
-   \details LogonRop has a fixed size for redirect response:
-   -# LogonFlags: uint8_t
-   -# ServerNameSize: uint8_t
- */
-#define        SIZE_DFLT_ROPLOGON_REDIRECT     2
-
-#define        SIZE_NULL_TRANSACTION           2
-
-/**
-   \details LongTermId structure is fixed size:
-   -# DatabaseGUID: uint8_t * 16
-   -# GlobalCounter: uint8_t * 6
-   -# padding: uint16_t
- */
-#define        SIZE_DFLT_LONGTERMID            24
-
-/**
-   \details FastTransferSourceGetBuffer has a fixed size for:
-   -# TransferStatus: uint16_t
-   -# InProgressCount: uint16_t
-   -# TotalStepCount: uint16_t
-   -# Reserved (1 byte): uint8_t
-   -# TransferBufferSize (2 bytes): uint16_t
- */
-#define SIZE_DFLT_ROPFASTTRANSFERSOURCEGETBUFFER 9
-
-__BEGIN_DECLS
-
-/* definitions from libmapiserver_oxcfold.c */
-uint16_t libmapiserver_RopOpenFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetHierarchyTable_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetContentsTable_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopCreateFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopDeleteFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopDeleteMessage_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSetSearchCriteria_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetSearchCriteria_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopEmptyFolder_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxcmsg.c */
-uint16_t libmapiserver_RopOpenMessage_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopCreateMessage_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSaveChangesMessage_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopRemoveAllRecipients_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopModifyRecipients_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopReloadCachedInformation_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSetMessageReadFlag_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetAttachmentTable_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxcnotif.c */
-uint16_t libmapiserver_RopRegisterNotification_size(void);
-
-/* definitions from libmapiserver_oxcdata.c */
-uint16_t libmapiserver_TypedString_size(struct TypedString);
-uint16_t libmapiserver_RecipientRow_size(struct RecipientRow);
-uint16_t libmapiserver_LongTermId_size(void);
-
-/* definitions from libmapiserver_oxcprpt.c */
-uint16_t libmapiserver_RopSetProperties_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopDeleteProperties_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetPropertiesSpecific_size(struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopOpenStream_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopReadStream_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopWriteStream_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetStreamSize_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetPropertyIdsFromNames_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopDeletePropertiesNoReplicate_size(struct EcDoRpc_MAPI_REPL *);
-int libmapiserver_push_property(TALLOC_CTX *, struct smb_iconv_convenience *, uint32_t, const void *, DATA_BLOB *, uint8_t, uint8_t);
-struct SRow *libmapiserver_ROP_request_to_properties(TALLOC_CTX *, void *, uint8_t);
-
-/* definitions from libmapiserver_oxcstor.c */
-uint16_t libmapiserver_RopLogon_size(struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopRelease_size(void);
-uint16_t libmapiserver_RopSetReceiveFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetReceiveFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetPerUserLongTermIds_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopReadPerUserInformation_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetPerUserGuid_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetReceiveFolderTable_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxctabl.c */
-uint16_t libmapiserver_RopSetColumns_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSortTable_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopRestrict_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopQueryRows_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopQueryPosition_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSeekRow_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopFindRow_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopResetTable_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxomsg.c */
-uint16_t libmapiserver_RopSubmitMessage_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopSetSpooler_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetAddressTypes_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopGetTransportFolder_size(struct EcDoRpc_MAPI_REPL *);
-uint16_t libmapiserver_RopOptionsData_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxorule.c */
-uint16_t libmapiserver_RopGetRulesTable_size(void);
-uint16_t libmapiserver_RopModifyRules_size(void);
-
-/* definitions from libmapiserver_oxcperm.c */
-uint16_t libmapiserver_RopGetPermissionsTable_size(struct EcDoRpc_MAPI_REPL *);
-
-/* definitions from libmapiserver_oxcfxics.c */
-uint16_t libmapiserver_RopFastTransferSourceCopyTo_size(struct EcDoRpc_MAPI_REPL *response);
-uint16_t libmapiserver_RopFastTransferSourceGetBuffer_size(struct EcDoRpc_MAPI_REPL *response);
-
-__END_DECLS
-
-#endif /* ! __LIBMAPISERVER_H__ */
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcdata.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcdata.c
deleted file mode 100644 (file)
index b676cbd..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcdata.c
-
-   \brief OXCDATA Data Structures
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate the size of a TypedString structure
-
-   \param typedstring TypedString structure
-
-   \return Size of typedstring structure
- */
-_PUBLIC_ uint16_t libmapiserver_TypedString_size(struct TypedString typedstring)
-{
-       uint16_t        size = 0;
-
-       size += sizeof (uint8_t);
-
-       switch (typedstring.StringType) {
-       case StringType_NONE:
-       case StringType_EMPTY:
-               break;
-       case StringType_STRING8:
-               if (typedstring.String.lpszA) {
-                       size += strlen(typedstring.String.lpszA) + 1;
-               }
-               break;
-       case StringType_UNICODE_REDUCED:
-               if (typedstring.String.lpszW_reduced) {
-                       size += strlen(typedstring.String.lpszW_reduced) + 1;
-               }
-               break;
-       case StringType_UNICODE:
-               if (typedstring.String.lpszW) {
-                       size += strlen(typedstring.String.lpszW) * 2 + 2;
-               }
-               break;
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate the size of a RecipientRow structure
-
-   \param recipientrow RecipientRow structure
-
-   \return Size of RecipientRow structure
- */
-_PUBLIC_ uint16_t libmapiserver_RecipientRow_size(struct RecipientRow recipientrow)
-{
-       uint16_t        size = 0;
-
-       /* RecipientFlags */
-       size += sizeof (uint16_t);
-
-       /* recipient_type */
-       if (recipientrow.RecipientFlags & 0x1) {
-               size += sizeof (uint8_t) * 2; /* AddressPrefixUsed + DisplayType */
-               size += strlen(recipientrow.X500DN.recipient_x500name) + 1;
-       }
-
-       /* recipient_EmailAddress */
-       switch (recipientrow.RecipientFlags & 0x208) {
-       case 0x8:
-               size += strlen(recipientrow.EmailAddress.lpszA);
-               break;
-       case 0x208:
-               size += strlen(recipientrow.EmailAddress.lpszW) * 2 + 2;
-               break;
-       default:
-               break;
-       }
-
-       /* recipient_DisplayName */
-       switch (recipientrow.RecipientFlags & 0x210) {
-       case 0x10:
-               size += strlen(recipientrow.DisplayName.lpszA);
-               break;
-       case 0x210:
-               size += strlen(recipientrow.DisplayName.lpszW) * 2 + 2;
-               break;
-       default:
-               break;
-       }
-
-       /* recipient_SimpleDisplayName */
-       switch (recipientrow.RecipientFlags & 0x600) {
-       case 0x400:
-               size += strlen(recipientrow.SimpleDisplayName.lpszA);
-               break;
-       case 0x600:
-               size += strlen(recipientrow.SimpleDisplayName.lpszW) * 2 + 2;
-               break;
-       default:
-               break;
-       }
-
-       /* recipient_TransmittableDisplayName */
-       switch (recipientrow.RecipientFlags & 0x260) {
-       case 0x20:
-               size += strlen(recipientrow.TransmittableDisplayName.lpszA);
-               break;
-       case 0x220:
-               size += strlen(recipientrow.TransmittableDisplayName.lpszW) * 2 + 2;
-               break;
-       default:
-               break;
-       }
-
-       /* prop_count */
-       size += sizeof (uint16_t);
-
-       /* layout */
-       size += sizeof (uint8_t);
-
-       /* prop_values */
-       size += sizeof (uint16_t);
-       size += recipientrow.prop_values.length;
-
-       return size;
-}
-
-
-/**
-   \details Calculate the size of a LongTermId structure
-
-   \return Size of LongTermId structure
- */
-_PUBLIC_ uint16_t libmapiserver_LongTermId_size(void)
-{
-       return SIZE_DFLT_LONGTERMID;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfold.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfold.c
deleted file mode 100644 (file)
index 2c425d5..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcfold.c
-
-   \brief OXCFOLD ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate OpenFolder Rop size
-
-   \param response pointer to the OpenFolder EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of OpenFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopOpenFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPOPENFOLDER;
-       
-       /* No ghosted folder for the moment */
-       return size;
-}
-
-
-/**
-   \details Calculate GetHierarchyTable Rop size
-
-   \param response pointer to the GetHierarchyTable EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of GetHierarchyTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetHierarchyTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETHIERARCHYTABLE;
-
-       return size;
-}
-
-
-/**
-   \details Calculate GetContentsTable Rop size
-
-   \param response pointer to the GetContentsTable EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of GetContentsTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetContentsTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETCONTENTSTABLE;
-       
-       return size;
-}
-
-
-/**
-   \details Calculate CreateFolder Rop size
-
-   \param response pointer to the CreateFolder EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of CreateFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopCreateFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPCREATEFOLDER;
-
-       if (response->u.mapi_CreateFolder.IsExistingFolder != 0) {
-               size += sizeof(response->u.mapi_CreateFolder.GhostUnion.GhostInfo.HasRules);
-               size += sizeof(response->u.mapi_CreateFolder.GhostUnion.GhostInfo.IsGhosted);
-               if (response->u.mapi_CreateFolder.GhostUnion.GhostInfo.IsGhosted != 0) {
-                       size += sizeof(response->u.mapi_CreateFolder.GhostUnion.GhostInfo.Ghost.Replicas.ServerCount);
-                       size += sizeof(response->u.mapi_CreateFolder.GhostUnion.GhostInfo.Ghost.Replicas.CheapServerCount);
-                       /* TODO: size += sizeof( servers )*/
-               }
-       }
-       return size;
-}
-
-
-/**
-   \details Calculate DeleteFolder Rop size
-
-   \param response pointer to the DeleteFolder EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of DeleteFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopDeleteFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPDELETEFOLDER;
-
-       return size;
-}
-
-/**
-   \details Calculate DeleteMessage (0x1e) Rop size
-
-   \param response pointer to the DeleteMessage EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of DeleteMessage response
- */
-_PUBLIC_ uint16_t libmapiserver_RopDeleteMessage_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPDELETEMESSAGE;
-
-       return size;
-}
-
-
-/**
-   \details Calculate SetSearchCriteria (0x30) Rop size
-
-   \param response pointer to the SetSearchCriteria EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetSearchCriteria response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetSearchCriteria_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate GetSearchCriteria (0x31) Rop size
-
-   \param response pointer to the GetSearchCriteria EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of GetSearchCriteria response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetSearchCriteria_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETSEARCHCRITERIA;
-       size += response->u.mapi_GetSearchCriteria.RestrictionDataSize;
-       size += response->u.mapi_GetSearchCriteria.FolderIdCount * sizeof (uint64_t);
-
-       return size;
-}
-
-
- /**
-   \details Calculate EmptyFolder Rop size
-
-   \param response pointer to the EmptyFolder EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of EmptyFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopEmptyFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPEMPTYFOLDER;
-       return size;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfxics.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcfxics.c
deleted file mode 100644 (file)
index 1e0268c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Inverse inc. 2010
-   Copyright (C) Brad Hards <bradh@openchange.org> 2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcfxics.c
-
-   \brief OXCFXICS ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate FastTransferSourceCopyTo (0x4d) Rop size
-
-   \param response pointer to the FastTransferSourceCopyTo EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of FastTransferSourceCopyTo response
- */
-_PUBLIC_ uint16_t libmapiserver_RopFastTransferSourceCopyTo_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate FastTransferSourceGetBuffer (0x4e) Rop size
-
-   \param response pointer to the FastTransferSourceGetBuffer EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of FastTransferSourceGetBuffer response
- */
-_PUBLIC_ uint16_t libmapiserver_RopFastTransferSourceGetBuffer_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       size += SIZE_DFLT_ROPFASTTRANSFERSOURCEGETBUFFER; 
-
-       if (response->error_code == ecServerBusy) {
-               size += sizeof (uint32_t); /* size of BackoffTime */
-       } else {
-               size += response->u.mapi_FastTransferSourceGetBuffer.TransferBuffer.length;
-       }
-
-       return size;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcmsg.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcmsg.c
deleted file mode 100644 (file)
index 4b6476c..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcmsg.c
-
-   \brief OXCMSG ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate OpenMessage (0x3) Rop size
-
-   \param response pointer to the OpenMessage EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of OpenMessage response
- */
-_PUBLIC_ uint16_t libmapiserver_RopOpenMessage_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-       uint8_t         i;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPOPENMESSAGE;
-
-       /* SubjectPrefix */
-       size += libmapiserver_TypedString_size(response->u.mapi_OpenMessage.SubjectPrefix);
-
-       /* NormalizedSubject */
-       size += libmapiserver_TypedString_size(response->u.mapi_OpenMessage.NormalizedSubject);
-
-       /* RecipientColumns */
-       size += sizeof (uint16_t);
-       size += response->u.mapi_OpenMessage.RecipientColumns.cValues * sizeof (uint32_t);
-
-       for (i = 0; i < response->u.mapi_OpenMessage.RowCount; i++) {
-               size += sizeof (uint8_t);
-               size += sizeof (uint16_t);
-               size += sizeof (uint16_t);
-               size += libmapiserver_RecipientRow_size(response->u.mapi_OpenMessage.recipients[i].RecipientRow);
-       }
-
-       return size;
-}
-
-/**
-   \details Calculate CreateMessage (0x6) Rop size
-
-   \param response pointer to the CreateMessage EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of CreateMessage response
- */
-_PUBLIC_ uint16_t libmapiserver_RopCreateMessage_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPCREATEMESSAGE;
-
-       if (response->u.mapi_CreateMessage.HasMessageId == 1) {
-               size += sizeof (uint64_t);
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate SaveChangesMessage (0xc) Rop size
-
-   \param response pointer to the SaveChangesMessage EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SaveChangesMessage response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSaveChangesMessage_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSAVECHANGESMESSAGE;
-
-       return size;
-}
-
-
-/**
-   \details Calculate RemoveAllRecipients (0xd) Rop size
-
-   \param response pointer to the RemoveAllRecipients EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of RemoveAllRecipients response
- */
-_PUBLIC_ uint16_t libmapiserver_RopRemoveAllRecipients_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate ModifyRecipients (0xe) Rop size
-
-   \param response pointer to the ModifyRecipients EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of ModifyRecipients response
- */
-_PUBLIC_ uint16_t libmapiserver_RopModifyRecipients_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate ReloadCachedInformation (0x10) Rop size
-
-   \param response pointer to the ReloadCachedInformation
-   EcDoRpc_MAPI_REPL structure
-
-   \return Size of ReloadCachedInformation response
- */
-_PUBLIC_ uint16_t libmapiserver_RopReloadCachedInformation_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-       uint8_t         i;
-       uint16_t        RecipientRowSize = 0;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPRELOADCACHEDINFORMATION;
-
-       /* SubjectPrefix */
-       size += libmapiserver_TypedString_size(response->u.mapi_ReloadCachedInformation.SubjectPrefix);
-
-       /* NormalizedSubject */
-       size += libmapiserver_TypedString_size(response->u.mapi_ReloadCachedInformation.NormalizedSubject);
-
-       /* RecipientColumns */
-       size += sizeof (uint16_t);
-       size += response->u.mapi_ReloadCachedInformation.RecipientColumns.cValues * sizeof (uint32_t);
-
-       for (i = 0; i < response->u.mapi_ReloadCachedInformation.RowCount; i++) {
-               size += sizeof (uint8_t);
-               size += sizeof (uint16_t);
-               size += sizeof (uint16_t);
-               size += sizeof (uint16_t);
-               RecipientRowSize = libmapiserver_RecipientRow_size(response->u.mapi_ReloadCachedInformation.RecipientRows[i].RecipientRow);
-               response->u.mapi_ReloadCachedInformation.RecipientRows[i].RecipientRowSize = RecipientRowSize;
-               size += RecipientRowSize;
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate SetMessageReadFlag (0x11) Rop size
-
-   \param response pointer to the SetMessageReadFlag EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetMessageReadFlag response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetMessageReadFlag_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSETMESSAGEREADFLAG;
-       
-       if (response->u.mapi_SetMessageReadFlag.ReadStatusChanged == 0x1) {
-               size += sizeof (uint8_t);
-               size += sizeof (uint8_t) * 24;
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate GetAttachmentTable (0x21) Rop size
-
-   \param response pointer to the GetAttachmentTable EcDoRpc_MAPI_REPL
-
-   \return Size of GetAttachmentTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetAttachmentTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcnotif.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcnotif.c
deleted file mode 100644 (file)
index ee8ac0e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcnotif.c
-
-   \brief OXCNOTIF ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate RegisterNotification Rop size
-
-   \return Size of RegisterNotification response
- */
-_PUBLIC_ uint16_t libmapiserver_RopRegisterNotification_size(void)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcperm.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcperm.c
deleted file mode 100644 (file)
index f5c574a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcmsg.c
-
-   \brief OXCMSG ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate GetPermissionsTable Rop size
-
-   \param response pointer to the GetPermissionsTable EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of GetPermissionsTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetPermissionsTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcprpt.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcprpt.c
deleted file mode 100644 (file)
index 1fabd4b..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcprpt.c
-
-   \brief OXCPRPT ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/mapidefs.h"
-#include "gen_ndr/ndr_exchange.h"
-#include <util/debug.h>
-
-/**
-   \details Calculate GetPropertiesSpecific Rop size
-
-   \param request pointer to the GetPropertiesSpecific
-   EcDoRpc_MAPI_REQ structure
-   \param response pointer to the GetPropertiesSpecific
-   EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetPropsSpecific response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetPropertiesSpecific_size(struct EcDoRpc_MAPI_REQ *request,
-                                                             struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETPROPERTIESSPECIFIC;
-       size += response->u.mapi_GetProps.prop_data.length;
-
-       return size;
-}
-
-
-/**
-   \details Calculate SetProperties Rop size
-
-   \param response pointer to the SetProperties EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetProperties response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetProperties_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSETPROPERTIES;
-
-       if (response->u.mapi_SetProps.PropertyProblemCount) {
-               size += response->u.mapi_SetProps.PropertyProblemCount * sizeof(struct PropertyProblem);
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate SetProperties Rop size
-
-   \param response pointer to the SetProperties EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetProperties response
- */
-_PUBLIC_ uint16_t libmapiserver_RopDeleteProperties_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPDELETEPROPERTIES;
-
-       if (response->u.mapi_DeleteProps.PropertyProblemCount) {
-               size += response->u.mapi_DeleteProps.PropertyProblemCount * sizeof(struct PropertyProblem);
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate OpenStream Rop size
-
-   \param response pointer to the OpenStream EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of OpenStream response   
- */
-_PUBLIC_ uint16_t libmapiserver_RopOpenStream_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPOPENSTREAM;
-
-       return size;
-}
-
-
-/**
-   \details Calculate ReadStream Rop size
-
-   \param response pointer to the ReadStream EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of ReadStream response   
- */
-_PUBLIC_ uint16_t libmapiserver_RopReadStream_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPREADSTREAM;
-
-       if (response->u.mapi_ReadStream.data.length) {
-               size += response->u.mapi_ReadStream.data.length;
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate WriteStream Rop size
-
-   \param response pointer to the WriteStream EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of WriteStream response   
- */
-_PUBLIC_ uint16_t libmapiserver_RopWriteStream_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPWRITESTREAM;
-
-       return size;
-}
-
-
-/**
-   \details Calculate GetStreamSize Rop size
-
-   \param response pointer to the GetStreamSize
-   EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetStreamSize response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetStreamSize_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETSTREAMSIZE;
-
-       return size;
-}
-
-
-/**
-   \details Calculate GetPropertyIdsFromNames Rop size
-
-   \param response pointer to the GetPropertyIdsFromNames
-   EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetPropertyIdsFromNames response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetPropertyIdsFromNames_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETPROPERTYIDSFROMNAMES;
-
-       if (response->u.mapi_GetIDsFromNames.count) {
-               size += response->u.mapi_GetIDsFromNames.count * sizeof (uint16_t);
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate DeletePropertiesNoReplicate Rop size
-
-   \param response pointer to the DeletePropertiesNoReplicate
-   EcDoRpc_MAPI_REPL structure
-
-   \return Size of DeletePropertiesNoReplicate response
- */
-_PUBLIC_ uint16_t libmapiserver_RopDeletePropertiesNoReplicate_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPDELETEPROPERTIESNOREPLICATE;
-       size += (response->u.mapi_DeletePropertiesNoReplicate.PropertyProblemCount
-                * (sizeof(uint16_t) /* PropertyProblem.Index */
-                   + sizeof(uint32_t) /* PropertyProblem.PropertyTag */
-                   + sizeof(uint32_t) /* PropertyProblem.ErrorCode */));
-
-       return size;
-}
-
-
-/**
-   \details Add a property value to a DATA blob. This convenient
-   function should be used when creating a GetPropertiesSpecific reply
-   response blob.
-
-   \param mem_ctx pointer to the memory context
-   \param iconv_convenience pointer to the iconv_convenience context
-   \param property the property tag which value is meant to be
-   appended to the blob
-   \param value generic pointer on the property value
-   \param blob the data blob the function uses to return the blob
-   \param layout whether values should be prefixed by a layout
-   \param flagged define if the properties are flagged or not
-
-   \note blob.length must be set to 0 before this function is called
-   the first time. Also the function only supports a limited set of
-   property types at the moment.
-
-   \return 0 on success;
- */
-_PUBLIC_ int libmapiserver_push_property(TALLOC_CTX *mem_ctx,
-                                        struct smb_iconv_convenience *iconv_convenience,
-                                        uint32_t property, 
-                                        const void *value, 
-                                        DATA_BLOB *blob,
-                                        uint8_t layout, 
-                                        uint8_t flagged)
-{
-       struct ndr_push         *ndr;
-       
-       ndr = ndr_push_init_ctx(mem_ctx);
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-       ndr->offset = 0;
-       if (blob->length) {
-               talloc_free(ndr->data);
-               ndr->data = blob->data;
-               ndr->offset = blob->length;
-       }
-
-       /* Step 1. Is the property flagged */
-       if (flagged) {
-               switch (property & 0xFFFF) {
-               case PT_ERROR:
-                       switch (layout) {
-                       case 0x1:
-                               ndr_push_uint8(ndr, NDR_SCALARS, layout);
-                               goto end;
-                       case PT_ERROR:
-                               ndr_push_uint8(ndr, NDR_SCALARS, PT_ERROR);
-                               break;
-                       }
-                       break;
-               default:
-                       ndr_push_uint8(ndr, NDR_SCALARS, 0x0);
-                       break;
-               }
-       } else {
-               /* Step 2. Set the layout */
-               if (layout) {
-                       switch (property & 0xFFFF) {
-                       case PT_ERROR:
-                               ndr_push_uint8(ndr, NDR_SCALARS, PT_ERROR);
-                               break;
-                       default:
-                               ndr_push_uint8(ndr, NDR_SCALARS, 0x0);
-                       }
-               }
-       }
-
-       /* Step 2. Push property data if supported */
-       switch (property & 0xFFFF) {
-       case PT_I2:
-               ndr_push_uint16(ndr, NDR_SCALARS, *(uint16_t *) value);
-               break;
-       case PT_LONG:
-       case PT_ERROR:
-       case PT_OBJECT:
-               ndr_push_uint32(ndr, NDR_SCALARS, *(uint32_t *) value);
-               break;
-       case PT_DOUBLE:
-               ndr_push_double(ndr, NDR_SCALARS, *(double *) value);
-               break;
-       case PT_I8:
-               ndr_push_dlong(ndr, NDR_SCALARS, *(uint64_t *) value);
-               break;
-       case PT_BOOLEAN:
-               ndr_push_uint8(ndr, NDR_SCALARS, *(uint8_t *) value);
-               break;
-       case PT_STRING8:
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_STR_ASCII);
-               ndr_push_string(ndr, NDR_SCALARS, (char *) value);
-               break;
-       case PT_UNICODE:
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
-               ndr_push_string(ndr, NDR_SCALARS, (char *) value);
-               break;
-       case PT_BINARY:
-               ndr_push_SBinary_short(ndr, NDR_SCALARS, (struct SBinary_short *) value);
-               break;
-       case PT_CLSID:
-               ndr_push_GUID(ndr, NDR_SCALARS, (struct GUID *) value);
-               break;
-       case PT_SYSTIME:
-               ndr_push_FILETIME(ndr, NDR_SCALARS, (struct FILETIME *) value);
-               break;
-       default:
-               break;
-       }
-end:
-       /* Step 3. Steal ndr context */
-       blob->data = ndr->data;
-       talloc_steal(mem_ctx, blob->data);
-       blob->length = ndr->offset;
-
-       talloc_free(ndr);
-       return 0;
-}
-
-
-/**
-   \details Turn request parameters to SPropValue array. This
-   convenient function should be used among MAPI ROPs that have
-   parameters which can be turned to MAPI properties and are stored
-   within backends.
-
-   \param mem_ctx pointer to the memory context
-   \param request generic pointer to the ROP request
-   \param opnum MAPI opnum identifying ROP contents
-
-   \note Developers must talloc_free returned SRow after they finish
-   using it.
-
-   \return Allocated SRow on success, otherwise NULL
- */
-_PUBLIC_ struct SRow *libmapiserver_ROP_request_to_properties(TALLOC_CTX *mem_ctx, 
-                                                             void *request, 
-                                                             uint8_t opnum)
-{
-       struct SRow                     *aRow;
-       struct CreateFolder_req         *CreateFolder_req;
-
-       aRow = talloc_zero(mem_ctx, struct SRow);
-       aRow->lpProps = talloc_array(aRow, struct SPropValue, 2);
-       aRow->cValues = 0;
-
-       switch (opnum) {
-       case op_MAPI_CreateFolder:
-               CreateFolder_req = (struct CreateFolder_req *) request;
-               aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues),
-                                              PR_FOLDER_TYPE, (void *)&(CreateFolder_req->ulFolderType));
-               switch (CreateFolder_req->ulType) {
-               case MAPI_FOLDER_ANSI:
-                       aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues),
-                                                      PR_DISPLAY_NAME, (void *)(CreateFolder_req->FolderName.lpszA));
-                       aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues),
-                                                      PR_COMMENT, (void *)(CreateFolder_req->FolderComment.lpszA));
-                       break;
-               case MAPI_FOLDER_UNICODE:
-                       aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues),
-                                                      PR_DISPLAY_NAME_UNICODE, (void *)(CreateFolder_req->FolderName.lpszW));
-                       aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues),
-                                                      PR_COMMENT_UNICODE, (void *)(CreateFolder_req->FolderComment.lpszW));
-                       break;
-               }
-               
-               break;
-       default:
-               DEBUG(0, ("[%s:%d]: opnum %d not implemented yet\n", __FUNCTION__, __LINE__, opnum));
-               talloc_free(aRow);
-               return NULL;
-       }
-       
-       return aRow;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcstor.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxcstor.c
deleted file mode 100644 (file)
index 11f0129..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxcstor.c
-
-   \brief OXCSTOR ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-#include <string.h>
-
-/**
-   \details Calculate Logon Rop size
-
-   \param request pointer to the Logon EcDoRpc_MAPI_REQ structure
-   \param response pointer to the Logon EcDoRpc_MAPI_REPL structure
-
-   \return Size of Logon response
- */
-_PUBLIC_ uint16_t libmapiserver_RopLogon_size(struct EcDoRpc_MAPI_REQ *request,
-                                             struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || (response->error_code && response->error_code != ecWrongServer)) {
-               return size;
-       }
-
-       if (response->error_code == ecWrongServer) {
-               size += SIZE_DFLT_ROPLOGON_REDIRECT;
-               size += strlen (response->us.mapi_Logon.ServerName) + 1;
-               return size;
-       }
-
-       if (request->u.mapi_Logon.LogonFlags & LogonPrivate) {
-               size += SIZE_DFLT_ROPLOGON_MAILBOX;
-       } else {
-               size += SIZE_DFLT_ROPLOGON_PUBLICFOLDER;
-       }
-       return size;
-}
-
-
-/**
-   \details Calculate SetReceiveFolder (0x26) Rop size
-
-   \param response pointer to the SetReceiveFolder EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetReceiveFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetReceiveFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate GetReceiveFolder Rop size
-
-   \param response pointer to the GetReceiveFolder EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetReceiveFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetReceiveFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETRECEIVEFOLDER;
-       size += strlen(response->u.mapi_GetReceiveFolder.MessageClass) + 1;
-
-       return size;
-}
-
-
-/**
-   \details Calculate GetPerUserLongTermIds Rop size
-
-   \param response pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetPerUserLongTermIds response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetPerUserLongTermIds_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-       uint16_t        i;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETPERUSERLONGTERMIDS;
-
-       for (i = 0; i < response->u.mapi_GetPerUserLongTermIds.LongTermIdCount; i++) {
-               size += libmapiserver_LongTermId_size();
-       }
-       
-
-       return size;
-}
-
-/**
-   \details Calculate ReadPerUserInformation Rop size
-
-   \param response pointer to the ReadPerUserInformation EcDoRpc_MAPI_REPL structure
-
-   \return Size of ReadPerUserInformation response
- */
-_PUBLIC_ uint16_t libmapiserver_RopReadPerUserInformation_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPREADPERUSERINFORMATION;
-
-       if (response->u.mapi_ReadPerUserInformation.DataSize) {
-               size += response->u.mapi_ReadPerUserInformation.DataSize;
-       }
-
-       return size;
-}
-
-/**
-   \details Calculate GetPerUserLongTermIds Rop size
-
-   \param response pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetPerUserLongTermIds response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetPerUserGuid_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETPERUSERGUID;
-
-       return size;
-}
-
-/**
-   \details Calculate GetReceiveFolderTable ROP size
-
-   \param response pointer to the GetReceiveFolderTable EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetPerUserLongTermIds response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetReceiveFolderTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint32_t        i = 0;
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += sizeof(uint32_t); /* cValues */
-       for (i = 0; i < response->u.mapi_GetReceiveFolderTable.cValues; ++i) {
-               size += sizeof(uint8_t); /* flag */
-               size += sizeof(uint64_t); /* fid */
-               size += strlen(response->u.mapi_GetReceiveFolderTable.entries[i].lpszMessageClass) + 1;
-               size += sizeof(struct FILETIME); /* modiftime */
-       }
-
-       return size;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxctabl.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxctabl.c
deleted file mode 100644 (file)
index 2ddd0d3..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxctabl.c
-
-   \brief OXCTABL ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate SetColumns Rop size
-
-   \param response pointer to the SetColumns EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetColumns response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetColumns_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSETCOLUMNS;
-
-       return size;
-}
-
-
-/**
-   \details Calculate SortTable Rop size
-
-   \param response pointer to the SortTable EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SortTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSortTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSORTTABLE;
-
-       return size;
-}
-
-/**
-   \details Calculate Restrict Rop size
-
-   \param response pointer to the Restrict EcDoRpc_MAPI_REPL structure
-
-   \return Size of Restrict response
- */
-_PUBLIC_ uint16_t libmapiserver_RopRestrict_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPRESTRICT;
-
-       return size;
-}
-
-
-/**
-   \details Calculate QueryRows Rop size
-
-   \param response pointer to the QueryRows EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of QueryRows response
- */
-_PUBLIC_ uint16_t libmapiserver_RopQueryRows_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPQUERYROWS;
-       if (response->u.mapi_QueryRows.RowCount) {
-               size += response->u.mapi_QueryRows.RowData.length;
-       }
-
-       return size;
-}
-
-
-/**
-   \details Calculate QueryPosition Rop size
-
-   \param response pointer to the QueryPosition EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of QueryPosition response
- */
-_PUBLIC_ uint16_t libmapiserver_RopQueryPosition_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPQUERYPOSITION;
-
-       return size;
-}
-
-
-/**
-   \details Calculate SeekRow Rop size
-
-   \param response pointer to the SeekRow EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SeekRow response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSeekRow_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPSEEKROW;
-
-       return size;
-}
-
-
-/**
-   \details Calculate FindRow Rop size
-
-   \param response pointer to the FindRow EcDoRpc_MAPI_REPL structure
-
-   \return Size of FindRow response
- */
-_PUBLIC_ uint16_t libmapiserver_RopFindRow_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPFINDROW;
-
-       if (response->u.mapi_FindRow.HasRowData) {
-               size += response->u.mapi_FindRow.row.length;
-       }
-
-       return size;
-}
-
-/**
-   \details Calculate ResetTable (0x81) Rop size
-
-   \param response pointer to the ResetTable EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of ResetTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopResetTable_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxomsg.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxomsg.c
deleted file mode 100644 (file)
index 55b78eb..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Brad Hards 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxomsg.c
-
-   \brief OXOMSG ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-#include <string.h>
-
-/**
-   \details Calculate SubmitMessage (0x32) Rop size
-
-   \param response pointer to the SubmitMessage EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SubmitMessage response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSubmitMessage_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate SetSpooler (0x47) Rop size
-
-   \param response pointer to the SetSpooler EcDoRpc_MAPI_REPL
-   structure
-
-   \return Size of SetSpooler response
- */
-_PUBLIC_ uint16_t libmapiserver_RopSetSpooler_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       return SIZE_DFLT_MAPI_RESPONSE;
-}
-
-
-/**
-   \details Calculate GetAddressTypes (0x49) Rop size
-
-   \param response pointer to the GetAddressTypes EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetAddressTypes response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetAddressTypes_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETADDRESSTYPES;
-       /* The length of the strings is variable, but given by the size parameter */
-       size += response->u.mapi_AddressTypes.size;
-
-       return size;
-}
-
-/**
-   \details Calculate GetTransportFolder (0x6d) ROP size
-
-   \param response pointer to the GetTransportFolder EcDoRpc_MAPI_REPL structure
-
-   \return Size of GetTransportFolder response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetTransportFolder_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPGETTRANSPORTFOLDER;
-
-       return size;
-}
-
-
-/**
-   \details Calculate OptionsData (0x6f) Rop size
-
-   \param response pointer to the OptionsData EcDoRpc_MAPI_REPL structure
-
-   \return Size of OptionsData response
- */
-_PUBLIC_ uint16_t libmapiserver_RopOptionsData_size(struct EcDoRpc_MAPI_REPL *response)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       if (!response || response->error_code) {
-               return size;
-       }
-
-       size += SIZE_DFLT_ROPOPTIONSDATA;
-       size += response->u.mapi_OptionsData.OptionsInfo.cb;
-       size += response->u.mapi_OptionsData.HelpFileSize;
-       if (response->u.mapi_OptionsData.HelpFileSize != 0) {
-               size += strlen(response->u.mapi_OptionsData.HelpFileName.HelpFileName) + 1;
-       }
-
-       return size;
-}
diff --git a/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxorule.c b/branches/plugfest/mapiproxy/libmapiserver/libmapiserver_oxorule.c
deleted file mode 100644 (file)
index 2082d38..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-   libmapiserver - MAPI library for Server side
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file libmapiserver_oxorule.c
-
-   \brief OXORULE ROP Response size calculations
- */
-
-#include "libmapiserver.h"
-
-/**
-   \details Calculate GetRulesTable Rop size
-
-   \return Size of GetRulesTable response
- */
-_PUBLIC_ uint16_t libmapiserver_RopGetRulesTable_size(void)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       return size;
-}
-
-
-/**
-   \details Calculate ModifyRules Rop size
-
-   \return Size of ModifyRules response
- */
-_PUBLIC_ uint16_t libmapiserver_RopModifyRules_size(void)
-{
-       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
-
-       return size;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore.pc.in b/branches/plugfest/mapiproxy/libmapistore.pc.in
deleted file mode 100644 (file)
index 1ef89e8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-datarootdir=@prefix@/share
-datadir=@datadir@
-
-Name: MAPISTORE
-Description: MAPI Storage Abstraction Layer library
-Version: @PACKAGE_VERSION@ 
-Libs: -L${libdir} -lmapistore
-Libs.private: @LIBS@
-Cflags: -I${includedir}
-Requires: talloc tdb libmapi
diff --git a/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.c b/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.c
deleted file mode 100644 (file)
index f4d5201..0000000
+++ /dev/null
@@ -1,1412 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-   MAPIStore FS / OCPF backend
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapistore_fsocpf.h"
-
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <errno.h>
-
-/**
-   \details Initialize fsocpf mapistore backend
-
-   \return MAPISTORE_SUCCESS on success
- */
-static enum MAPISTORE_ERROR fsocpf_init(void)
-{
-       DEBUG(0, ("fsocpf backend initialized\n"));
-
-       ocpf_init();
-       
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Allocate / initialize the fsocpf_context structure
-
-   \param mem_ctx pointer to the memory context
-   \param uri pointer to the fsocpf path
-   \param dir pointer to the DIR structure associated with the uri
- */
-static struct fsocpf_context *fsocpf_context_init(TALLOC_CTX *mem_ctx, 
-                                                 const char *uri, 
-                                                 DIR *dir)
-{
-       struct fsocpf_context   *fsocpf_ctx;
-
-       fsocpf_ctx = talloc_zero(mem_ctx, struct fsocpf_context);
-       fsocpf_ctx->private_data = NULL;
-       fsocpf_ctx->uri = talloc_strdup(fsocpf_ctx, uri);
-       fsocpf_ctx->dir = dir;
-       fsocpf_ctx->folders = NULL;
-       fsocpf_ctx->messages = NULL;
-
-       return fsocpf_ctx;
-}
-
-/**
-   \details Generate a mapistore URI for root (system/special) folders
-
-   \param private_data pointer to the private data holding the fsocpf_context structure
-   \param index the folder index for which to create the mapistore URI
-   \param username the username for which to create the mapistore URI
-   \param mapistore_uri pointer on pointer to the string to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-static enum MAPISTORE_ERROR fsocpf_create_mapistore_uri(TALLOC_CTX *mem_ctx,
-                                                       uint32_t index,
-                                                       const char *username,
-                                                       char **mapistore_uri)
-{
-       uint32_t                        i;
-
-       for (i = 0; dflt_folders[i].name; i++) {
-               if (dflt_folders[i].index == index) {
-                       *mapistore_uri = talloc_asprintf(mem_ctx, "fsocpf://%s/%s/%s", mapistore_get_mapping_path(), username, dflt_folders[i].name);
-                       DEBUG(5, ("* [%s:%d][%s]: URI = %s\n", __FILE__, __LINE__, __FUNCTION__, *mapistore_uri));
-                       return MAPISTORE_SUCCESS;
-               }
-       }
-
-       return MAPISTORE_ERR_NOT_FOUND;
-}
-
-
-/**
-   \details Allocate / initialize a fsocpf_folder_list element
-
-   This essentially creates a node of the linked list, which will be added to the list
-   by the caller
-
-   \param mem_ctx pointer to the memory context
-   \param fid the folder id for the folder
-   \param uri pointer to the fsocpf path for the folder
-   \param dir pointer to the DIR structure associated with the fid / uri
- */
-static struct fsocpf_folder_list *fsocpf_folder_list_element_init(TALLOC_CTX *mem_ctx, 
-                                                                 uint64_t fid, 
-                                                                 const char *uri, 
-                                                                 DIR *dir)
-{
-       struct fsocpf_folder_list *el;
-
-       el = talloc_zero(mem_ctx, struct fsocpf_folder_list);
-       el->folder = talloc_zero((TALLOC_CTX *)el, struct fsocpf_folder);
-       el->folder->fid = fid;
-       el->folder->path = talloc_strdup((TALLOC_CTX *)el, uri);
-       el->folder->dir = dir;
-
-       return el;
-}
-
-
-/**
-  \details search for the fsocpf_folder for a given folder ID
-
-  \param fsocpf_ctx the store context
-  \param fid the folder ID of the fsocpf_folder to search for
-
-  \return folder on success, or NULL if the folder was not found
-*/
-static struct fsocpf_folder *fsocpf_find_folder_by_fid(struct fsocpf_context *fsocpf_ctx, 
-                                                      uint64_t fid)
-{
-       struct fsocpf_folder_list       *el;
-
-       for (el = fsocpf_ctx->folders; el; el = el->next) {
-               if (el->folder && el->folder->fid == fid) {
-                       return el->folder;
-               }
-       }
-       return NULL;
-}
-
-
-/**
-   \details Allocate / initialize a fsocpf_message_list element
-
-   This essentialy creates a node of the linked list, which will be
-   added to the list by the caller
-
-   \param mem_ctx pointer to the memory context
-   \param fid the folder id for the message
-   \param mid the message id for the message
-   \param uri pointer to the fsocpf path for the message
-   \param context_id the ocpf context identifier
- */
-static struct fsocpf_message_list *fsocpf_message_list_element_init(TALLOC_CTX *mem_ctx,
-                                                                   uint64_t fid,
-                                                                   uint64_t mid,
-                                                                   const char *uri,
-                                                                   uint32_t context_id)
-{
-       struct fsocpf_message_list      *el;
-
-       el = talloc_zero(mem_ctx, struct fsocpf_message_list);
-       el->message = talloc_zero((TALLOC_CTX *)el, struct fsocpf_message);
-       el->message->fid = fid;
-       el->message->mid = mid;
-       el->message->path = talloc_strdup((TALLOC_CTX *)el, uri);
-       el->message->ocpf_context_id = context_id;
-
-       return el;
-}
-
-
-/**
-   \details search for the fsocpf_message for a given message ID
-
-   \param fsocpf_ctx the store context
-   \param mid the message ID of the fsocpf_message to search for
-
-   \return message on success, or NULL if the message was not found
- */
-static struct fsocpf_message *fsocpf_find_message_by_mid(struct fsocpf_context *fsocpf_ctx,
-                                                        uint64_t mid)
-{
-       struct fsocpf_message_list      *el;
-
-       for (el = fsocpf_ctx->messages; el; el = el->next) {
-               if (el->message && el->message->mid == mid) {
-                       return el->message;
-               }
-       }
-       return NULL;
-}
-
-
-/**
-   \details search for the fsocpf_message_list for a given message ID
-
-   \param fsocpf_ctx the store context
-   \param mid the message ID of the fsocpf_message to search for
-
-   \return point to message list on success, or NULL if the message was not found
- */
-static struct fsocpf_message_list *fsocpf_find_message_list_by_mid(struct fsocpf_context *fsocpf_ctx,
-                                                                  uint64_t mid)
-{
-       struct fsocpf_message_list      *el;
-
-       if (!fsocpf_ctx || !fsocpf_ctx->messages) {
-               return NULL;
-       }
-
-       for (el = fsocpf_ctx->messages; el; el = el->next) {
-               if (el->message && el->message->mid == mid) {
-                       return el;
-               }
-       }
-       return NULL;
-}
-
-
-/**
-   \details Create a connection context to the fsocpf backend
-
-   \param mem_ctx pointer to the memory context
-   \param uri pointer to the fsocpf path
-   \param private_data pointer to the private backend context 
- */
-static enum MAPISTORE_ERROR fsocpf_create_context(struct mapistore_backend_context *mstoredb_ctx, const char *uri, void **private_data)
-{
-       TALLOC_CTX                      *mem_ctx;
-       DIR                             *top_dir;
-       struct fsocpf_context           *fsocpf_ctx;
-       struct fsocpf_folder_list       *el;
-       int                             len;
-       int                             i;
-
-       DEBUG(0, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-       DEBUG(4, ("[%s:%d]: fsocpf uri: %s\n", __FUNCTION__, __LINE__, uri));
-
-       mem_ctx = (TALLOC_CTX *) mstoredb_ctx;
-
-       /* Step 1. Try to open context directory */
-       top_dir = opendir(uri);
-       if (!top_dir) {
-               /* If it doesn't exist, try to create it */
-               if (mkdir(uri, S_IRWXU) != 0 ) {
-                       return MAPISTORE_ERR_CONTEXT_FAILED;
-               }
-               top_dir = opendir(uri);
-               if (!top_dir) {
-                       return MAPISTORE_ERR_CONTEXT_FAILED;
-               }
-       }
-
-       /* Step 2. Allocate / Initialize the fsocpf context structure */
-       fsocpf_ctx = fsocpf_context_init(mem_ctx, uri, top_dir);
-
-       /* FIXME: Retrieve the fid from the URI */
-       len = strlen(uri);
-       for (i = len; i > 0; i--) {
-               if (uri[i] == '/' && i != len) {
-                       char *tmp;
-
-                       tmp = talloc_strdup(mem_ctx, uri + i + 1);
-                       fsocpf_ctx->fid = strtoull(tmp, NULL, 16);
-                       talloc_free(tmp);
-                       break;
-               }
-       }
-
-       /* Create the entry in the list for top mapistore folders */
-       el = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fsocpf_ctx->fid, uri, top_dir);
-       DLIST_ADD_END(fsocpf_ctx->folders, el, struct fsocpf_folder_list *);
-       DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", el->folder->fid));
-
-       /* Step 3. Store fsocpf context within the opaque private_data pointer */
-       *private_data = (void *)fsocpf_ctx;
-
-       DEBUG(0, ("%s has been opened\n", uri));
-       {
-               struct dirent *curdir;
-               int j = 0;
-
-               while ((curdir = readdir(fsocpf_ctx->dir)) != NULL) {
-                       DEBUG(0, ("%d: readdir: %s\n", j, curdir->d_name));
-                       j++;
-               }
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Delete a connection context from the fsocpf backend
-
-   \param private_data pointer to the current fsocpf context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_delete_context(void *private_data)
-{
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_SUCCESS;
-       }
-
-       if (fsocpf_ctx->dir) {
-               closedir(fsocpf_ctx->dir);
-               fsocpf_ctx->dir = NULL;
-       }
-
-       talloc_free(fsocpf_ctx);
-       fsocpf_ctx = NULL;
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Delete data associated to a given folder or message
-
-   \param private_data pointer to the current fsocpf context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_release_record(void *private_data, uint64_t fmid, uint8_t type)
-{
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message_list      *message;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_SUCCESS;
-       }
-
-       switch (type) {
-       case MAPISTORE_FOLDER:
-               break;
-       case MAPISTORE_MESSAGE:
-               message = fsocpf_find_message_list_by_mid(fsocpf_ctx, fmid);
-               if (message && message->message) {
-                       if (message->message->ocpf_context_id) {
-                               ocpf_del_context(message->message->ocpf_context_id);
-                       }
-                       DLIST_REMOVE(fsocpf_ctx->messages, message);
-                       talloc_free(message);
-               }
-               break;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details return the mapistore path associated to a given message or
-   folder ID
-
-   \param private_data pointer to the current fsocpf context
-   \param fmid the folder/message ID to lookup
-   \param type whether it is a folder or message
-   \param path pointer on pointer to the path to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-static enum MAPISTORE_ERROR fsocpf_get_path(void *private_data, uint64_t fmid,
-                                           uint8_t type, char **path)
-{
-       struct fsocpf_folder    *folder;
-       struct fsocpf_message   *message;
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_ERROR;
-       }
-
-       switch (type) {
-       case MAPISTORE_FOLDER:
-               folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fmid);
-               if (!folder) {
-                       DEBUG(0, ("folder doesn't exist ...\n"));
-                       *path = NULL;
-                       return MAPISTORE_ERROR;
-               }
-               DEBUG(0, ("folder->path is %s\n", folder->path));
-               *path = folder->path;
-               break;
-       case MAPISTORE_MESSAGE:
-               message = fsocpf_find_message_by_mid(fsocpf_ctx, fmid);
-               if (!message) {
-                       DEBUG(0, ("message doesn't exist ...\n"));
-                       *path = NULL;
-                       return MAPISTORE_ERROR;
-               }
-               DEBUG(0, ("message->path is %s\n", message->path));
-               *path = message->path;
-               break;
-       default:
-               DEBUG(0, ("[%s]: Invalid type %d\n", __FUNCTION__, type));
-               return MAPISTORE_ERROR;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-static enum MAPISTORE_ERROR fsocpf_op_get_fid_by_name(void *private_data, uint64_t parent_fid, const char* foldername, uint64_t *fid)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder    *folder;
-       uint32_t                ocpf_context_id;
-       struct dirent           *curdir;
-       char                    *propfile;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues = 0;
-       int                     ret;
-       uint32_t                i;
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_ERROR;
-       }
-
-       /* Step 1. Search for the parent folder by fid */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, parent_fid);
-       if (!folder) {
-               return MAPISTORE_ERROR;
-       }
-       
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_get_fid_by_name");
-
-       /* Step 2. Iterate over the contents of the parent folder, searching for a matching name */
-       rewinddir(folder->dir);
-       while ((curdir = readdir(folder->dir)) != NULL) {
-               if ((curdir->d_type == DT_DIR) && (strncmp(curdir->d_name, "0x", 2) == 0)) {
-                       // open the .properties file for this sub-directory
-                       propfile = talloc_asprintf(mem_ctx, "%s/%s/.properties",
-                                                  folder->path, curdir->d_name);
-                       DEBUG(6, ("propfile: %s\n", propfile));
-                       ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_READ);
-
-                       /* process the file */
-                       ret = ocpf_parse(ocpf_context_id);
-                       DEBUG(6, ("ocpf_parse (%d) = %d\n", ocpf_context_id, ret));
-                       talloc_free(propfile);
-       
-                       ocpf_server_set_SPropValue(mem_ctx, ocpf_context_id);
-                       lpProps = ocpf_get_SPropValue(ocpf_context_id, &cValues);
-                       for (i = 0; i < cValues; ++i) {
-                               if (lpProps && lpProps[i].ulPropTag == PR_DISPLAY_NAME) {
-                                 const char * this_folder_display_name = (const char *)get_SPropValue_data(&(lpProps[i]));
-                                       DEBUG(6, ("looking at %s found in %s\n", this_folder_display_name, curdir->d_name));
-                                       if (strcmp(this_folder_display_name, foldername) == 0) {
-                                               DEBUG(4, ("folder name %s found in %s\n", this_folder_display_name, curdir->d_name));
-                                               talloc_free(mem_ctx);
-                                               ocpf_del_context(ocpf_context_id);
-                                               *fid = strtoul(curdir->d_name, NULL, 16);
-                                               return MAPISTORE_SUCCESS;
-                                       }
-                               }
-                       }
-                       ocpf_del_context(ocpf_context_id);
-               }
-       }
-       talloc_free(mem_ctx);
-       return MAPISTORE_ERR_NOT_FOUND;
-}
-
-/**
-  \details Set the properties for a folder
-  
-  \param path the path to the folder
-  \param fid the folder ID of the folder
-  \param aRow the properties to set on the folder
-*/
-static void fsocpf_set_folder_props(const char *path, uint64_t fid, struct SRow *aRow)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapi_SPropValue_array    mapi_lpProps;
-       uint32_t                        ocpf_context_id;
-       char                            *propfile;
-       uint32_t                        i;
-
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_set_folder_props");
-       
-       /* Create the array of mapi properties */
-       mapi_lpProps.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, aRow->cValues);
-       mapi_lpProps.cValues = aRow->cValues;
-       mapidump_SRow(aRow, "[+]");
-       for (i = 0; i < aRow->cValues; i++) {
-               cast_mapi_SPropValue((TALLOC_CTX *)mapi_lpProps.lpProps,
-                                    &(mapi_lpProps.lpProps[i]), &(aRow->lpProps[i]));
-       }
-
-       /* Create the .properties file */
-       propfile = talloc_asprintf(mem_ctx, "%s/.properties", path);
-
-       ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_CREATE);
-
-       ocpf_write_init(ocpf_context_id, fid);
-       DEBUG(0, ("Writing %s\n", propfile));
-       ocpf_write_auto(ocpf_context_id, NULL, &mapi_lpProps);
-       ocpf_write_commit(ocpf_context_id);
-       ocpf_del_context(ocpf_context_id);
-       
-       talloc_free(mem_ctx);
-}
-
-/**
-   \details Create a folder in the fsocpf backend
-   
-   \param private_data pointer to the current fsocpf context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_op_mkdir(void *private_data, uint64_t parent_fid, uint64_t fid,
-                                           struct SRow *aRow)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder            *folder;
-       char                            *newfolder;
-       const char                      *new_folder_name = NULL;
-       uint64_t                        dummy_fid;
-       struct fsocpf_folder_list       *newel;
-       DIR                             *dir;
-       int                             ret;
-       uint32_t                        i;
-
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx) {
-               DEBUG(0, ("No fsocpf context found :-(\n"));
-               return MAPISTORE_ERROR;
-       }
-
-       /* Step 0. Check if it already exists */
-       for (i = 0; i < aRow->cValues; ++i) {
-               if (aRow->lpProps[i].ulPropTag == PR_DISPLAY_NAME) {
-                       new_folder_name = aRow->lpProps[i].value.lpszA;
-               }
-       }
-       if (fsocpf_op_get_fid_by_name(private_data, parent_fid, new_folder_name, &dummy_fid) == MAPISTORE_SUCCESS) {
-               /* already exists */
-               return MAPISTORE_ERR_EXIST;
-       }
-
-       /* Step 1. Search for the parent fid */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, parent_fid);
-
-       if (! folder) {
-               DEBUG(0, ("parent context for folder 0x%.16"PRIx64" not found\n", parent_fid));
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_mkdir");
-
-       /* Step 2. Stringify fid and create directory */
-       newfolder = talloc_asprintf(mem_ctx, "%s/0x%.16"PRIx64, folder->path, fid);
-       DEBUG(0, ("newfolder = %s\n", newfolder));
-       ret = mkdir(newfolder, 0700);
-       if (ret) {
-               DEBUG(0, ("mkdir failed with ret = %d\n", ret));
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERROR;
-       }
-       dir = opendir(newfolder);
-       
-       /* add this folder to the list of ones we know about */
-       newel = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, newfolder, dir);
-       DLIST_ADD_END(fsocpf_ctx->folders, newel, struct fsocpf_folder_list *);
-       DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", fid));
-
-       fsocpf_set_folder_props(newfolder, fid, aRow);
-       
-       talloc_free(mem_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Delete a folder from the fsocpf backend
-
-   \param private_data pointer to the current fsocpf context
-   \param parent_fid the FID for the parent of the folder to delete
-   \param fid the FID for the folder to delete
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_op_rmdir(void *private_data, uint64_t parent_fid, uint64_t fid)
-{
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder    *parent;
-       char                    *folderpath;
-       char                    *propertiespath;
-       TALLOC_CTX              *mem_ctx;
-       int                     ret;
-       
-       if (!fsocpf_ctx) {
-               DEBUG(0, ("No fsocpf context found for op_rmdir :-(\n"));
-               return MAPISTORE_ERROR;
-       }
-       DEBUG(4, ("FSOCPF would delete FID 0x%"PRIx64" from 0x%"PRIx64"\n", fid, parent_fid));
-
-       /* Step 1. Search for the parent fid */
-       parent = fsocpf_find_folder_by_fid(fsocpf_ctx, parent_fid);
-
-       if (! parent) {
-               DEBUG(0, ("parent context for folder 0x%.16"PRIx64" not found\n", parent_fid));
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_mkdir");
-
-       /* Step 2. Stringify fid */
-       folderpath = talloc_asprintf(mem_ctx, "%s/0x%.16"PRIx64, parent->path, fid);
-       DEBUG(5, ("folder to delete = %s\n", folderpath));
-
-       /* Step 3. Remove .properties file */
-       propertiespath = talloc_asprintf(mem_ctx, "%s/.properties", folderpath);
-       ret = unlink(propertiespath);
-       if (ret) {
-               DEBUG(0, ("unlink failed with ret = %d (%s)\n", ret, strerror(errno)));
-               /* this could happen if we have no .properties file, so lets still try to delete */
-       }
-
-       /* Step 4. Delete directory */
-       ret = rmdir(folderpath);
-       if (ret) {
-               DEBUG(0, ("rmdir failed with ret = %d (%s)\n", ret, strerror(errno)));
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERROR;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Open a folder from the fsocpf backend
-
-   \param private_data pointer to the current fsocpf context
-   \param parent_fid the parent folder identifier
-   \param fid the identifier of the colder to open
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_op_opendir(void *private_data, uint64_t parent_fid, uint64_t fid)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder            *folder;
-       struct fsocpf_folder_list       *el;
-       struct fsocpf_folder_list       *newel;
-       struct dirent                   *curdir;
-       char                            *searchdir;
-       char                            *newpath;
-       DIR                             *dir;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_ERROR;
-       }
-
-       /* Step 0. If fid equals top folder fid, it is already open */
-       if (fsocpf_ctx->fid == fid) {
-               /* If we access it for the first time, just add an entry to the folder list */
-               if (!fsocpf_ctx->folders) {
-                       el = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, fsocpf_ctx->uri, fsocpf_ctx->dir);
-                       DLIST_ADD_END(fsocpf_ctx->folders, el, struct fsocpf_folder_list *);
-                       DEBUG(0, ("Element added to the list 0x%16"PRIx64"\n", el->folder->fid));
-               }
-
-               folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fid);
-
-               return (! folder) ? MAPISTORE_ERR_NO_DIRECTORY : MAPISTORE_SUCCESS;
-       } else {
-               /* Step 1. Search for the parent fid */
-               folder = fsocpf_find_folder_by_fid(fsocpf_ctx, parent_fid);
-               if (! folder) {
-                       return MAPISTORE_ERR_NO_DIRECTORY;
-               }
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_opendir");
-
-       /* Step 2. stringify fid */
-       searchdir = talloc_asprintf(mem_ctx, "0x%.16"PRIx64, fid);
-       DEBUG(0, ("Looking for %s\n", searchdir));
-
-       /* Read the directory and search for the fid to open */
-       rewinddir(folder->dir);
-       errno = 0;
-       {
-               int i = 0;
-               while ((curdir = readdir(folder->dir)) != NULL) {
-                       DEBUG(0, ("%d: readdir: %s\n", i, curdir->d_name));
-                       i++;
-                       if (curdir->d_name && !strcmp(curdir->d_name, searchdir)) {
-
-                               newpath = talloc_asprintf(mem_ctx, "%s/0x%.16"PRIx64, folder->path, fid);
-                               dir = opendir(newpath);
-                               if (!dir) {
-                                       talloc_free(mem_ctx);
-                                       return MAPISTORE_ERR_CONTEXT_FAILED;
-                               }
-                               DEBUG(0, ("FOUND\n"));
-
-                               newel = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, newpath, dir);
-                               DLIST_ADD_END(fsocpf_ctx->folders, newel, struct fsocpf_folder_list *);
-                               DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", fid));
-                       }
-               }
-       }
-
-       DEBUG(0, ("errno = %d\n", errno));
-
-       rewinddir(folder->dir);
-       talloc_free(mem_ctx);
-               
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Close a folder from the fsocpf backend
-
-   \param private_data pointer to the current fsocpf context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_op_closedir(void *private_data)
-{
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-
-       if (!fsocpf_ctx) {
-               return MAPISTORE_ERROR;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Read directory content from the fsocpf backend
-
-   \param private_data pointer to the current fsocpf context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-static enum MAPISTORE_ERROR fsocpf_op_readdir_count(void *private_data, 
-                                                   uint64_t fid,
-                                                   uint8_t table_type,
-                                                   uint32_t *RowCount)
-{
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder            *folder;
-       struct dirent                   *curdir;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx || !RowCount) {
-               return MAPISTORE_ERROR;
-       }
-
-       if (fsocpf_ctx->fid == fid) {
-               /* If we access it for the first time, just add an entry to the folder list */
-               if (!fsocpf_ctx->folders) {
-                       struct fsocpf_folder_list *el = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, fsocpf_ctx->uri, fsocpf_ctx->dir);
-                       DLIST_ADD_END(fsocpf_ctx->folders, el, struct fsocpf_folder_list *);
-                       DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", el->folder->fid));
-               }
-       }
-
-       /* Search for the fid fsocpf_folder entry */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fid);
-       if (! folder) {
-               *RowCount = 0;
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-
-       switch (table_type) {
-       case MAPISTORE_FOLDER_TABLE:
-               rewinddir(folder->dir);
-               errno = 0;
-               *RowCount = 0;
-               while ((curdir = readdir(folder->dir)) != NULL) {
-                       if (curdir->d_name && curdir->d_type == DT_DIR &&
-                           strcmp(curdir->d_name, ".") && strcmp(curdir->d_name, "..")) {
-                               DEBUG(0, ("Adding %s to the RowCount\n", curdir->d_name));
-                               *RowCount += 1;
-                       }
-               }
-               break;
-       case MAPISTORE_MESSAGE_TABLE:
-               rewinddir(folder->dir);
-               errno = 0;
-               *RowCount = 0;
-               while ((curdir = readdir(folder->dir)) != NULL) {
-                       if (curdir->d_name && curdir->d_type == DT_REG &&
-                           strcmp(curdir->d_name, ".properties")) {
-                               DEBUG(0, ("Adding %s to the RowCount\n", curdir->d_name));
-                               *RowCount += 1;
-                       }
-               }
-               break;
-       default:
-               break;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_get_property_from_folder_table(struct fsocpf_folder *folder,
-                                                                 uint32_t pos,
-                                                                 enum MAPITAGS proptag,
-                                                                 void **data)
-{
-       int                     ret;
-       struct dirent           *curdir;
-       uint32_t                counter = 0;
-       char                    *folderID;
-       char                    *propfile;
-       uint32_t                cValues = 0;
-       struct SPropValue       *lpProps;
-       uint32_t                ocpf_context_id;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       /* Set dir listing to current position */
-       rewinddir(folder->dir);
-       errno = 0;
-       while ((curdir = readdir(folder->dir)) != NULL) {
-               if (curdir->d_name && curdir->d_type == DT_DIR &&
-                   strcmp(curdir->d_name, ".") && strcmp(curdir->d_name, "..") &&
-                   counter == pos) {
-                       folderID = talloc_strdup(folder, curdir->d_name);
-                       break;
-               }
-               if (strcmp(curdir->d_name, ".") && strcmp(curdir->d_name, "..") && 
-                   (curdir->d_type == DT_DIR)) {
-                       counter++;
-               }
-       }
-
-       if (!curdir) {
-               DEBUG(0, ("curdir not found\n"));
-               *data = NULL;
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       /* If fid, return folder->fid */
-       if (proptag == PR_FID) {
-               uint64_t        *fid;
-
-               fid = talloc_zero(folder, uint64_t);
-               *fid = strtoull(folderID, NULL, 16);
-               talloc_free(folderID);
-               *data = (uint64_t *)fid;
-               return MAPISTORE_SUCCESS;
-       } 
-
-       /* Otherwise opens .properties file with ocpf for fid entry */
-       propfile = talloc_asprintf(folder, "%s/%s/.properties", folder->path, folderID);
-       talloc_free(folderID);
-
-       ret = ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_READ);
-       talloc_free(propfile);
-
-       /* process the file */
-       ret = ocpf_parse(ocpf_context_id);
-
-       ocpf_server_set_SPropValue(folder, ocpf_context_id);
-       lpProps = ocpf_get_SPropValue(ocpf_context_id, &cValues);
-
-       /* FIXME: We need to find a proper way to handle this (for all types) */
-       talloc_steal(folder, lpProps);
-
-       *data = (void *) get_SPropValue(lpProps, proptag);
-       if (((proptag & 0xFFFF) == PT_STRING8) || ((proptag & 0xFFFF) == PT_UNICODE)) {
-               /* Hack around PT_STRING8 and PT_UNICODE */
-               if (*data == NULL && ((proptag & 0xFFFF) == PT_STRING8)) {
-                 *data = (void *) get_SPropValue(lpProps, (enum MAPITAGS)(((int)proptag & 0xFFFF0000) + PT_UNICODE));
-               } else if (*data == NULL && (proptag & 0xFFFF) == PT_UNICODE) {
-                 *data = (void *) get_SPropValue(lpProps, (enum MAPITAGS)((int)(proptag & 0xFFFF0000) + PT_STRING8));
-               }
-               *data = talloc_strdup(folder, (char *)*data);
-       }
-
-       if (*data == NULL) {
-               ret = ocpf_del_context(ocpf_context_id);
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       ret = ocpf_del_context(ocpf_context_id);
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_get_property_from_message_table(struct fsocpf_folder *folder,
-                                                                  uint32_t pos,
-                                                                  enum MAPITAGS proptag,
-                                                                  void **data)
-{
-       int                     ret;
-       struct dirent           *curdir;
-       uint32_t                counter = 0;
-       char                    *messageID = NULL;
-       char                    *propfile;
-       uint32_t                cValues = 0;
-       struct SPropValue       *lpProps;
-       uint32_t                ocpf_context_id;
-
-       DEBUG(5, ("[%s:%d\n]", __FUNCTION__, __LINE__));
-
-       /* Set dir listing to current position */
-       rewinddir(folder->dir);
-       errno = 0;
-       while ((curdir = readdir(folder->dir)) != NULL) {
-               if (curdir->d_name && curdir->d_type == DT_REG &&
-                   strcmp(curdir->d_name, ".properties") && counter == pos) {
-                       messageID = talloc_strdup(folder, curdir->d_name);
-                       break;
-               }
-               if (strcmp(curdir->d_name, ".properties") && 
-                   strcmp(curdir->d_name, ".") &&
-                   strcmp(curdir->d_name, "..") &&
-                   (curdir->d_type == DT_REG)) {
-                       counter++;
-               }
-       }
-
-       if (!messageID) {
-               *data = NULL;
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       /* if fid, return folder fid */
-       if (proptag == PR_FID) {
-               *data = (uint64_t *)&folder->fid;
-               return MAPISTORE_SUCCESS;
-         }
-
-       /* If mid, return curdir->d_name */
-       if (proptag == PR_MID) {
-               uint64_t        *mid;
-
-               mid = talloc_zero(folder, uint64_t);
-               *mid = strtoull(messageID, NULL, 16);
-               talloc_free(messageID);
-               *data = (uint64_t *)mid;
-               return MAPISTORE_SUCCESS;
-       }
-
-       /* Otherwise opens curdir->d_name file with ocpf */
-       propfile = talloc_asprintf(folder, "%s/%s", folder->path, messageID);
-       talloc_free(messageID);
-
-       ret = ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_READ);
-       talloc_free(propfile);
-
-       /* process the file */
-       ret = ocpf_parse(ocpf_context_id);
-
-       ocpf_server_set_SPropValue(folder, ocpf_context_id);
-       lpProps = ocpf_get_SPropValue(ocpf_context_id, &cValues);
-
-       /* FIXME: We need to find a proper way to handle this (for all types) */
-       talloc_steal(folder, lpProps);
-
-       *data = (void *) get_SPropValue(lpProps, proptag);
-       if (((proptag & 0xFFFF) == PT_STRING8) || ((proptag & 0xFFFF) == PT_UNICODE)) {
-               /* Hack around PT_STRING8 and PT_UNICODE */
-               if (*data == NULL && ((proptag & 0xFFFF) == PT_STRING8)) {
-                 *data = (void *) get_SPropValue(lpProps, (enum MAPITAGS)(((int)proptag & 0xFFFF0000) + PT_UNICODE));
-               } else if (*data == NULL && (proptag & 0xFFFF) == PT_UNICODE) {
-                 *data = (void *) get_SPropValue(lpProps, (enum MAPITAGS)(((int)proptag & 0xFFFF0000) + PT_STRING8));
-               }
-               *data = talloc_strdup(folder, (char *)*data);
-       }
-
-       if (*data == NULL) {
-               ocpf_del_context(ocpf_context_id);
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       ocpf_del_context(ocpf_context_id);
-       return MAPISTORE_SUCCESS;       
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_get_table_property(void *private_data,
-                                                        uint64_t fid,
-                                                        uint8_t table_type,
-                                                        uint32_t pos,
-                                                        enum MAPITAGS proptag,
-                                                        void **data)
-{
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_folder_list       *el;
-       struct fsocpf_folder            *folder;
-       enum MAPISTORE_ERROR            retval = MAPISTORE_SUCCESS;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       if (!fsocpf_ctx || !data) {
-               return MAPISTORE_ERROR;
-       }
-
-       if (fsocpf_ctx->fid == fid) {
-               /* If we access it for the first time, just add an entry to the folder list */
-               if (!fsocpf_ctx->folders || !fsocpf_ctx->folders->folder) {
-                       el = fsocpf_folder_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, fsocpf_ctx->uri, fsocpf_ctx->dir);
-                       DLIST_ADD_END(fsocpf_ctx->folders, el, struct fsocpf_folder_list *);
-                       DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", el->folder->fid));
-               }
-       }
-
-       /* Search for the fid fsocpf_folder entry */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fid);
-       if (! folder) {
-               *data = NULL;
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-
-       switch (table_type) {
-       case MAPISTORE_FOLDER_TABLE:
-               retval = fsocpf_get_property_from_folder_table(folder, pos, proptag, data);
-               break;
-       case MAPISTORE_MESSAGE_TABLE:
-               retval = fsocpf_get_property_from_message_table(folder, pos, proptag, data);
-               break;
-       default:
-               break;
-       }
-
-       return retval;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_openmessage(void *private_data,
-                                                 uint64_t fid,
-                                                 uint64_t mid,
-                                                 struct mapistore_message *msg)
-{
-       TALLOC_CTX                      *mem_ctx;
-       int                             ret;
-       enum MAPISTATUS                 retval;
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message_list      *el;
-       struct fsocpf_message           *message;
-       struct fsocpf_folder            *folder;
-       uint32_t                        ocpf_context_id;
-       char                            *propfile;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       /* Search for the mid fsocpf_message entry */
-       message = fsocpf_find_message_by_mid(fsocpf_ctx, mid);
-       if (message) {
-               DEBUG(0, ("Message was already opened\n"));
-               msg->properties = talloc_zero(fsocpf_ctx, struct SRow);
-               msg->recipients = ocpf_get_recipients(message, message->ocpf_context_id);
-               msg->properties->lpProps = ocpf_get_SPropValue(message->ocpf_context_id, 
-                                                              &msg->properties->cValues);
-               return MAPISTORE_SUCCESS;
-       }
-
-       /* Search for the fid fsocpf_folder entry */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fid);
-       if (!folder) {
-               DEBUG(0, ("fsocpf_op_openmessage: folder not found\n"));
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       DEBUG(0, ("Message: 0x%.16"PRIx64" is inside %s\n", mid, folder->path));
-
-       /* Trying to open and map the file with OCPF */
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_openmessage");
-       propfile = talloc_asprintf(mem_ctx, "%s/0x%.16"PRIx64, folder->path, mid);
-
-       ret = ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_READ);
-       ret = ocpf_parse(ocpf_context_id);
-
-       if (!ret) {
-               el = fsocpf_message_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, mid, 
-                                                     propfile, ocpf_context_id);
-               DLIST_ADD_END(fsocpf_ctx->messages, el, struct fsocpf_message_list *);
-               DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", mid));
-
-               /* Retrieve recipients from the message */
-               msg->recipients = ocpf_get_recipients(el, ocpf_context_id);
-
-               /* Retrieve properties from the message */
-               msg->properties = talloc_zero(el, struct SRow);
-               retval = ocpf_server_set_SPropValue(el, ocpf_context_id);
-               msg->properties->lpProps = ocpf_get_SPropValue(ocpf_context_id, &msg->properties->cValues);
-       } else {
-               DEBUG(0, ("An error occured while processing %s\n", propfile));
-               talloc_free(propfile);
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERR_CONTEXT_FAILED;
-       }
-
-       talloc_free(propfile);
-       talloc_free(mem_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_createmessage(void *private_data,
-                                                   uint64_t fid,
-                                                   uint64_t mid)
-{
-       TALLOC_CTX                      *mem_ctx;
-       int                             ret;
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message_list      *el;
-       struct fsocpf_folder            *folder;
-       uint32_t                        ocpf_context_id;
-       char                            *propfile;
-       
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       /* Search for the fid fsocpf_folder entry */
-       folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fid);
-       if (!folder) {
-               DEBUG(0, ("fsocpf_op_createmessage: folder not found\n"));
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       DEBUG(0, ("Message: 0x%.16"PRIx64" will be created inside %s\n", mid, folder->path));
-       
-       mem_ctx = talloc_named(NULL, 0, "fsocpf_op_createmessage");
-       propfile = talloc_asprintf(mem_ctx, "%s/0x%.16"PRIx64, folder->path, mid);
-
-       ret = ocpf_new_context(propfile, &ocpf_context_id, OCPF_FLAGS_CREATE);
-       if (!ret) {
-               el = fsocpf_message_list_element_init((TALLOC_CTX *)fsocpf_ctx, fid, mid,
-                                                     propfile, ocpf_context_id);
-               DLIST_ADD_END(fsocpf_ctx->messages, el, struct fsocpf_message_list *);
-               DEBUG(0, ("Element added to the list 0x%.16"PRIx64"\n", mid));
-       } else {
-               DEBUG(0, ("An error occured while creating %s\n", propfile));
-               talloc_free(propfile);
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERR_CONTEXT_FAILED;
-       }
-
-       talloc_free(propfile);
-       talloc_free(mem_ctx);
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_savechangesmessage(void *private_data,
-                                                        uint64_t mid,
-                                                        uint8_t flags)
-{
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message           *message;
-       
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       message = fsocpf_find_message_by_mid(fsocpf_ctx, mid);
-       if (!message || !message->ocpf_context_id) {
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-       ocpf_write_init(message->ocpf_context_id, message->fid);
-       ocpf_write_commit(message->ocpf_context_id);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_submitmessage(void *private_data,
-                                                   uint64_t mid,
-                                                   uint8_t flags)
-{
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message           *message;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       /* This implementation is incorrect but should fit for immediate purposes */
-       message = fsocpf_find_message_by_mid(fsocpf_ctx, mid);
-       ocpf_write_init(message->ocpf_context_id, message->fid);
-       ocpf_write_commit(message->ocpf_context_id);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-static char *fsocpf_get_recipients(TALLOC_CTX *mem_ctx, struct SRowSet *SRowSet, uint8_t recipient_class)
-{
-       char            *recipient = NULL;
-       uint32_t        i;
-
-       for (i = 0; i < SRowSet->cRows; i++) {
-               if (SRowSet->aRow[i].lpProps[0].value.l == recipient_class) {
-                       if (!recipient) {
-                               recipient = talloc_strdup(mem_ctx, SRowSet->aRow[i].lpProps[1].value.lpszA);
-                       } else {
-                               recipient = talloc_asprintf(recipient, "%s;%s", recipient, 
-                                                           SRowSet->aRow[i].lpProps[1].value.lpszA);
-                       }
-               }
-       }
-
-       return recipient;
-}
-
-static enum MAPISTORE_ERROR fsocpf_op_getprops(void *private_data, 
-                                              uint64_t fmid, 
-                                              uint8_t type, 
-                                              struct SPropTagArray *SPropTagArray,
-                                              struct SRow *aRow)
-{
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message   *message;
-       uint32_t                cValues;
-       struct SPropValue       *lpProps;
-       struct SPropValue       lpProp;
-       struct SRowSet          *SRowSet;
-       uint32_t                i;
-       uint32_t                j;
-       char                    *recip_str = NULL;
-
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       switch (type) {
-       case MAPISTORE_FOLDER:
-               break;
-       case MAPISTORE_MESSAGE:
-               message = fsocpf_find_message_by_mid(fsocpf_ctx, fmid);
-               ocpf_server_set_SPropValue(fsocpf_ctx, message->ocpf_context_id);
-               lpProps = ocpf_get_SPropValue(message->ocpf_context_id, &cValues);
-               SRowSet = ocpf_get_recipients(fsocpf_ctx, message->ocpf_context_id);
-
-               ocpf_dump(message->ocpf_context_id);
-               for (i = 0; i != SPropTagArray->cValues; i++) {
-                       switch (SPropTagArray->aulPropTag[i]) {
-                       case PR_DISPLAY_TO:
-                       case PR_DISPLAY_TO_UNICODE:
-                               recip_str = fsocpf_get_recipients(fsocpf_ctx, SRowSet, OCPF_MAPI_TO);
-                               break;
-                       case PR_DISPLAY_CC:
-                       case PR_DISPLAY_CC_UNICODE:
-                               recip_str = fsocpf_get_recipients(fsocpf_ctx, SRowSet, OCPF_MAPI_CC);
-                               break;
-                       case PR_DISPLAY_BCC:
-                       case PR_DISPLAY_BCC_UNICODE:
-                               recip_str = fsocpf_get_recipients(fsocpf_ctx, SRowSet, OCPF_MAPI_BCC);
-                               break;
-                       default:
-                               for (j = 0; j != cValues; j++) {
-                                       if (SPropTagArray->aulPropTag[i] == lpProps[j].ulPropTag)  {
-                                               SRow_addprop(aRow, lpProps[j]);
-                                       }
-                               }
-                       }
-
-                       if (recip_str) {
-                               lpProp.ulPropTag = SPropTagArray->aulPropTag[i];
-                               switch (SPropTagArray->aulPropTag[i] & 0xFFFF) {
-                               case PT_STRING8:
-                                       lpProp.value.lpszA = talloc_strdup(aRow, recip_str);
-                                       break;
-                               case PT_UNICODE:
-                                       lpProp.value.lpszW = talloc_strdup(aRow, recip_str);
-                                       break;
-                               }
-                               SRow_addprop(aRow, lpProp);
-                               talloc_free(recip_str);
-                               recip_str = NULL;
-                       }
-               }
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-static enum MAPISTORE_ERROR fsocpf_op_setprops(void *private_data,
-                                              uint64_t fmid,
-                                              uint8_t type,
-                                              struct SRow *aRow)
-{
-       struct fsocpf_context   *fsocpf_ctx = (struct fsocpf_context *) private_data;
-       struct fsocpf_folder    *folder;
-       struct fsocpf_message   *message;
-       uint32_t                i;
-
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       switch (type) {
-       case MAPISTORE_FOLDER:
-               folder = fsocpf_find_folder_by_fid(fsocpf_ctx, fmid);
-               if (!folder) {
-                       return MAPISTORE_ERR_NOT_FOUND;
-               }
-               fsocpf_set_folder_props(folder->path, folder->fid, aRow);
-               break;
-       case MAPISTORE_MESSAGE:
-               message = fsocpf_find_message_by_mid(fsocpf_ctx, fmid);
-               if (!message || !message->ocpf_context_id) {
-                       return MAPISTORE_ERR_NOT_FOUND;
-               }
-               for (i = 0; i < aRow->cValues; i++) {
-                       if (aRow->lpProps[i].ulPropTag == PR_MESSAGE_CLASS) {
-                               ocpf_server_set_type(message->ocpf_context_id, aRow->lpProps[i].value.lpszA);
-                       } else if (aRow->lpProps[i].ulPropTag == PR_MESSAGE_CLASS_UNICODE) {
-                               ocpf_server_set_type(message->ocpf_context_id, aRow->lpProps[i].value.lpszW);
-                       }
-                       ocpf_server_add_SPropValue(message->ocpf_context_id, &aRow->lpProps[i]);
-               }
-               break;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-static enum MAPISTORE_ERROR fsocpf_op_deletemessage(void *private_data,
-                                                   uint64_t mid,
-                                                   uint8_t flags)
-{
-       int res;
-       struct fsocpf_context           *fsocpf_ctx = (struct fsocpf_context *)private_data;
-       struct fsocpf_message           *message;
-       
-       DEBUG(5, ("[%s:%d]\n", __FUNCTION__, __LINE__));
-
-       message = fsocpf_find_message_by_mid(fsocpf_ctx, mid);
-
-       if (!message || !message->path) {
-               return MAPISTORE_ERR_NOT_FOUND;
-       }
-
-       res = unlink(message->path);
-
-       if (res == 0) {
-               return MAPISTORE_SUCCESS;
-       } else {
-               DEBUG(1, ("%s, could not unlink: %s\n", __FUNCTION__, strerror(errno)));
-               return MAPISTORE_ERROR;
-       }
-}
-
-/**
-   \details Entry point for mapistore FSOCPF backend
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-int mapistore_init_backend(void)
-{
-       struct mapistore_backend        backend;
-       int                             ret;
-
-       /* Fill in our name */
-       backend.name = "fsocpf";
-       backend.description = "mapistore filesystem + ocpf backend";
-       backend.uri_namespace = "fsocpf://";
-
-       /* Fill in all the operations */
-       backend.init = fsocpf_init;
-       backend.create_context = fsocpf_create_context;
-       backend.delete_context = fsocpf_delete_context;
-       backend.create_uri = fsocpf_create_mapistore_uri;
-       backend.release_record = fsocpf_release_record;
-       backend.get_path = fsocpf_get_path;
-       backend.op_mkdir = fsocpf_op_mkdir;
-       backend.op_rmdir = fsocpf_op_rmdir;
-       backend.op_opendir = fsocpf_op_opendir;
-       backend.op_closedir = fsocpf_op_closedir;
-       backend.op_readdir_count = fsocpf_op_readdir_count;
-       backend.op_get_table_property = fsocpf_op_get_table_property;
-       backend.op_openmessage = fsocpf_op_openmessage;
-       backend.op_createmessage = fsocpf_op_createmessage;
-       backend.op_savechangesmessage = fsocpf_op_savechangesmessage;
-       backend.op_submitmessage = fsocpf_op_submitmessage;
-       backend.op_getprops = fsocpf_op_getprops;
-       backend.op_get_fid_by_name = fsocpf_op_get_fid_by_name;
-       backend.op_setprops = fsocpf_op_setprops;
-       backend.op_deletemessage = fsocpf_op_deletemessage;
-
-       /* Register ourselves with the MAPISTORE subsystem */
-       ret = mapistore_backend_register(&backend);
-       if (ret != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("Failed to register the '%s' mapistore backend!\n", backend.name));
-               return ret;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.h b/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_fsocpf.h
deleted file mode 100644 (file)
index a32e694..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-   MAPIStore FSOCPF backend
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPISTORE_FSOCPF_H
-#define        __MAPISTORE_FSOCPF_H
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include "libocpf/ocpf.h"
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include "mapiproxy/libmapistore/mapistore_defs.h"
-#include "mapiproxy/libmapistore/mapistore_backend.h"
-#include <dlinklist.h>
-#include <dirent.h>
-
-struct fsocpf_folder {
-       uint64_t                        fid;
-       DIR                             *dir;
-       char                            *path;
-};
-
-struct fsocpf_folder_list {
-       struct fsocpf_folder            *folder;
-       struct fsocpf_folder_list       *next;
-       struct fsocpf_folder_list       *prev;
-};
-
-struct fsocpf_message {
-       uint64_t                        mid;
-       uint64_t                        fid;
-       uint32_t                        ocpf_context_id;
-       char                            *path;
-};
-
-struct fsocpf_message_list {
-       struct fsocpf_message           *message;
-       struct fsocpf_message_list      *prev;
-       struct fsocpf_message_list      *next;
-};
-
-struct fsocpf_context {
-       void                            *private_data;
-       char                            *uri;
-       struct fsocpf_folder_list       *folders;
-       struct fsocpf_message_list      *messages;
-       uint64_t                        fid;
-       DIR                             *dir;
-};
-
-
-struct fsocpf_dflt_folders {
-       enum MAPISTORE_DFLT_FOLDERS     index;
-       const char                      *name;
-};
-
-const struct fsocpf_dflt_folders dflt_folders[] = {
-       { MDB_ROOT_FOLDER,              "Root" },
-       { MDB_DEFERRED_ACTIONS,         "Deferred Actions" },
-       { MDB_SPOOLER_QUEUE,            "Spooler Queue" },
-       { MDB_TODO_SEARCH,              "TODO Search" },
-       { MDB_IPM_SUBTREE,              "IPM Subtree" },
-       { MDB_INBOX,                    "Inbox" },
-       { MDB_OUTBOX,                   "Outbox" },
-       { MDB_SENT_ITEMS,               "Sent Items" },
-       { MDB_DELETED_ITEMS,            "Deleted Items" },
-       { MDB_COMMON_VIEWS,             "Common Views" },
-       { MDB_SCHEDULE,                 "Schedule" },
-       { MDB_SEARCH,                   "Search" },
-       { MDB_VIEWS,                    "Views" },
-       { MDB_SHORTCUTS,                "Shortcuts" },
-       { MDB_REMINDERS,                "Reminders" },
-       { MDB_CALENDAR,                 "Calendar" },
-       { MDB_CONTACTS,                 "Contacts" },
-       { MDB_JOURNAL,                  "Journal" },
-       { MDB_NOTES,                    "Notes" },
-       { MDB_TASKS,                    "Tasks" },
-       { MDB_DRAFTS,                   "Drafts" },
-       { MDB_TRACKED_MAIL,             "Tracked Mail" },
-       { MDB_SYNC_ISSUES,              "Synchronization Issues" },
-       { MDB_CONFLICTS,                "Conflicts" },
-       { MDB_LOCAL_FAILURES,           "Local Failures" },
-       { MDB_SERVER_FAILURES,          "Server Failures" },
-       { MDB_JUNK_EMAIL,               "Junk Email" },
-       { MDB_RSS_FEEDS,                "RSS Feeds" },
-       { MDB_CONVERSATION_ACT,         "Conversation Act" },
-       { MDB_CUSTOM,                   NULL }
-};
-
-__BEGIN_DECLS
-
-int    mapistore_init_backend(void);
-
-__END_DECLS
-
-#endif /* ! __MAPISTORE_FSOCPF_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.c b/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.c
deleted file mode 100644 (file)
index 56b732f..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-   MAPIStore database backend
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010-2011
-   Copyright (C) Brad Hards 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapistore_mstoredb.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-
-/**
-   \details Initialize mstoredb mapistore backend
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-static enum MAPISTORE_ERROR mstoredb_init(void)
-{
-       DEBUG(0, ("* [%s:%d][%s]: mstoredb backend initialized\n", __FILE__, __LINE__, __FUNCTION__));
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Generate a mapistore URI for root (system/special) folders
-
-   \param mem_ctx pointer to the memory context
-   \param index the folder index for which to create the mapistore URI
-   \param username the username for which to create the mapistore URI
-   \param mapistore_uri pointer on pointer to the string to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-static enum MAPISTORE_ERROR mstoredb_create_mapistore_uri(TALLOC_CTX *mem_ctx,
-                                                         enum MAPISTORE_DFLT_FOLDERS index,
-                                                         const char *username,
-                                                         char **mapistore_uri)
-{
-       const char      *firstorgdn;
-       int             i;
-
-       /* Sanity checks */
-       if (!username || !mapistore_uri) {
-               DEBUG(5, ("! [%s:%d][%s]: Invalid parameter\n", __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_INVALID_PARAMETER;
-       }
-
-       firstorgdn = mapistore_get_firstorgdn();
-       if (!firstorgdn) {
-               DEBUG(5, ("! [%s:%d][%s]: Invalid firstorgdn\n", __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_INVALID_PARAMETER;
-       }
-
-       for (i = 0; dflt_folders[i].name; i++) {
-               if (dflt_folders[i].index == index) {
-                       *mapistore_uri = talloc_asprintf(mem_ctx, "mstoredb://%s,CN=%s,%s", dflt_folders[i].name, username, firstorgdn);
-                       DEBUG(5, ("* [%s:%d][%s]: URI = %s\n", __FILE__, __LINE__, __FUNCTION__, *mapistore_uri));
-                       return MAPISTORE_SUCCESS;
-               }
-       }
-
-       return MAPISTORE_ERR_NOT_FOUND;
-}
-
-/**
-   \details Create a conneciton context to the mstoredb backend 
-
-   \param ctx pointer to the opaque mapistore backend context
-   \param uri pointer to the mstoredb DN to open
-   \param private_data pointer to the private backend context to return
- */
-static enum MAPISTORE_ERROR mstoredb_create_context(struct mapistore_backend_context *ctx,
-                                                   const char *uri,
-                                                   void **private_data)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mstoredb_context *mstoredb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "*", NULL };
-       int                     ret;
-
-       /* Sanity checks */
-       if (!ctx || !uri || !private_data) return MAPISTORE_ERR_INVALID_PARAMETER;
-
-       DEBUG(0, ("* [%s:%d][%s]: uri = %s\n", __FILE__, __LINE__, __FUNCTION__, uri));
-
-       mem_ctx = (TALLOC_CTX *) ctx;
-       
-       /* Step 1. Initialize mstoredb context */
-       mstoredb_ctx = talloc_zero(mem_ctx, struct mstoredb_context);
-       mstoredb_ctx->context_dn = talloc_strdup(mstoredb_ctx, uri);
-       mstoredb_ctx->mdb_ctx = ctx;
-
-       /* Step 2. Retrieve path to the mapistore database */
-       mstoredb_ctx->dbpath = mapistore_get_database_path();
-       DEBUG(5, ("* [%s:%d][%s]: database path = %s\n", __FILE__, __LINE__, __FUNCTION__, mstoredb_ctx->dbpath));
-
-       /* Step 3. Open a wrapped connection to mapistore.ldb */
-       mstoredb_ctx->ldb_ctx = mapistore_public_ldb_connect(mstoredb_ctx->mdb_ctx, mstoredb_ctx->dbpath);
-       if (!mstoredb_ctx->ldb_ctx) {
-               DEBUG(5, ("! [%s:%d][%s]: Unable to open mapistore.ldb\n", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(mstoredb_ctx);
-               return MAPISTORE_ERR_DATABASE_INIT;
-       }
-
-       /* Step 4. Check if uri (DN) is correct */
-       ret = ldb_search((struct ldb_context *)mstoredb_ctx->ldb_ctx, mstoredb_ctx, &res,
-                        ldb_get_default_basedn((struct ldb_context *)mstoredb_ctx->ldb_ctx),
-                        LDB_SCOPE_SUBTREE, recipient_attrs, "(dn=%s)", uri);
-       if (ret != LDB_SUCCESS || !res || res->count != 1) {
-               talloc_free(mstoredb_ctx);
-               return MAPISTORE_ERROR;
-       }
-
-       /* Step 5. Use the FID as the folder identifier for this context */
-       mstoredb_ctx->context_fid = ldb_msg_find_attr_as_uint64(res->msgs[0], "PidTagFolderId", 0);
-       DEBUG(5, ("* [%s:%d][%s]: Root folder identifier for this context is 0x%.16"PRIx64"\n",
-                 __FILE__, __LINE__, __FUNCTION__, mstoredb_ctx->context_fid));
-
-       mstoredb_ctx->basedn = ldb_dn_new(mstoredb_ctx, mstoredb_ctx->ldb_ctx, uri);
-       if (!mstoredb_ctx->basedn) {
-               DEBUG(5, ("! [%s:%d][%s]: Unable to create DN from URI\n",
-                         __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(mstoredb_ctx);
-               return MAPISTORE_ERROR;
-       }
-
-       *private_data = (void *)mstoredb_ctx;
-
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Delete a connection context from the mstoredb backend
-
-   \param private_data pointer to the current mstoredb context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-static enum MAPISTORE_ERROR mstoredb_delete_context(void *private_data)
-{
-       DEBUG(5, ("* [%s:%d][%s]\n", __FILE__, __LINE__, __FUNCTION__));
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Entry point for mapistore MSTOREDB backend
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_init_backend(void)
-{
-       struct mapistore_backend        backend;
-       enum MAPISTORE_ERROR            retval;
-
-       /* Fill in our name */
-       backend.name = "mstoredb";
-       backend.description = "mapistore database backend";
-       backend.uri_namespace = "mstoredb://";
-       
-       /* Fill in all the operations */
-       backend.init = mstoredb_init;
-       backend.create_context = mstoredb_create_context;
-       backend.delete_context = mstoredb_delete_context;
-       backend.create_uri = mstoredb_create_mapistore_uri;
-
-       /* Register ourselves with the MAPISTORE subsystem */
-       retval = mapistore_backend_register(&backend);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(5, ("Failed to register the '%s' mapistore backend!\n", backend.name));
-       }
-
-       return retval;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.h b/branches/plugfest/mapiproxy/libmapistore/backends/mapistore_mstoredb.h
deleted file mode 100644 (file)
index ed8a67e..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-   MAPIStore database backend
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010-2011
-   Copyright (C) Brad Hards 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPISTORE_MSTOREDB_H
-#define        __MAPISTORE_MSTOREDB_H
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include "mapiproxy/libmapistore/mapistore_defs.h"
-#include "mapiproxy/libmapistore/mapistore_backend.h"
-#include "mapiproxy/libmapistore/mapistore.h"
-
-struct mstoredb_context {
-       struct mapistore_backend_context        *mdb_ctx;
-       void                                    *ldb_ctx;
-       const char                              *dbpath;
-       char                                    *context_dn;
-       uint64_t                                context_fid;
-       struct ldb_dn                           *basedn;
-};
-
-#define        MAILBOX_BASE_URI        "CN=%s,%s"
-
-struct mstoredb_dflt_folders {
-       enum MAPISTORE_DFLT_FOLDERS     index;
-       const char                      *name;
-};
-
-const struct mstoredb_dflt_folders dflt_folders[] = {
-       { MDB_ROOT_FOLDER,              "CN=Mailbox Root,CN=Folders" },
-       { MDB_DEFERRED_ACTIONS,         "CN=Deferred Actions,CN=Mailbox Root,CN=Folders" },
-       { MDB_SPOOLER_QUEUE,            "CN=Spooler Queue,CN=Mailbox Root,CN=Folders" },
-       { MDB_TODO_SEARCH,              "CN=To-Do Search,CN=Mailbox Root,CN=Folders" },
-       { MDB_IPM_SUBTREE,              "CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_INBOX,                    "CN=Inbox,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_OUTBOX,                   "CN=Outbox,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_SENT_ITEMS,               "CN=Sent Items,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_DELETED_ITEMS,            "CN=Deleted Items,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_COMMON_VIEWS,             "CN=Common Views,CN=Mailbox Root,CN=Folders" },
-       { MDB_SCHEDULE,                 "CN=Schedule,CN=Mailbox Root,CN=Folders" },
-       { MDB_SEARCH,                   "CN=Search,CN=Mailbox Root,CN=Folders" },
-       { MDB_VIEWS,                    "CN=Views,CN=Mailbox Root,CN=Folders" },
-       { MDB_SHORTCUTS,                "CN=Shortcuts,CN=Mailbox Root,CN=Folders" },
-       { MDB_REMINDERS,                "CN=Reminders,CN=Mailbox Root,CN=Folders" },
-       { MDB_CALENDAR,                 "CN=Calendar,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_CONTACTS,                 "CN=Contacts,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_JOURNAL,                  "CN=Journal,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_NOTES,                    "CN=Notes,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_TASKS,                    "CN=Tasks,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_DRAFTS,                   "CN=Drafts,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_TRACKED_MAIL,             "CN=Tracked Mail,CN=Mailbox Root,CN=Folders" },
-       { MDB_SYNC_ISSUES,              "CN=Sync Issues,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_CONFLICTS,                "CN=Conflicts,CN=Sync Issues,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_LOCAL_FAILURES,           "CN=Local Failures,CN=Sync Issues,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_SERVER_FAILURES,          "CN=Server Failures,CN=Sync Issues,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_JUNK_EMAIL,               "CN=Junk Emails,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_RSS_FEEDS,                "CN=RSS Feeds,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_CONVERSATION_ACT,         "CN=Conversation Actions,CN=IPM Subtree,CN=Mailbox Root,CN=Folders" },
-       { MDB_CUSTOM,                   NULL }
-};
-
-__BEGIN_DECLS
-
-/* CN=Inbox,CN=IPM SUbtree,CN=Mailbox Root,CN=Folders,CN=jkerihuel,CN=First Adminsitrative Group, ... */ 
-
-enum MAPISTORE_ERROR mapistore_init_backend(void);
-
-__END_DECLS
-
-#endif /* ! __MAPISTORE_MSTOREDB_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/database/mapistoredb.c b/branches/plugfest/mapiproxy/libmapistore/database/mapistoredb.c
deleted file mode 100644 (file)
index 13e20c9..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include "mapiproxy/libmapistore/mapistore.h"
-#include "mapiproxy/libmapistore/mapistore_private.h"
-
-/**
-   \file mapistoredb.c
-
-   \brief MAPIStore database provisioning interface
- */
-
-int lpcfg_server_role(struct loadparm_context *lp_ctx);
-
-/**
-   \details Initialize the mapistore database context
-
-   \param mem_ctx pointer to the memory context
-   \param path string pointer to the mapistore database location
-
-   If path if NULL use the default mapistore database path instead.
-
-   \return Allocated mapistore database context on success, otherwise NULL
- */
-struct mapistoredb_context *mapistoredb_init(TALLOC_CTX *mem_ctx,
-                                            const char *path)
-{
-       struct mapistoredb_context      *mdb_ctx;
-       char                            **domaindn;
-       char                            *full_path;
-       struct stat                     sb;
-       int                             i;
-       int                             ret;
-
-       /* Sanity checks */
-       if (path == NULL) {
-               path = MAPISTORE_DBPATH;
-       }
-
-       /* Ensure the path is valid */
-       if (stat(path, &sb) == -1) {
-               perror(path);
-               return NULL;
-       }
-
-       /* Step 1. Initialize mapistoredb context */
-       mdb_ctx = talloc_zero(mem_ctx, struct mapistoredb_context);
-       mdb_ctx->param = talloc_zero(mem_ctx, struct mapistoredb_conf);
-       if (!mdb_ctx->param) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to allocate memory for mdb_ctx->param", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(mdb_ctx);
-               return NULL;
-       }
-
-       /* Step 2. Initialize Samba loadparm context and load default values */
-       mdb_ctx->lp_ctx = loadparm_init(mdb_ctx);
-       lpcfg_load_default(mdb_ctx->lp_ctx);
-
-       /* Step 3. Initialize tevent structure */
-       mdb_ctx->ev = tevent_context_init(mdb_ctx);
-
-       /* Step 4. Open a wrapped connection on the mapistore database */
-       full_path = talloc_asprintf(mem_ctx, "%s/mapistore.ldb", path);
-       mdb_ctx->ldb_ctx = mapistore_ldb_wrap_connect(mdb_ctx, mdb_ctx->ev, full_path, 0);
-       talloc_free(full_path);
-       if (!mdb_ctx->ldb_ctx) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to open wrapped connection over mapistore.ldb\n", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(mdb_ctx);
-               return NULL;
-       }
-
-       /* Step 5. Retrieve default values from smb.conf */
-       mdb_ctx->param->netbiosname = strlower_talloc(mdb_ctx->param, lpcfg_netbios_name(mdb_ctx->lp_ctx));
-       mdb_ctx->param->dnsdomain = strlower_talloc(mdb_ctx->param, lpcfg_realm(mdb_ctx->lp_ctx));
-       mdb_ctx->param->domain = strlower_talloc(mdb_ctx->param, lpcfg_sam_name(mdb_ctx->lp_ctx));
-
-       switch (lpcfg_server_role(mdb_ctx->lp_ctx)) {
-       case ROLE_DOMAIN_CONTROLLER:
-               domaindn = str_list_make(mdb_ctx->param, mdb_ctx->param->dnsdomain, ".");
-               strlower_m(domaindn[0]);
-               mdb_ctx->param->domaindn = talloc_asprintf(mdb_ctx->param, "DC_%s", domaindn[0]);
-               for (i = 1; domaindn[i]; i++) {
-                       strlower_m(domaindn[i]);
-                       mdb_ctx->param->domaindn = talloc_asprintf_append_buffer(mdb_ctx->param->domaindn, ",DC=%s", domaindn[i]);
-               }
-               talloc_free(domaindn);
-               break;
-       default:
-               mdb_ctx->param->domaindn = talloc_asprintf(mdb_ctx->param, "CN=%s", mdb_ctx->param->domain);
-               break;
-       }
-
-       mdb_ctx->param->serverdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_SERVERDN,
-                                                  mdb_ctx->param->netbiosname,
-                                                  mdb_ctx->param->domaindn);
-       mdb_ctx->param->firstorg = talloc_strdup(mdb_ctx->param, DFLT_MDB_FIRSTORG);
-       mdb_ctx->param->firstou = talloc_strdup(mdb_ctx->param, DFLT_MDB_FIRSTOU);
-       mdb_ctx->param->firstorgdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_FIRSTORGDN,
-                                                    mdb_ctx->param->firstou,
-                                                    mdb_ctx->param->firstorg,
-                                                    mdb_ctx->param->serverdn);
-       mdb_ctx->param->db_path = talloc_asprintf(mdb_ctx->param, "%s/mapistore.ldb", path);
-       mdb_ctx->param->mstore_path = talloc_asprintf(mdb_ctx->param, "%s/mapistore", path);
-
-       /* Step 6. Initialize mapistore */
-       if (stat(mdb_ctx->param->mstore_path, &sb) == -1) {
-               ret = mkdir(mdb_ctx->param->mstore_path, 0700);
-               if (ret == -1) {
-                       perror(mdb_ctx->param->mstore_path);
-                       talloc_free(mdb_ctx);
-                       return NULL;
-               }
-       }
-
-       mapistore_set_database_path(mdb_ctx->param->db_path);
-       mapistore_set_mapping_path(mdb_ctx->param->mstore_path);
-       mdb_ctx->mstore_ctx = mapistore_init(mdb_ctx, NULL);
-       if (!mdb_ctx->mstore_ctx) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to initialize mapistore context\n", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(mdb_ctx);
-               return NULL;
-       }
-
-       return mdb_ctx;
-}
-
-
-/**
-   \details Free a mapistore database context
-
-   \param mdb_ctx the context to free (from mapistoredb_init())
- */
-void mapistoredb_release(struct mapistoredb_context *mdb_ctx)
-{
-       if (!mdb_ctx) {
-               DEBUG(5, ("! [%s:%d][%s]: Invalid mapistore database context\n", __FILE__, __LINE__, __FUNCTION__));
-               return;
-       }
-
-       talloc_free(mdb_ctx->lp_ctx);
-       talloc_free(mdb_ctx->param);
-       talloc_free(mdb_ctx);
-}
-
-
-/**
-   \details Get a mapistore URI for a system/special folder from
-   backend
-
-   \param mdb_ctx pointer to the mapistore database context
-   \param username the username for which we want to retrieve the uri
-   \param uri the uri namespace to query
-   \param namespace_uri the namespace uri to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistoredb_get_mapistore_uri(struct mapistoredb_context *mdb_ctx,
-                                                  enum MAPISTORE_DFLT_FOLDERS index,
-                                                  const char *namespace_uri,
-                                                  const char *username,
-                                                  char **uri)
-{
-       enum MAPISTORE_ERROR    retval;
-       char                    *_uri;
-
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->mstore_ctx) {
-               DEBUG(5, ("! [%s:%d][%s]: Invalid mapistore database context\n", __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_INVALID_CONTEXT;
-       }
-       if (!namespace_uri || !username) {
-               DEBUG(5, ("! [%s:%d][%s]: Invalid parameter\n", __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_INVALID_PARAMETER;
-       }
-
-       retval = mapistore_create_uri(mdb_ctx->mstore_ctx, index, namespace_uri, username, &_uri);
-       if (retval == MAPISTORE_SUCCESS) {
-               *uri = _uri;
-       }
-
-       return retval;
-}
-
-
-/** TODO: this is a copy of code in mapistore_mstoredb.c */
-static bool write_ldif_string_to_store(struct ldb_context *ldb_ctx, const char *ldif_string)
-{
-       struct ldb_ldif *ldif;
-       int             ret;
-       
-       while ((ldif = ldb_ldif_read_string(ldb_ctx, (const char **)&ldif_string))) {
-               ret = ldb_msg_normalize(ldb_ctx, ldif, ldif->msg, &ldif->msg);
-               if (ret != LDB_SUCCESS) {
-                       ldb_ldif_read_free(ldb_ctx, ldif);
-                       return false;
-               }
-               ret = ldb_add(ldb_ctx, ldif->msg);
-               if (ret != LDB_SUCCESS) {
-                       ldb_ldif_read_free(ldb_ctx, ldif);
-                       return false;
-               }
-               ldb_ldif_read_free(ldb_ctx, ldif);
-       }
-       
-       return true;
-}
-
-
-/**
-   \details Default provisioning for mapistore.ldb database
-
-   \param mdb_ctx pointer to the mapistore database context
-   
-   \return MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistoredb_provision(struct mapistoredb_context *mdb_ctx)
-{
-       char    *ldif_str;
-
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->ldb_ctx) return MAPISTORE_ERR_NOT_INITIALIZED;
-
-       /* Step 1. Add database schema */
-       if (write_ldif_string_to_store(mdb_ctx->ldb_ctx, MDB_INIT_LDIF_TMPL) == false) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to add database schema\n", __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_DATABASE_OPS;
-       }
-
-       /* Step 2. Add RootDSE schema */
-       ldif_str = talloc_asprintf(mdb_ctx, MDB_ROOTDSE_LDIF_TMPL,
-                                  mdb_ctx->param->firstou,
-                                  mdb_ctx->param->firstorg,
-                                  mdb_ctx->param->serverdn,
-                                  mdb_ctx->param->serverdn);
-       if (write_ldif_string_to_store(mdb_ctx->ldb_ctx, ldif_str) == false) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to add RootDSE schema\n", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(ldif_str);
-               return MAPISTORE_ERR_DATABASE_OPS;
-       }
-       talloc_free(ldif_str);
-
-       /* Step 3. Provision Server object responsible for maintaining
-        * the Replica identifier */
-       ldif_str = talloc_asprintf(mdb_ctx, MDB_SERVER_LDIF_TMPL,
-                                  mdb_ctx->param->serverdn,
-                                  mdb_ctx->param->netbiosname,
-                                  mdb_ctx->param->firstorg,
-                                  mdb_ctx->param->serverdn,
-                                  mdb_ctx->param->firstorg,
-                                  mdb_ctx->param->firstou,
-                                  mdb_ctx->param->firstorg,
-                                  mdb_ctx->param->serverdn,
-                                  mdb_ctx->param->firstou);
-       if (write_ldif_string_to_store(mdb_ctx->ldb_ctx, ldif_str) == false) {
-               DEBUG(5, ("! [%s:%d][%s]: Failed to provision server object\n", __FILE__, __LINE__, __FUNCTION__));
-               talloc_free(ldif_str);
-               return MAPISTORE_ERR_DATABASE_OPS;
-       }
-       talloc_free(ldif_str);
-
-       return MAPISTORE_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/database/mapistoredb_conf.c b/branches/plugfest/mapiproxy/libmapistore/database/mapistoredb_conf.c
deleted file mode 100644 (file)
index 0824c19..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include "mapiproxy/libmapistore/mapistore.h"
-#include "mapiproxy/libmapistore/mapistore_private.h"
-
-/**
-   \details Get accessor for netbiosname
-
-   \param mdb_ctx pointer to the mapistore database context
-
-   \return pointer to netbiosname string on success, otherwise NULL
- */
-const char *mapistoredb_get_netbiosname(struct mapistoredb_context *mdb_ctx)
-{
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param || !mdb_ctx->param->netbiosname) {
-               return NULL;
-       }
-
-       return (const char *) mdb_ctx->param->netbiosname;
-}
-
-/**
-   \details Set accessor for netbiosname
-
-   \param mdb_ctx pointer to the mapistore database context
-   \param netbiosname the netbios name string to set
-
-   \return MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistoredb_set_netbiosname(struct mapistoredb_context *mdb_ctx,
-                                                const char *netbiosname)
-{
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param) return MAPISTORE_ERR_NOT_INITIALIZED;
-       if (!netbiosname) return MAPISTORE_ERR_INVALID_PARAMETER;
-
-       if (mdb_ctx->param->netbiosname) {
-               talloc_free(mdb_ctx->param->netbiosname);
-       }
-
-       mdb_ctx->param->netbiosname = talloc_strdup(mdb_ctx->param, netbiosname);
-
-       /* Update serverdn */
-       if (mdb_ctx->param->serverdn) {
-               talloc_free(mdb_ctx->param->serverdn);
-       }
-       mdb_ctx->param->serverdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_SERVERDN,
-                                                  mdb_ctx->param->netbiosname,
-                                                  mdb_ctx->param->domaindn);
-
-       /* Update firstorgdn */
-       if (mdb_ctx->param->firstorgdn) {
-               talloc_free(mdb_ctx->param->firstorgdn);
-       }
-       mdb_ctx->param->firstorgdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_FIRSTORGDN,
-                                                    mdb_ctx->param->firstou, 
-                                                    mdb_ctx->param->firstorg,
-                                                    mdb_ctx->param->serverdn);
-
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Get accessor for firstorg
-
-   \param mdb_ctx pointer to the mapistore database context
-
-   \return pointer to firstorg string on success, otherwise NULL
- */
-const char *mapistoredb_get_firstorg(struct mapistoredb_context *mdb_ctx)
-{
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param || !mdb_ctx->param->firstorg) {
-               return NULL;
-       }
-
-       return (const char *) mdb_ctx->param->firstorg;
-}
-
-/**
-   \details Accessor for first organization
-
-   \param mdb_ctx pointer to the mapistore database context
-   \param firstorg the first organization string to set
-
-   \return MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR
-*/
-enum MAPISTORE_ERROR mapistoredb_set_firstorg(struct mapistoredb_context *mdb_ctx,
-                                             const char *firstorg)
-{
-       enum MAPISTORE_ERROR    retval;
-
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param) return MAPISTORE_ERR_NOT_INITIALIZED;
-       if (!firstorg) return MAPISTORE_ERR_INVALID_PARAMETER;
-
-       if (mdb_ctx->param->firstorg) {
-               talloc_free(mdb_ctx->param->firstorg);
-       }
-
-       mdb_ctx->param->firstorg = talloc_strdup(mdb_ctx->param, firstorg);
-
-       /* Update firstorgdn */
-       if (mdb_ctx->param->firstorgdn) {
-               talloc_free(mdb_ctx->param->firstorgdn);
-       }
-       mdb_ctx->param->firstorgdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_FIRSTORGDN,
-                                                    mdb_ctx->param->firstou, 
-                                                    mdb_ctx->param->firstorg,
-                                                    mdb_ctx->param->serverdn);
-
-       retval = mapistore_set_firstorgdn(mdb_ctx->param->firstou, 
-                                         mdb_ctx->param->firstorg, 
-                                         mdb_ctx->param->serverdn);
-
-       return retval;
-}
-
-/**
-   \details Get accessor for firstou
-
-   \param mdb_ctx pointer to the mapistore database context
-
-   \return pointer to firstou string on success, otherwise NULL
- */
-const char *mapistoredb_get_firstou(struct mapistoredb_context *mdb_ctx)
-{
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param || !mdb_ctx->param->firstou) {
-               return NULL;
-       }
-
-       return (const char *) mdb_ctx->param->firstou;
-}
-
-/**
-   \details Accessor for first organization unit
-
-   \param mdb_ctx pointer to the mapistore database context
-   \param firstou the first organization unit string to set
-
-   \return MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistoredb_set_firstou(struct mapistoredb_context *mdb_ctx,
-                                            const char *firstou)
-{
-       enum MAPISTORE_ERROR    retval;
-
-       /* Sanity checks */
-       if (!mdb_ctx || !mdb_ctx->param) return MAPISTORE_ERR_NOT_INITIALIZED;
-       if (!firstou) return MAPISTORE_ERR_INVALID_PARAMETER;
-
-       if (mdb_ctx->param->firstou) {
-               talloc_free(mdb_ctx->param->firstou);
-       }
-
-       mdb_ctx->param->firstou = talloc_strdup(mdb_ctx->param, firstou);
-
-       /* Update firstorgdn */
-       if (mdb_ctx->param->firstorgdn) {
-               talloc_free(mdb_ctx->param->firstorgdn);
-       }
-       mdb_ctx->param->firstorgdn = talloc_asprintf(mdb_ctx->param, TMPL_MDB_FIRSTORGDN,
-                                                    mdb_ctx->param->firstou, 
-                                                    mdb_ctx->param->firstorg,
-                                                    mdb_ctx->param->serverdn);
-
-       retval = mapistore_set_firstorgdn(mdb_ctx->param->firstou, 
-                                         mdb_ctx->param->firstorg, 
-                                         mdb_ctx->param->serverdn);
-
-       return retval;
-}
-
-/**
-   \details Helper function, dumps current mapistore_context
-   configuration parameters
-
-   \param mdb_ctx the mapistore database context
-
-   \sa mapistoredb_init
- */
-void mapistoredb_dump_conf(struct mapistoredb_context *mdb_ctx)
-{
-       DEBUG(0, ("Database Path:                %s\n", mdb_ctx->param->db_path));
-       DEBUG(0, ("Netbios Name:                 %s\n", mdb_ctx->param->netbiosname));
-       DEBUG(0, ("DNS Domain:                   %s\n", mdb_ctx->param->dnsdomain));
-       DEBUG(0, ("Domain:                       %s\n", mdb_ctx->param->domain));
-       DEBUG(0, ("Domain DN:                    %s\n", mdb_ctx->param->domaindn));
-       DEBUG(0, ("Server DN:                    %s\n", mdb_ctx->param->serverdn));
-       DEBUG(0, ("First Organization:           %s\n", mdb_ctx->param->firstorg));
-       DEBUG(0, ("First Organization Unit:      %s\n", mdb_ctx->param->firstou));
-       DEBUG(0, ("First Organization DN:        %s\n", mdb_ctx->param->firstorgdn));
-}
-
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore.h b/branches/plugfest/mapiproxy/libmapistore/mapistore.h
deleted file mode 100644 (file)
index b52665f..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPISTORE_H
-#define        __MAPISTORE_H
-
-#ifndef        _GNU_SOURCE
-#define        _GNU_SOURCE
-#endif
-
-#ifndef        _PUBLIC_
-#define        _PUBLIC_
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdbool.h>
-
-#include <tdb.h>
-#include <ldb.h>
-#include <talloc.h>
-#include <util/debug.h>
-
-#include "libmapi/libmapi.h"
-
-#include "mapistore_defs.h"
-
-typedef        int (*init_backend_fn) (void);
-
-#define        MAPISTORE_INIT_MODULE   "mapistore_init_backend"
-
-/* Forward declaration */
-struct mapistoredb_context;
-
-struct indexing_context_list;
-
-struct backend_context {
-       const struct mapistore_backend  *backend;
-       void                            *private_data;
-       struct indexing_context_list    *indexing;
-       uint32_t                        context_id;
-       uint32_t                        ref_count;
-       char                            *uri;
-};
-
-struct backend_context_list {
-       struct backend_context          *ctx;
-       struct backend_context_list     *prev;
-       struct backend_context_list     *next;
-};
-
-struct processing_context;
-
-struct mapistore_context {
-       struct processing_context       *processing_ctx;
-       struct backend_context_list     *context_list;
-       struct indexing_context_list    *indexing_list;
-       void                            *nprops_ctx;
-};
-
-struct indexing_folders_list {
-       uint64_t                        *folderID;
-       uint32_t                        count;
-};
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-/* definitions from mapistore_interface.c */
-struct mapistore_context *mapistore_init(TALLOC_CTX *, const char *);
-enum MAPISTORE_ERROR mapistore_release(struct mapistore_context *);
-enum MAPISTORE_ERROR mapistore_add_context(struct mapistore_context *, const char *, uint32_t *);
-enum MAPISTORE_ERROR mapistore_add_context_ref_count(struct mapistore_context *, uint32_t);
-enum MAPISTORE_ERROR mapistore_del_context(struct mapistore_context *, uint32_t);
-enum MAPISTORE_ERROR mapistore_create_uri(struct mapistore_context *, uint32_t, const char *, const char *, char **);
-enum MAPISTORE_ERROR mapistore_release_record(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_search_context_by_uri(struct mapistore_context *, const char *, uint32_t *);
-const char *mapistore_errstr(enum MAPISTORE_ERROR);
-enum MAPISTORE_ERROR mapistore_add_context_indexing(struct mapistore_context *, const char *, uint32_t);
-enum MAPISTORE_ERROR mapistore_opendir(struct mapistore_context *, uint32_t, uint64_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_closedir(struct mapistore_context *mstore_ctx, uint32_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_mkdir(struct mapistore_context *, uint32_t, uint64_t, uint64_t, struct SRow *);
-enum MAPISTORE_ERROR mapistore_rmdir(struct mapistore_context *, uint32_t, uint64_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_get_folder_count(struct mapistore_context *, uint32_t, uint64_t, uint32_t *);
-enum MAPISTORE_ERROR mapistore_get_message_count(struct mapistore_context *, uint32_t, uint64_t, uint32_t *);
-enum MAPISTORE_ERROR mapistore_get_table_property(struct mapistore_context *, uint32_t, uint8_t, uint64_t, 
-                                                 enum MAPITAGS, uint32_t, void **);
-enum MAPISTORE_ERROR mapistore_openmessage(struct mapistore_context *, uint32_t, uint64_t, uint64_t, struct mapistore_message *);
-enum MAPISTORE_ERROR mapistore_createmessage(struct mapistore_context *, uint32_t, uint64_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_savechangesmessage(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_submitmessage(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_getprops(struct mapistore_context *, uint32_t, uint64_t, uint8_t, struct SPropTagArray *, struct SRow *);
-enum MAPISTORE_ERROR mapistore_get_fid_by_name(struct mapistore_context *, uint32_t, uint64_t, const char *, uint64_t*);
-enum MAPISTORE_ERROR mapistore_setprops(struct mapistore_context *, uint32_t, uint64_t, uint8_t, struct SRow *);
-enum MAPISTORE_ERROR mapistore_get_child_fids(struct mapistore_context *, uint32_t, uint64_t, uint64_t **, uint32_t *);
-enum MAPISTORE_ERROR mapistore_deletemessage(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-
-/* definitions from mapistore_processing.c */
-enum MAPISTORE_ERROR   mapistore_set_mapping_path(const char *);
-enum MAPISTORE_ERROR   mapistore_set_database_path(const char *);
-const char             *mapistore_get_database_path(void);
-enum MAPISTORE_ERROR   mapistore_set_firstorgdn(const char *, const char *, const char *);
-const char             *mapistore_get_firstorgdn(void);
-
-/* definitions from mapistore_backend.c */
-const char     *mapistore_backend_get_installdir(void);
-init_backend_fn        *mapistore_backend_load(TALLOC_CTX *, const char *);
-struct backend_context *mapistore_backend_lookup(struct backend_context_list *, uint32_t);
-struct backend_context *mapistore_backend_lookup_by_uri(struct backend_context_list *, const char *);
-bool           mapistore_backend_run_init(init_backend_fn *);
-
-/* definitions from mapistoredb.c */
-struct mapistoredb_context *mapistoredb_init(TALLOC_CTX *, const char *);
-void mapistoredb_release(struct mapistoredb_context *);
-enum MAPISTORE_ERROR mapistoredb_provision(struct mapistoredb_context *);
-enum MAPISTORE_ERROR mapistoredb_get_mapistore_uri(struct mapistoredb_context *, enum MAPISTORE_DFLT_FOLDERS, const char *, const char *, char **);
-
-/* definitions from mapistoredb_conf.c */
-void                           mapistoredb_dump_conf(struct mapistoredb_context *);
-enum MAPISTORE_ERROR           mapistoredb_set_netbiosname(struct mapistoredb_context *, const char *);
-enum MAPISTORE_ERROR           mapistoredb_set_firstorg(struct mapistoredb_context *, const char *);
-enum MAPISTORE_ERROR           mapistoredb_set_firstou(struct mapistoredb_context *, const char *);
-const char*                    mapistoredb_get_netbiosname(struct mapistoredb_context *);
-const char*                    mapistoredb_get_firstorg(struct mapistoredb_context *);
-const char*                    mapistoredb_get_firstou(struct mapistoredb_context *);
-
-/* definitions from mapistore_indexing.c */
-enum MAPISTORE_ERROR mapistore_indexing_add(struct mapistore_context *, const char *);
-enum MAPISTORE_ERROR mapistore_indexing_del(struct mapistore_context *, const char *);
-enum MAPISTORE_ERROR mapistore_indexing_get_folder_list(struct mapistore_context *, const char *, uint64_t, struct indexing_folders_list **);
-enum MAPISTORE_ERROR mapistore_indexing_record_add_fid(struct mapistore_context *, uint32_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_indexing_record_del_fid(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_indexing_record_add_mid(struct mapistore_context *, uint32_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_indexing_record_del_mid(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-
-/* definitions from mapistore_namedprops.c */
-int mapistore_namedprops_get_mapped_id(void *ldb_ctx, struct MAPINAMEID, uint16_t *);
-
-__END_DECLS
-
-#endif /* ! __MAPISTORE_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_backend.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_backend.c
deleted file mode 100644 (file)
index 5ec56d7..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Note: init and load functions have been copied from
-   samba4/source4/param/util.c initially wrote by Jelmer.
-
-   Copyright (C) Jelmer Vernooij 2005-2007
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <sys/types.h>
-#include <string.h>
-#include <dlfcn.h>
-#include <dirent.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include "mapistore_backend.h"
-#include <dlinklist.h>
-
-#include <util.h>
-#include <util/debug.h>
-
-/**
-   \file mapistore_backend.c
-
-   \brief mapistore backends management API
- */
-
-
-static struct mstore_backend {
-       struct mapistore_backend        *backend;
-} *backends = NULL;
-
-int                                    num_backends;
-
-
-/**
-   \details Register mapistore backends
-
-   \param _backend pointer to the mapistore backend to register
-
-   \return MAPISTORE_SUCCESS on success
- */
-_PUBLIC_ extern enum MAPISTORE_ERROR mapistore_backend_register(const struct mapistore_backend *backend)
-{
-       int                             i;
-
-       /* Sanity checks */
-       if (!backend) {
-               return MAPISTORE_ERR_INVALID_PARAMETER;
-       }
-
-       for (i = 0; i < num_backends; i++) {
-               if (backends[i].backend && backend && 
-                   backend->name && backends[i].backend->name &&
-                   !strcmp(backends[i].backend->name, backend->name)) {
-                       DEBUG(3, ("MAPISTORE backend '%s' already registered\n", backend->name));
-                       return MAPISTORE_SUCCESS;
-               }
-       }
-
-       backends = realloc_p(backends, struct mstore_backend, num_backends + 1);
-       if (!backends) {
-               smb_panic("out of memory in mapistore_backend_register");
-       }
-
-       backends[num_backends].backend = (struct mapistore_backend *)smb_xmemdup(backend, sizeof (*backend));
-       backends[num_backends].backend->name = smb_xstrdup(backend->name);
-
-       num_backends++;
-
-       DEBUG(3, ("MAPISTORE backend '%s' registered\n", backend->name));
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Return the full path where mapistore backends are
-   installed.
-
-   \return Pointer to the full path where backends are installed.
- */
-_PUBLIC_ const char *mapistore_backend_get_installdir(void)
-{
-       return MAPISTORE_BACKEND_INSTALLDIR;
-}
-
-
-/**
-   \details Obtain the backend init function from a shared library
-   file
-
-   \param path full path to the backend shared library
-
-   \return Pointer to the initialization function on success,
-   otherwise NULL.
- */
-static init_backend_fn load_backend(const char *path)
-{
-       void    *handle;
-       void    *init_fn;
-
-       handle = dlopen(path, RTLD_NOW);
-       if (handle == NULL) {
-               DEBUG(0, ("Unable to open %s: %s\n", path, dlerror()));
-               return NULL;
-       }
-
-       init_fn = dlsym(handle, MAPISTORE_INIT_MODULE);
-
-       if (init_fn == NULL) {
-               DEBUG(0, ("Unable to find %s() in %s: %s\n",
-                         MAPISTORE_INIT_MODULE, path, dlerror()));
-               DEBUG(1, ("Loading mapistore backend '%s' failed\n", path));
-               dlclose(handle);
-               return NULL;
-       }
-
-       return (init_backend_fn) init_fn;
-}
-
-
-/**
-   \details Load backends from specified directory
-
-   \param mem_ctx pointer to the memory context
-   \param path name of the backend's shared library folder
-
-   \return allocated array of functions pointers to initialization
-   functions on success, otherwise NULL.
- */
-static init_backend_fn *load_backends(TALLOC_CTX *mem_ctx, const char *path)
-{
-       DIR             *dir;
-       struct dirent   *entry;
-       char            *filename;
-       int             success = 0;
-       init_backend_fn *ret;
-
-       ret = talloc_array(mem_ctx, init_backend_fn, 2);
-       ret[0] = NULL;
-
-       dir = opendir(path);
-       if (dir == NULL) {
-               talloc_free(ret);
-               return NULL;
-       }
-
-       while ((entry = readdir(dir))) {
-               if (ISDOT(entry->d_name) || ISDOTDOT(entry->d_name)) {
-                       continue;
-               }
-               
-               filename = talloc_asprintf(mem_ctx, "%s/%s", path, entry->d_name);
-               ret[success] = load_backend(filename);
-               if (ret[success]) {
-                       ret = talloc_realloc(mem_ctx, ret, init_backend_fn, success + 2);
-                       success++;
-                       ret[success] = NULL;
-               }
-
-               talloc_free(filename);
-       }
-
-       closedir(dir);
-
-       return ret;
-}
-
-
-/**
-   \details Load the initialization functions from backends DSO
-
-   \param mem_ctx pointer to the memory context
-   \param path pointer to the backend's DSO folder
-
-   \return allocated array of functions pointers to initialization
-   functions on success, otherwise NULL.
- */
-_PUBLIC_ init_backend_fn *mapistore_backend_load(TALLOC_CTX *mem_ctx, const char *path)
-{
-       if (!path) {
-               path = mapistore_backend_get_installdir();
-       }
-
-       return load_backends(mem_ctx, path);
-}
-
-
-/**
-   \details Run specified initialization functions.
-
-   \param fns pointer to an array of mapistore backends initialization
-   functions
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapistore_backend_run_init(init_backend_fn *fns)
-{
-       int                             i;
-       bool                            ret = true;
-
-       if (fns == NULL) {
-               return true;
-       }
-
-       for (i = 0; fns[i]; i++) {
-               ret &= (bool)fns[i]();
-       }
-
-       return ret;
-}
-
-
-/**
-   \details Initialize mapistore backends
-
-   \param mem_ctx pointer to the memory context
-   \param path pointer to folder where mapistore backends are
-   installed
-
-   \return MAPISTORE_SUCCESS on success, otherwise
-   MAPISTORE_ERR_BACKEND_INIT
- */
-enum MAPISTORE_ERROR mapistore_backend_init(TALLOC_CTX *mem_ctx, const char *path)
-{
-       init_backend_fn                 *ret;
-       bool                            status;
-       enum MAPISTORE_ERROR            retval;
-       int                             i;
-
-       ret = mapistore_backend_load(mem_ctx, path);
-       status = mapistore_backend_run_init(ret);
-       talloc_free(ret);
-
-       for (i = 0; i < num_backends; i++) {
-               if (backends[i].backend) {
-                       DEBUG(3, ("MAPISTORE backend '%s' loaded\n", backends[i].backend->name));
-                       retval = backends[i].backend->init();
-                       if (retval != MAPISTORE_SUCCESS) {
-                                return retval;
-                        }
-                }
-        }
-
-        return (status != true) ? MAPISTORE_SUCCESS : MAPISTORE_ERR_BACKEND_INIT;
- }
-
- static enum MAPISTORE_ERROR delete_context(void *data)
- {
-        struct backend_context         *context = (struct backend_context *) data;
-
-        context->backend->delete_context(context->private_data);
-
-        return MAPISTORE_SUCCESS;
- }
-
- /**
-    \details Create backend context
-
-    \param mem_ctx pointer to the memory context
-    \param uri_namespace the backend namespace
-    \param uri the backend parameters which can be passes inline
-
-    \return a valid backend_context pointer on success, otherwise NULL
-  */
- struct backend_context *mapistore_backend_create_context(TALLOC_CTX *mem_ctx, const char *uri_namespace, 
-                                                         const char *uri)
- {
-        struct backend_context         *context;
-        int                            retval;
-        bool                           found = false;
-        void                           *private_data = NULL;
-        int                            i;
-
-        DEBUG(0, ("namespace is %s and backend_uri is '%s'\n", uri_namespace, uri));
-        for (i = 0; i < num_backends; i++) {
-                if (backends[i].backend->uri_namespace && 
-                    !strcmp(uri_namespace, backends[i].backend->uri_namespace)) {
-                        found = true;
-                        retval = backends[i].backend->create_context(mem_ctx, uri, &private_data);
-                        if (retval != MAPISTORE_SUCCESS) {
-                                return NULL;
-                        }
-
-                        break;
-                }
-        }
-        if (found == false) {
-                DEBUG(0, ("MAPISTORE: no backend with namespace '%s' is available\n", uri_namespace));
-                return NULL;
-        }
-
-        context = talloc_zero(mem_ctx, struct backend_context);
-        talloc_set_destructor((void *)context, (int (*)(void *))delete_context);
-        context->backend = backends[i].backend;
-        context->private_data = private_data;
-        context->ref_count = 0;
-        context->uri = talloc_strdup(context, uri);
-        talloc_steal(context, private_data);
-
-        return context;
- }
-
- /**
-    \details Increase the ref count associated to a given backend
-
-    \param bctx pointer to the backend context
-
-    \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
-  */
- _PUBLIC_ enum MAPISTORE_ERROR mapistore_backend_add_ref_count(struct backend_context *bctx)
- {
-        if (!bctx) {
-                return MAPISTORE_ERROR;
-        }
-
-        bctx->ref_count += 1;
-
-        return MAPISTORE_SUCCESS;
- }
-
-
- /**
-    \details Delete a context from the specified backend
-
-    \param bctx pointer to the backend context
-
-    \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
-  */
- _PUBLIC_ enum MAPISTORE_ERROR mapistore_backend_delete_context(struct backend_context *bctx)
- {
-        enum MAPISTORE_ERROR   ret;
-
-        if (!bctx->backend->delete_context) return MAPISTORE_ERROR;
-
-        if (bctx->indexing) {
-                mapistore_indexing_del_ref_count(bctx->indexing);
-        }
-
-        if (bctx->ref_count) {
-                bctx->ref_count -= 1;
-                return MAPISTORE_ERR_REF_COUNT;
-        }
-
-        ret = bctx->backend->delete_context(bctx->private_data);
-        talloc_set_destructor((void *)bctx, NULL);
-
-        return ret;
- }
-
-
- _PUBLIC_ enum MAPISTORE_ERROR mapistore_backend_release_record(struct backend_context *bctx, uint64_t fmid, uint8_t type)
- {
-        return bctx->backend->release_record(bctx->private_data, fmid, type);
- }
-
-
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_backend_create_uri(TALLOC_CTX *mem_ctx, 
-                                                          enum MAPISTORE_DFLT_FOLDERS index, 
-                                                          const char *uri_namespace,
-                                                          const char *username, 
-                                                          char **uri)
-{
-       enum MAPISTORE_ERROR    retval;
-       char                    *_uri = NULL;
-       int                     i;
-
-       for (i = 0; i < num_backends; i++) {
-               if (backends[i].backend->uri_namespace &&
-                   !strcmp(uri_namespace, backends[i].backend->uri_namespace)) {
-                       retval = backends[i].backend->create_uri(mem_ctx, index, username, &_uri);
-                       if (retval == MAPISTORE_SUCCESS) {
-                               *uri = _uri;
-                               return retval;
-                       }
-               }
-       }
-
-       return MAPISTORE_ERR_NOT_FOUND;
-}
-
- /**
-    \details find the context matching given context identifier
-
-    \param backend_list_ctx pointer to the backend context list
-    \param context_id the context identifier to search
-
-    \return Pointer to the mapistore_backend context on success, otherwise NULL
-  */
- _PUBLIC_ struct backend_context *mapistore_backend_lookup(struct backend_context_list *backend_list_ctx,
-                                                          uint32_t context_id)
- {
-        struct backend_context_list    *el;
-
-        /* Sanity checks */
-        if (!backend_list_ctx) return NULL;
-
-        for (el = backend_list_ctx; el; el = el->next) {
-                if (el->ctx && el->ctx->context_id == context_id) {
-                        return el->ctx;
-                }
-        }
-
-        return NULL;
- }
-
-
- /**
-    \details find the context matching given uri string
-
-    \param backend_list_ctx pointer to the backend context list
-    \param uri the uri string to search
-
-    \return Pointer to the mapistore_backend context on success,
-    otherwise NULL
-  */
- _PUBLIC_ struct backend_context *mapistore_backend_lookup_by_uri(struct backend_context_list *backend_list_ctx,
-                                                                 const char *uri)
- {
-        struct backend_context_list    *el;
-
-        /* sanity checks */
-        if (!backend_list_ctx) return NULL;
-        if (!uri) return NULL;
-
-        for (el = backend_list_ctx; el; el = el->next) {
-                if (el->ctx && el->ctx->uri &&
-                    !strcmp(el->ctx->uri, uri)) {
-                        return el->ctx;
-                }
-        }
-
-        return NULL;
- }
-
- enum MAPISTORE_ERROR mapistore_get_path(struct backend_context *bctx, uint64_t fmid, uint8_t type, char **path)
- {
-        enum MAPISTORE_ERROR   ret;
-        char                   *bpath = NULL;
-
-        ret = bctx->backend->get_path(bctx->private_data, fmid, type, &bpath);
-
-        if (!ret) {
-                *path = talloc_asprintf(bctx, "%s%s", bctx->backend->uri_namespace, bpath);
-        } else {
-                *path = NULL;
-        }
-
-        return ret;
- }
-
- enum MAPISTORE_ERROR mapistore_backend_opendir(struct backend_context *bctx, uint64_t parent_fid, uint64_t fid)
- {
-        return bctx->backend->op_opendir(bctx->private_data, parent_fid, fid);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_mkdir(struct backend_context *bctx, 
-                                             uint64_t parent_fid, 
-                                             uint64_t fid,
-                                             struct SRow *aRow)
- {
-        return bctx->backend->op_mkdir(bctx->private_data, parent_fid, fid, aRow);
- }
-
- enum MAPISTORE_ERROR mapistore_backend_rmdir(struct backend_context *bctx,
-                                             uint64_t parent_fid,
-                                             uint64_t fid)
- {
-        return bctx->backend->op_rmdir(bctx->private_data, parent_fid, fid);
- }
-
- enum MAPISTORE_ERROR mapistore_backend_readdir_count(struct backend_context *bctx, 
-                                                     uint64_t fid, 
-                                                     uint8_t table_type, 
-                                                     uint32_t *RowCount)
- {
-        enum MAPISTORE_ERROR           ret;
-        uint32_t                       count = 0;
-
-        ret = bctx->backend->op_readdir_count(bctx->private_data, fid, table_type, &count);
-        *RowCount = count;
-
-        return ret;
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_get_table_property(struct backend_context *bctx, 
-                                                          uint64_t fid, 
-                                                          uint8_t table_type,
-                                                          uint32_t pos, 
-                                                          enum MAPITAGS proptag, 
-                                                          void **data)
- {
-        return bctx->backend->op_get_table_property(bctx->private_data, fid, table_type, pos, proptag, data);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_openmessage(struct backend_context *bctx, 
-                                                   uint64_t parent_fid, 
-                                                   uint64_t mid, 
-                                                   struct mapistore_message *msg)
- {
-        return bctx->backend->op_openmessage(bctx->private_data, parent_fid, mid, msg);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_createmessage(struct backend_context *bctx, 
-                                                     uint64_t parent_fid, 
-                                                     uint64_t mid)
- {
-        return bctx->backend->op_createmessage(bctx->private_data, parent_fid, mid);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_savechangesmessage(struct backend_context *bctx, 
-                                                          uint64_t mid, 
-                                                          uint8_t flags)
- {
-        return bctx->backend->op_savechangesmessage(bctx->private_data, mid, flags);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_submitmessage(struct backend_context *bctx, 
-                                                     uint64_t mid, 
-                                                     uint8_t flags)
- {
-        return bctx->backend->op_submitmessage(bctx->private_data, mid, flags);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_getprops(struct backend_context *bctx, 
-                                                uint64_t fmid, 
-                                                uint8_t type, 
-                                                struct SPropTagArray *SPropTagArray, 
-                                                struct SRow *aRow)
- {
-        return bctx->backend->op_getprops(bctx->private_data, fmid, type, SPropTagArray, aRow);
- }
-
-
- enum MAPISTORE_ERROR mapistore_backend_get_fid_by_name(struct backend_context *bctx,
-                                                       uint64_t parent_fid,
-                                                       const char *name,
-                                                       uint64_t *fid)
- {
-        return bctx->backend->op_get_fid_by_name(bctx->private_data, parent_fid, name, fid);
- }
-
-
-
- enum MAPISTORE_ERROR mapistore_backend_setprops(struct backend_context *bctx, 
-                                                uint64_t fmid, 
-                                                uint8_t type, 
-                                                struct SRow *aRow)
- {
-        return bctx->backend->op_setprops(bctx->private_data, fmid, type, aRow);
- }
-
- enum MAPISTORE_ERROR mapistore_backend_deletemessage(struct backend_context *bctx, 
-                                                     uint64_t mid, 
-                                                     uint8_t flags)
-{
-       return bctx->backend->op_deletemessage(bctx->private_data, mid, flags);
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_backend.h b/branches/plugfest/mapiproxy/libmapistore/mapistore_backend.h
deleted file mode 100644 (file)
index 408fe53..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mapistore_backend.h
-
-   \brief MAPISTORE backend storage API
-   
-   This header contains the API that a backend storage / provider
-   needs to implement.
- */
-
-#ifndef        __MAPISTORE_BACKEND_H
-#define        __MAPISTORE_BACKEND_H
-
-#include <ldb.h>
-#include "libmapi/libmapi.h"
-
-struct mapistore_backend_context;
-
-/**
-  \brief Backend provider interface
- */
-struct mapistore_backend {
-       const char      *name;
-       const char      *description;
-       const char      *uri_namespace;
-
-       enum MAPISTORE_ERROR (*init)(void);
-       enum MAPISTORE_ERROR (*create_context)(struct mapistore_backend_context *ctx, const char *, void **);
-       enum MAPISTORE_ERROR (*delete_context)(void *);
-       enum MAPISTORE_ERROR (*create_uri)(TALLOC_CTX *, uint32_t, const char *, char **);
-       enum MAPISTORE_ERROR (*release_record)(void *, uint64_t, uint8_t);
-       enum MAPISTORE_ERROR (*get_path)(void *, uint64_t, uint8_t, char **);
-       /* folders semantic */
-       enum MAPISTORE_ERROR (*op_mkdir)(void *, uint64_t, uint64_t, struct SRow *);
-       enum MAPISTORE_ERROR (*op_rmdir)(void *, uint64_t, uint64_t);
-       enum MAPISTORE_ERROR (*op_opendir)(void *, uint64_t, uint64_t);
-       enum MAPISTORE_ERROR (*op_closedir)(void *);
-       enum MAPISTORE_ERROR (*op_readdir_count)(void *, uint64_t, uint8_t, uint32_t *);
-       enum MAPISTORE_ERROR (*op_get_table_property)(void *, uint64_t, uint8_t, uint32_t, enum MAPITAGS, void **);
-       /* message semantics */
-       enum MAPISTORE_ERROR (*op_openmessage)(void *, uint64_t, uint64_t, struct mapistore_message *);
-       enum MAPISTORE_ERROR (*op_createmessage)(void *, uint64_t, uint64_t);
-       enum MAPISTORE_ERROR (*op_savechangesmessage)(void *, uint64_t, uint8_t);
-       enum MAPISTORE_ERROR (*op_submitmessage)(void *, uint64_t, uint8_t);
-       enum MAPISTORE_ERROR (*op_getprops)(void *, uint64_t, uint8_t, struct SPropTagArray *, struct SRow *);
-       enum MAPISTORE_ERROR (*op_get_fid_by_name)(void *, uint64_t, const char *, uint64_t *);
-       enum MAPISTORE_ERROR (*op_setprops)(void *, uint64_t, uint8_t, struct SRow *);
-       enum MAPISTORE_ERROR (*op_deletemessage)(void *, uint64_t mid, uint8_t flags);
-};
-
-/*
-  \brief Register a backend
-  This function registers a backend with mapistore.
-
-  The general approach is to create a mapistore_backend object within the 
-  mapistore_init_backend() entry point, fill in the various structure elements
-  and function pointers, and then call mapistore_backend_register().
-  \code
-  int mapistore_init_backend(void)
-  {
-    struct mapistore_backend demo_backend;
-    
-    demo_backend.name = "demo";
-    demo_backend.description = "this is just a demostration of the mapistore backend API";
-    demo_backend.uri_namespace = "demo://";
-    demo.init = demo_init; // calls demo_init() on startup
-    ... // more function pointers here.
-    
-    mapistore_backend_register(&demo_backend);
-    if (ret != MAPISTORE_SUCCESS) {
-        DEBUG(0, ("Failed to register the '%s' mapistore backend\n", demo_backend.name));
-        return ret;
-    }
-
-    return MAPISTORE_SUCCESS;
-  }
-  \endcode
- */
-
-__BEGIN_DECLS
-
-extern enum MAPISTORE_ERROR    mapistore_backend_register(const struct mapistore_backend *);
-
-/* definitions from mapistore_backend_public.c */
-struct ldb_context     *mapistore_public_ldb_connect(struct mapistore_backend_context *, const char *);
-
-__END_DECLS
-
-#endif /* __MAPISTORE_BACKEND_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_backend_public.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_backend_public.c
deleted file mode 100644 (file)
index 6e4e26d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Note: init and load functions have been copied from
-   samba4/source4/param/util.c initially written by Jelmer.
-
-   Copyright (C) Jelmer Vernooij 2005-2007
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mapistore_backend_public.c
-
-   \brief Provides a public API mapistore backends can use to interact
-   with mapistore internals. Some functions are just wrappers over
-   existing mapistore functions.
- */
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include "mapistore_backend.h"
-
-
-/**
-   \details Open a wrapped context to a LDB database
-
-   This function is a wrapper to mapistore_ldb_wrap_connect which
-   helps keeping mapistore_backend_context opaque to backends.
-
-   \return valid LDB context pointer on success, otherwise NULL
- */
-struct ldb_context *mapistore_public_ldb_connect(struct mapistore_backend_context *ctx,
-                                                const char *path)
-{
-       struct mapistore_context        *mstore_ctx = (struct mapistore_context *)ctx;
-       struct tevent_context           *ev;
-
-       /* Sanity checks */
-       if (!path || !mstore_ctx) {
-               return NULL;
-       }
-
-       ev = tevent_context_init(mstore_ctx);
-       if (!ev) return NULL;
-
-       return mapistore_ldb_wrap_connect(mstore_ctx, ev, path, 0);
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_defs.h b/branches/plugfest/mapiproxy/libmapistore/mapistore_defs.h
deleted file mode 100644 (file)
index 89d8ed8..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mapistore_defs.h
-
-   \brief MAPISTORE common definitions
-   
-   This header contains the shared definitions for data structures,
-   enumerations and defines that are used across the MAPISTORE API.
- */
-
-#ifndef        __MAPISTORE_DEFS_H
-#define        __MAPISTORE_DEFS_H
-
-/**
-  \brief Special Folder identifiers
-  
-  This list identifies each of the folder identifiers.
- */
-enum MAPISTORE_DFLT_FOLDERS {
-       MDB_ROOT_FOLDER         = 1,
-       MDB_DEFERRED_ACTIONS    = 2,
-       MDB_SPOOLER_QUEUE       = 3,
-       MDB_TODO_SEARCH         = 4,
-       MDB_IPM_SUBTREE         = 5,
-       MDB_INBOX               = 6,
-       MDB_OUTBOX              = 7,
-       MDB_SENT_ITEMS          = 8,
-       MDB_DELETED_ITEMS       = 9,
-       MDB_COMMON_VIEWS        = 10,
-       MDB_SCHEDULE            = 11,
-       MDB_SEARCH              = 12,
-       MDB_VIEWS               = 13,
-       MDB_SHORTCUTS           = 14,
-       MDB_REMINDERS           = 15,
-       MDB_CALENDAR            = 16,
-       MDB_CONTACTS            = 17,
-       MDB_JOURNAL             = 18,
-       MDB_NOTES               = 19,
-       MDB_TASKS               = 20,
-       MDB_DRAFTS              = 21,
-       MDB_TRACKED_MAIL        = 22,
-       MDB_SYNC_ISSUES         = 23,
-       MDB_CONFLICTS           = 24,
-       MDB_LOCAL_FAILURES      = 25,
-       MDB_SERVER_FAILURES     = 26,
-       MDB_JUNK_EMAIL          = 27,
-       MDB_RSS_FEEDS           = 28,
-       MDB_CONVERSATION_ACT    = 29, /**< Conversation Actions folder */
-       MDB_LAST_SPECIALFOLDER  = MDB_CONVERSATION_ACT, /**< the last identifier, used for iteration */
-       MDB_CUSTOM              = 999 /**< This is a custom (or generic) folder with no special meaning */
-};
-
-struct mapistore_message {
-       struct SRowSet                  *recipients;
-       struct SRow                     *properties;
-};
-
-#define        MAPISTORE_FOLDER_TABLE          1
-#define        MAPISTORE_MESSAGE_TABLE         2
-
-#define        MAPISTORE_FOLDER                1
-#define        MAPISTORE_MESSAGE               2
-
-#define        MAPISTORE_SOFT_DELETE           1
-#define        MAPISTORE_PERMANENT_DELETE      2
-
-/* TODO: perhaps this should be in another header */
-const char             *mapistore_get_mapping_path(void);
-
-#endif /* __MAPISTORE_DEFS_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_errors.h b/branches/plugfest/mapiproxy/libmapistore/mapistore_errors.h
deleted file mode 100644 (file)
index 0c56208..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mapistore_errors.h
-
-   \brief This header provides a set of result codes for MAPISTORE
-   function calls.
- */
-
-#ifndef        __MAPISTORE_ERRORS_H
-#define        __MAPISTORE_ERRORS_H
-
-enum MAPISTORE_ERROR {
-       MAPISTORE_SUCCESS = 0, /*!< The function call succeeded. */
-       MAPISTORE_ERROR = 1,   /*!< The function call failed for some non-specific reason. */
-       MAPISTORE_ERR_NO_MEMORY = 2, /*!< The function call failed because it was unable to allocate the memory required by underlying operations. */
-       MAPISTORE_ERR_ALREADY_INITIALIZED = 3, /*!< The function call failed because underlying context has already been initialized. */
-       MAPISTORE_ERR_NOT_INITIALIZED = 4, /*!< The function call failed because context has not been initialized. */
-       MAPISTORE_ERR_CORRUPTED = 5, /*!< The function call failed because an internal mapistore storage component has corrupted data. */
-       MAPISTORE_ERR_INVALID_PARAMETER = 6, /*!< The function call failed because one of the function parameters is invalid. */
-       MAPISTORE_ERR_NO_DIRECTORY = 7, /*!< The function call failed because the directory doesn't exist. */
-       MAPISTORE_ERR_DATABASE_INIT = 8, /*!< The function call failed because the underlying function couldn't open a database. */
-       MAPISTORE_ERR_DATABASE_OPS = 9, /*!< The function call failed because the underlying function didn't run a database operation successfully. */
-       MAPISTORE_ERR_BACKEND_REGISTER = 10, /*!< The function failed to register a storage backend. */
-       MAPISTORE_ERR_BACKEND_INIT = 11, /*!< One or more storage backend initialization functions failed to complete successfully. */
-       MAPISTORE_ERR_CONTEXT_FAILED = 12, /*!< The function failed because mapistore failed to create a context. */
-       MAPISTORE_ERR_INVALID_NAMESPACE = 13, /*!< The function failed because the provided namespace is invalid. */
-       MAPISTORE_ERR_NOT_FOUND = 14, /*!< The function failed to find the requested record/data. */
-       MAPISTORE_ERR_REF_COUNT = 15, /*!<  The function still has a reference count. */
-       MAPISTORE_ERR_EXIST = 16, /*!< The function already has record/data for the searched element. */
-       MAPISTORE_ERR_INVALID_OBJECT = 17, /*!< The specified object is invalid */
-       MAPISTORE_ERR_INVALID_CONTEXT = 18, /*!< The specified context is invalid */
-};
-
-#endif /* ! __MAPISTORE_ERRORS_H */
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_indexing.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_indexing.c
deleted file mode 100644 (file)
index ba088f9..0000000
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include <string.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include <dlinklist.h>
-#include "libmapi/libmapi_private.h"
-
-#include <tdb.h>
-
-/**
-   \details Search the indexing record matching the username
-
-   \param mstore_ctx pointer to the mapistore context
-   \param username the username to lookup
-
-   \return pointer to the tdb_wrap structure on success, otherwise NULL
- */
-struct indexing_context_list *mapistore_indexing_search(struct mapistore_context *mstore_ctx, 
-                                                       const char *username)
-{
-       struct indexing_context_list    *el;
-
-       /* Sanity checks */
-       if (!mstore_ctx) return NULL;
-       if (!username) return NULL;
-
-       for (el = mstore_ctx->indexing_list; el; el = el->next) {
-               if (el && el->username && !strcmp(el->username, username)) {
-                       return el;
-               }
-       }
-
-       return NULL;
-}
-
-/**
-   \details Open connection to indexing database for a given user
-
-   \param mstore_ctx pointer to the mapistore context
-   \param username name for which the indexing database has to be
-   created
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_add(struct mapistore_context *mstore_ctx, 
-                                                    const char *username)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct indexing_context_list    *ictx;
-       char                            *dbpath = NULL;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
-       MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERROR, NULL);
-
-       /* Step 1. Search if the context already exists */
-       ictx = mapistore_indexing_search(mstore_ctx, username);
-       MAPISTORE_RETVAL_IF(ictx, MAPISTORE_SUCCESS, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "mapistore_indexing_init");
-       ictx = talloc_zero(mstore_ctx->indexing_list, struct indexing_context_list);
-
-       /* Step 1. Open/Create the indexing database */
-       dbpath = talloc_asprintf(mem_ctx, "%s/%s/indexing.tdb", 
-                                mapistore_get_mapping_path(), username);
-       ictx->index_ctx = tdb_wrap_open(ictx, dbpath, 0, 0, O_RDWR|O_CREAT, 0600);
-       talloc_free(dbpath);
-       if (!ictx->index_ctx) {
-               DEBUG(3, ("[%s:%d]: %s\n", __FUNCTION__, __LINE__, strerror(errno)));
-               talloc_free(ictx);
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERR_DATABASE_INIT;
-       }
-       ictx->username = talloc_strdup(ictx, username);
-       ictx->ref_count = 0;
-       DLIST_ADD_END(mstore_ctx->indexing_list, ictx, struct indexing_context_list *);
-
-       talloc_free(mem_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Close connection to indexing database for a given user
-
-   \param mstore_ctx pointer to the mapistore context
-   \param username name for which the indexing database has to be
-   deleted
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_del(struct mapistore_context *mstore_ctx,
-                                                    const char *username)
-{
-       struct indexing_context_list    *ictx;
-       
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
-       MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERROR, NULL);
-
-       /* Step 1. Search for the context */
-       ictx = mapistore_indexing_search(mstore_ctx, username);
-       MAPISTORE_RETVAL_IF(!ictx, MAPISTORE_ERROR, NULL);
-
-       /* Step 2. Return if ref_count is not 0 */
-       MAPISTORE_RETVAL_IF(ictx->ref_count, MAPISTORE_SUCCESS, NULL);
-
-       /* Step 3. Remove it from the list and free if 0 */
-       DLIST_REMOVE(mstore_ctx->indexing_list, ictx);
-       talloc_free(ictx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Increase the ref count associated to a given indexing context
-
-   \param ictx pointer to the indexing context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistore_indexing_add_ref_count(struct indexing_context_list *ictx)
-{
-       MAPISTORE_RETVAL_IF(!ictx, MAPISTORE_ERROR, NULL);
-
-       ictx->ref_count += 1;
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Decrease the ref count associated to a given indexing context
-
-   \param ictx pointer to the indexing context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-enum MAPISTORE_ERROR mapistore_indexing_del_ref_count(struct indexing_context_list *ictx)
-{
-       MAPISTORE_RETVAL_IF(!ictx, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!ictx->ref_count, MAPISTORE_SUCCESS, NULL);
-
-       ictx->ref_count -= 1;
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Convenient function to check if the folder/message ID
-   passed in parameter already exists in the database or not and
-   whether it is soft deleted or not
-
-   \param ictx pointer to the indexing context
-   \param fmid folder/message ID to lookup
-   \param IsSoftDeleted pointer to boolean returned by the function
-   which indicates whether the record is soft_deleted or not
-
-   \return MAPISTORE_SUCCESS if the folder/message ID doesn't exist,
-   otherwise MAPISTORE_ERR_EXIST.
- */
-enum MAPISTORE_ERROR mapistore_indexing_search_existing_fmid(struct indexing_context_list *ictx, 
-                                                            uint64_t fmid, bool *IsSoftDeleted)
-{
-       int             ret;
-       TDB_DATA        key;
-
-       /* Sanity */
-       MAPISTORE_RETVAL_IF(!ictx, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!fmid, MAPISTORE_ERROR, NULL);
-
-       key.dptr = (unsigned char *) talloc_asprintf(ictx, "0x%.16"PRIx64, fmid);
-       key.dsize = strlen((const char *)key.dptr);
-       *IsSoftDeleted = false;
-
-       ret = tdb_exists(ictx->index_ctx->tdb, key);
-       talloc_free(key.dptr);
-
-       /* If it doesn't exist look for a SOFT_DELETED entry */
-       if (!ret) {
-               key.dptr = (unsigned char *) talloc_asprintf(ictx, "%s0x%.16"PRIx64,
-                                                            MAPISTORE_SOFT_DELETED_TAG,
-                                                            fmid);
-               key.dsize = strlen((const char *)key.dptr);
-               ret = tdb_exists(ictx->index_ctx->tdb, key);
-               if (ret) {
-                       *IsSoftDeleted = true;
-               }
-       }
-
-       MAPISTORE_RETVAL_IF(ret, MAPISTORE_ERR_EXIST, NULL);
-       
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Add a folder or message record to the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param fmid the folder or message ID to add
-   \param type MAPISTORE_FOLDER or MAPISTORE_MESSAGE
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_indexing_record_add_fmid(struct mapistore_context *mstore_ctx,
-                                                       uint32_t context_id,  uint64_t fmid, 
-                                                       uint8_t type)
-{
-       enum MAPISTORE_ERROR            ret;
-       int                             retval;
-       struct backend_context          *backend_ctx;
-       struct indexing_context_list    *ictx;
-       TDB_DATA                        key;
-       TDB_DATA                        dbuf;
-       char                            *mapistore_URI = NULL;
-       bool                            IsSoftDeleted = false;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!context_id, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!fmid, MAPISTORE_ERROR, NULL);
-
-       /* Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       MAPISTORE_RETVAL_IF(!backend_ctx->indexing, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Check if the fid/mid doesn't already exist within the database */
-       ictx = backend_ctx->indexing;
-       ret = mapistore_indexing_search_existing_fmid(ictx, fmid, &IsSoftDeleted);
-       MAPISTORE_RETVAL_IF(ret, ret, NULL);
-
-       /* Retrieve the mapistore URI given context_id and fmid */
-       mapistore_get_path(backend_ctx, fmid, type, &mapistore_URI);
-       DEBUG(0, ("mapistore_URI = %s\n", mapistore_URI));
-       MAPISTORE_RETVAL_IF(!mapistore_URI, MAPISTORE_ERROR, NULL);
-
-       /* Add the record given its fid and mapistore_uri */
-       key.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "0x%.16"PRIx64, fmid);
-       key.dsize = strlen((const char *) key.dptr);
-
-       dbuf.dptr = (unsigned char *) talloc_strdup(mstore_ctx, mapistore_URI);
-       dbuf.dsize = strlen((const char *) dbuf.dptr);
-
-       retval = tdb_store(ictx->index_ctx->tdb, key, dbuf, TDB_INSERT);
-       talloc_free(key.dptr);
-       talloc_free(dbuf.dptr);
-       talloc_free(mapistore_URI);
-
-       if (retval == -1) {
-               DEBUG(3, ("[%s:%d]: Unable to create 0x%.16"PRIx64" record: %s\n", __FUNCTION__, __LINE__,
-                         fmid, mapistore_URI));
-               return MAPISTORE_ERR_DATABASE_OPS;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Remove a folder or message record from the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param fmid the folder or message ID to delete
-   \flags the type of deletion MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_indexing_record_del_fmid(struct mapistore_context *mstore_ctx,
-                                                       uint32_t context_id, uint64_t fmid,
-                                                       uint8_t flags)
-{
-       enum MAPISTORE_ERROR            ret;
-       int                             retval;
-       struct backend_context          *backend_ctx;
-       struct indexing_context_list    *ictx;
-       TDB_DATA                        key;
-       TDB_DATA                        newkey;
-       TDB_DATA                        dbuf;
-       bool                            IsSoftDeleted = false;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!context_id, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!fmid, MAPISTORE_ERROR, NULL);
-
-       /* Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       MAPISTORE_RETVAL_IF(!backend_ctx->indexing, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Check if the fid/mid still exists within the database */
-       ictx = backend_ctx->indexing;
-       ret = mapistore_indexing_search_existing_fmid(ictx, fmid, &IsSoftDeleted);
-       MAPISTORE_RETVAL_IF(!ret, ret, NULL);
-
-       if (IsSoftDeleted == true) {
-               key.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "%s0x%.16"PRIx64, 
-                                                            MAPISTORE_SOFT_DELETED_TAG, fmid);
-       } else {
-               key.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "0x%.16"PRIx64, fmid);
-       }
-       key.dsize = strlen((const char *) key.dptr);
-
-       switch (flags) {
-       case MAPISTORE_SOFT_DELETE:
-               /* nothing to do if the record is already soft deleted */
-               MAPISTORE_RETVAL_IF(IsSoftDeleted == true, MAPISTORE_SUCCESS, NULL);
-               newkey.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "%s0x%.16"PRIx64, 
-                                                               MAPISTORE_SOFT_DELETED_TAG,
-                                                               fmid);
-               newkey.dsize = strlen ((const char *)newkey.dptr);
-               /* Retrieve previous value */
-               dbuf = tdb_fetch(ictx->index_ctx->tdb, key);
-               /* Add new record */
-               retval = tdb_store(ictx->index_ctx->tdb, newkey, dbuf, TDB_INSERT);
-               /* Delete previous record */
-               retval = tdb_delete(ictx->index_ctx->tdb, key);
-               talloc_free(key.dptr);
-               talloc_free(newkey.dptr);
-               break;
-       case MAPISTORE_PERMANENT_DELETE:
-               retval = tdb_delete(ictx->index_ctx->tdb, key);
-               talloc_free(key.dptr);
-               MAPISTORE_RETVAL_IF(retval, MAPISTORE_ERR_DATABASE_OPS, NULL);
-               break;
-       }
-       
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the list of parent folder identifiers until we
-   reach the expected item
-
-   \param mstore_ctx pointer to the mapistore context
-   \param username the name of the account where to look for the
-   indexing database
-   \param fmid the folder/message ID to search
-   \param parents pointer to an array of elements that subsequently
-   leads to fmid returned by the function
-   \param count pointer to the number of parents the function returns
-
-   \note This function is useful for the emsmdb provider when we are
-   trying to open a folder/message using an InputHandleIdx referencing
-   the store object. In such situation, no context ID is available
-   since the store object access openchange.ldb.
-
-   It means we need to retrieve the list of folders to the item within
-   the mapistore context and rely on an existing parent (if opened) or
-   opens everything from the top parent if none is available.
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
-
-   \sa mapistore_indexing_record_open_fmid
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_get_folder_list(struct mapistore_context *mstore_ctx,
-                                                                const char *username, uint64_t fmid,
-                                                                struct indexing_folders_list **_flist)
-{
-       int                             ret;
-       struct indexing_context_list    *ictx;
-       struct indexing_folders_list    *flist = NULL;
-       TDB_DATA                        key;
-       TDB_DATA                        dbuf;
-       bool                            IsSoftDeleted = false;
-       char                            *uri = NULL;
-       char                            *tmp_uri;
-       char                            *substr;
-       char                            *folder;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
-       MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!_flist, MAPISTORE_ERROR, NULL);
-       /* MAPISTORE_RETVAL_IF(!parents, MAPISTORE_ERROR, NULL); */
-       /* MAPISTORE_RETVAL_IF(!count, MAPISTORE_ERROR, NULL); */
-
-       /* 1. Search for an existing indexing context */
-       ictx = mapistore_indexing_search(mstore_ctx, username);
-       MAPISTORE_RETVAL_IF(!ictx, MAPISTORE_ERROR, NULL);
-
-       /* 2. Ensure the fid/mid exist within the indexing database */
-       ret = mapistore_indexing_search_existing_fmid(ictx, fmid, &IsSoftDeleted);
-       DEBUG(0, ("ret = %d\n", ret));
-       MAPISTORE_RETVAL_IF(!ret, MAPISTORE_ERROR, NULL);
-
-       /* 3. Retrieve the mapistore_uri */
-       if (IsSoftDeleted == true) {
-               key.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "%s0x%.16"PRIx64,
-                                                            MAPISTORE_SOFT_DELETED_TAG, fmid);
-       } else {
-               key.dptr = (unsigned char *) talloc_asprintf(mstore_ctx, "0x%.16"PRIx64, fmid);
-               DEBUG(0, ("Search for record 0x%.16"PRIx64"\n", fmid));
-       }
-       key.dsize = strlen((const char *) key.dptr);
-
-       dbuf = tdb_fetch(ictx->index_ctx->tdb, key);
-       talloc_free(key.dptr);
-
-       uri = talloc_strndup(mstore_ctx, (const char *)dbuf.dptr, dbuf.dsize);
-       MAPISTORE_RETVAL_IF(!uri, MAPISTORE_ERROR, NULL);
-       DEBUG(0, ("uri = %s\n", uri));
-
-       /* FIXME: Look for folders starting with 0x ... nasty but will do the trick for now */
-
-       flist = talloc_zero(mstore_ctx, struct indexing_folders_list);
-       flist->folderID = talloc_array(flist, uint64_t, 2);
-       flist->count = 0;
-       
-       tmp_uri = uri;
-       while ((substr = strcasestr(uri, "0x")) != NULL) {
-               folder = talloc_strndup(mstore_ctx, substr, 18);
-               flist->folderID[flist->count] = strtoull(folder, NULL, 16);
-               if (flist->folderID[flist->count] != fmid) {
-                       flist->count += 1;
-                       flist->folderID = talloc_realloc(flist, flist->folderID, uint64_t, flist->count + 1);
-               } else {
-                       flist->folderID[flist->count] = 0;
-               }
-               talloc_free(folder);
-               uri = substr + 18;
-       }
-
-       talloc_free(tmp_uri);
-
-       *_flist = flist;
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Add a fid record to the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param fid the fid to add
-
-   \note This is a wrapper to the internal common
-   mapistore_indexing_record_add_fmid function.
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_record_add_fid(struct mapistore_context *mstore_ctx,
-                                                               uint32_t context_id, uint64_t fid)
-{
-       return mapistore_indexing_record_add_fmid(mstore_ctx, context_id, fid, MAPISTORE_FOLDER);
-}
-
-
-/**
-   \details Delete a fid record from the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param fid the fid to remove
-   \param flags the type of deletion MAPISTORE_SOFT_DELETE or
-   MAPISTORE_PERMANENT_DELETE
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_record_del_fid(struct mapistore_context *mstore_ctx,
-                                                               uint32_t context_id, uint64_t fid, 
-                                                               uint8_t flags)
-{
-       return mapistore_indexing_record_del_fmid(mstore_ctx, context_id, fid, flags);
-}
-
-
-/**
-   \details Add a mid record to the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param mid the mid to add
-
-   \note This is a wrapper to the internal common
-   mapistore_indexing_record_add_fmid function.
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_record_add_mid(struct mapistore_context *mstore_ctx,
-                                                               uint32_t context_id, uint64_t mid)
-{
-       return mapistore_indexing_record_add_fmid(mstore_ctx, context_id, mid, MAPISTORE_MESSAGE);
-}
-
-
-/**
-   \details Delete a mid record from the indexing database
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the indexing
-   database to update
-   \param mid the mid to remove
-   \param flags the type of deletion MAPISTORE_SOFT_DELETE or
-   MAPISTORE_PERMANENT_DELETE
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_indexing_record_del_mid(struct mapistore_context *mstore_ctx,
-                                                               uint32_t context_id, uint64_t mid,
-                                              uint8_t flags)
-{
-       return mapistore_indexing_record_del_fmid(mstore_ctx, context_id, mid, flags);
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_interface.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_interface.c
deleted file mode 100644 (file)
index 28b4d5f..0000000
+++ /dev/null
@@ -1,1052 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include <dlinklist.h>
-#include "libmapi/libmapi_private.h"
-
-#include <string.h>
-
-/**
-   \details Initialize the mapistore context
-
-   \param mem_ctx pointer to the memory context
-
-   \return allocate mapistore context on success, otherwise NULL
- */
-_PUBLIC_ struct mapistore_context *mapistore_init(TALLOC_CTX *mem_ctx, const char *path)
-{
-       enum MAPISTORE_ERROR            retval;
-       struct mapistore_context        *mstore_ctx;
-
-       mstore_ctx = talloc_zero(mem_ctx, struct mapistore_context);
-       if (!mstore_ctx) {
-               return NULL;
-       }
-
-       mstore_ctx->processing_ctx = talloc_zero(mstore_ctx, struct processing_context);
-
-       retval = mapistore_init_mapping_context(mstore_ctx->processing_ctx);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(5, ("[%s:%d]: %s\n", __FUNCTION__, __LINE__, mapistore_errstr(retval)));
-               talloc_free(mstore_ctx);
-               return NULL;
-       }
-
-       retval = mapistore_backend_init(mstore_ctx, path);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(5, ("[%s:%d]: %s\n", __FUNCTION__, __LINE__, mapistore_errstr(retval)));
-               talloc_free(mstore_ctx);
-               return NULL;
-       }
-
-       mstore_ctx->context_list = NULL;
-       mstore_ctx->indexing_list = talloc_zero(mstore_ctx, struct indexing_context_list);
-
-       mstore_ctx->nprops_ctx = NULL;
-       retval = mapistore_namedprops_init(mstore_ctx, &(mstore_ctx->nprops_ctx));
-
-       return mstore_ctx;
-}
-
-
-/**
-   \details Release the mapistore context and destroy any data
-   associated
-
-   \param mstore_ctx pointer to the mapistore context
-
-   \note The function needs to rely on talloc destructors which is not
-   implemented in code yet.
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_release(struct mapistore_context *mstore_ctx)
-{
-       if (!mstore_ctx) return MAPISTORE_ERR_NOT_INITIALIZED;
-
-       talloc_free(mstore_ctx->nprops_ctx);
-       talloc_free(mstore_ctx->processing_ctx);
-       talloc_free(mstore_ctx->context_list);
-       talloc_free(mstore_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Add a new connection context to mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param uri the connection context URI
-   \param pointer to the context identifier the function returns
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_add_context(struct mapistore_context *mstore_ctx, 
-                                                   const char *uri, uint32_t *context_id)
-{
-       TALLOC_CTX                              *mem_ctx;
-       int                                     retval;
-       struct backend_context                  *backend_ctx;
-       struct backend_context_list             *backend_list;
-       char                                    *uri_namespace;
-       char                                    *namespace_start;
-       char                                    *backend_uri;
-
-       /* Step 1. Perform Sanity Checks on URI */
-       if (!uri || strlen(uri) < 4) {
-               return MAPISTORE_ERR_INVALID_NAMESPACE;
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "mapistore_add_context");
-       uri_namespace = talloc_strdup(mem_ctx, uri);
-       namespace_start = uri_namespace;
-       uri_namespace= strchr(uri_namespace, ':');
-       if (!uri_namespace) {
-               DEBUG(0, ("[%s:%d]: Error - Invalid namespace '%s'\n", __FUNCTION__, __LINE__, namespace_start));
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERR_INVALID_NAMESPACE;
-       }
-
-       if (uri_namespace[1] && uri_namespace[1] == '/' &&
-           uri_namespace[2] && uri_namespace[2] == '/' &&
-           uri_namespace[3]) {
-               backend_uri = talloc_strdup(mem_ctx, &uri_namespace[3]);
-               uri_namespace[3] = '\0';
-               backend_ctx = mapistore_backend_create_context((TALLOC_CTX *)mstore_ctx, namespace_start, backend_uri);
-               if (!backend_ctx) {
-                       return MAPISTORE_ERR_CONTEXT_FAILED;
-               }
-
-               backend_list = talloc_zero((TALLOC_CTX *) mstore_ctx, struct backend_context_list);
-               talloc_steal(backend_list, backend_ctx);
-               backend_list->ctx = backend_ctx;
-               retval = mapistore_get_context_id(mstore_ctx->processing_ctx, &backend_list->ctx->context_id);
-               if (retval != MAPISTORE_SUCCESS) {
-                       talloc_free(mem_ctx);
-                       return MAPISTORE_ERR_CONTEXT_FAILED;
-               }
-               *context_id = backend_list->ctx->context_id;
-               DLIST_ADD_END(mstore_ctx->context_list, backend_list, struct backend_context_list *);
-
-       } else {
-               DEBUG(0, ("[%s:%d]: Error - Invalid URI '%s'\n", __FUNCTION__, __LINE__, uri));
-               talloc_free(mem_ctx);
-               return MAPISTORE_ERR_INVALID_NAMESPACE;
-       }
-
-       talloc_free(mem_ctx);
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Increase the reference counter of an existing context
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the context to
-   update
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_add_context_ref_count(struct mapistore_context *mstore_ctx,
-                                                             uint32_t context_id)
-{
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            retval;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* TODO: Fix context_id sign */
-       if ((int)context_id == -1) return MAPISTORE_ERROR;
-
-       /* Step 0. Ensure the context exists */
-       DEBUG(0, ("mapistore_add_context_ref_count: context_is to increment is %d\n", context_id));
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Increment the ref count */
-       retval = mapistore_backend_add_ref_count(backend_ctx);
-
-       return retval;
-}
-
-
-/**
-   \details Search for an existing context given its uri
-
-   \param mstore_ctx pointer to the mapistore context
-   \param uri the URI to lookup
-   \param context_id pointer to the context identifier to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_search_context_by_uri(struct mapistore_context *mstore_ctx,
-                                                             const char *uri,
-                                                             uint32_t *context_id)
-{
-       struct backend_context          *backend_ctx;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       if (!uri) return MAPISTORE_ERROR;
-
-       backend_ctx = mapistore_backend_lookup_by_uri(mstore_ctx->context_list, uri);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_NOT_FOUND, NULL);
-
-       *context_id = backend_ctx->context_id;
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Delete an existing connection context from mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the context to
-   delete
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_del_context(struct mapistore_context *mstore_ctx, 
-                                                   uint32_t context_id)
-{
-       struct backend_context_list     *backend_list;
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            retval;
-       bool                            found = false;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* TODO: Fix context_id sign */
-       if ((int)context_id == -1) return MAPISTORE_ERROR;
-
-       /* Step 0. Ensure the context exists */
-       DEBUG(0, ("mapistore_del_context: context_id to del is %d\n", context_id));
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* search the backend_list item */
-       for (backend_list = mstore_ctx->context_list; backend_list; backend_list = backend_list->next) {
-               if (backend_list->ctx->context_id == context_id) {
-                       found = true;
-                       break;
-               }               
-       }
-       if (found == false) {
-               return MAPISTORE_ERROR;
-       }
-
-       /* Step 1. Delete the context within backend */
-       retval = mapistore_backend_delete_context(backend_ctx);
-       switch (retval) {
-       case MAPISTORE_ERR_REF_COUNT:
-               return MAPISTORE_SUCCESS;
-       case MAPISTORE_SUCCESS:
-               DLIST_REMOVE(mstore_ctx->context_list, backend_list);
-               /* Step 2. Add the free'd context id to the free list */
-               retval = mapistore_free_context_id(mstore_ctx->processing_ctx, context_id);
-               break;
-       default:
-               return retval;
-       }
-
-       return retval;
-}
-
-
-/**
-   \details Release private backend data associated a folder / message
-   opened within the mapistore backend
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param fmid a folder or message identifier
-   \param type the type of fmid, either MAPISTORE_FOLDER or MAPISTORE_MESSAGE
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_release_record(struct mapistore_context *mstore_ctx,
-                                                      uint32_t context_id,
-                                                      uint64_t fmid,
-                                                      uint8_t type)
-{
-       struct backend_context          *backend_ctx;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend release_record */
-       ret = mapistore_backend_release_record(backend_ctx, fmid, type);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Associate an indexing context to a mapistore context
-
-   \param mstore_ctx pointer to the mapistore context
-   \param username account name referencing the indexing record
-   \param context_id the context identifier referencing the context to
-   alter
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_add_context_indexing(struct mapistore_context *mstore_ctx,
-                                                            const char *username,
-                                                            uint32_t context_id)
-{
-       struct indexing_context_list    *indexing_ctx;
-       struct backend_context          *backend_ctx;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-       MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERROR, NULL);
-       /* TODO: Fix context_id sign */
-       MAPISTORE_RETVAL_IF((int)context_id == -1, MAPISTORE_ERROR, NULL);
-
-       /* Step 0. Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       /* If the indexing pointer is already existing, return success */
-       MAPISTORE_RETVAL_IF(backend_ctx->indexing, MAPISTORE_SUCCESS, NULL);
-
-       /* Step 1. Search the indexing record */
-       indexing_ctx = mapistore_indexing_search(mstore_ctx, username);
-       MAPISTORE_RETVAL_IF(!indexing_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Reference the indexing record within backend context */
-       backend_ctx->indexing = indexing_ctx;
-
-       /* Step 3. Increment the indexing ref counter */
-       mapistore_indexing_add_ref_count(indexing_ctx);
-
-       DEBUG(0, ("mapistore_add_context_indexing username: %s\n", backend_ctx->indexing->username));
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-void mapistore_set_errno(int status)
-{
-       errno = status;
-}
-
-
-/**
-   \details return a string explaining what a mapistore error constant
-   means.
-
-   \param mapistore_err the mapistore error constant
-
-   \return constant string
- */
-_PUBLIC_ const char *mapistore_errstr(enum MAPISTORE_ERROR mapistore_err)
-{
-       switch (mapistore_err) {
-       case MAPISTORE_SUCCESS:
-               return "Success";
-       case MAPISTORE_ERROR:
-               return "Non-specific error";
-       case MAPISTORE_ERR_NO_MEMORY:
-               return "No memory available";
-       case MAPISTORE_ERR_ALREADY_INITIALIZED:
-               return "Already initialized";
-       case MAPISTORE_ERR_NOT_INITIALIZED:
-               return "Not initialized";
-       case MAPISTORE_ERR_CORRUPTED:
-               return "Corrupted";
-       case MAPISTORE_ERR_INVALID_PARAMETER:
-               return "Invalid parameter";
-       case MAPISTORE_ERR_NO_DIRECTORY:
-               return "No such file or directory";
-       case MAPISTORE_ERR_DATABASE_INIT:
-               return "Database initialization failed";
-       case MAPISTORE_ERR_DATABASE_OPS:
-               return "Database operation failed";
-       case MAPISTORE_ERR_BACKEND_REGISTER:
-               return "Storage backend registration failed";
-       case MAPISTORE_ERR_BACKEND_INIT:
-               return "Storage backend initialization failed";
-       case MAPISTORE_ERR_CONTEXT_FAILED:
-               return "Context creation failed";
-       case MAPISTORE_ERR_INVALID_NAMESPACE:
-               return "Invalid namespace";
-       case MAPISTORE_ERR_NOT_FOUND:
-               return "Record or data not found";
-       case MAPISTORE_ERR_REF_COUNT:
-               return "Reference count still exists";
-       case MAPISTORE_ERR_EXIST:
-               return "Already exists";
-       case MAPISTORE_ERR_INVALID_OBJECT:
-               return "Invalid object";
-       case MAPISTORE_ERR_INVALID_CONTEXT:
-               return "Invalid mapistore context";
-       }
-
-       return "Unknown error";
-}
-
-
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_create_uri(struct mapistore_context *mstore_ctx,
-                                                  uint32_t index,
-                                                  const char *namespace_uri,
-                                                  const char *username,
-                                                  char **_uri)
-{
-       enum MAPISTORE_ERROR    ret;
-       char                    *uri;
-       char                    *ref_str;
-       char                    *ns;
-
-       /* Sanity checks */
-       if (!namespace_uri || strlen(namespace_uri) < 4) {
-               return MAPISTORE_ERR_INVALID_NAMESPACE;
-       }
-
-       ref_str = (char *)namespace_uri;
-       ns = strchr(namespace_uri, ':');
-       if (!ns) {
-               DEBUG(0, ("! [%s:%d][%s]: Invalid namespace '%s'\n", __FILE__, __LINE__, __FUNCTION__, ref_str));
-               return MAPISTORE_ERR_INVALID_NAMESPACE;
-       }
-
-       if (ns[1] && ns[1] == '/' && ns[2] && ns[2] == '/') {
-               if (ns[3]) {
-                       ns[3] = '\0';
-               }
-               ret = mapistore_backend_create_uri((TALLOC_CTX *)mstore_ctx, index, ref_str, username, &uri);
-               if (ret == MAPISTORE_SUCCESS) {
-                       *_uri = uri;
-               }
-               return ret;
-       }
-
-       return MAPISTORE_ERR_NOT_FOUND;
-}
-
-
-/**
-   \details Open a directory in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the directory will be opened
-   \param parent_fid the parent folder identifier
-   \param fid folder identifier to open
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_opendir(struct mapistore_context *mstore_ctx,
-                                               uint32_t context_id,
-                                               uint64_t parent_fid,
-                                               uint64_t fid)
-{
-       struct backend_context          *backend_ctx;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend opendir */
-       ret = mapistore_backend_opendir(backend_ctx, parent_fid, fid);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Close a directory in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the directory has to be closed/released
-   \param fid the folder identifier referencing the folder to close
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_closedir(struct mapistore_context *mstore_ctx,
-                                                uint32_t context_id,
-                                                uint64_t fid)
-{
-       struct backend_context          *backend_ctx;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 0. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* mapistore_backend_closedir() */
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Create a directory in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the directory will be created
-   \param parent_fid the parent folder identifier
-   \param new_fid the folder identifier for the new folder
-   \param aRow pointer to MAPI data structures with properties to be
-   added to the new folder
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_mkdir(struct mapistore_context *mstore_ctx,
-                                             uint32_t context_id,
-                                             uint64_t parent_fid,
-                                             uint64_t fid,
-                                             struct SRow *aRow)
-{
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);       
-       
-       /* Step 2. Call backend mkdir */
-       ret = mapistore_backend_mkdir(backend_ctx, parent_fid, fid, aRow);
-
-       return ret;
-}
-
-
-/**
-   \details Remove a directory in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param parent_fid the parent folder identifier
-   \param fid the folder identifier representing the folder to delete
-   \param flags flags that control the behaviour of the operation
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_rmdir(struct mapistore_context *mstore_ctx,
-                                             uint32_t context_id,
-                                             uint64_t parent_fid,
-                                             uint64_t fid,
-                                             uint8_t flags)
-{
-       struct backend_context          *backend_ctx;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-       DEBUG(4, ("mapistore_rmdir interface, fid 0x%"PRIx64" from parent 0x%"PRIx64"\n", fid, parent_fid));
-
-       /* Step 1. Find the backend context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);       
-
-       /* Step 2. Handle deletion of child folders / messages */
-       if (flags | DEL_FOLDERS) {
-               uint64_t        *childFolders;
-               uint32_t        childFolderCount;
-               int             retval;
-               uint32_t        i;
-
-               /* Get subfolders list */
-               retval = mapistore_get_child_fids(mstore_ctx, context_id, fid,
-                                                 &childFolders, &childFolderCount);
-               DEBUG(4, ("mapistore_rmdir fid: 0x%"PRIx64", child count: %d\n", fid, childFolderCount));
-               if (retval) {
-                       DEBUG(4, ("mapistore_rmdir bad retval: 0x%x", retval));
-                       return MAPISTORE_ERR_NOT_FOUND;
-               }
-
-               /* Delete each subfolder in mapistore */
-               for (i = 0; i < childFolderCount; ++i) {
-                       DEBUG(4, ("mapistore_rmdir child: %d, FID: 0x%"PRIx64", parent: 0x%"PRIx64"\n", i, childFolders[i], fid));
-                       retval = mapistore_rmdir(mstore_ctx, context_id, fid, childFolders[i], flags);
-                       if (retval) {
-                                 DEBUG(4, ("mapistore_rmdir failed to delete fid 0x%"PRIx64" (0x%x)", childFolders[i], retval));
-                                 talloc_free(childFolders);
-                                 return MAPISTORE_ERR_NOT_FOUND;
-                       }
-               }
-
-       }
-       
-       /* Step 3. Call backend rmdir */
-       DEBUG(4, ("mapistore_rmdir backend delete of fid 0x%"PRIx64" from parent 0x%"PRIx64"\n", fid, parent_fid));
-       ret = mapistore_backend_rmdir(backend_ctx, parent_fid, fid);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Retrieve the number of child folders within a mapistore
-   folder
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param fid the folder identifier
-   \param RowCount pointer to the count result to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_get_folder_count(struct mapistore_context *mstore_ctx,
-                                                        uint32_t context_id,
-                                                        uint64_t fid,
-                                                        uint32_t *RowCount)
-{
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 0. Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Call backend readdir */
-       ret = mapistore_backend_readdir_count(backend_ctx, fid, MAPISTORE_FOLDER_TABLE, RowCount);
-
-       return ret;
-}
-
-
-/**
-   \details Retrieve the number of child messages within a mapistore folder
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param fid the folder identifier
-   \param RowCount pointer to the count result to return
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_get_message_count(struct mapistore_context *mstore_ctx,
-                                                         uint32_t context_id,
-                                                         uint64_t fid,
-                                                         uint32_t *RowCount)
-{
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 0. Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend readdir_count */
-       ret = mapistore_backend_readdir_count(backend_ctx, fid, MAPISTORE_MESSAGE_TABLE, RowCount);
-
-       return ret;
-}
-
-
-/**
-   \details Retrieve a MAPI property from a table
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param table_type the type of table (folders or messges)
-   \param fid the folder identifier where the search takes place
-   \param proptag the MAPI property tag to retrieve value for
-   \param pos the record position in search results
-   \param data pointer on pointer to the data the function returns
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_get_table_property(struct mapistore_context *mstore_ctx,
-                                                          uint32_t context_id,
-                                                          uint8_t table_type,
-                                                          uint64_t fid,
-                                                          enum MAPITAGS proptag,
-                                                          uint32_t pos,
-                                                          void **data)
-{
-       struct backend_context          *backend_ctx;
-       enum MAPISTORE_ERROR            ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend readdir */
-       ret = mapistore_backend_get_table_property(backend_ctx, fid, table_type, pos, proptag, data);
-
-       return ret;
-}
-
-
-/**
-   \details Open a message in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the directory will be opened
-   \param parent_fid the parent folder identifier
-   \param mid the message identifier to open
-   \param pointer to the mapistore_message structure
-
-   \return MAPISTORE SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_openmessage(struct mapistore_context *mstore_ctx,
-                                                   uint32_t context_id,
-                                                   uint64_t parent_fid,
-                                                   uint64_t mid,
-                                                   struct mapistore_message *msg)
-{
-       struct backend_context          *backend_ctx;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend openmessage */
-       ret = mapistore_backend_openmessage(backend_ctx, parent_fid, mid, msg);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Create a message in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-
-   \param context_id the context identifier referencing the backend
-   where the messagewill be created
-   \param parent_fid the parent folder identifier
-   \param mid the message identifier to create
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_createmessage(struct mapistore_context *mstore_ctx,
-                                                     uint32_t context_id,
-                                                     uint64_t parent_fid,
-                                                     uint64_t mid)
-{
-       struct backend_context          *backend_ctx;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       
-       /* Step 2. Call backend createmessage */
-       ret = mapistore_backend_createmessage(backend_ctx, parent_fid, mid);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Commit the changes made to a message in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the message's changes will be saved
-   \param mid the message identifier to save
-   \param flags flags associated to the commit operation
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_savechangesmessage(struct mapistore_context *mstore_ctx,
-                                                          uint32_t context_id,
-                                                          uint64_t mid,
-                                                          uint8_t flags)
-{
-       struct backend_context  *backend_ctx;
-       int                     ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend savechangesmessage */
-       ret = mapistore_backend_savechangesmessage(backend_ctx, mid, flags);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Submits a message for sending.
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the message will be submitted
-   \param mid the message identifier representing the message to submit
-   \param flags flags associated to the submit operation
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_submitmessage(struct mapistore_context *mstore_ctx,
-                                                     uint32_t context_id,
-                                                     uint64_t mid,
-                                                     uint8_t flags)
-{
-       struct backend_context  *backend_ctx;
-       int                     ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend submitmessage */
-       ret = mapistore_backend_submitmessage(backend_ctx, mid, flags);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Get properties of a message/folder in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where properties will be fetched
-   \param fmid the identifier referencing the message/folder
-   \param type the object type (folder or message)
-   \param properties pointer to the list of properties to fetch
-   \param aRow pointer to the SRow structure
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_getprops(struct mapistore_context *mstore_ctx,
-                                                uint32_t context_id,
-                                                uint64_t fmid,
-                                                uint8_t type,
-                                                struct SPropTagArray *properties,
-                                                struct SRow *aRow)
-{
-       struct backend_context  *backend_ctx;
-       int                     ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend getprops */
-       ret = mapistore_backend_getprops(backend_ctx, fmid, type, properties, aRow);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-/**
-   \details Search for a folder ID by name
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the folder will be searched for
-   \param parent_fid the parent folder identifier
-   \param foldername the name of the folder to search for
-   \param fid the fid (result)
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_get_fid_by_name(struct mapistore_context *mstore_ctx,
-                                                       uint32_t context_id,
-                                                       uint64_t parent_fid,
-                                                       const char *name,
-                                                       uint64_t *fid)
-{
-       struct backend_context  *backend_ctx;
-       enum MAPISTORE_ERROR    ret;
-
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-       MAPISTORE_RETVAL_IF(!name, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       MAPISTORE_RETVAL_IF(!fid, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend getprops */
-       ret = mapistore_backend_get_fid_by_name(backend_ctx, parent_fid, name, fid);
-
-       return ret;
-}
-
-/**
-   \details Set properties of a message/folder in mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where properties will be stored
-   \param fmid the identifier referencing the message/folder
-   \param type the object type (folder or message)
-   \param aRow pointer to the SRow structure
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_setprops(struct mapistore_context *mstore_ctx,
-                                                uint32_t context_id,
-                                                uint64_t fmid,
-                                                uint8_t type,
-                                                struct SRow *aRow)
-{
-       struct backend_context  *backend_ctx;
-       int                     ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend setprops */
-       ret = mapistore_backend_setprops(backend_ctx, fmid, type, aRow);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
-
-
-/**
-   \details Retrieve the folder IDs of child folders within a mapistore
-   folder
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   \param fid the folder identifier (for the parent folder)
-   \param child_fids pointer to where to return the array of child fids
-   \param child_fid_count pointer to the count result to return
-
-   \note The caller is responsible for freeing the \p child_fids array
-   when it is no longer required.
-   
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_get_child_fids(struct mapistore_context *mstore_ctx,
-                                                      uint32_t context_id,
-                                                      uint64_t fid,
-                                                      uint64_t *child_fids[],
-                                                      uint32_t *child_fid_count)
-{
-       struct backend_context          *backend_ctx;
-       uint32_t                        i;
-       void                            *data;
-       int                             ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 0. Ensure the context exists */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Call backend readdir to get the folder count */
-       ret = mapistore_backend_readdir_count(backend_ctx, fid, MAPISTORE_FOLDER_TABLE, child_fid_count);
-       MAPISTORE_RETVAL_IF(ret, MAPISTORE_ERR_NO_DIRECTORY, NULL);
-       
-       /* Step 2. Create a suitable sized array for the fids */
-       *child_fids = talloc_zero_array((TALLOC_CTX *)mstore_ctx, uint64_t, *child_fid_count);
-
-       /* Step 3. Fill the array */
-       for (i = 0; i < *child_fid_count; ++i) {
-               // TODO: add error checking for this call
-               ret = mapistore_get_table_property(mstore_ctx, context_id, MAPISTORE_FOLDER_TABLE, fid,
-                                                  PR_FID, i, &data);
-               (*child_fids)[i] = *((uint64_t*)(data));
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Delete a message from mapistore
-
-   \param mstore_ctx pointer to the mapistore context
-   \param context_id the context identifier referencing the backend
-   where the message's to be located is stored
-   \param mid the message identifier of the folder to delete
-   \param flags flags that control the behaviour of the operation (MAPISTORE_SOFT_DELETE
-   or MAPISTORE_PERMANENT_DELETE)
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_deletemessage(struct mapistore_context *mstore_ctx,
-                                                     uint32_t context_id,
-                                                     uint64_t mid,
-                                                     uint8_t flags)
-{
-       struct backend_context  *backend_ctx;
-       int                     ret;
-
-       /* Sanity checks */
-       MAPISTORE_SANITY_CHECKS(mstore_ctx, NULL);
-
-       /* Step 1. Search the context */
-       backend_ctx = mapistore_backend_lookup(mstore_ctx->context_list, context_id);
-       MAPISTORE_RETVAL_IF(!backend_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       /* Step 2. Call backend operation */
-       ret = mapistore_backend_deletemessage(backend_ctx, mid, flags);
-
-       return !ret ? MAPISTORE_SUCCESS : MAPISTORE_ERROR;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_ldb_wrap.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_ldb_wrap.c
deleted file mode 100644 (file)
index ed5d389..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   LDB wrap functions
-
-   Copyright (C) Andrew Tridgell 2004-2009
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "config.h"
-#include <stdio.h>
-#include <string.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include <dlinklist.h>
-#include <ldb.h>
-
-static struct ldb_wrap *ldb_wrap_list;
-
-/*
-  see if two database opens are equivalent
- */
-static bool mapistore_ldb_wrap_same_context(const struct ldb_wrap_context *c1,
-                                           const struct ldb_wrap_context *c2)
-{
-       return (c1->ev == c2->ev &&
-               c1->flags == c2->flags &&
-               (c1->url == c2->url || strcmp(c1->url, c2->url) == 0));
-}
-
-/* 
-   free a ldb_wrap structure
- */
-static int mapistore_ldb_wrap_destructor(struct ldb_wrap *w)
-{
-       DLIST_REMOVE(ldb_wrap_list, w);
-       return 0;
-}
-
-/*
-  wrapped connection to a ldb database
-  to close just talloc_free() the returned ldb_context
-
-  TODO:  We need an error_string parameter
- */
-struct ldb_context *mapistore_ldb_wrap_connect(TALLOC_CTX *mem_ctx,
-                                              struct tevent_context *ev,
-                                              const char *url,
-                                              unsigned int flags)
-{
-       struct ldb_context      *ldb;
-       int                     ret;
-       struct ldb_wrap         *w;
-       struct ldb_wrap_context c;
-
-       c.url          = url;
-       c.ev           = ev;
-       c.flags        = flags;
-
-       /* see if we can re-use an existing ldb */
-       for (w = ldb_wrap_list; w; w = w->next) {
-               if (mapistore_ldb_wrap_same_context(&c, &w->context)) {
-                       return talloc_reference(mem_ctx, w->ldb);
-               }
-       }
-
-       /* we want to use the existing event context if possible. This
-          relies on the fact that in smbd, everything is a child of
-          the main event_context */
-       if (ev == NULL) {
-               return NULL;
-       }
-
-       ldb = ldb_init(mem_ctx, ev);
-       if (ldb == NULL) {
-               return NULL;
-       }
-
-       ldb_set_create_perms(ldb, 0600);
-       
-       ret = ldb_connect(ldb, url, flags, NULL);
-       if (ret != LDB_SUCCESS) {
-               talloc_free(ldb);
-               return NULL;
-       }
-
-       /* add to the list of open ldb contexts */
-       w = talloc(ldb, struct ldb_wrap);
-       if (w == NULL) {
-               talloc_free(ldb);
-               return NULL;
-       }
-
-       w->context = c;
-       w->context.url = talloc_strdup(w, url);
-       if (w->context.url == NULL) {
-               talloc_free(ldb);
-               return NULL;
-       }
-
-       w->ldb = ldb;
-
-       DLIST_ADD(ldb_wrap_list, w);
-
-       DEBUG(3,("ldb_wrap open of %s\n", url));
-
-       talloc_set_destructor(w, mapistore_ldb_wrap_destructor);
-
-       return ldb;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_namedprops.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_namedprops.c
deleted file mode 100644 (file)
index fb43b8d..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include "libmapi/libmapi_private.h"
-#include <ldb.h>
-
-#include <sys/stat.h>
-
-static const char *mapistore_namedprops_get_ldif_path(void)
-{
-       return MAPISTORE_LDIF;
-}
-
-/**
-   \details Initialize the named properties database or return pointer
-   to the existing one if already initialized/opened.
-
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer on pointer to the ldb context the function
-   returns
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_namedprops_init(TALLOC_CTX *mem_ctx, void **_ldb_ctx)
-{
-       int                     ret;
-       struct stat             sb;
-       struct ldb_context      *ldb_ctx = NULL;
-       struct ldb_ldif         *ldif;
-       char                    *filename;
-       FILE                    *f;
-       struct tevent_context   *ev;
-       char                    *database;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-       MAPISTORE_RETVAL_IF(!_ldb_ctx, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
-
-       ev = tevent_context_init(mem_ctx);
-       MAPISTORE_RETVAL_IF(!ev, MAPISTORE_ERR_NO_MEMORY, NULL);
-
-       database = talloc_asprintf(mem_ctx, "%s/%s", mapistore_get_mapping_path(), MAPISTORE_DB_NAMED);
-       DEBUG(0, ("database = %s\n", database));
-
-       /* Step 1. Stat the database and populate it if it doesn't exist */
-       if (stat(database, &sb) == -1) {
-               ldb_ctx = mapistore_ldb_wrap_connect(ldb_ctx, ev, database, 0);
-               talloc_free(database);
-               MAPISTORE_RETVAL_IF(!ldb_ctx, MAPISTORE_ERR_DATABASE_INIT, NULL);
-
-               filename = talloc_asprintf(mem_ctx, "%s/mapistore_namedprops.ldif", 
-                                          mapistore_namedprops_get_ldif_path());
-               f = fopen(filename, "r");
-               talloc_free(filename);
-               MAPISTORE_RETVAL_IF(!f, MAPISTORE_ERROR, NULL);
-
-               while ((ldif = ldb_ldif_read_file(ldb_ctx, f))) {
-                       struct ldb_message *normalized_msg;
-                       ret = ldb_msg_normalize(ldb_ctx, mem_ctx, ldif->msg, &normalized_msg);
-                       MAPISTORE_RETVAL_IF(ret, MAPISTORE_ERR_DATABASE_INIT, NULL);
-                       ret = ldb_add(ldb_ctx, normalized_msg);
-                       talloc_free(normalized_msg);
-                       if (ret != LDB_SUCCESS) {
-                               fclose(f);
-                               MAPISTORE_RETVAL_IF(ret, MAPISTORE_ERR_DATABASE_INIT, NULL);
-                       }
-                       ldb_ldif_read_free(ldb_ctx, ldif);
-               }
-               fclose(f);
-
-       } else {
-               ldb_ctx = mapistore_ldb_wrap_connect(ldb_ctx, ev, database, 0);
-               talloc_free(database);
-               MAPISTORE_RETVAL_IF(!ldb_ctx, MAPISTORE_ERR_DATABASE_INIT, NULL);
-       }
-
-       *_ldb_ctx = ldb_ctx;
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details return the mapped property ID matching the nameid
-   structure passed in parameter.
-
-   \param _ldb_ctx pointer to the namedprops ldb context
-   \param nameid the MAPINAMEID structure to lookup
-   \param propID pointer to the property ID the function returns
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR
- */
-_PUBLIC_ int mapistore_namedprops_get_mapped_id(void *_ldb_ctx, 
-                                               struct MAPINAMEID nameid, 
-                                               uint16_t *propID)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx = (struct ldb_context *)_ldb_ctx;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       int                     ret;
-       char                    *filter = NULL;
-       char                    *guid;
-
-       /* Sanity checks */
-       MAPISTORE_RETVAL_IF(!ldb_ctx, MAPISTORE_ERROR, NULL);
-       MAPISTORE_RETVAL_IF(!propID, MAPISTORE_ERROR, NULL);
-
-       *propID = 0;
-       mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_get_mapped_propID");
-       guid = GUID_string(mem_ctx, (const struct GUID *)&nameid.lpguid);
-
-       switch (nameid.ulKind) {
-       case MNID_ID:
-               filter = talloc_asprintf(mem_ctx, "(&(objectClass=MNID_ID)(oleguid=%s)(cn=0x%.4x))",
-                                        guid, nameid.kind.lid);
-               break;
-       case MNID_STRING:
-               filter = talloc_asprintf(mem_ctx, "(&(objectClass=MNID_STRING)(oleguid=%s)(cn=%s))",
-                                        guid, nameid.kind.lpwstr.Name);
-               break;
-       }
-       talloc_free(guid);
-
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
-                        LDB_SCOPE_SUBTREE, attrs, "%s", filter);
-       MAPISTORE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPISTORE_ERROR, mem_ctx);
-
-       *propID = ldb_msg_find_attr_as_uint(res->msgs[0], "mapped_id", 0);
-       MAPISTORE_RETVAL_IF(!*propID, MAPISTORE_ERROR, mem_ctx);
-
-       talloc_free(filter);
-       talloc_free(mem_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_private.h b/branches/plugfest/mapiproxy/libmapistore/mapistore_private.h
deleted file mode 100644 (file)
index c01f69f..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MAPISTORE_PRIVATE_H__
-#define        __MAPISTORE_PRIVATE_H__
-
-#include <talloc.h>
-
-void mapistore_set_errno(int);
-
-#define        MAPISTORE_RETVAL_IF(x,e,c)      \
-do {                                   \
-       if (x) {                        \
-               mapistore_set_errno(e); \
-               if (c) {                \
-                       talloc_free(c); \
-               }                       \
-               return (e);             \
-       }                               \
-} while (0);
-
-#define        MAPISTORE_SANITY_CHECKS(x,c)                                            \
-MAPISTORE_RETVAL_IF(!x, MAPISTORE_ERR_NOT_INITIALIZED, c);                     \
-MAPISTORE_RETVAL_IF(!x->processing_ctx, MAPISTORE_ERR_NOT_INITIALIZED, c);     \
-MAPISTORE_RETVAL_IF(!x->context_list, MAPISTORE_ERR_NOT_INITIALIZED, c);
-
-#ifndef        ISDOT
-#define ISDOT(path) ( \
-                       *((const char *)(path)) == '.' && \
-                       *(((const char *)(path)) + 1) == '\0' \
-                   )
-#endif
-
-#ifndef        ISDOTDOT
-#define ISDOTDOT(path) ( \
-                           *((const char *)(path)) == '.' && \
-                           *(((const char *)(path)) + 1) == '.' && \
-                           *(((const char *)(path)) + 2) == '\0' \
-                       )
-#endif
-
-
-struct tdb_wrap {
-       struct tdb_context      *tdb;
-       const char              *name;
-       struct tdb_wrap         *prev;
-       struct tdb_wrap         *next;
-};
-
-struct ldb_wrap_context {
-       const char              *url;
-       struct tevent_context   *ev;
-       unsigned int            flags;
-};
-
-struct ldb_wrap {
-  struct ldb_wrap                      *next;
-       struct ldb_wrap                 *prev;
-       struct ldb_wrap_context         context;
-       struct ldb_context              *ldb;
-};
-
-
-/**
-   mapistore database context.
-
-   This structure stores parameters for mapistore database
-   initialization and backend initialization.
- */
-#define        DFLT_MDB_FIRSTORG       "First Organization"
-#define        DFLT_MDB_FIRSTOU        "First Organization Unit"
-#define        TMPL_MDB_SERVERDN       "CN=%s,%s"
-#define        TMPL_MDB_FIRSTORGDN     "CN=%s,CN=%s,%s"
-
-struct mapistoredb_conf {
-       char            *db_path;
-       char            *mstore_path;
-       char            *netbiosname;
-       char            *dnsdomain;
-       char            *domain;
-       char            *domaindn;
-       char            *serverdn;
-       char            *firstorg;
-       char            *firstou;
-       char            *firstorgdn;
-};
-
-struct mapistoredb_context {
-       struct ldb_context              *ldb_ctx;
-       struct loadparm_context         *lp_ctx;
-       struct tevent_context           *ev;
-       struct mapistoredb_conf         *param;
-       struct mapistore_context        *mstore_ctx;
-};
-
-#define        MDB_INIT_LDIF_TMPL              \
-       "dn: @OPTIONS\n"                \
-       "checkBaseOnSearch: TRUE\n\n"   \
-       "dn: @INDEXLIST\n"              \
-       "@IDXATTR: cn\n\n"              \
-       "dn: @ATTRIBUTES@\n"            \
-       "cn: CASE_INSENSITIVE\n"        \
-       "dn: CASE_INSENSITIVE\n\n"
-
-#define        MDB_ROOTDSE_LDIF_TMPL                                           \
-       "dn: @ROOTDSE\n"                                                \
-       "defaultNamingContext: CN=%s,%s,%s\n"                           \
-       "rootDomainNamingContext: %s\n"                                 \
-       "vendorName: OpenChange Project (http://www.openchange.org)\n\n"
-
-#define        MDB_SERVER_LDIF_TMPL            \
-       "dn: %s\n"                      \
-       "objectClass: top\n"            \
-       "objectClass: server\n"         \
-       "cn: %s\n"                      \
-       "ReplicaID: 0x1\n\n"            \
-                                       \
-       "dn: CN=%s,%s\n"                \
-       "objectClass: top\n"            \
-       "objectClass: org\n"            \
-       "cn: %s\n\n"                    \
-                                       \
-       "dn: CN=%s,CN=%s,%s\n"          \
-       "objectClass: top\n"            \
-       "objectClass: ou\n"             \
-       "cn: %s\n"
-
-
-/**
-   Identifier mapping context.
-
-   This structure stores PR_MID and PR_FID identifiers to backend
-   identifiers mapping. It points to a database containing the used
-   identifiers.
-
-   The last_id structure member references the last identifier value
-   which got created. There is no identifier available with a value
-   higher than last_id.
- */
-struct id_mapping_context {
-       struct tdb_wrap         *used_ctx;
-       uint64_t                last_id;
-};
-
-
-/**
-   Free context identifier list
-
-   This structure is a double chained list storing unused context
-   identifiers.
- */
-struct context_id_list {
-       uint32_t                context_id;
-       struct context_id_list  *prev;
-       struct context_id_list  *next;
-};
-
-
-struct processing_context {
-       struct id_mapping_context       *mapping_ctx;
-       struct context_id_list          *free_ctx;
-       uint32_t                        last_context_id;
-       uint64_t                        dflt_start_id;
-};
-
-
-/**
-   Indexing identifier list
- */
-struct indexing_context_list {
-       struct tdb_wrap                 *index_ctx;
-       char                            *username;
-       uint32_t                        ref_count;
-       struct indexing_context_list    *prev;
-       struct indexing_context_list    *next;
-};
-
-#define        MAPISTORE_DB_NAMED              "named_properties.ldb"
-#define        MAPISTORE_DB_INDEXING           "indexing.tdb"
-#define        MAPISTORE_SOFT_DELETED_TAG      "SOFT_DELETED:"
-
-/**
-   The database name where in use ID mappings are stored
- */
-#define        MAPISTORE_DB_LAST_ID_KEY        "mapistore_last_id"
-#define        MAPISTORE_DB_LAST_ID_VAL        0x15000
-
-#define        MAPISTORE_DB_NAME_USED_ID       "mapistore_id_mapping_used.tdb"
-
-/**
-   Mapistore opaque context to pass down to backends
-
-   Semantically, encapsulating the mstore_ctx within a container's
-   structure help abstracting mapistore logic from backend's
-   perspective and write a specific API dealing exclusively with this
-   particular context.
- */
-struct mapistore_backend_context {
-       struct mapistore_context        *mstore_ctx;
-};
-
-__BEGIN_DECLS
-
-/* definitions from mapistore_processing.c */
-enum MAPISTORE_ERROR mapistore_init_mapping_context(struct processing_context *);
-enum MAPISTORE_ERROR mapistore_get_context_id(struct processing_context *, uint32_t *);
-enum MAPISTORE_ERROR mapistore_free_context_id(struct processing_context *, uint32_t);
-
-
-/* definitions from mapistore_backend.c */
-enum MAPISTORE_ERROR mapistore_backend_init(TALLOC_CTX *, const char *);
-struct backend_context *mapistore_backend_create_context(TALLOC_CTX *, const char *, const char *);
-enum MAPISTORE_ERROR mapistore_backend_add_ref_count(struct backend_context *);
-enum MAPISTORE_ERROR mapistore_backend_delete_context(struct backend_context *);
-enum MAPISTORE_ERROR mapistore_backend_create_uri(TALLOC_CTX *, enum MAPISTORE_DFLT_FOLDERS, const char *, const char *, char **);
-enum MAPISTORE_ERROR mapistore_backend_release_record(struct backend_context *, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_get_path(struct backend_context *, uint64_t, uint8_t, char **);
-enum MAPISTORE_ERROR mapistore_backend_opendir(struct backend_context *, uint64_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_backend_mkdir(struct backend_context *, uint64_t, uint64_t, struct SRow *);
-enum MAPISTORE_ERROR mapistore_backend_readdir_count(struct backend_context *, uint64_t, uint8_t, uint32_t *);
-enum MAPISTORE_ERROR mapistore_backend_rmdir(struct backend_context *, uint64_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_backend_get_table_property(struct backend_context *, uint64_t, uint8_t, uint32_t, 
-                                                         enum MAPITAGS, void **);
-enum MAPISTORE_ERROR mapistore_backend_openmessage(struct backend_context *, uint64_t, uint64_t, struct mapistore_message *);
-enum MAPISTORE_ERROR mapistore_backend_createmessage(struct backend_context *, uint64_t, uint64_t);
-enum MAPISTORE_ERROR mapistore_backend_savechangesmessage(struct backend_context *, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_backend_submitmessage(struct backend_context *, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_backend_getprops(struct backend_context *, uint64_t, uint8_t, 
-                                               struct SPropTagArray *, struct SRow *);
-enum MAPISTORE_ERROR mapistore_backend_setprops(struct backend_context *, uint64_t, uint8_t, struct SRow *);
-enum MAPISTORE_ERROR mapistore_backend_get_fid_by_name(struct backend_context *, uint64_t, const char *, uint64_t *);
-enum MAPISTORE_ERROR mapistore_backend_deletemessage(struct backend_context *, uint64_t, uint8_t);
-
-/* definitions from mapistore_tdb_wrap.c */
-struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *, const char *, int, int, int, mode_t);
-
-/* definitions from mapistore_ldb_wrap.c */
-struct ldb_context *mapistore_ldb_wrap_connect(TALLOC_CTX *, struct tevent_context *, const char *, unsigned int);
-
-/* definitions from mapistore_indexing.c */
-struct indexing_context_list *mapistore_indexing_search(struct mapistore_context *, const char *);
-enum MAPISTORE_ERROR mapistore_indexing_search_existing_fmid(struct indexing_context_list *, uint64_t, bool *);
-enum MAPISTORE_ERROR mapistore_indexing_record_add_fmid(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_indexing_record_del_fmid(struct mapistore_context *, uint32_t, uint64_t, uint8_t);
-enum MAPISTORE_ERROR mapistore_indexing_add_ref_count(struct indexing_context_list *);
-enum MAPISTORE_ERROR mapistore_indexing_del_ref_count(struct indexing_context_list *);
-
-/* definitions from mapistore_namedprops.c */
-enum MAPISTORE_ERROR mapistore_namedprops_init(TALLOC_CTX *, void **);
-
-__END_DECLS
-
-#endif /* ! __MAPISTORE_PRIVATE_H__ */
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_processing.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_processing.c
deleted file mode 100644 (file)
index d9a458f..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include <sys/types.h>
-
-#define __STDC_FORMAT_MACROS   1
-#include <inttypes.h>
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include <dlinklist.h>
-#include "libmapi/libmapi_private.h"
-
-#include <tdb.h>
-
-char   *mapping_path = NULL;
-char   *mapistore_dbpath = NULL;
-char   *mapistore_firstorgdn = NULL;
-
-/**
-   \details Set the mapping path
-
-   \param path pointer to the mapping path
-
-   \note The mapping path can be set unless id_mapping_context is
-   initialized. If path is NULL and mapping path is not yet
-   initialized, then mapping_path will be reset to its default value
-   when the initialization routine is called.
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-_PUBLIC_ enum MAPISTORE_ERROR mapistore_set_mapping_path(const char *path)
-{
-       TALLOC_CTX      *mem_ctx;
-       DIR             *dir;
-
-       /* Case 1. Path is set to NULL */
-       if (!path) {
-               if (mapping_path) {
-                       talloc_free(mapping_path);
-               }
-               mapping_path = NULL;
-               return MAPISTORE_SUCCESS;
-       }
-
-       if (mapping_path) {
-               talloc_free(mapping_path);
-       }
-
-       /* Case 2. path is initialized */
-
-       /* Step 1. Check if path is valid path */
-       dir = opendir(path);
-       if (!dir) {
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-
-       /* Step 2. TODO: Check for write permissions */
-
-       if (closedir(dir) == -1) {
-               /* FIXME: Should have a better error name here */
-               return MAPISTORE_ERR_NO_DIRECTORY;
-       }
-       
-       mem_ctx = talloc_autofree_context();
-       mapping_path = talloc_strdup(mem_ctx, path);
-       return MAPISTORE_SUCCESS;
-}
-
-/**
-   \details Return the current mapping path
-
-   \return pointer to the mapping path.
- */
-const char *mapistore_get_mapping_path(void)
-{
-       return (!mapping_path) ? MAPISTORE_MAPPING_PATH : (const char *)mapping_path;
-}
-
-
-/**
-   \details Set the mapistore.ldb mapping path
-
-   \param dbname string pointer to the mapistore database path
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_set_database_path(const char *dbname)
-{
-       TALLOC_CTX      *mem_ctx;
-
-       if (!dbname) {
-               if (mapistore_dbpath) {
-                       talloc_free(mapistore_dbpath);
-               }
-               mapistore_dbpath = NULL;
-               return MAPISTORE_SUCCESS;
-       }
-
-       if (mapistore_dbpath) {
-               talloc_free(mapistore_dbpath);
-               mapistore_dbpath = NULL;
-       }
-
-       mem_ctx = talloc_autofree_context();
-       mapistore_dbpath = talloc_strdup(mem_ctx, dbname);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-enum MAPISTORE_ERROR mapistore_set_firstorgdn(const char *firstou, const char *firstorg, const char *serverdn)
-{
-       TALLOC_CTX      *mem_ctx;
-
-       if (mapistore_firstorgdn) {
-               talloc_free(mapistore_firstorgdn);
-       }
-
-       mem_ctx = talloc_autofree_context();
-       mapistore_firstorgdn = talloc_asprintf(mem_ctx, TMPL_MDB_FIRSTORGDN, firstou, firstorg, serverdn);
-       if (!mapistore_firstorgdn) {
-               DEBUG(5, ("! [%s:%d][%s]: Unable to allocate memory to set firstorgdn\n", 
-                         __FILE__, __LINE__, __FUNCTION__));
-               return MAPISTORE_ERR_NO_MEMORY;
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-const char *mapistore_get_firstorgdn(void)
-{
-       return mapistore_firstorgdn;
-}
-
-/**
-   \details Return the current path to mapistore.ldb database
-
-   \return pointer to the mapistore database path
- */
-const char *mapistore_get_database_path(void)
-{
-       return (!mapistore_dbpath) ? MAPISTORE_DBPATH : (const char *) mapistore_dbpath;
-}
-
-
-
-
-
-/**
-   \details Initialize the ID mapping context or return the existing
-   one if already initialized.
-
-   \param pctx pointer to the processing context
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_init_mapping_context(struct processing_context *pctx)
-{
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       TALLOC_CTX      *mem_ctx;
-       char            *dbpath;
-       uint64_t        last_id;
-       char            *tmp_buf;
-       int             ret;
-
-       if (!pctx) return MAPISTORE_ERR_NOT_INITIALIZED;
-       if (pctx->mapping_ctx) return MAPISTORE_ERR_ALREADY_INITIALIZED;
-
-       pctx->mapping_ctx = talloc_zero(pctx, struct id_mapping_context);
-       if (!pctx->mapping_ctx) return MAPISTORE_ERR_NO_MEMORY;
-
-       mem_ctx = talloc_named(NULL, 0, "mapistore_init_mapping_context");
-
-       /* Open/Create the used ID database */
-       if (!pctx->mapping_ctx->used_ctx) {
-               dbpath = talloc_asprintf(mem_ctx, "%s/%s", mapistore_get_mapping_path(), MAPISTORE_DB_NAME_USED_ID);
-               pctx->mapping_ctx->used_ctx = tdb_wrap_open(pctx, dbpath, 0, 0, O_RDWR|O_CREAT, 0600);
-               talloc_free(dbpath);
-               if (!pctx->mapping_ctx->used_ctx) {
-                       DEBUG(3, ("[%s:%d]: %s\n", __FUNCTION__, __LINE__, strerror(errno)));
-                       talloc_free(mem_ctx);
-                       talloc_free(pctx->mapping_ctx);
-                       return MAPISTORE_ERR_DATABASE_INIT;
-               }
-       }
-
-       /* Retrieve the last ID value */
-       key.dptr = (unsigned char *) MAPISTORE_DB_LAST_ID_KEY;
-       key.dsize = strlen(MAPISTORE_DB_LAST_ID_KEY);
-
-       dbuf = tdb_fetch(pctx->mapping_ctx->used_ctx->tdb, key);
-
-       /* If the record doesn't exist, insert it */
-       if (!dbuf.dptr || !dbuf.dsize) {
-               dbuf.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%"PRIx64, (uint64_t) MAPISTORE_DB_LAST_ID_VAL);
-               dbuf.dsize = strlen((const char *) dbuf.dptr);
-               last_id = MAPISTORE_DB_LAST_ID_VAL;
-
-               ret = tdb_store(pctx->mapping_ctx->used_ctx->tdb, key, dbuf, TDB_INSERT);
-               talloc_free(dbuf.dptr);
-               if (ret == -1) {
-                       DEBUG(3, ("[%s:%d]: Unable to create %s record: %s\n", __FUNCTION__, __LINE__,
-                                 MAPISTORE_DB_LAST_ID_KEY, tdb_errorstr(pctx->mapping_ctx->used_ctx->tdb)));
-                       talloc_free(mem_ctx);
-                       talloc_free(pctx->mapping_ctx);
-
-                       return MAPISTORE_ERR_DATABASE_OPS;
-               }
-
-       } else {
-               tmp_buf = talloc_strndup(mem_ctx, (char *)dbuf.dptr, dbuf.dsize);
-               free(dbuf.dptr);
-               last_id = strtoull(tmp_buf, NULL, 16);
-               talloc_free(tmp_buf);
-       }
-
-       pctx->mapping_ctx->last_id = last_id;
-
-       talloc_free(mem_ctx);
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Return an unused or new context identifier
-
-   \param pctx pointer to the processing context
-   \param context_id pointer to the context identifier the function
-   returns
-
-   \return a non zero context identifier on success, otherwise 0.
- */
-enum MAPISTORE_ERROR mapistore_get_context_id(struct processing_context *pctx, uint32_t *context_id)
-{
-       struct context_id_list  *el;
-
-       /* Sanity checks */
-       if (!pctx) return MAPISTORE_ERR_NOT_INITIALIZED;
-
-       /* Step 1. The free context list doesn't exist yet */
-       if (!pctx->free_ctx) {
-               pctx->last_context_id++;
-               *context_id = pctx->last_context_id;
-       }
-
-       /* Step 2. We have a free list */
-       for (el = pctx->free_ctx; el; el = el->next) {
-               if (el->context_id) {
-                       *context_id = el->context_id;
-                       DLIST_REMOVE(pctx->free_ctx, el);
-                       break;
-               }
-       }
-
-       return MAPISTORE_SUCCESS;
-}
-
-
-/**
-   \details Add a context identifier to the list
-
-   \param pctx pointer to the processing context
-   \param context_id the identifier referencing the context to free
-
-   \return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
- */
-enum MAPISTORE_ERROR mapistore_free_context_id(struct processing_context *pctx, uint32_t context_id)
-{
-       struct context_id_list  *el;
-
-       /* Sanity checks */
-       if (!pctx) return MAPISTORE_ERR_NOT_INITIALIZED;
-
-       /* Step 1. Ensure the list is not corrupted */
-       for (el = pctx->free_ctx; el; el = el->next) {
-               if (el->context_id == context_id) {
-                       return MAPISTORE_ERR_CORRUPTED;
-               }
-       }
-
-       /* Step 2. Create the element and add it to the list */
-       el = talloc_zero((TALLOC_CTX *)pctx, struct context_id_list);
-       el->context_id = context_id;
-       DLIST_ADD_END(pctx->free_ctx, el, struct context_id_list *);
-
-       return MAPISTORE_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/mapistore_tdb_wrap.c b/branches/plugfest/mapiproxy/libmapistore/mapistore_tdb_wrap.c
deleted file mode 100644 (file)
index f635be3..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   TDB wrap functions
-
-   Copyright (C) Andrew Tridgell 2004
-   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "config.h"
-#include <stdio.h>
-#include <string.h>
-
-#include "mapistore_errors.h"
-#include "mapistore.h"
-#include "mapistore_private.h"
-#include <dlinklist.h>
-
-static struct tdb_wrap *tdb_list;
-
-/* destroy the last connection to a tdb */
-static int tdb_wrap_destructor(struct tdb_wrap *w)
-{
-       tdb_close(w->tdb);
-       DLIST_REMOVE(tdb_list, w);
-       return 0;
-}                               
-
-/*
- Log tdb messages via DEBUG().
-*/
-static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level, 
-                        const char *format, ...) PRINTF_ATTRIBUTE(3,4);
-
-static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level, 
-                        const char *format, ...)
-{
-       va_list ap;
-       char    *ptr = NULL;
-       int     dl;
-       int     ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&ptr, format, ap);
-       va_end(ap);
-       
-       switch (level) {
-       case TDB_DEBUG_FATAL:
-               dl = 0;
-               break;
-       case TDB_DEBUG_ERROR:
-               dl = 1;
-               break;
-       case TDB_DEBUG_WARNING:
-               dl = 2;
-               break;
-       case TDB_DEBUG_TRACE:
-               dl = 5;
-               break;
-       default:
-               dl = 0;
-       }               
-
-       if (ptr != NULL) {
-               const char *name = tdb_name(tdb);
-               DEBUG(dl, ("tdb(%s): %s", name ? name : "unnamed", ptr));
-               free(ptr);
-       }
-}
-
-
-/**
-   \details wrapped connection to a tdb database
-
-   \param mem_ctx pointer to the memory context
-   \param name tdb database name
-   \param hash_size the hash size
-   \param tdb_flags TDB flags
-   \param open_flags open flags
-   \param mode 
-
-   \note to close just talloc_free() the tdb_wrap pointer
-
-   \return pointer to an allocated tdb_wrap structure on success,
-   otherwise NULL
- */
-struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, const char *name, 
-                              int hash_size, int tdb_flags,
-                              int open_flags, mode_t mode)
-{
-       struct tdb_wrap                 *w;
-       struct tdb_logging_context      log_ctx;
-
-       log_ctx.log_fn = tdb_wrap_log;
-
-       for (w = tdb_list; w; w = w->next) {
-               if (strcmp(name, w->name) == 0) {
-                       return talloc_reference(mem_ctx, w);
-               }
-       }
-
-       w = talloc(mem_ctx, struct tdb_wrap);
-       if (w == NULL) {
-               return NULL;
-       }
-
-       w->name = talloc_strdup(w, name);
-
-       w->tdb = tdb_open_ex(name, hash_size, tdb_flags, 
-                            open_flags, mode, &log_ctx, NULL);
-       if (w->tdb == NULL) {
-               talloc_free(w);
-               return NULL;
-       }
-
-       talloc_set_destructor(w, tdb_wrap_destructor);
-
-       DLIST_ADD(tdb_list, w);
-
-       return w;
-}
diff --git a/branches/plugfest/mapiproxy/libmapistore/tests/mapistore_test.c b/branches/plugfest/mapiproxy/libmapistore/tests/mapistore_test.c
deleted file mode 100644 (file)
index 8c072d7..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-   OpenChange Storage Abstraction Layer library test tool
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/libmapistore/mapistore.h"
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include <talloc.h>
-#include <core/ntstatus.h>
-#include <samba/popt.h>
-#include <param.h>
-#include <util/debug.h>
-
-/**
-   \file mapistore_test.c
-
-   \brief Test mapistore implementation
- */
-
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       int                             retval;
-       struct mapistore_context        *mstore_ctx;
-       struct loadparm_context         *lp_ctx;
-       poptContext                     pc;
-       int                             opt;
-       const char                      *opt_debug = NULL;
-       uint32_t                        context_id = 0;
-       uint32_t                        context_id2 = 0;
-       uint32_t                        context_id3 = 0;
-
-       enum { OPT_DEBUG=1000 };
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               { "debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG,  "set the debug level", NULL },
-               { NULL, 0, 0, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "mapistore_test");
-       lp_ctx = loadparm_init(mem_ctx);
-       lpcfg_load_default(lp_ctx);
-       setup_logging(NULL, DEBUG_STDOUT);
-       
-       pc = poptGetContext("mapistore_test", argc, argv, long_options, 0);
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               }
-       }
-
-       poptFreeContext(pc);
-
-       if (opt_debug) {
-               lpcfg_set_cmdline(lp_ctx, "log level", opt_debug);
-       }
-       
-       retval = mapistore_set_mapping_path("/tmp");
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       mstore_ctx = mapistore_init(mem_ctx, NULL);
-       if (!mstore_ctx) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       retval = mapistore_add_context(mstore_ctx, "sqlite:///tmp/test.db", &context_id);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       retval = mapistore_add_context(mstore_ctx, "sqlite:///tmp/test2.db", &context_id2);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       DEBUG(0, ("Context ID: [1] = %d and [2] = %d\n", context_id, context_id2));
-
-
-       retval = mapistore_add_context(mstore_ctx, "fsocpf:///tmp/fsocpf", &context_id3);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       retval = mapistore_del_context(mstore_ctx, context_id);
-       retval = mapistore_del_context(mstore_ctx, context_id2);
-       retval = mapistore_del_context(mstore_ctx, context_id3);
-
-       retval = mapistore_release(mstore_ctx);
-       if (retval != MAPISTORE_SUCCESS) {
-               DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-               exit (1);
-       }
-
-       return 0;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_cache.c b/branches/plugfest/mapiproxy/modules/mpm_cache.c
deleted file mode 100644 (file)
index dce27c4..0000000
+++ /dev/null
@@ -1,1179 +0,0 @@
-/*
-   MAPI Proxy - Cache module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mpm_cache.c
-   
-   \brief Cache messages and attachments so we can reduce WAN traffic
- */
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/modules/mpm_cache.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <time.h>
-
-struct mpm_cache *mpm = NULL;
-
-/**
-   \details Find the position of the given MAPI call in a serialized
-   MAPI request.
-
-   If the request includes a Release call, then request and replies
-   indexes for other calls will mismatch.
-
-   \param opnum The MAPI opnum to seek
-   \param mapi_req Pointer to the MAPI request calls array
-
-   \return On success, returns the call position, otherwise -1.
- */
-static uint32_t cache_find_call_request_index(uint8_t opnum, struct EcDoRpc_MAPI_REQ *mapi_req)
-{
-       uint32_t        i;
-
-       for (i = 0; mapi_req[i].opnum; i++) {
-               if (mapi_req[i].opnum == opnum) {
-                       return i;
-               }
-       }
-
-       return -1;
-}
-
-/**
-   \details Dump time statistic between OpenStream and Release
-
-   This function monitors the effective time required to open, read
-   and close a stream.
-
-   \param stream the mpm_stream entry
- */
-static void cache_dump_stream_stat(struct mpm_stream *stream)
-{
-       TALLOC_CTX      *mem_ctx;
-       struct timeval  tv_end;
-       uint64_t        sec;
-       uint64_t        usec;
-       char            *name;
-       const char      *stage;
-
-       mem_ctx = (TALLOC_CTX *)mpm;
-
-       if (stream->attachment) {
-               name = talloc_asprintf(mem_ctx, "0x%"PRIx64"/0x%"PRIx64"/%d",
-                                      stream->attachment->message->FolderId,
-                                      stream->attachment->message->MessageId,
-                                      stream->attachment->AttachmentID);
-       } else if (stream->message) {
-               name = talloc_asprintf(mem_ctx, "0x%"PRIx64"/0x%"PRIx64,
-                                      stream->message->FolderId,
-                                      stream->message->MessageId);
-       } else {
-               return;
-       }
-
-       gettimeofday(&tv_end, NULL);
-       sec = tv_end.tv_sec - stream->tv_start.tv_sec;
-       if ((tv_end.tv_usec - stream->tv_start.tv_usec) < 0) {
-               sec -= 1;
-               usec = tv_end.tv_usec + stream->tv_start.tv_usec;
-               while (usec > 1000000) {
-                       usec -= 1000000;
-                       sec += 1;
-               }
-       } else {
-               usec = tv_end.tv_usec - stream->tv_start.tv_usec;
-       }
-
-       if (stream->ahead == true) {
-               stage = "[read ahead]";
-       } else if ((stream->ahead == false) && (stream->cached == true)) {
-               stage = "[cached mode]";
-       } else {
-               stage = "[non cached]";
-       }
-
-       DEBUG(1, ("STATISTIC: %-20s %s The difference is %ld seconds %ld microseconds\n", 
-                 stage, name, (long int)sec, (long int)usec));
-       talloc_free(name);
-}
-
-
-/**
-   \details
-
-   1. close the existing FILE *
-   2. build complete file path
-   3. replace __FILE__ arguments with complete file path
-   4. call execve
-   5. stat the sync'd file
-   6. open the stream again
-   7. mark the file as cached
-
-   \param stream pointer on the mpm_stream entry
- */
-static NTSTATUS cache_exec_sync_cmd(struct mpm_stream *stream)
-{
-       uint32_t        i;
-       int             ret = 0;
-       char            **args;
-       struct stat     sb;
-       pid_t           pid;
-       int             status;
-
-       mpm_cache_stream_close(stream);
-
-       for (i = 0; mpm->sync_cmd[i]; i++);
-
-       args = talloc_array((TALLOC_CTX *)mpm, char *, i + 1);
-
-       for (i = 0; mpm->sync_cmd[i]; i++){
-               if (strstr(mpm->sync_cmd[i], "__FILE__")) {
-                       args[i] = string_sub_talloc((TALLOC_CTX *)args, mpm->sync_cmd[i], "__FILE__", stream->filename);
-               } else {
-                       args[i] = talloc_strdup((TALLOC_CTX *)args, mpm->sync_cmd[i]);
-               }
-       }
-       args[i] = NULL;
-
-       for (i = 0; args[i]; i++){
-               DEBUG(0, ("'%s' ", args[i]));
-       }
-       DEBUG(0, ("\n"));
-
-       switch(pid = fork()) {
-       case -1:
-               DEBUG(0, ("Failed to fork\n"));
-               break;
-       case 0:
-               ret = execve(args[0], args, NULL);
-               break;
-       default:
-               wait(&status);
-               break;
-       }
-       talloc_free(args);
-       if (ret == -1) {
-               perror("execve: ");
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       ret = stat(stream->filename, &sb);
-       if (ret == -1) {
-               perror("stat: ");
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       if (sb.st_size != stream->StreamSize) {
-               DEBUG(0, ("Sync'd file size is 0x%x and 0x%x was expected\n",
-                         (uint32_t)sb.st_size, stream->StreamSize));
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       mpm_cache_stream_open(mpm, stream);
-       stream->cached = true;
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Track down Release calls and update the mpm_cache global
-   list - removing associated entries.
-
-   This function recursively remove child entries whenever necessary.
-
-   \param dce_call pointer to the session context
-   \param EcDoRpc pointer to the EcDoRpc operation
-   \param handle_idx the handle to track down
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_pull_Release(struct dcesrv_call_state *dce_call,
-                                  struct EcDoRpc *EcDoRpc, 
-                                  uint32_t handle_idx)
-{
-       struct mpm_message              *message;
-       struct mpm_attachment           *attach;
-       struct mpm_stream               *stream;
-
-       /* Look over messages */
-       for (message = mpm->messages; message; message = message->next) {
-               if ((mpm_session_cmp(message->session, dce_call) == true) &&
-                   (EcDoRpc->in.mapi_request->handles[handle_idx] == message->handle)) {
-                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Message 0x%"PRIx64" 0x%"PRIx64": 0x%x\n", 
-                                 MPM_LOCATION, MPM_SESSION(message), message->FolderId, 
-                                 message->MessageId, message->handle));
-
-                       /* Loop over children attachments */
-                       attach = mpm->attachments;
-                       while (attach) {
-                               if ((mpm_session_cmp(attach->session, dce_call) == true) &&
-                                   (message->handle == attach->parent_handle)) {
-                                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del recursive 1: Attachment %d: 0x%x\n", MPM_LOCATION,
-                                                 MPM_SESSION(attach), attach->AttachmentID, attach->handle));
-
-                                       /* Loop over children streams */
-                                       stream = mpm->streams;
-                                       while (stream) {
-                                               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                                                   (attach->handle == stream->parent_handle)) {
-                                                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del recursive 1-2: Stream 0x%x\n", 
-                                                                 MPM_LOCATION, MPM_SESSION(stream), stream->handle));
-                                                       mpm_session_release(stream->session);
-                                                       mpm_cache_stream_close(stream);
-                                                       talloc_free(stream->filename);
-                                                       DLIST_REMOVE(mpm->streams, stream);
-                                                       talloc_free(stream);
-                                                       stream = mpm->streams;
-                                               } else {
-                                                       stream = stream->next;
-                                               }
-                                       }
-
-                                       mpm_session_release(attach->session);
-                                       DLIST_REMOVE(mpm->attachments, attach);
-                                       talloc_free(attach);
-                                       attach = mpm->attachments;
-                               } else {
-                                       attach = attach->next;
-                               }
-                       }
-
-                       /* Look over children streams */
-                       stream = mpm->streams;
-                       while (stream) {
-                               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                                   (message->handle == stream->parent_handle)) {
-                                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del recursive 1: Stream 0x%x\n", 
-                                                 MPM_LOCATION, MPM_SESSION(stream), stream->handle));
-                                       mpm_session_release(stream->session);
-                                       mpm_cache_stream_close(stream);
-                                       DLIST_REMOVE(mpm->streams, stream);
-                                       talloc_free(stream->filename);
-                                       talloc_free(stream);
-                                       stream = mpm->streams;
-                               } else {
-                                       stream = stream->next;
-                               }
-                       }
-
-                       mpm_session_release(message->session);
-                       DLIST_REMOVE(mpm->messages, message);
-                       talloc_free(message);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       /* Look over attachments */
-       for (attach = mpm->attachments; attach; attach = attach->next) {
-               if ((mpm_session_cmp(attach->session, dce_call) == true) &&
-                   (EcDoRpc->in.mapi_request->handles[handle_idx] == attach->handle)) {
-                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Attachment %d: 0x%x\n", MPM_LOCATION, 
-                                 MPM_SESSION(attach), attach->AttachmentID, attach->handle));
-
-
-                       /* Loop over children streams */
-                       stream = mpm->streams;
-                       while (stream) {
-                               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                                   (attach->handle == stream->parent_handle)) {
-                                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del recursive 2: Stream 0x%x\n", 
-                                                 MPM_LOCATION, MPM_SESSION(stream), stream->handle));
-                                       mpm_session_release(stream->session);
-                                       mpm_cache_stream_close(stream);
-                                       DLIST_REMOVE(mpm->streams, stream);
-                                       talloc_free(stream->filename);
-                                       talloc_free(stream);
-                                       stream = mpm->streams;
-                               } else {
-                                       stream = stream->next;
-                               }
-                       }                       
-
-                       mpm_session_release(attach->session);
-                       DLIST_REMOVE(mpm->attachments, attach);
-                       talloc_free(attach);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       /* Look over streams */
-       for (stream = mpm->streams; stream; stream = stream->next) {
-               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                   (EcDoRpc->in.mapi_request->handles[handle_idx] == stream->handle)) {
-                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Stream 0x%x\n", MPM_LOCATION, 
-                                 MPM_SESSION(stream), stream->handle));
-                       mpm_session_release(stream->session);
-                       mpm_cache_stream_close(stream);
-                       DLIST_REMOVE(mpm->streams, stream);
-                       talloc_free(stream->filename);
-                       talloc_free(stream);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenMessage requests and register a message in the
-   mpm_messages list.
-
-   This is the first step for message registration: 
-   * set Folder ID and Message ID
-   * set the handle to 0xFFFFFFFF
-   * Insert the message to the list
-
-   \param dce_call pointer to the session context
-   \param mem_ctx the memory context
-   \param request reference to the OpenMessage request
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS cache_pull_OpenMessage(struct dcesrv_call_state *dce_call,
-                                      TALLOC_CTX *mem_ctx, 
-                                      struct OpenMessage_req request)
-{
-       struct mpm_message              *message;
-
-       /* Check if the message has already been registered */
-       for (message = mpm->messages; message; message = message->next) {
-               if ((mpm_session_cmp(message->session, dce_call) == true) &&
-                   (request.FolderId == message->FolderId) &&
-                   (request.MessageId == message->MessageId)) {
-                       DLIST_REMOVE(mpm->messages, message);
-               }
-       }
-
-       message = talloc((TALLOC_CTX *)mpm, struct mpm_message);
-       NT_STATUS_HAVE_NO_MEMORY(message);
-       
-       message->session = mpm_session_init((TALLOC_CTX *)mpm, dce_call);
-       NT_STATUS_HAVE_NO_MEMORY(message->session);
-
-       message->FolderId = request.FolderId;
-       message->MessageId = request.MessageId;
-       message->handle = 0xFFFFFFFF;
-       
-       DLIST_ADD_END(mpm->messages, message, struct mpm_message *);
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenMessage replies and store OpenMessage MAPI
-   handle.
-
-   This is the second step for message registration:
-
-   * Seek for a given FolderId/MessageId in the mpm_message list
-
-   * If a match is found (expected) and MAPI retval is set to
-     MAPI_E_SUCCESS, update the handle field for the element and
-     commit this message in the tdb store.
-     
-   * If retval is different from MAPI_E_SUCCESS, then delete the
-     record
-
-
-   \param dce_call pointer to the session context
-   \param mapi_req reference to the OpenMessage MAPI request entry
-   \param mapi_repl reference to the OpenMessage MAPI response entry
-   \param EcDoRpc pointer to the current EcDoRpc operation
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_push_OpenMessage(struct dcesrv_call_state *dce_call,
-                                      struct EcDoRpc_MAPI_REQ mapi_req, 
-                                      struct EcDoRpc_MAPI_REPL mapi_repl, 
-                                      struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_message      *el;
-       struct mapi_response    *mapi_response;
-       struct OpenMessage_req  request;
-
-       request = mapi_req.u.mapi_OpenMessage;
-
-       mapi_response = EcDoRpc->out.mapi_response;
-
-       for (el = mpm->messages; el; el = el->next) {
-               if ((el->FolderId == request.FolderId) && (el->MessageId == request.MessageId) &&
-                   (mpm_session_cmp(el->session, dce_call) == true)) {
-                       if (mapi_repl.error_code == MAPI_E_SUCCESS) {
-                               mpm_cache_ldb_add_message((TALLOC_CTX *)mpm, mpm->ldb_ctx, el);
-                               el->handle = mapi_response->handles[request.handle_idx];
-                               DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Add: Message 0x%"PRIx64" 0x%"PRIx64" 0x%x\n", 
-                                         MPM_LOCATION, MPM_SESSION(el), el->FolderId, el->MessageId, el->handle));
-                       } else {
-                               DEBUG(0, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Message OpenMessage returned %s\n", 
-                                         MPM_LOCATION, MPM_SESSION(el), mapi_get_errstr(mapi_repl.error_code)));
-                               DLIST_REMOVE(mpm->messages, el);
-                       }
-                       return NT_STATUS_OK;
-               }
-       }
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenAttach requests and register an attachment in
-   the mpm_messages list.
-
-   This is the first step for attachment registration.  This
-   function first ensures the attachment is not already registered,
-   otherwise delete it. It next creates the attachment entry in the
-   global mpm_message structure.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx the memory context
-   \param mapi_req reference to the OpenAttach EcDoRpc_MAPI_REQ entry
-   \param EcDoRpc pointer to the EcDoRpc operation
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_NO_MEMORY
- */
-static NTSTATUS cache_pull_OpenAttach(struct dcesrv_call_state *dce_call,
-                                     TALLOC_CTX *mem_ctx, 
-                                     struct EcDoRpc_MAPI_REQ mapi_req, 
-                                     struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_message      *el;
-       struct mpm_attachment   *attach;
-       struct mapi_request     *mapi_request;
-       struct OpenAttach_req   request;
-
-       mapi_request = EcDoRpc->in.mapi_request;
-       request = mapi_req.u.mapi_OpenAttach;
-
-       for (attach = mpm->attachments; attach; attach = attach->next) {
-               /* Check if the attachment has already been registered */
-               if ((mpm_session_cmp(attach->session, dce_call) == true) &&
-                   (mapi_request->handles[mapi_req.handle_idx] == attach->parent_handle) && (request.AttachmentID == attach->AttachmentID)) {
-                       DLIST_REMOVE(mpm->attachments, attach);
-               }
-       }
-
-       attach = talloc((TALLOC_CTX *)mpm, struct mpm_attachment);
-       NT_STATUS_HAVE_NO_MEMORY(attach);
-
-       attach->session = mpm_session_init((TALLOC_CTX *)mpm, dce_call);
-       NT_STATUS_HAVE_NO_MEMORY(attach->session);
-
-       attach->AttachmentID = request.AttachmentID;
-       attach->parent_handle = mapi_request->handles[mapi_req.handle_idx];
-       attach->handle = 0xFFFFFFFF;
-
-       for (el = mpm->messages; el; el = el->next) {
-               if ((mpm_session_cmp(el->session, dce_call) == true) && attach->parent_handle == el->handle) {
-                       attach->message = el;
-                       break;
-               }
-       }
-
-       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Add [1]: Attachment %d  parent handle (0x%x) 0x%"PRIx64", 0x%"PRIx64" added to the list\n", 
-                 MPM_LOCATION, MPM_SESSION(attach), request.AttachmentID, attach->parent_handle, 
-                 attach->message->FolderId, attach->message->MessageId));
-       DLIST_ADD_END(mpm->attachments, attach, struct mpm_attachment *);
-       
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenAttach replies and store OpenAttach MAPI
-   handle.
-
-   This is the second step for attachment registration:
-
-   * Seek for a given parent_handle/attachmentID in the
-     mpm_attachments list.
-
-   * if a match is found (expected) and MAPI retval is set to
-     MAPI_E_SUCCESS, update the handle parameter for the element and
-     commit this attachment in the tdb store.
-
-   * If retval is different from MAPI_E_SUCCESS, then delete the
-     element.
-     
-   \param dce_call pointer to the session context
-   \param mapi_req reference to the OpenAttach request entry
-   \param mapi_repl reference to the OpenAttach MAPI response entry
-   \param EcDoRpc pointer to the current EcDoRpc operation
-
-   \return NT_STATUS_OK
-
- */
-static NTSTATUS cache_push_OpenAttach(struct dcesrv_call_state *dce_call,
-                                     struct EcDoRpc_MAPI_REQ mapi_req, 
-                                     struct EcDoRpc_MAPI_REPL mapi_repl, 
-                                     struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_attachment           *el;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       struct OpenAttach_req           request;
-
-       mapi_request = EcDoRpc->in.mapi_request;
-       mapi_response = EcDoRpc->out.mapi_response;
-       request = mapi_req.u.mapi_OpenAttach;
-
-       for (el = mpm->attachments; el; el = el->next) {
-               if ((mpm_session_cmp(el->session, dce_call) == true) &&
-                   (mapi_request->handles[mapi_req.handle_idx] == el->parent_handle) &&
-                   (request.AttachmentID == el->AttachmentID)) {
-                       if (mapi_repl.error_code == MAPI_E_SUCCESS) {
-                               el->handle = mapi_response->handles[request.handle_idx];
-                               DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Add [2]: Attachment %d with handle 0x%x and parent handle 0x%x\n", 
-                                         MPM_LOCATION, MPM_SESSION(el), el->AttachmentID, el->handle, el->parent_handle));
-                               mpm_cache_ldb_add_attachment((TALLOC_CTX *)mpm, mpm->ldb_ctx, el);
-                       } else {
-                               DEBUG(0, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Attachment OpenAttach returned %s\n", 
-                                         MPM_LOCATION, MPM_SESSION(el), mapi_get_errstr(mapi_repl.error_code)));
-                               DLIST_REMOVE(mpm->attachments, el);
-                       }
-                       return NT_STATUS_OK;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenStream requests and register a stream in the
-   mpm_streams list.
-
-   We are only interested in monitoring streams related to attachments
-   or messages. This is the first step for stream registration:
-
-   * Look whether this stream inherits from a message or attachment
-   * Fill the stream element according to previous statement
-   * Add it to the mpm_stream list
-
-   \param dce_call pointer to the session context
-   \param mem_ctx the memory context
-   \param mapi_req reference to the OpenStream MAPI request
-   \param EcDoRpc pointer to the current EcDoRpc operation
-   
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_NO_MEMORY
- */
-static NTSTATUS cache_pull_OpenStream(struct dcesrv_call_state *dce_call,
-                                     TALLOC_CTX *mem_ctx, 
-                                     struct EcDoRpc_MAPI_REQ mapi_req, 
-                                     struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_stream       *stream;
-       struct mpm_attachment   *attach;
-       struct mpm_message      *message;
-       struct mapi_request     *mapi_request;
-       struct OpenStream_req   request;
-
-       mapi_request = EcDoRpc->in.mapi_request;
-       request = mapi_req.u.mapi_OpenStream;
-
-       for (attach = mpm->attachments; attach; attach = attach->next) {
-               if ((mpm_session_cmp(attach->session, dce_call) == true) &&
-                   mapi_request->handles[mapi_req.handle_idx] == attach->handle) {
-                       stream = talloc((TALLOC_CTX *)mpm, struct mpm_stream);
-                       NT_STATUS_HAVE_NO_MEMORY(stream);
-
-                       stream->session = mpm_session_init((TALLOC_CTX *)mpm, dce_call);
-                       NT_STATUS_HAVE_NO_MEMORY(stream->session);
-
-                       stream->handle = 0xFFFFFFFF;
-                       stream->parent_handle = attach->handle;
-                       stream->PropertyTag = request.PropertyTag;
-                       stream->StreamSize = 0;
-                       stream->filename = NULL;
-                       stream->attachment = attach;
-                       stream->cached = false;
-                       stream->message = NULL;
-                       stream->ahead = (mpm->ahead == true) ? true : false;
-                       gettimeofday(&stream->tv_start, NULL);
-                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Stream::attachment added 0x%x 0x%"PRIx64" 0x%"PRIx64"\n", 
-                                 MPM_LOCATION, MPM_SESSION(stream), stream->parent_handle, 
-                                 stream->attachment->message->FolderId, stream->attachment->message->MessageId));
-                       DLIST_ADD_END(mpm->streams, stream, struct mpm_stream *);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       for (message = mpm->messages; message; message = message->next) {
-               if ((mpm_session_cmp(message->session, dce_call) == true) &&
-                   mapi_request->handles[mapi_req.handle_idx] == message->handle) {
-                       stream = talloc((TALLOC_CTX *)mpm, struct mpm_stream);
-                       NT_STATUS_HAVE_NO_MEMORY(stream);
-
-                       stream->session = mpm_session_init((TALLOC_CTX *)mpm, dce_call);
-                       NT_STATUS_HAVE_NO_MEMORY(stream->session);
-
-                       stream->handle = 0xFFFFFFFF;
-                       stream->parent_handle = message->handle;
-                       stream->PropertyTag = request.PropertyTag;
-                       stream->StreamSize = 0;
-                       stream->filename = NULL;
-                       stream->attachment = NULL;
-                       stream->cached = false;
-                       stream->ahead = (mpm->ahead == true) ? true : false;
-                       gettimeofday(&stream->tv_start, NULL);
-                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Stream::message added 0x%x\n", 
-                                 MPM_LOCATION, MPM_SESSION(stream), stream->parent_handle));
-                       stream->message = message;
-                       DLIST_ADD_END(mpm->streams, stream, struct mpm_stream *);
-                       return NT_STATUS_OK;
-               }
-       }
-
-       DEBUG(1, ("* [%s:%d] Stream: Not related to any attachment or message ?!?\n",
-                     MPM_LOCATION));
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor OpenStream replies and store the OpenStream MAPI
-   handle.
-
-   This is the second step for stream registration:
-
-   * Seek the parent_handle/PropertyTag couple in the mpm_streams
-     list.
-
-   * If a match is found (expected) and MAPI retval is set to
-     MAPI_E_SUCCESS, update the handle field and StreamSize parameters
-     for the element and commit this stream in the tdb store.
-
-   * If retval is different from MAPI_E_SUCCESS, then delete the
-   * element.
-
-   \param dce_call pointer to the session context
-   \param mapi_req reference to the OpenStream MAPI request entry
-   \param mapi_repl reference to the OpenStream MAPI response entry
-   \param EcDoRpc pointer to the current EcDoRpc operation
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_push_OpenStream(struct dcesrv_call_state *dce_call,
-                                     struct EcDoRpc_MAPI_REQ mapi_req, 
-                                     struct EcDoRpc_MAPI_REPL mapi_repl, 
-                                     struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_stream       *el;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct OpenStream_req   request;
-       struct OpenStream_repl  response;
-
-       mapi_request = EcDoRpc->in.mapi_request;
-       mapi_response = EcDoRpc->out.mapi_response;
-       request = mapi_req.u.mapi_OpenStream;
-       response = mapi_repl.u.mapi_OpenStream;
-
-       for (el = mpm->streams; el; el = el->next) {
-               if ((mpm_session_cmp(el->session, dce_call) == true) &&
-                   (mapi_request->handles[mapi_req.handle_idx] == el->parent_handle)) {
-                       if (request.PropertyTag == el->PropertyTag) {
-                               if (mapi_repl.error_code == MAPI_E_SUCCESS) {
-                                       el->handle = mapi_response->handles[request.handle_idx];
-                                       el->StreamSize = response.StreamSize;
-                                       DEBUG(2, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Add [2]: Stream for Property Tag 0x%x, handle 0x%x and size = %d\n", 
-                                                 MPM_LOCATION, MPM_SESSION(el), el->PropertyTag, el->handle, el->StreamSize));
-                                       mpm_cache_ldb_add_stream(mpm, mpm->ldb_ctx, el);
-                               } else {
-                                       DEBUG(0, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Del: Stream OpenStream returned %s\n", 
-                                                 MPM_LOCATION, MPM_SESSION(el), mapi_get_errstr(mapi_repl.error_code)));
-                                       DLIST_REMOVE(mpm->streams, el);
-                               }
-                               return NT_STATUS_OK;
-                       }
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Monitor ReadStream replies.
-
-   This function writes ReadStream data received from remote server
-   and associated to messages or attachments to the opened associated
-   file. This function only writes data if the file is not already
-   cached, otherwise it just returns.
-
-   \param dce_call pointer to the session context
-   \param mapi_req reference to the ReadStream MAPI request
-   \param mapi_repl reference to the ReadStream MAPI reply
-   \param EcDoRpc pointer to the current EcDoRpc operation
-
-   \return NT_STATUS_OK
-
-   \sa cache_dispatch
- */
-static NTSTATUS cache_push_ReadStream(struct dcesrv_call_state *dce_call,
-                                     struct EcDoRpc_MAPI_REQ mapi_req,
-                                     struct EcDoRpc_MAPI_REPL mapi_repl, 
-                                     struct EcDoRpc *EcDoRpc)
-{
-       struct mpm_stream       *stream;
-       struct mapi_response    *mapi_response;
-       struct ReadStream_repl  response;
-       struct ReadStream_req   request;
-
-       mapi_response = EcDoRpc->out.mapi_response;
-       response = mapi_repl.u.mapi_ReadStream;
-       request = mapi_req.u.mapi_ReadStream;
-
-       /* Check if the handle is registered */
-       for (stream = mpm->streams; stream; stream = stream->next) {
-               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                   mapi_response->handles[mapi_repl.handle_idx] == stream->handle) {
-                       if (stream->fp && stream->cached == false) {
-                               if (mpm->sync == true && stream->StreamSize > mpm->sync_min) {
-                                       cache_exec_sync_cmd(stream);
-                               } else {
-                                       DEBUG(5, ("* [%s:%d] [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] %zd bytes from remove server\n", 
-                                                 MPM_LOCATION, MPM_SESSION(stream), response.data.length));
-                                       mpm_cache_stream_write(stream, response.data.length, response.data.data);
-                                       if (stream->offset == stream->StreamSize) {
-                                               if (response.data.length) {
-                                                       cache_dump_stream_stat(stream);
-                                               }
-                                       }
-                               }
-                       } else if (stream->cached == true) {
-                               /* This is managed by the dispatch routine */
-                       }
-                       return NT_STATUS_OK;
-               }
-       }
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Analyze EcDoRpc MAPI requests
-
-   This function loops over EcDoRpc MAPI calls and search for the
-   opnums required by the cache module to monitor Stream traffic
-   properly.
-
-   \param dce_call the session context
-   \param mem_ctx the memory context
-   \param r generic pointer on EcDoRpc operation
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       struct EcDoRpc          *EcDoRpc;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       uint32_t                i;
-
-       if (dce_call->pkt.u.request.opnum != 0x2) {
-               return NT_STATUS_OK;
-       }
-
-       EcDoRpc = (struct EcDoRpc *) r;
-       if (!EcDoRpc) return NT_STATUS_OK;
-       if (!&(EcDoRpc->in)) return NT_STATUS_OK;
-       if (!EcDoRpc->in.mapi_request) return NT_STATUS_OK;
-       if (!EcDoRpc->in.mapi_request->mapi_req) return NT_STATUS_OK;
-
-       /* If this is an idle request, do not go further */
-       if (EcDoRpc->in.mapi_request->length == 2) {
-               return NT_STATUS_OK;
-       }
-
-       mapi_req = EcDoRpc->in.mapi_request->mapi_req;
-       for (i = 0; mapi_req[i].opnum; i++) {
-               switch (mapi_req[i].opnum) {
-               case op_MAPI_OpenMessage:
-                       cache_pull_OpenMessage(dce_call, (TALLOC_CTX *)mpm, mapi_req[i].u.mapi_OpenMessage);
-                       break;
-               case op_MAPI_OpenAttach:
-                       cache_pull_OpenAttach(dce_call, (TALLOC_CTX *)mpm, mapi_req[i], EcDoRpc);
-                       break;
-               case op_MAPI_OpenStream:
-                       cache_pull_OpenStream(dce_call, (TALLOC_CTX *)mpm, mapi_req[i], EcDoRpc);
-                       break;
-               case op_MAPI_Release:
-                       cache_pull_Release(dce_call, EcDoRpc, mapi_req[i].handle_idx);
-                       break;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Analyze EcDoRpc MAPI responses
-
-   This function loops over EcDoRpc MAPI calls and search for the
-   opnums required by the cache module to monitor Stream traffic
-   properly.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx the memory context
-   \param r generic pointer on EcDoRpc operation
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       struct EcDoRpc                  *EcDoRpc;
-       struct EcDoRpc_MAPI_REPL        *mapi_repl;
-       struct EcDoRpc_MAPI_REQ         *mapi_req;
-       uint32_t                        i;
-       uint32_t                        index;
-
-       if (dce_call->pkt.u.request.opnum != 0x2) {
-               return NT_STATUS_OK;
-       }
-
-       EcDoRpc = (struct EcDoRpc *) r;
-       if (!EcDoRpc) return NT_STATUS_OK;
-       if (!&(EcDoRpc->out)) return NT_STATUS_OK;
-       if (!EcDoRpc->out.mapi_response) return NT_STATUS_OK;
-       if (!EcDoRpc->out.mapi_response->mapi_repl) return NT_STATUS_OK;
-
-       /* If this is an idle request, do not got further */
-       if (EcDoRpc->out.mapi_response->length == 2) {
-               return NT_STATUS_OK;
-       }
-
-       mapi_repl = EcDoRpc->out.mapi_response->mapi_repl;
-       mapi_req = EcDoRpc->in.mapi_request->mapi_req;
-
-       for (i = 0; mapi_repl[i].opnum; i++) {
-               switch (mapi_repl[i].opnum) {
-               case op_MAPI_OpenMessage:
-                       index = cache_find_call_request_index(op_MAPI_OpenMessage, mapi_req);
-                       if (index == -1) break;
-                       cache_push_OpenMessage(dce_call, mapi_req[index], mapi_repl[i], EcDoRpc);
-                       break;
-               case op_MAPI_OpenAttach:
-                       index = cache_find_call_request_index(op_MAPI_OpenAttach, mapi_req);
-                       if (index == -1) break;
-                       cache_push_OpenAttach(dce_call, mapi_req[index], mapi_repl[i], EcDoRpc);
-                       break;
-               case op_MAPI_OpenStream:
-                       index = cache_find_call_request_index(op_MAPI_OpenStream, mapi_req);
-                       if (index == -1) break;
-                       cache_push_OpenStream(dce_call, mapi_req[index], mapi_repl[i], EcDoRpc);
-                       break;
-               case op_MAPI_ReadStream:
-                       index = cache_find_call_request_index(op_MAPI_ReadStream, mapi_req);
-                       if (index == -1) break;
-                       cache_push_ReadStream(dce_call, mapi_req[index], mapi_repl[i], EcDoRpc);
-                       break;
-               default:
-                       break;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Dispatch function. 
-
-   This function avoids calling dcerpc_ndr_request - understand
-   forwarding client request to remove server - when the client is
-   reading a message/attachment stream available in the cache.
-
-   This function can also be used to loop over dcerpc_ndr_request and
-   perform a read-ahead operation.
-
-   \param dce_call the session context
-   \param mem_ctx the memory context
-   \param r pointer on EcDoRpc operation
-   \param mapiproxy pointer to a mapiproxy structure controlling
-   mapiproxy behavior.
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS cache_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                              void *r, struct mapiproxy *mapiproxy)
-{
-       struct EcDoRpc          *EcDoRpc;
-       struct mapi_request     *mapi_request;
-       struct mapi_response    *mapi_response;
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct mpm_stream       *stream;
-       uint32_t                i;
-       uint32_t                count;
-
-       if (dce_call->pkt.u.request.opnum != 0x2) {
-               return NT_STATUS_OK;
-       }
-
-       EcDoRpc = (struct EcDoRpc *) r;
-       if (!EcDoRpc->in.mapi_request->mapi_req) return NT_STATUS_OK;
-
-       /* If this is an idle request, do not got further */
-       if (EcDoRpc->in.mapi_request->length == 2) {
-               return NT_STATUS_OK;
-       }
-
-       mapi_request = EcDoRpc->in.mapi_request;
-       mapi_response = EcDoRpc->out.mapi_response;
-       mapi_req = mapi_request->mapi_req;
-       
-       for (count = 0, i = 0; mapi_req[i].opnum; i++) {
-               switch (mapi_req[i].opnum) {
-               case op_MAPI_ReadStream:
-                       count++;
-                       break;
-               }
-       }
-
-       /* If we have more than count cached calls, forward to Exchange */
-       if (i > count) return NT_STATUS_OK;
-
-       for (i = 0; mapi_req[i].opnum; i++) {
-               switch (mapi_req[i].opnum) {
-               case op_MAPI_ReadStream:
-               {
-                       struct ReadStream_req   request;
-
-                       request = mapi_req[i].u.mapi_ReadStream;
-                       for (stream = mpm->streams; stream; stream = stream->next) {
-                               if ((mpm_session_cmp(stream->session, dce_call) == true) &&
-                                   (mapi_request->handles[mapi_req[i].handle_idx] == stream->handle)) {
-                                       if (stream->cached == true) {
-                                       cached:
-                                               mapiproxy->norelay = true;
-                                               mapiproxy->ahead = false;
-                                               /* Create a fake ReadStream reply */
-                                               mapi_response->mapi_repl = talloc_array(mem_ctx, struct EcDoRpc_MAPI_REPL, i + 2);
-                                               mapi_response->mapi_repl[i].opnum = op_MAPI_ReadStream;
-                                               mapi_response->mapi_repl[i].handle_idx = mapi_req[i].handle_idx;
-                                               mapi_response->mapi_repl[i].error_code = MAPI_E_SUCCESS;
-                                               mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length = 0;
-                                               mapi_response->mapi_repl[i].u.mapi_ReadStream.data.data = (uint8_t *) talloc_size(mem_ctx, request.ByteCount);
-                                               mpm_cache_stream_read(stream, (size_t) request.ByteCount, 
-                                                                     &mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length,
-                                                                     &mapi_response->mapi_repl[i].u.mapi_ReadStream.data.data);
-                                               if (stream->offset == stream->StreamSize) {
-                                                       if (mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length) {
-                                                               cache_dump_stream_stat(stream);
-                                                       }
-                                               }
-                                               DEBUG(5, ("* [%s:%d] %zd bytes read from cache\n", MPM_LOCATION,
-                                                         mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length));
-                                               mapi_response->handles = talloc_array(mem_ctx, uint32_t, 1);
-                                               mapi_response->handles[0] = stream->handle;
-                                               mapi_response->mapi_len = 0xE + mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length;
-                                               mapi_response->length = mapi_response->mapi_len - 4;
-                                               *EcDoRpc->out.length = mapi_response->mapi_len;
-                                               EcDoRpc->out.size = EcDoRpc->in.size;
-                                               break;
-                                       } else if ((stream->cached == false) && (stream->ahead == true)) {
-                                               if (mapiproxy->ahead == true)  {
-                                                       mpm_cache_stream_write(stream,
-                                                                              mapi_response->mapi_repl[i].u.mapi_ReadStream.data.length,
-                                                                              mapi_response->mapi_repl[i].u.mapi_ReadStream.data.data);
-                                                       /* When read ahead is over */
-                                                       if (stream->offset == stream->StreamSize) {
-                                                               cache_dump_stream_stat(stream);
-                                                               mpm_cache_stream_reset(stream);
-                                                               stream->cached = true;
-                                                               stream->ahead = false;
-                                                               goto cached;
-                                                       }
-                                               } else {
-                                                       mapiproxy->ahead = true;
-                                               }
-                                       }
-                               }
-                       }
-               }
-               break;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details 
- */
-static NTSTATUS cache_unbind(struct server_id server_id, uint32_t context_id)
-{
-       struct mpm_message      *message;
-       struct mpm_attachment   *attach;
-       struct mpm_stream       *stream;
-
-       /* Look over messages still attached to the session */
-       message = mpm->messages;
-       while (message) {
-               if ((mpm_session_cmp_sub(message->session, server_id, context_id) == true)) {
-                       DEBUG(2, ("[%s:%d]: [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Message - 0x%"PRIx64"/0x%"PRIx64" handle(0x%x)\n",
-                                 MPM_LOCATION, MPM_SESSION(message), message->FolderId, message->MessageId, 
-                                 message->handle));
-                       mpm_session_release(message->session);
-                       DLIST_REMOVE(mpm->messages, message);
-                       talloc_free(message);
-                       message = mpm->messages;
-               } else {
-                       message = message->next;
-               }
-       }
-
-       /* Look over attachments still attached to the session */
-       attach = mpm->attachments;
-       while (attach) {
-               if ((mpm_session_cmp_sub(attach->session, server_id, context_id) == true)) {
-                       DEBUG(2, ("[%s:%d]: [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Attachment - AttachmentID(0x%x) handle(0x%x)\n",
-                                 MPM_LOCATION, MPM_SESSION(attach), attach->AttachmentID, attach->handle));
-                       mpm_session_release(attach->session);
-                       DLIST_REMOVE(mpm->attachments, attach);
-                       talloc_free(attach);
-                       attach = mpm->attachments;
-               } else {
-                       attach = attach->next;
-               }
-       }
-
-       stream = mpm->streams;
-       while (stream) {
-               if ((mpm_session_cmp_sub(stream->session, server_id, context_id) == true)) {
-                       DEBUG(2, ("[%s:%d]: [s(0x%"PRIx64"-0x%x-0x%x),c(0x%x)] Stream - handle(0x%x)\n", MPM_LOCATION,
-                                 MPM_SESSION(stream), stream->handle));
-                       mpm_session_release(stream->session);
-                       mpm_cache_stream_close(stream);
-                       talloc_free(stream->filename);
-                       DLIST_REMOVE(mpm->streams, stream);
-                       talloc_free(stream);
-                       stream = mpm->streams;
-               } else {
-                       stream = stream->next;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the cache module and retrieve configuration from
-   smb.conf
-
-   Possible smb.conf parameters:
-       * mpm_cache:database
-
-   \param dce_ctx the session context
-
-   \return NT_STATUS_OK on success otherwise
-   NT_STATUS_INVALID_PARAMETER, NT_STATUS_NO_MEMORY
- */
-static NTSTATUS cache_init(struct dcesrv_context *dce_ctx)
-{
-       char                    *database;
-       struct loadparm_context *lp_ctx;
-       NTSTATUS                status;
-
-       mpm = talloc_zero(dce_ctx, struct mpm_cache);
-       if (!mpm) return NT_STATUS_NO_MEMORY;
-       mpm->messages = NULL;
-       mpm->attachments = NULL;
-       mpm->streams = NULL;
-
-       mpm->ahead = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "ahead", false);
-       mpm->sync = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync", false);
-       mpm->sync_min = lpcfg_parm_int(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_min", 500000);
-       mpm->sync_cmd = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_cmd"), " ");
-       mpm->dbpath = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "path");
-
-       if ((mpm->ahead == true) && mpm->sync) {
-               DEBUG(0, ("%s: cache:ahead and cache:sync are exclusive!\n", MPM_ERROR));
-               talloc_free(mpm);
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       if (!mpm->dbpath) {
-               DEBUG(0, ("%s: Missing mpm_cache:path parameter\n", MPM_ERROR));
-               talloc_free(mpm);
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       database = talloc_asprintf(dce_ctx->lp_ctx, "tdb://%s/%s", mpm->dbpath, MPM_DB);
-       status = mpm_cache_ldb_createdb(dce_ctx, database, &mpm->ldb_ctx);
-       if (!NT_STATUS_IS_OK(status)) {
-               talloc_free(database);
-               talloc_free(mpm);
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       lp_ctx = loadparm_init(dce_ctx);
-       lpcfg_load_default(lp_ctx);
-       dcerpc_init(lp_ctx);
-
-       talloc_free(database);
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Entry point for the cache mapiproxy module
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module module;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       module.name = "cache";
-       module.description = "Cache MAPI messages and attachments";
-       module.endpoint = "exchange_emsmdb";
-
-       /* Fill in all the operations */
-       module.init = cache_init;
-       module.unbind = cache_unbind;
-       module.push = cache_push;
-       module.ndr_pull = NULL;
-       module.pull = cache_pull;
-       module.dispatch = cache_dispatch;
-
-       /* Register ourselves with the MAPIPROXY subsystem */
-       ret = mapiproxy_module_register(&module);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'cache' mapiproxy module!\n"));
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_cache.h b/branches/plugfest/mapiproxy/modules/mpm_cache.h
deleted file mode 100644 (file)
index f45ced6..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-   MAPI Proxy - Cache module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __MPM_CACHE_H
-#define        __MPM_CACHE_H
-
-#include <stdio.h>
-
-#include <dlinklist.h>
-#include <ldb_errors.h>
-#include <ldb.h>
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-struct mpm_message {
-       struct mpm_session      *session;
-       uint32_t                handle;
-       uint64_t                FolderId;
-       uint64_t                MessageId;
-       struct mpm_message      *prev;
-       struct mpm_message      *next;
-};
-
-struct mpm_attachment {
-       struct mpm_session      *session;
-       uint32_t                parent_handle;
-       uint32_t                handle;
-       uint32_t                AttachmentID;
-       struct mpm_message      *message;
-       struct mpm_attachment   *prev;
-       struct mpm_attachment   *next;
-};
-
-/**
-   A stream can either be for a message or attachment
- */
-struct mpm_stream {
-       struct mpm_session      *session;
-       uint32_t                parent_handle;
-       uint32_t                handle;
-       enum MAPITAGS           PropertyTag;
-       uint32_t                StreamSize;
-       size_t                  offset;
-       FILE                    *fp;
-       char                    *filename;
-       bool                    cached;
-       bool                    ahead;
-       struct timeval          tv_start;
-       struct mpm_attachment   *attachment;
-       struct mpm_message      *message;
-       struct mpm_stream       *prev;
-       struct mpm_stream       *next;
-};
-
-/* TODO: Make use of dce_ctx->context->context_id to differentiate sessions ? */
-
-struct mpm_cache {
-       struct ldb_context      *ldb_ctx;
-       struct mpm_message      *messages;
-       struct mpm_attachment   *attachments;
-       struct mpm_stream       *streams;
-       const char              *dbpath;
-       bool                    ahead;
-       bool                    sync;
-       int                     sync_min;
-       char                    **sync_cmd;
-};
-
-__BEGIN_DECLS
-
-NTSTATUS               samba_init_module(void);
-
-NTSTATUS       mpm_cache_ldb_createdb(struct dcesrv_context *, const char *, struct ldb_context **);
-NTSTATUS       mpm_cache_ldb_add_message(TALLOC_CTX *, struct ldb_context *, struct mpm_message *);
-NTSTATUS       mpm_cache_ldb_add_attachment(TALLOC_CTX *, struct ldb_context *, struct mpm_attachment *);
-NTSTATUS       mpm_cache_ldb_add_stream(struct mpm_cache *, struct ldb_context *, struct mpm_stream *);
-
-NTSTATUS       mpm_cache_stream_open(struct mpm_cache *, struct mpm_stream *);
-NTSTATUS       mpm_cache_stream_close(struct mpm_stream *);
-NTSTATUS       mpm_cache_stream_write(struct mpm_stream *, uint16_t, uint8_t *);
-NTSTATUS       mpm_cache_stream_read(struct mpm_stream *, size_t, size_t *, uint8_t **);
-NTSTATUS       mpm_cache_stream_reset(struct mpm_stream *);
-
-__END_DECLS
-
-/*
- * Defines
- */
-
-#define        MPM_NAME        "mpm_cache"
-#define        MPM_ERROR       "[ERROR] mpm_cache:"
-#define        MPM_DB          "mpm_cache.ldb"
-#define        MPM_DB_STORAGE  "data"
-
-#define        MPM_LOCATION    __FUNCTION__, __LINE__
-#define        MPM_SESSION(x)  x->session->server_id.id, x->session->server_id.id2, x->session->server_id.node, x->session->context_id
-
-#endif /* __MPM_CACHE_H */
diff --git a/branches/plugfest/mapiproxy/modules/mpm_cache_ldb.c b/branches/plugfest/mapiproxy/modules/mpm_cache_ldb.c
deleted file mode 100644 (file)
index d029e3b..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
-   MAPI Proxy - Cache module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mpm_cache_ldb.c
-
-   \brief LDB routines for the cache module
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/modules/mpm_cache.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <util/debug.h>
-
-/**
-   \details Create the cache database
-
-   \param dce_ctx pointer to the session context
-   \param database the complete path to the tdb store
-   \param ldb_ctx pointer to pointer on the the LDB context
-
-   \return NT_STATUS_OK on success, otherwise NT_ERROR:
-   NT_STATUS_NO_MEMORY, NT_STATUS_NOT_FOUND.
- */
-NTSTATUS mpm_cache_ldb_createdb(struct dcesrv_context *dce_ctx, 
-                               const char *database, 
-                               struct ldb_context **ldb_ctx)
-{
-       struct ldb_context      *tmp_ctx;
-       struct tevent_context   *ev;
-       int                     ret;
-
-       ev = tevent_context_init(dce_ctx);
-       if (!ev) return NT_STATUS_NO_MEMORY;
-
-       tmp_ctx = ldb_init(dce_ctx, ev);
-       if (!tmp_ctx) return NT_STATUS_NO_MEMORY;
-       
-       ret = ldb_connect(tmp_ctx, database, 0, NULL);
-       if (ret != LDB_SUCCESS) {
-               return NT_STATUS_NOT_FOUND;
-       }
-
-       *ldb_ctx = tmp_ctx;
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Add a folder record to the TDB store
-
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer to the LDB context
-   \param FolderId the ID we will be using to uniquely create the
-   record
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_NOT_FOUND
- */
-static NTSTATUS  mpm_cache_ldb_add_folder(TALLOC_CTX *mem_ctx, 
-                                         struct ldb_context *ldb_ctx,
-                                         uint64_t FolderId)
-{
-       struct ldb_message      *msg;
-       char                    *dn;
-       int                     ret;
-
-       msg = ldb_msg_new(mem_ctx);
-       if (msg == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       dn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=Cache", FolderId);
-       msg->dn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       talloc_free(dn);
-       if (!msg->dn) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       ret = ldb_add(ldb_ctx, msg);
-       if (ret != 0) {
-               DEBUG(0, ("* [%s:%d] Failed to modify record %s: %s\n",
-                         MPM_LOCATION, ldb_dn_get_linearized(msg->dn), 
-                         ldb_errstring(ldb_ctx)));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Add a message record to the TDB store
-
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer to the LDB context
-   \param message pointer to the mpm_message entry with the folder and
-   message ID
-
-   \return NT_STATUS_OK on success, otherwise a NT error
- */
-NTSTATUS mpm_cache_ldb_add_message(TALLOC_CTX *mem_ctx, 
-                                  struct ldb_context *ldb_ctx, 
-                                  struct mpm_message *message)
-{
-       NTSTATUS                status;
-       struct ldb_message      *msg;
-       struct ldb_dn           *dn;
-       struct ldb_result       *res;
-       char                    *basedn;
-       int                     ret;
-
-       /* First check if the CN=Folder,CN=Cache entry exists */
-       basedn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=Cache", message->FolderId);
-       dn = ldb_dn_new(mem_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!dn) return NT_STATUS_UNSUCCESSFUL;
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
-       if (ret == LDB_SUCCESS && !res->count) {
-               DEBUG(5, ("* [%s:%d] We have to create folder TDB record: CN=0x%"PRIx64",CN=Cache\n", 
-                         MPM_LOCATION, message->FolderId));
-               status = mpm_cache_ldb_add_folder(mem_ctx, ldb_ctx, message->FolderId);
-               if (!NT_STATUS_IS_OK(status)) return status;
-       }
-
-       /* Search if the message doesn't already exist */
-       basedn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache", 
-                                message->MessageId, message->FolderId);
-       dn = ldb_dn_new(mem_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!dn) return NT_STATUS_UNSUCCESSFUL;
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
-       if (res->count) return NT_STATUS_OK;
-
-       /* Create the CN=Message,CN=Folder,CN=Cache */
-       msg = ldb_msg_new(mem_ctx);
-       if (msg == NULL) return NT_STATUS_NO_MEMORY;
-
-       basedn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache", 
-                                message->MessageId, message->FolderId);
-       msg->dn = ldb_dn_new(ldb_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!msg->dn) return NT_STATUS_NO_MEMORY;
-
-       ret = ldb_add(ldb_ctx, msg);
-       if (ret != 0) {
-               DEBUG(0, ("* [%s:%d] Failed to modify record %s: %s\n",
-                         MPM_LOCATION, ldb_dn_get_linearized(msg->dn), 
-                         ldb_errstring(ldb_ctx)));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Add an attachment record to the TDB store
-   \param mem_ctx pointer to the memory context
-   \param ldb_ctx pointer to the LDB context
-   \param attach pointer to the mpm_attachment entry
-
-   \return NT_STATUS_OK on success, otherwise a NT error
-*/
-NTSTATUS mpm_cache_ldb_add_attachment(TALLOC_CTX *mem_ctx,
-                                     struct ldb_context *ldb_ctx,
-                                     struct mpm_attachment *attach)
-{
-       struct mpm_message      *message;
-       struct ldb_message      *msg;
-       struct ldb_dn           *dn;
-       struct ldb_result       *res;
-       char                    *basedn;
-       int                     ret;
-
-       message = attach->message;
-
-       /* Search if the attachment doesn't already exist */
-       basedn = talloc_asprintf(mem_ctx, "CN=%d,CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                attach->AttachmentID, message->MessageId, 
-                                message->FolderId);
-       dn = ldb_dn_new(mem_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!dn) return NT_STATUS_UNSUCCESSFUL;
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
-       if (ret == LDB_SUCCESS && res->count) return NT_STATUS_OK;
-
-       DEBUG(2, ("* [%s:%d] Create the attachment TDB record\n", MPM_LOCATION));
-
-       msg = ldb_msg_new(mem_ctx);
-       if (msg == NULL) return NT_STATUS_NO_MEMORY;
-       
-       basedn = talloc_asprintf(mem_ctx, "CN=%d,CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                attach->AttachmentID, message->MessageId, 
-                                message->FolderId);
-       msg->dn = ldb_dn_new(ldb_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!msg->dn) return NT_STATUS_NO_MEMORY;
-
-       ret = ldb_add(ldb_ctx, msg);
-       if (ret != 0) {
-               DEBUG(0, ("* [%s:%d] Failed to modify record %s: %s\n",
-                         MPM_LOCATION, ldb_dn_get_linearized(msg->dn), 
-                         ldb_errstring(ldb_ctx)));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Add stream references to a message or attachment in the
-   TDB store
-
-   \param mpm pointer to the cache module general structure
-   \param ldb_ctx pointer to the LDB context
-   \param stream pointer to the mpm_stream entry
-
-   \return NT_STATUS_OK on success, otherwise NT error
- */
-NTSTATUS mpm_cache_ldb_add_stream(struct mpm_cache *mpm, 
-                                 struct ldb_context *ldb_ctx,
-                                 struct mpm_stream *stream)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct mpm_message      *message;
-       struct mpm_attachment   *attach;
-       struct ldb_message      *msg;
-       struct ldb_dn           *dn;
-       const char * const      attrs[] = { "*", NULL };
-       struct ldb_result       *res;
-       char                    *basedn = NULL;
-       char                    *attribute;
-       int                     ret;
-       uint32_t                i;
-
-       mem_ctx = (TALLOC_CTX *) mpm;
-       
-       if (stream->attachment) {
-               attach = stream->attachment;
-               message = attach->message;
-       } else if (stream->message) {
-               attach = NULL;
-               message = stream->message;
-       } else {
-               return NT_STATUS_OK;
-       }
-
-       /* This is a stream for an attachment */
-       if (stream->attachment) {
-               basedn = talloc_asprintf(mem_ctx, "CN=%d,CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                        attach->AttachmentID, message->MessageId,
-                                        message->FolderId);
-               dn = ldb_dn_new(mem_ctx, ldb_ctx, basedn);
-               talloc_free(basedn);
-               if (!dn) return NT_STATUS_UNSUCCESSFUL;
-               
-               ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, attrs, 
-                                "(0x%x=*)", stream->PropertyTag);
-
-               if (ret == LDB_SUCCESS && res->count == 1) {
-                       attribute = talloc_asprintf(mem_ctx, "0x%x", stream->PropertyTag);
-                       basedn = (char *) ldb_msg_find_attr_as_string(res->msgs[0], attribute, NULL);
-                       talloc_free(attribute);
-                       DEBUG(2, ("* [%s:%d] Loading from cache 0x%x = %s\n", MPM_LOCATION,
-                                 stream->PropertyTag, basedn));
-                       stream->filename = talloc_strdup(mem_ctx, basedn);
-                       stream->cached = true;
-                       stream->ahead = false;
-                       mpm_cache_stream_open(mpm, stream);
-
-                       return NT_STATUS_OK;
-               }
-
-               /* Otherwise create the stream with basedn above */
-               basedn = talloc_asprintf(mem_ctx, "CN=%d,CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                        attach->AttachmentID, message->MessageId,
-                                        message->FolderId);
-
-               DEBUG(2, ("* [%s:%d] Create the stream TDB record for attachment\n", MPM_LOCATION));
-       } 
-
-       if (stream->message) {
-               basedn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                        message->MessageId, message->FolderId);
-               dn = ldb_dn_new(mem_ctx, ldb_ctx, basedn);
-               talloc_free(basedn);
-               if (!dn) return NT_STATUS_UNSUCCESSFUL;
-
-               ret = ldb_search(ldb_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, attrs, "(0x%x=*)", stream->PropertyTag);
-
-               if (ret == LDB_SUCCESS && res->count == 1) {
-                       attribute = talloc_asprintf(mem_ctx, "0x%x", stream->PropertyTag);
-                       basedn = (char *) ldb_msg_find_attr_as_string(res->msgs[0], attribute, NULL);
-                       talloc_free(attribute);
-                       DEBUG(2, ("* [%s:%d] Loading from cache 0x%x = %s\n", MPM_LOCATION,
-                                 stream->PropertyTag, basedn));
-                       stream->filename = talloc_strdup(mem_ctx, basedn);
-                       stream->cached = true;
-                       stream->ahead = false;
-                       mpm_cache_stream_open(mpm, stream);
-
-                       return NT_STATUS_OK;
-               }
-
-               /* Otherwise create the stream with basedn above */
-               basedn = talloc_asprintf(mem_ctx, "CN=0x%"PRIx64",CN=0x%"PRIx64",CN=Cache",
-                                        message->MessageId, message->FolderId);
-               
-               DEBUG(2, ("* [%s:%d] Modify the message TDB record and append stream information\n",
-                         MPM_LOCATION));
-       }
-
-       stream->cached = false;
-       mpm_cache_stream_open(mpm, stream);
-
-       msg = ldb_msg_new(mem_ctx);
-       if (msg == NULL) return NT_STATUS_NO_MEMORY;
-
-       msg->dn = ldb_dn_new(ldb_ctx, ldb_ctx, basedn);
-       talloc_free(basedn);
-       if (!msg->dn) return NT_STATUS_NO_MEMORY;
-       
-       attribute = talloc_asprintf(mem_ctx, "0x%x", stream->PropertyTag);
-       ldb_msg_add_fmt(msg, attribute, "%s", stream->filename);
-       talloc_free(attribute);
-       
-       attribute = talloc_asprintf(mem_ctx, "0x%x_StreamSize", stream->PropertyTag);
-       ldb_msg_add_fmt(msg, attribute, "%d", stream->StreamSize);
-       talloc_free(attribute);
-
-       /* mark all the message elements as LDB_FLAG_MOD_REPLACE */
-       for (i=0;i<msg->num_elements;i++) {
-               msg->elements[i].flags = LDB_FLAG_MOD_REPLACE;
-       }
-       
-       ret = ldb_modify(ldb_ctx, msg);
-       if (ret != 0) {
-               DEBUG(0, ("* [%s:%d] Failed to modify record %s: %s\n",
-                         MPM_LOCATION, ldb_dn_get_linearized(msg->dn), 
-                         ldb_errstring(ldb_ctx)));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       return NT_STATUS_OK;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_cache_stream.c b/branches/plugfest/mapiproxy/modules/mpm_cache_stream.c
deleted file mode 100644 (file)
index 16a7b92..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
-   MAPI Proxy - Cache module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mpm_cache_stream.c
-
-   \brief Storage routines for the cache module
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/modules/mpm_cache.h"
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <util/debug.h>
-
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <errno.h>
-
-/**
-   \details Create a file: message or attachment in the cache
-
-   If the stream is attached to an attachment: FolderID/MessageID/AttachmentID.stream
-   If the stream is attached to a message:     FolderID/MessageID.stream
-
-   \param mpm pointer to the cache module general structure
-   \param stream pointer to the mpm_stream entry
-
-   \return Return a FILE pointer otherwise NULL
- */
-NTSTATUS mpm_cache_stream_open(struct mpm_cache *mpm, struct mpm_stream *stream)
-{
-       TALLOC_CTX      *mem_ctx;
-       char            *file;
-       int             ret;
-
-       mem_ctx = (TALLOC_CTX *) mpm;
-
-       if (stream->filename) {
-               stream->fp = fopen(stream->filename, "r");
-               stream->offset = 0;
-               return NT_STATUS_OK;
-       }
-
-       if (stream->message) {
-               /* Create the folder */
-               file = talloc_asprintf(mem_ctx, "%s/0x%"PRIx64, mpm->dbpath, stream->message->FolderId);
-               ret = mkdir(file, 0777);
-               talloc_free(file);
-               if ((ret == -1) && (errno != EEXIST)) return NT_STATUS_UNSUCCESSFUL;
-
-               /* Open the file */
-               file = talloc_asprintf(mem_ctx, "%s/0x%"PRIx64"/0x%"PRIx64".stream",
-                                      mpm->dbpath, stream->message->FolderId,
-                                      stream->message->MessageId);
-
-               DEBUG(2, ("* [%s:%d]: Opening Message stream %s\n", MPM_LOCATION, file));
-               stream->filename = talloc_strdup(mem_ctx, file);
-               stream->fp = fopen(file, "w+");
-               stream->offset = 0;
-               talloc_free(file);
-               
-               return NT_STATUS_OK;
-       }
-
-       if (stream->attachment) {
-               /* Create the folders */
-               file = talloc_asprintf(mem_ctx, "%s/0x%"PRIx64, mpm->dbpath, 
-                                      stream->attachment->message->FolderId);
-               ret = mkdir(file, 0777);
-               talloc_free(file);
-               if ((ret == -1) && (errno != EEXIST)) return NT_STATUS_UNSUCCESSFUL;
-
-               file = talloc_asprintf(mem_ctx, "%s/0x%"PRIx64"/0x%"PRIx64, mpm->dbpath,
-                                      stream->attachment->message->FolderId, 
-                                      stream->attachment->message->MessageId);
-               ret = mkdir(file, 0777);
-               talloc_free(file);
-               if ((ret == -1) && (errno != EEXIST)) return NT_STATUS_UNSUCCESSFUL;
-
-               file = talloc_asprintf(mem_ctx, "%s/0x%"PRIx64"/0x%"PRIx64"/%d.stream", 
-                                      mpm->dbpath,
-                                      stream->attachment->message->FolderId, 
-                                      stream->attachment->message->MessageId,
-                                      stream->attachment->AttachmentID);
-
-               DEBUG(2, ("* [%s:%d]: Opening Attachment stream %s\n", MPM_LOCATION, file));
-               stream->filename = talloc_strdup(mem_ctx, file);
-               stream->fp = fopen(file, "w+");
-               stream->offset = 0;
-               talloc_free(file);
-
-               return NT_STATUS_OK;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Close the filesystem stream
-
-   \param stream pointer to the mpm_stream entry
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_NOT_FOUND
- */
-NTSTATUS mpm_cache_stream_close(struct mpm_stream *stream)
-{
-       if (stream && stream->fp) {
-               fclose(stream->fp);
-               stream->fp = NULL;
-       } else {
-               return NT_STATUS_NOT_FOUND;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Read input_size bytes from a local binary stream
-
-   \param stream pointer to the mpm_stream entry
-   \param input_size the number of bytes to read
-   \param length output pointer to the length effectively read from the
-   stream
-   \param data output pointer to the binary data read from the stream
-
-   \return NT_STATUS_OK
- */
-NTSTATUS mpm_cache_stream_read(struct mpm_stream *stream, size_t input_size, size_t *length, uint8_t **data)
-{
-       fseek(stream->fp, stream->offset, SEEK_SET);
-       *length = fread(*data, sizeof (uint8_t), input_size, stream->fp);
-       stream->offset += *length;
-       DEBUG(5, ("* [%s:%d]: Current offset: 0x%zx\n", MPM_LOCATION,
-                 stream->offset));
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Write length bytes to a local stream
-
-   \param stream pointer to the mpm_stream entry
-   \param length the data length to write to the stream
-   \param data pointer to the data to write to the stream
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL
- */
-NTSTATUS mpm_cache_stream_write(struct mpm_stream *stream, uint16_t length, uint8_t *data)
-{
-       uint32_t        WrittenSize;
-
-       fseek(stream->fp, stream->offset, SEEK_SET);
-       WrittenSize = fwrite(data, sizeof (uint8_t), length, stream->fp);
-       if (WrittenSize != length) {
-               DEBUG(0, ("* [%s:%d] WrittenSize != length\n", MPM_LOCATION));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       stream->offset += WrittenSize;
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Rewind a stream to the beginning
-
-   \param stream pointer to the mpm_stream entry
-
-   \return NT_STATUS_OK on success
- */
-NTSTATUS mpm_cache_stream_reset(struct mpm_stream *stream)
-{
-       fseek(stream->fp, 0, SEEK_SET);
-       stream->offset = 0;
-
-       return NT_STATUS_OK;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_downgrade.c b/branches/plugfest/mapiproxy/modules/mpm_downgrade.c
deleted file mode 100644 (file)
index 2af54cd..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-   MAPI Proxy - Downgrade Module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mpm_downgrade.c
-
-   \brief Downgrade EMSMDB protocol version EcDoConnect/EcDoRpc
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include <util/debug.h>
-
-
-/**
-   \details This function replaces the store_version short array
-   returned by Exchange in EcDoConnect with a version matching
-   Exchange 2000. Otherwise Outlook tries to upgrade indefinitely.
-
-   \param dce_call pointer to the session context
-   \param r pointer to the EcDoConnect structure
-
-   \return true on success
- */
-static bool downgrade_EcDoConnect(struct dcesrv_call_state *dce_call, struct EcDoConnect *r)
-{
-       r->out.rgwServerVersion[0] = 0x0006;
-       r->out.rgwServerVersion[1] = 0x1141;
-       r->out.rgwServerVersion[2] = 0x0005;
-
-       return true;
-}
-
-
-static NTSTATUS downgrade_push(struct dcesrv_call_state *dce_call,
-                              TALLOC_CTX *mem_ctx, void *r)
-{
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-       const char                              *name;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-       name = table->calls[opnum].name;
-
-       if (table->name && !strcmp(table->name, "exchange_emsmdb")) {
-               if (name && !strcmp(name, "EcDoConnect")) {
-                       downgrade_EcDoConnect(dce_call, (struct EcDoConnect *)r);
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS downgrade_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull)
-{
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS downgrade_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Returns the nca_op_rng_error DCERPC status code when
-   Outlook sends an EcDoConnectEx requrest.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r generic pointer to EcDoConnectEx structure
-   \param mapiproxy pointer to the mapiproxy structure
-
-   \return NT_STATUS_NET_WRITE_FAULT when EcDoConnectEx is detected,
-   otherwise NT_STATUS_OK
-
-*/
-static NTSTATUS downgrade_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r,
-                                  struct mapiproxy *mapiproxy)
-{
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-
-       table = (const struct ndr_interface_table *)dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-       
-       if ((opnum == 0xA) && (table->name && !strcmp(table->name, "exchange_emsmdb"))) {
-               dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
-               return NT_STATUS_NET_WRITE_FAULT;
-       }
-
-       return NT_STATUS_OK;
-}
-
-/**
-   \details Entry point for the downgrade mapiproxy module
-   
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module module;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       module.name = "downgrade";
-       module.description = "Downgrade EMSMDB protocol version EcDoConnect/EcDoRpc";
-       module.endpoint = "exchange_emsmdb";
-
-       /* Fill in all the operations */
-       module.init = NULL;
-       module.unbind = NULL;
-       module.push = downgrade_push;
-       module.ndr_pull = downgrade_ndr_pull;
-       module.pull = downgrade_pull;
-       module.dispatch = downgrade_dispatch;
-
-       /* Register ourselves with the MAPIPROXY subsystem */
-       ret = mapiproxy_module_register(&module);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'downgrade' mapiproxy module!\n"));
-               return ret;
-       }
-       
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_dummy.c b/branches/plugfest/mapiproxy/modules/mpm_dummy.c
deleted file mode 100644 (file)
index 8002083..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-   MAPI Proxy - Dummy Module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/dcesrv_mapiproxy_proto.h"
-#include <util/debug.h>
-
-/**
-   \details Dummy init function which reads a parametric option from
-   smb.conf and display it on the log channel.
- */
-static NTSTATUS dummy_init(struct dcesrv_context *dce_ctx)
-{
-       const char      *test;
-
-       test = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "mpm_dummy", "test");
-       if (test) {
-               DEBUG(0, ("Sample dummy string: %s\n", test));
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS dummy_unbind(struct server_id server_id, uint32_t context_id)
-{
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS dummy_push(struct dcesrv_call_state *dce_call, 
-                          TALLOC_CTX *mem_ctx,  void *r)
-{
-       return NT_STATUS_OK;
-}
-
-static NTSTATUS dummy_ndr_pull(struct dcesrv_call_state *dce_call,
-                              TALLOC_CTX *mem_ctx, struct ndr_pull *ndr)
-{
-       return NT_STATUS_OK;
-}
-
-static NTSTATUS dummy_pull(struct dcesrv_call_state *dce_call,
-                          TALLOC_CTX *mem_ctx, void *r)
-{
-       return NT_STATUS_OK;
-}
-
-static NTSTATUS dummy_dispatch(struct dcesrv_call_state *dce_call,
-                              TALLOC_CTX *mem_ctx, void *r,
-                              struct mapiproxy *mapiproxy)
-{
-       return NT_STATUS_OK;
-}
-
-
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module module;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       module.name = "dummy";
-       module.description = "dummy MAPIPROXY module";
-       module.endpoint = "exchange_emsmdb";
-
-       /* Fill in all the operations */
-       module.init = dummy_init;
-       module.unbind = dummy_unbind;
-       module.push = dummy_push;
-       module.ndr_pull = dummy_ndr_pull;
-       module.pull = dummy_pull;
-       module.dispatch = dummy_dispatch;
-
-       /* Register ourselves with the MAPIPROXY subsytem */
-       ret = mapiproxy_module_register(&module);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register 'dummy' mapiproxy module!\n"));
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/modules/mpm_pack.c b/branches/plugfest/mapiproxy/modules/mpm_pack.c
deleted file mode 100644 (file)
index 5a4f2b7..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
-   MAPI Proxy - Unpack/Pack Module
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file mpm_pack.c
-
-   \brief Pack/Unpack specified MAPI calls into/from a custom MAPI call
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include <util/debug.h>
-
-#define        MPM_NAME        "mpm_pack"
-#define        MPM_PACK_ERROR  "[ERROR] mpm_pack:"
-
-NTSTATUS samba_init_module(void);
-
-static struct mpm_pack {
-       uint8_t         *mapi_calls;
-       bool            lasthop;
-} *mpm = NULL;
-
-
-static uint32_t proxypack(TALLOC_CTX *mem_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, 
-                         struct ndr_push *ndr)
-{
-       struct proxypack_req    request;
-       uint32_t                size;
-
-       /* Fill in the proxypack operation */
-       size = 0;       
-       request.bin.cb = ndr->offset;
-       size += sizeof (uint16_t);
-       request.bin.lpb = (uint8_t *) talloc_memdup(mem_ctx, ndr->data, ndr->offset);
-       size += ndr->offset;
-
-       /* Fill the MAPI_REQ request */
-       mapi_req->opnum = op_MAPI_proxypack;
-       mapi_req->logon_id = 0;
-       mapi_req->handle_idx = 0;
-       mapi_req->u.mapi_proxypack = request;
-       size += 5;
-
-       return size;
-}
-
-/**
-   \details unpack proxypack contents and restore the original EcDoRpc
-   request
- */
-static bool unpack(TALLOC_CTX *mem_ctx, struct EcDoRpc *EcDoRpc)
-{
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct EcDoRpc_MAPI_REQ *mapi_newreq;
-       struct ndr_pull         *ndr;
-       bool                    found;
-       uint32_t                i;
-       uint8_t                 pos;
-       uint32_t                count;
-       uint32_t                nopack_count = 0;
-       uint32_t                nopack_idx = 0;
-       uint32_t                pack_idx = 0;
-
-       mapi_req = EcDoRpc->in.mapi_request->mapi_req;
-
-       /* Seek the unpack call */
-       for (i = 0, found = false; mapi_req[i].opnum; i++) {
-               if (mapi_req[i].opnum == op_MAPI_proxypack) {
-                       found = true;
-                       break;
-               }
-       }
-       /* Nothing to unpack */
-       if (found == false) return false;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_pull);
-
-       ndr->data_size = mapi_req[i].u.mapi_proxypack.bin.cb;
-       ndr->data = mapi_req[i].u.mapi_proxypack.bin.lpb;
-
-       for (nopack_count = 0; mapi_req[nopack_count].opnum; nopack_count++);
-
-       /* Merge unpacked and non packed calls < last packed call position */
-       mapi_newreq = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
-       for (count = 0; ndr->offset != ndr->data_size; count++) {
-               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &pos));
-               if (pack_idx < pos) {
-                       while (pack_idx < pos) {
-                               if (nopack_idx >= nopack_count) break;
-                               
-                               mapi_newreq = talloc_realloc(mem_ctx, mapi_newreq, struct EcDoRpc_MAPI_REQ, pack_idx + 2);
-                               mapi_newreq[pack_idx] = mapi_req[nopack_idx];
-                               nopack_idx++;
-                               pack_idx++;
-                       }
-               }
-               
-               if (pos > pack_idx) {
-                       pack_idx = pos;
-               }
-               
-               mapi_newreq = talloc_realloc(mem_ctx, mapi_newreq, struct EcDoRpc_MAPI_REQ, pack_idx + 2);
-               NDR_CHECK(ndr_pull_EcDoRpc_MAPI_REQ(ndr, NDR_SCALARS, &mapi_newreq[pos]));
-               pack_idx++;
-       }
-
-       /* Append remaining non packed calls */
-       mapi_newreq[pack_idx].opnum = 0;
-       while (mapi_req[nopack_idx].opnum) {
-               if (nopack_idx > nopack_count) break;
-               
-               if (mapi_req[nopack_idx].opnum != op_MAPI_proxypack) {
-                       mapi_newreq = talloc_realloc(mem_ctx, mapi_newreq, struct EcDoRpc_MAPI_REQ, pack_idx + 2);
-                       mapi_newreq[pack_idx] = mapi_req[nopack_idx];
-                       pack_idx++;
-                       mapi_newreq[pack_idx].opnum = 0;
-               }
-               nopack_idx++;
-       }
-
-       /* Update mapi_request length and mapi_req pointer */
-       EcDoRpc->in.mapi_request->mapi_len -= (5 + count);
-       EcDoRpc->in.mapi_request->length -= (5 + count);
-       EcDoRpc->in.mapi_request->mapi_req = mapi_newreq;
-
-       return true;
-}
-
-/**
-   \details pack EcDoRpc calls into proxypack
- */
-static bool pack(TALLOC_CTX *mem_ctx, struct EcDoRpc *EcDoRpc)
-{
-       struct EcDoRpc_MAPI_REQ *mapi_req;
-       struct EcDoRpc_MAPI_REQ *mapi_newreq;
-       struct ndr_push         *ndr;
-       struct ndr_push         *nopack_ndr;
-       uint32_t                size;
-       uint32_t                handle_size;
-       uint32_t                i, j;
-       uint32_t                idx;
-       bool                    found;
-
-       mapi_req = EcDoRpc->in.mapi_request->mapi_req;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_push);
-
-       nopack_ndr = talloc_zero(mem_ctx, struct ndr_push);
-
-       mapi_newreq = talloc_array(mem_ctx, struct EcDoRpc_MAPI_REQ, 2);
-
-       for (i = 0, idx = 0; mapi_req[i].opnum; i++) {
-               found = false;
-               for (j = 0; mpm->mapi_calls[j]; j++) {
-                       if (mapi_req[i].opnum == mpm->mapi_calls[j]) {
-                               ndr_push_uint8(ndr, NDR_SCALARS, i);
-                               ndr_push_EcDoRpc_MAPI_REQ(ndr, NDR_SCALARS, &mapi_req[i]);
-                               found = true;
-                               break;
-                       }
-               }
-               if (found == false) {
-                       mapi_newreq = talloc_realloc(mem_ctx, mapi_newreq, struct EcDoRpc_MAPI_REQ, idx + 2);
-                       ndr_push_EcDoRpc_MAPI_REQ(nopack_ndr, NDR_SCALARS, &mapi_req[i]);
-                       mapi_newreq[idx] = mapi_req[i];
-                       idx++;
-               }
-       }
-
-       if (ndr->offset == 0) {
-               talloc_free(mapi_newreq);
-               talloc_free(nopack_ndr);
-               talloc_free(ndr);
-               return false;
-       }
-
-       DEBUG(3, ("============ non packed =============\n"));
-       dump_data(3, nopack_ndr->data, nopack_ndr->offset);
-       DEBUG(3, ("=====================================\n"));
-
-       DEBUG(3, ("\n============ packed =============\n"));
-       dump_data(3, ndr->data, ndr->offset);
-       DEBUG(3, ("=================================\n"));
-
-
-       /* Fill in the proxypack operation */
-       mapi_newreq = talloc_realloc(mem_ctx, mapi_newreq, struct EcDoRpc_MAPI_REQ, idx + 2);
-       size = proxypack(mem_ctx, &mapi_newreq[idx], ndr);
-       talloc_free(ndr);
-
-       if (!size) return false;
-
-       idx++;
-       mapi_newreq[idx].opnum = 0;
-
-       /* Recalculate the EcDoRpc request size */
-       handle_size = EcDoRpc->in.mapi_request->mapi_len - EcDoRpc->in.mapi_request->length;
-       EcDoRpc->in.mapi_request->mapi_len = nopack_ndr->offset + size + handle_size;
-       EcDoRpc->in.mapi_request->length = nopack_ndr->offset + size;
-
-       /* Replace EcDoRpc_MAPI_REQ */
-       talloc_free(EcDoRpc->in.mapi_request->mapi_req);
-       EcDoRpc->in.mapi_request->mapi_req = mapi_newreq;
-
-       /* Free memory */
-       talloc_free(nopack_ndr);
-
-       return true;
-}
-
-static NTSTATUS pack_push(struct dcesrv_call_state *dce_call,
-                         TALLOC_CTX *mem_ctx, void *r)
-{
-       return NT_STATUS_OK;
-}
-
-
-static NTSTATUS pack_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull)
-{
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details pack EcDoRpc MAPI requests
-
-   This function searches for MAPI opnums to pack in the requests,
-   add this opnums to the mapiproxy opnum DATA blob and refactor the
-   request to remove references to these calls in the original
-   request.
- */
-static NTSTATUS pack_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
-{
-       struct EcDoRpc          *EcDoRpc;
-       bool                    ret = false;
-
-       if (dce_call->pkt.u.request.opnum != 0x2) {
-               return NT_STATUS_OK;
-       }
-
-       EcDoRpc = (struct EcDoRpc *) r;
-       if (!EcDoRpc->in.mapi_request->mapi_req) return NT_STATUS_OK;
-
-       /* If this is an idle request, do not go further */
-       if (EcDoRpc->in.mapi_request->length == 2) {
-               return NT_STATUS_OK;
-       }
-
-       /* If this is not a last-hop */
-       if (mpm->lasthop == false) return NT_STATUS_OK;
-
-       ret = unpack(mem_ctx, EcDoRpc);
-       if (ret == false) {
-               ret = pack(mem_ctx, EcDoRpc);
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the pack module and retrieve configuration from
-   smb.conf.
-
-   Possible parameters:
-   * mpm_pack:opnums = 0x1, 0x2, 0x3
-   * mpm_pack:lasthop = true|false
-   
- */
-static NTSTATUS pack_init(struct dcesrv_context *dce_ctx)
-{
-       char            **calls;
-       unsigned long           opnum;
-       int                     i;
-       int                     j;
-       struct loadparm_context *lp_ctx;
-
-       /* Fetch the mapi call list from smb.conf */
-       calls = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "opnums"), NULL);
-
-       mpm = talloc_zero(dce_ctx, struct mpm_pack);
-       mpm->mapi_calls = talloc_zero(mpm, uint8_t);
-
-       for (i = 0; calls[i]; i++) {
-               opnum = strtol(calls[i], NULL, 16);
-               if (opnum <= 0 || opnum >= 0xFF) {
-                       DEBUG(0, ("%s: invalid MAPI opnum 0x%.2x\n", MPM_PACK_ERROR, (uint32_t)opnum));
-                       talloc_free(mpm);
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-               /* avoid duplicated opnums */
-               for (j = 0; j < i; j++) {
-                       if (opnum == mpm->mapi_calls[j]) {
-                               DEBUG(0, ("%s: duplicated opnum: 0x%.2x\n", MPM_PACK_ERROR, (uint32_t)opnum));
-                               talloc_free(mpm);
-                               return NT_STATUS_INVALID_PARAMETER;
-                       }
-               }
-               mpm->mapi_calls = talloc_realloc(mpm, mpm->mapi_calls, uint8_t, i + 2);
-               mpm->mapi_calls[i] = (uint8_t) opnum;
-       }
-       mpm->mapi_calls[i] = 0;
-
-       /* Fetch the lasthop parameter from smb.conf */
-       mpm->lasthop = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "lasthop", true);
-
-       lp_ctx = loadparm_init(dce_ctx);
-       lpcfg_load_default(lp_ctx);
-       dcerpc_init(lp_ctx);
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Entry point for the pack mapiproxy module
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module module;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       module.name = "pack";
-       module.description = "Pack specified MAPI calls into a custom MAPI call";
-       module.endpoint = "exchange_emsmdb";
-
-       /* Fill in all the operations */
-       module.init = pack_init;
-       module.unbind = NULL;
-       module.push = pack_push;
-       module.ndr_pull = pack_ndr_pull;
-       module.pull = pack_pull;
-       module.dispatch = NULL;
-
-       /* Register ourselves with the MAPIPROXY subsystem */
-       ret = mapiproxy_module_register(&module);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'pack' mapiproxy module!\n"));;
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c
deleted file mode 100644 (file)
index 189c932..0000000
+++ /dev/null
@@ -1,1352 +0,0 @@
-/*
-   MAPI Proxy - Exchange EMSMDB Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file dcesrv_exchange_emsmdb.c
-
-   \brief OpenChange EMSMDB Server implementation
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-struct exchange_emsmdb_session         *emsmdb_session = NULL;
-void                                   *openchange_ldb_ctx = NULL;
-
-/**
-   \details exchange_emsmdb EcDoConnect (0x0) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoConnect request data
-
-   \note Session linking is not supported at the moment
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoConnect(struct dcesrv_call_state *dce_call,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct EcDoConnect *r)
-{
-       struct emsmdbp_context          *emsmdbp_ctx;
-       struct dcesrv_handle            *handle;
-       struct policy_handle            wire_handle;
-       struct exchange_emsmdb_session  *session;
-       struct ldb_message              *msg;
-       const char                      *cn;
-       const char                      *userDN;
-       char                            *dnprefix;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_emsmdb: EcDoConnect (0x0)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-       failure:
-               wire_handle.handle_type = EXCHANGE_HANDLE_EMSMDB;
-               wire_handle.uuid = GUID_zero();
-               *r->out.handle = wire_handle;
-               
-               r->out.pcmsPollsMax = talloc_zero(mem_ctx, uint32_t);
-               r->out.pcRetry = talloc_zero(mem_ctx, uint32_t);
-               r->out.pcmsRetryDelay = talloc_zero(mem_ctx, uint32_t);
-               r->out.picxr = talloc_zero(mem_ctx, uint32_t);
-               r->out.pullTimeStamp = talloc_zero(mem_ctx, uint32_t);
-
-               *r->out.pcmsPollsMax = 0;
-               *r->out.pcRetry = 0;
-               *r->out.pcmsRetryDelay = 0;
-               r->out.szDisplayName = NULL;
-               r->out.szDNPrefix = NULL;
-               r->out.rgwServerVersion[0] = 0;
-               r->out.rgwServerVersion[1] = 0;
-               r->out.rgwServerVersion[2] = 0;
-               r->out.rgwClientVersion[0] = 0;
-               r->out.rgwClientVersion[1] = 0;
-               r->out.rgwClientVersion[2] = 0;
-               *r->out.pullTimeStamp = 0;
-
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 1. Initialize the emsmdbp context */
-       emsmdbp_ctx = emsmdbp_init(dce_call->conn->dce_ctx->lp_ctx, 
-                                  dce_call->context->conn->auth_state.session_info->info->account_name,
-                                  openchange_ldb_ctx);
-       if (!emsmdbp_ctx) {
-               smb_panic("unable to initialize emsmdbp context");
-               OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_FAILONEPROVIDER, NULL);
-       }
-
-       /* Step 2. Check if incoming user belongs to the Exchange organization */
-       if (emsmdbp_verify_user(dce_call, emsmdbp_ctx) == false) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       /* Step 3. Check if input user DN belongs to the Exchange organization */
-       if (emsmdbp_verify_userdn(dce_call, emsmdbp_ctx, r->in.szUserDN, &msg) == false) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       emsmdbp_ctx->szUserDN = talloc_strdup(emsmdbp_ctx, r->in.szUserDN);
-       emsmdbp_ctx->userLanguage = r->in.ulLcidString;
-
-       /* Step 4. Retrieve the display name of the user */
-       *r->out.szDisplayName = ldb_msg_find_attr_as_string(msg, "displayName", NULL);
-       emsmdbp_ctx->szDisplayName = talloc_strdup(emsmdbp_ctx, *r->out.szDisplayName);
-
-       /* Step 5. Retrieve the dinstinguished name of the server */
-       cn = ldb_msg_find_attr_as_string(msg, "cn", NULL);
-       userDN = ldb_msg_find_attr_as_string(msg, "legacyExchangeDN", NULL);
-       dnprefix = (char *)strstr(userDN, cn);
-       if (!dnprefix) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       *dnprefix = '\0';
-       *r->out.szDNPrefix = strupper_talloc(mem_ctx, userDN);
-
-       /* Step 6. Fill EcDoConnect reply */
-       handle = dcesrv_handle_new(dce_call->context, EXCHANGE_HANDLE_EMSMDB);
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-       
-       handle->data = (void *) emsmdbp_ctx;
-       *r->out.handle = handle->wire_handle;
-
-       r->out.pcmsPollsMax = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcmsPollsMax = EMSMDB_PCMSPOLLMAX;
-
-       r->out.pcRetry = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcRetry = EMSMDB_PCRETRY;
-
-       r->out.pcmsRetryDelay = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcmsRetryDelay = EMSMDB_PCRETRYDELAY;
-
-       r->out.picxr = talloc_zero(mem_ctx, uint32_t);
-       *r->out.picxr = 0;
-
-       /* The following server version is not supported by Outlook 2010 */
-       r->out.rgwServerVersion[0] = 0x6;
-       r->out.rgwServerVersion[1] = 0x1141;
-       r->out.rgwServerVersion[2] = 0x5;
-
-       /* This one is but requires EcDoConnectEx/EcDoRpcExt2/Async
-        * EMSMDB implementation */
-
-       /* r->out.rgwServerVersion[0] = 0x8; */
-       /* r->out.rgwServerVersion[1] = 0x82B4; */
-       /* r->out.rgwServerVersion[2] = 0x3; */
-
-       r->out.rgwClientVersion[0] = r->in.rgwClientVersion[0];
-       r->out.rgwClientVersion[1] = r->in.rgwClientVersion[1];
-       r->out.rgwClientVersion[2] = r->in.rgwClientVersion[2];
-
-       r->out.pullTimeStamp = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pullTimeStamp = time(NULL);
-
-       r->out.result = MAPI_E_SUCCESS;
-
-       /* Search for an existing session and increment ref_count, otherwise create it */
-       for (session = emsmdb_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call) == true)) {
-                       DEBUG(0, ("[exchange_emsmdb]: Increment session ref count for %d\n", 
-                                 session->session->context_id));
-                       mpm_session_increment_ref_count(session->session);
-                       found = true;
-                       break;
-               }
-       }
-
-       if (found == false) {
-               /* Step 7. Associate this emsmdbp context to the session */
-               session = talloc((TALLOC_CTX *)emsmdb_session, struct exchange_emsmdb_session);
-               OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-
-               session->pullTimeStamp = *r->out.pullTimeStamp;
-               session->session = mpm_session_init((TALLOC_CTX *)emsmdb_session, dce_call);
-               OPENCHANGE_RETVAL_IF(!session->session, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-
-               mpm_session_set_private_data(session->session, (void *) emsmdbp_ctx);
-               mpm_session_set_destructor(session->session, emsmdbp_destructor);
-
-               DEBUG(0, ("[exchange_emsmdb]: New session added: %d\n", session->session->context_id));
-
-               DLIST_ADD_END(emsmdb_session, session, struct exchange_emsmdb_session *);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_emsmdb EcDoDisconnect (0x1) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoDisconnect request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoDisconnect(struct dcesrv_call_state *dce_call,
-                                            TALLOC_CTX *mem_ctx,
-                                            struct EcDoDisconnect *r)
-{
-       struct dcesrv_handle            *h;
-       struct exchange_emsmdb_session  *session;
-       bool                            ret;
-
-       DEBUG(3, ("exchange_emsmdb: EcDoDisconnect (0x1)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 1. Retrieve handle and free if emsmdbp context and session are available */
-       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
-       if (h) {
-               for (session = emsmdb_session; session; session = session->next) {
-                       if ((mpm_session_cmp(session->session, dce_call) == true)) {
-                               ret = mpm_session_release(session->session);
-                               if (ret == true) {
-                                       DLIST_REMOVE(emsmdb_session, session);
-                                       DEBUG(5, ("[%s:%d]: Session found and released\n", 
-                                                 __FUNCTION__, __LINE__));
-                                       talloc_free(session);
-                               } else {
-                                       DEBUG(5, ("[%s:%d]: Session found and ref_count decreased\n",
-                                                 __FUNCTION__, __LINE__));
-                               }
-                               break;
-                       }
-               }
-       }
-
-       r->out.handle->handle_type = 0;
-       r->out.handle->uuid = GUID_zero();
-
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static struct mapi_response *EcDoRpc_process_transaction(TALLOC_CTX *mem_ctx, 
-                                                        struct emsmdbp_context *emsmdbp_ctx,
-                                                        struct mapi_request *mapi_request)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_response    *mapi_response;
-       uint32_t                handles_length;
-       uint16_t                size = 0;
-       uint32_t                i;
-       uint32_t                idx;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-       if (!mapi_request) return NULL;
-
-       /* Allocate mapi_response */
-       mapi_response = talloc_zero(mem_ctx, struct mapi_response);
-       mapi_response->handles = mapi_request->handles;
-
-       /* Step 1. Handle Idle requests case */
-       if (mapi_request->mapi_len <= 2) {
-               mapi_response->mapi_len = 2;
-               return mapi_response;
-       }
-       
-       /* Step 2. Process serialized MAPI requests */
-       mapi_response->mapi_repl = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REPL);
-       for (i = 0, idx = 0, size = 0; mapi_request->mapi_req[i].opnum != 0; i++) {
-               DEBUG(0, ("MAPI Rop: 0x%.2x (%d)\n", mapi_request->mapi_req[i].opnum, size));
-
-               if (mapi_request->mapi_req[i].opnum != op_MAPI_Release) {
-                       mapi_response->mapi_repl = talloc_realloc(mem_ctx, mapi_response->mapi_repl,
-                                                                 struct EcDoRpc_MAPI_REPL, idx + 2);
-               }
-
-               switch (mapi_request->mapi_req[i].opnum) {
-               case op_MAPI_Release: /* 0x01 */
-                       retval = EcDoRpc_RopRelease(mem_ctx, emsmdbp_ctx, 
-                                                   &(mapi_request->mapi_req[i]),
-                                                   mapi_request->handles, &size);
-                       break;
-               case op_MAPI_OpenFolder: /* 0x02 */
-                       retval = EcDoRpc_RopOpenFolder(mem_ctx, emsmdbp_ctx,
-                                                      &(mapi_request->mapi_req[i]),
-                                                      &(mapi_response->mapi_repl[idx]),
-                                                      mapi_response->handles, &size);
-                       break;
-               case op_MAPI_OpenMessage: /* 0x3 */
-                       retval = EcDoRpc_RopOpenMessage(mem_ctx, emsmdbp_ctx,
-                                                       &(mapi_request->mapi_req[i]),
-                                                       &(mapi_response->mapi_repl[idx]),
-                                                       mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetHierarchyTable: /* 0x04 */
-                       retval = EcDoRpc_RopGetHierarchyTable(mem_ctx, emsmdbp_ctx,
-                                                             &(mapi_request->mapi_req[i]),
-                                                             &(mapi_response->mapi_repl[idx]),
-                                                             mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetContentsTable: /* 0x05 */
-                       retval = EcDoRpc_RopGetContentsTable(mem_ctx, emsmdbp_ctx,
-                                                            &(mapi_request->mapi_req[i]),
-                                                            &(mapi_response->mapi_repl[idx]),
-                                                            mapi_response->handles, &size);
-                       break;
-               case op_MAPI_CreateMessage: /* 0x06 */
-                       retval = EcDoRpc_RopCreateMessage(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetProps: /* 0x07 */
-                       retval = EcDoRpc_RopGetPropertiesSpecific(mem_ctx, emsmdbp_ctx,
-                                                                 &(mapi_request->mapi_req[i]),
-                                                                 &(mapi_response->mapi_repl[idx]),
-                                                                 mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_GetPropsAll: 0x8 */
-               /* op_MAPI_GetPropList: 0x9 */
-               case op_MAPI_SetProps: /* 0x09 */
-                       retval = EcDoRpc_RopSetProperties(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               case op_MAPI_DeleteProps: /* 0xb */
-                       retval = EcDoRpc_RopDeleteProperties(mem_ctx, emsmdbp_ctx,
-                                                            &(mapi_request->mapi_req[i]),
-                                                            &(mapi_response->mapi_repl[idx]),
-                                                            mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SaveChangesMessage: /* 0x0c */
-                       retval = EcDoRpc_RopSaveChangesMessage(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_SaveChangesMessage: 0xc */
-               /* op_MAPI_RemoveAllRecipients: 0xd */
-               case op_MAPI_ModifyRecipients: /* 0xe */
-                       retval = EcDoRpc_RopModifyRecipients(mem_ctx, emsmdbp_ctx,
-                                                            &(mapi_request->mapi_req[i]),
-                                                            &(mapi_response->mapi_repl[idx]),
-                                                            mapi_response->handles, &size);
-                       break;
-
-               /* op_MAPI_ReadRecipients: 0xf */
-               case op_MAPI_ReloadCachedInformation: /* 0x10 */
-                       retval = EcDoRpc_RopReloadCachedInformation(mem_ctx, emsmdbp_ctx,
-                                                                   &(mapi_request->mapi_req[i]),
-                                                                   &(mapi_response->mapi_repl[idx]),
-                                                                   mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SetMessageReadFlag: /* 0x11 */
-                       retval = EcDoRpc_RopSetMessageReadFlag(mem_ctx, emsmdbp_ctx,
-                                                              &(mapi_request->mapi_req[i]),
-                                                              &(mapi_response->mapi_repl[idx]),
-                                                              mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SetColumns: /* 0x12 */
-                       retval = EcDoRpc_RopSetColumns(mem_ctx, emsmdbp_ctx,
-                                                      &(mapi_request->mapi_req[i]),
-                                                      &(mapi_response->mapi_repl[idx]),
-                                                      mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SortTable: /* 0x13 */
-                       retval = EcDoRpc_RopSortTable(mem_ctx, emsmdbp_ctx,
-                                                     &(mapi_request->mapi_req[i]),
-                                                     &(mapi_response->mapi_repl[idx]),
-                                                     mapi_response->handles, &size);
-                       break;
-               case op_MAPI_Restrict: /* 0x14 */
-                       retval = EcDoRpc_RopRestrict(mem_ctx, emsmdbp_ctx,
-                                                    &(mapi_request->mapi_req[i]),
-                                                    &(mapi_response->mapi_repl[idx]),
-                                                    mapi_response->handles, &size);
-                       break;
-               case op_MAPI_QueryRows: /* 0x15 */
-                       retval = EcDoRpc_RopQueryRows(mem_ctx, emsmdbp_ctx,
-                                                     &(mapi_request->mapi_req[i]),
-                                                     &(mapi_response->mapi_repl[idx]),
-                                                     mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_GetStatus: 0x16 */
-               case op_MAPI_QueryPosition: /* 0x17 */
-                       retval = EcDoRpc_RopQueryPosition(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SeekRow: /* 0x18 */
-                       retval = EcDoRpc_RopSeekRow(mem_ctx, emsmdbp_ctx,
-                                                   &(mapi_request->mapi_req[i]),
-                                                   &(mapi_response->mapi_repl[idx]),
-                                                   mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_SeekRowBookmark: 0x19 */
-               /* op_MAPI_SeekRowApprox: 0x1a */
-               /* op_MAPI_CreateBookmark: 0x1b */
-               case op_MAPI_CreateFolder: /* 0x1c */
-                       retval = EcDoRpc_RopCreateFolder(mem_ctx, emsmdbp_ctx,
-                                                        &(mapi_request->mapi_req[i]),
-                                                        &(mapi_response->mapi_repl[idx]),
-                                                        mapi_response->handles, &size);
-                       break;
-               case op_MAPI_DeleteFolder: /* 0x1d */
-                       retval = EcDoRpc_RopDeleteFolder(mem_ctx, emsmdbp_ctx,
-                                                        &(mapi_request->mapi_req[i]),
-                                                        &(mapi_response->mapi_repl[idx]),
-                                                        mapi_response->handles, &size);
-                       break;
-               case op_MAPI_DeleteMessages: /* 0x1e */
-                       retval = EcDoRpc_RopDeleteMessages(mem_ctx, emsmdbp_ctx,
-                                                          &(mapi_request->mapi_req[i]),
-                                                          &(mapi_response->mapi_repl[idx]),
-                                                          mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_GetMessageStatus: 0x1f */
-               /* op_MAPI_SetMessageStatus: 0x20 */
-               case op_MAPI_GetAttachmentTable: /* 0x21 */
-                       retval = EcDoRpc_RopGetAttachmentTable(mem_ctx, emsmdbp_ctx,
-                                                              &(mapi_request->mapi_req[i]),
-                                                              &(mapi_response->mapi_repl[idx]),
-                                                              mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_OpenAttach: 0x22 */
-               /* op_MAPI_CreateAttach: 0x23 */
-               /* op_MAPI_DeleteAttach: 0x24 */
-               /* op_MAPI_SaveChangesAttachment: 0x25 */
-               case op_MAPI_SetReceiveFolder: /* 0x26 */
-                       retval = EcDoRpc_RopSetReceiveFolder(mem_ctx, emsmdbp_ctx,
-                                                            &(mapi_request->mapi_req[i]),
-                                                            &(mapi_response->mapi_repl[idx]),
-                                                            mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetReceiveFolder: /* 0x27 */
-                       retval = EcDoRpc_RopGetReceiveFolder(mem_ctx, emsmdbp_ctx,
-                                                            &(mapi_request->mapi_req[i]),
-                                                            &(mapi_response->mapi_repl[idx]),
-                                                            mapi_response->handles, &size);
-                       break;
-               case op_MAPI_RegisterNotification: /* 0x29 */
-                       retval = EcDoRpc_RopRegisterNotification(mem_ctx, emsmdbp_ctx,
-                                                                &(mapi_request->mapi_req[i]),
-                                                                &(mapi_response->mapi_repl[idx]),
-                                                                mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_Notify: 0x2a */
-               case op_MAPI_OpenStream: /* 0x2b */
-                       retval = EcDoRpc_RopOpenStream(mem_ctx, emsmdbp_ctx,
-                                                      &(mapi_request->mapi_req[i]),
-                                                      &(mapi_response->mapi_repl[idx]),
-                                                      mapi_response->handles, &size);
-                       break;
-               case op_MAPI_ReadStream: /* 0x2c */
-                       retval = EcDoRpc_RopReadStream(mem_ctx, emsmdbp_ctx,
-                                                      &(mapi_request->mapi_req[i]),
-                                                      &(mapi_response->mapi_repl[idx]),
-                                                      mapi_response->handles, &size);
-                       break;
-               case op_MAPI_WriteStream: /* 0x2d */
-                       retval = EcDoRpc_RopWriteStream(mem_ctx, emsmdbp_ctx,
-                                                       &(mapi_request->mapi_req[i]),
-                                                       &(mapi_response->mapi_repl[idx]),
-                                                       mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_SeekStream: 0x2e */
-               /* op_MAPI_SetStreamSize: 0x2f */
-               case op_MAPI_SetSearchCriteria: /* 0x30 */
-                       retval = EcDoRpc_RopSetSearchCriteria(mem_ctx, emsmdbp_ctx,
-                                                             &(mapi_request->mapi_req[i]),
-                                                             &(mapi_response->mapi_repl[idx]),
-                                                             mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetSearchCriteria: /* 0x31 */
-                       retval = EcDoRpc_RopGetSearchCriteria(mem_ctx, emsmdbp_ctx,
-                                                             &(mapi_request->mapi_req[i]),
-                                                             &(mapi_response->mapi_repl[idx]),
-                                                             mapi_response->handles, &size);
-                       break;
-               case op_MAPI_SubmitMessage: /* 0x32 */
-                       retval = EcDoRpc_RopSubmitMessage(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_MoveCopyMessages: 0x33 */
-               /* op_MAPI_AbortSubmit: 0x34 */
-               /* op_MAPI_MoveFolder: 0x35 */
-               /* op_MAPI_CopyFolder: 0x36 */
-               /* op_MAPI_QueryColumnsAll: 0x37 */
-               /* op_MAPI_Abort: 0x38 */
-               /* op_MAPI_CopyTo: 0x39 */
-               /* op_MAPI_CopyToStream: 0x3a */
-               /* op_MAPI_CloneStream: 0x3b */
-               case op_MAPI_GetPermissionsTable: /* 0x3e */
-                       retval = EcDoRpc_RopGetPermissionsTable(mem_ctx, emsmdbp_ctx,
-                                                               &(mapi_request->mapi_req[i]),
-                                                               &(mapi_response->mapi_repl[idx]),
-                                                               mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetRulesTable: /* 0x3f */
-                       retval = EcDoRpc_RopGetRulesTable(mem_ctx, emsmdbp_ctx,
-                                                         &(mapi_request->mapi_req[i]),
-                                                         &(mapi_response->mapi_repl[idx]),
-                                                         mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_ModifyPermissions: 0x40 */
-               case op_MAPI_ModifyRules: /* 0x41 */
-                       retval = EcDoRpc_RopModifyRules(mem_ctx, emsmdbp_ctx,
-                                                       &(mapi_request->mapi_req[i]),
-                                                       &(mapi_response->mapi_repl[idx]),
-                                                       mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_GetOwningServers: 0x42 */
-               /* op_MAPI_LongTermIdFromId: 0x43 */
-               /* op_MAPI_IdFromLongTermId: 0x44 */
-               /* op_MAPI_PublicFolderIsGhosted: 0x45 */
-               /* op_MAPI_OpenEmbeddedMessage: 0x46 */
-               case op_MAPI_SetSpooler: /* 0x47 */
-                       retval = EcDoRpc_RopSetSpooler(mem_ctx, emsmdbp_ctx,
-                                                      &(mapi_request->mapi_req[i]),
-                                                      &(mapi_response->mapi_repl[idx]),
-                                                      mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_SpoolerLockMessage: 0x48 */
-               case op_MAPI_AddressTypes: /*x49 */
-                       retval = EcDoRpc_RopGetAddressTypes(mem_ctx, emsmdbp_ctx,
-                                                           &(mapi_request->mapi_req[i]),
-                                                           &(mapi_response->mapi_repl[idx]),
-                                                           mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_TransportSend: 0x4a */
-               /* op_MAPI_FastTransferSourceGetBuffer: 0x4e */
-               case op_MAPI_FindRow: /* 0x4f */
-                       retval = EcDoRpc_RopFindRow(mem_ctx, emsmdbp_ctx, 
-                                                   &(mapi_request->mapi_req[i]),
-                                                   &(mapi_response->mapi_repl[idx]),
-                                                   mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_Progress: 0x50 */
-               /* op_MAPI_TransportNewMail: 0x51 */
-               /* op_MAPI_GetValidAttachments: 0x52 */
-               /* op_MAPI_GetNamesFromIDs: 0x55 */
-               case op_MAPI_GetIDsFromNames: /* 0x56 */
-                       retval = EcDoRpc_RopGetPropertyIdsFromNames(mem_ctx, emsmdbp_ctx,
-                                                                   &(mapi_request->mapi_req[i]),
-                                                                   &(mapi_response->mapi_repl[idx]),
-                                                                   mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_UpdateDeferredActionMessages: 0x57 */ 
-               case op_MAPI_EmptyFolder: /* 0x58 */
-               retval = EcDoRpc_RopEmptyFolder(mem_ctx, emsmdbp_ctx,
-                                               &(mapi_request->mapi_req[i]),
-                                               &(mapi_response->mapi_repl[idx]),
-                                               mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_ExpandRow: 0x59 */
-               /* op_MAPI_CollapseRow: 0x5a */
-               /* op_MAPI_LockRegionStream: 0x5b */
-               /* op_MAPI_UnlockRegionStream: 0x5c */
-               /* op_MAPI_CommitStream: 0x5d */
-               /* op_MAPI_GetStreamSize: 0x5e */
-               /* op_MAPI_QueryNamedProperties: 0x5f */
-               case op_MAPI_GetPerUserLongTermIds: /* 0x60 */
-                       retval = EcDoRpc_RopGetPerUserLongTermIds(mem_ctx, emsmdbp_ctx,
-                                                                 &(mapi_request->mapi_req[i]),
-                                                                 &(mapi_response->mapi_repl[idx]),
-                                                                 mapi_response->handles, &size);
-                       break;
-               case op_MAPI_GetPerUserGuid: /* 0x61 */
-                       retval = EcDoRpc_RopGetPerUserGuid(mem_ctx, emsmdbp_ctx,
-                                                          &(mapi_request->mapi_req[i]),
-                                                          &(mapi_response->mapi_repl[idx]),
-                                                          mapi_response->handles, &size);
-                       break;
-               case op_MAPI_ReadPerUserInformation: /* 0x63 */
-                       retval = EcDoRpc_RopReadPerUserInformation(mem_ctx, emsmdbp_ctx,
-                                                                  &(mapi_request->mapi_req[i]),
-                                                                  &(mapi_response->mapi_repl[idx]),
-                                                                  mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_ReadPerUserInformation: 0x63 */
-               /* op_MAPI_SetReadFlags: 0x66 */
-               /* op_MAPI_CopyProperties: 0x67 */
-               /* op_MAPI_GetReceiveFolderTable: 0x68 */
-               /* op_MAPI_GetCollapseState: 0x6b */
-               /* op_MAPI_SetCollapseState: 0x6c */
-               case op_MAPI_GetTransportFolder: /* 0x6d */
-                       retval = EcDoRpc_RopGetTransportFolder(mem_ctx, emsmdbp_ctx,
-                                                              &(mapi_request->mapi_req[i]),
-                                                              &(mapi_response->mapi_repl[idx]),
-                                                              mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_Pending: 0x6e */
-               case op_MAPI_OptionsData: /* 0x6f */
-                       retval = EcDoRpc_RopOptionsData(mem_ctx, emsmdbp_ctx,
-                                                       &(mapi_request->mapi_req[i]),
-                                                       &(mapi_response->mapi_repl[idx]),
-                                                       mapi_response->handles, &size);
-                       break;
-               /* op_MAPI_SyncConfigure: 0x70 */
-               /* op_MAPI_SyncImportMessageChange: 0x72 */
-               /* op_MAPI_SyncImportHierarchyChange: 0x73 */
-               /* op_MAPI_SyncImportDeletes: 0x74 */
-               /* op_MAPI_SyncUploadStateStreamBegin: 0x75 */
-               /* op_MAPI_SyncUploadStateStreamContinue: 0x76 */
-               /* op_MAPI_SyncUploadStateStreamEnd: 0x77 */
-               /* op_MAPI_SyncImportMessageMove: 0x78 */
-               /* op_MAPI_SetPropertiesNoReplicate: 0x79 */
-               /* op_MAPI_DeletePropertiesNoReplicate: 0x7a */
-               /* op_MAPI_GetStoreState: 0x7b */
-               /* op_MAPI_SyncOpenCollector: 0x7e */
-               /* op_MAPI_GetLocalReplicaIds: 0x7f */
-               /* op_MAPI_SyncImportReadStateChanges: 0x80 */
-               /* op_MAPI_ResetTable: 0x81 */
-               /* op_MAPI_SyncGetTransferState: 0x82 */
-               /* op_MAPI_OpenPublicFolderByName: 0x87 */
-               /* op_MAPI_SetSyncNotificationGuid: 0x88 */
-               /* op_MAPI_FreeBookmark: 0x89 */
-               /* op_MAPI_WriteAndCommitStream: 0x90 */
-               /* op_MAPI_HardDeleteMessages: 0x91 */
-               /* op_MAPI_HardDeleteMessagesAndSubfolders: 0x92 */
-               case op_MAPI_Logon: /* 0xfe */
-                       retval = EcDoRpc_RopLogon(mem_ctx, emsmdbp_ctx,
-                                                 &(mapi_request->mapi_req[i]),
-                                                 &(mapi_response->mapi_repl[idx]),
-                                                 mapi_response->handles, &size);
-                       break;
-               default:
-                       DEBUG(1, ("MAPI Rop: 0x%.2x not implemented!\n",
-                                 mapi_request->mapi_req[i].opnum));
-               }
-
-               if (mapi_request->mapi_req[i].opnum != op_MAPI_Release) {
-                       idx++;
-               }
-
-       }
-
-       /* Step 3. Notifications/Pending calls should be processed here */
-       mapi_response->mapi_repl[idx].opnum = 0;
-
-       /* Step 4. Fill mapi_response structure */
-       handles_length = mapi_request->mapi_len - mapi_request->length;
-       mapi_response->length = size + sizeof (mapi_response->length);
-       mapi_response->mapi_len = mapi_response->length + handles_length;
-
-       return mapi_response;
-}
-
-
-/**
-   \details exchange_emsmdb EcDoRpc (0x2) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoRpc request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoRpc(struct dcesrv_call_state *dce_call,
-                                     TALLOC_CTX *mem_ctx,
-                                     struct EcDoRpc *r)
-{
-       struct exchange_emsmdb_session  *session;
-       struct emsmdbp_context          *emsmdbp_ctx = NULL;
-       struct mapi_request             *mapi_request;
-       struct mapi_response            *mapi_response;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_emsmdb: EcDoRpc (0x2)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Retrieve the emsmdbp_context from the session management system */
-       for (session = emsmdb_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsmdbp_ctx = (struct emsmdbp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Step 1. Process EcDoRpc requests */
-       mapi_request = r->in.mapi_request;
-       mapi_response = EcDoRpc_process_transaction(mem_ctx, emsmdbp_ctx, mapi_request);
-
-       /* Step 2. Fill EcDoRpc reply */
-       r->out.handle = r->in.handle;
-       r->out.size = r->in.size;
-       r->out.offset = r->in.offset;
-       r->out.mapi_response = mapi_response;
-       r->out.length = talloc_zero(mem_ctx, uint16_t);
-       *r->out.length = mapi_response->mapi_len;
-
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_emsmdb EcGetMoreRpc (0x3) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcGetMoreRpc request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcGetMoreRpc(struct dcesrv_call_state *dce_call,
-                               TALLOC_CTX *mem_ctx,
-                               struct EcGetMoreRpc *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcGetMoreRpc (0x3) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcRRegisterPushNotification (0x4) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcRRegisterPushNotification request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcRRegisterPushNotification(struct dcesrv_call_state *dce_call,
-                                                         TALLOC_CTX *mem_ctx,
-                                                         struct EcRRegisterPushNotification *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcRRegisterPushNotification (0x4) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcRUnregisterPushNotification (0x5) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcRUnregisterPushNotification request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcRUnregisterPushNotification(struct dcesrv_call_state *dce_call,
-                                                           TALLOC_CTX *mem_ctx,
-                                                           struct EcRUnregisterPushNotification *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcRUnregisterPushNotification (0x5) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcDummyRpc (0x6) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDummyRpc request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcDummyRpc(struct dcesrv_call_state *dce_call,
-                             TALLOC_CTX *mem_ctx,
-                             struct EcDummyRpc *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcDummyRpc (0x6) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcRGetDCName (0x7) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcRGetDCName request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcRGetDCName(struct dcesrv_call_state *dce_call,
-                               TALLOC_CTX *mem_ctx,
-                               struct EcRGetDCName *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcRGetDCName (0x7) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcRNetGetDCName (0x8) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcRNetGetDCName request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcRNetGetDCName(struct dcesrv_call_state *dce_call,
-                                  TALLOC_CTX *mem_ctx,
-                                  struct EcRNetGetDCName *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcRNetGetDCName (0x8) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcDoRpcExt (0x9) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoRpcExt request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcDoRpcExt(struct dcesrv_call_state *dce_call,
-                             TALLOC_CTX *mem_ctx,
-                             struct EcDoRpcExt *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcDoRpcExt (0x9) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-/* check if a client version is too low to use */
-/* TODO: this could be much more sophisticated */
-static bool clientVersionIsTooLow(const uint16_t rgwClientVersion[3])
-{
-       if (rgwClientVersion[0] < 0x000B) {
-               return true;
-       } else {
-               return false;
-       }
-}
-
-/**
-   \details exchange_emsmdb EcDoConnectEx (0xA) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoConnectEx request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoConnectEx(struct dcesrv_call_state *dce_call,
-                                           TALLOC_CTX *mem_ctx,
-                                           struct EcDoConnectEx *r)
-{
-       struct emsmdbp_context          *emsmdbp_ctx;
-       struct dcesrv_handle            *handle;
-       struct policy_handle            wire_handle;
-       struct exchange_emsmdb_session  *session;
-       struct ldb_message              *msg;
-       const char                      *cn;
-       const char                      *userDN;
-       char                            *dnprefix;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_emsmdb: EcDoConnectEx (0xA)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-       failure:
-               wire_handle.handle_type = EXCHANGE_HANDLE_EMSMDB;
-               wire_handle.uuid = GUID_zero();
-               *r->out.handle = wire_handle;
-
-               r->out.pcmsPollsMax = talloc_zero(mem_ctx, uint32_t);
-               r->out.pcRetry = talloc_zero(mem_ctx, uint32_t);
-               r->out.pcmsRetryDelay = talloc_zero(mem_ctx, uint32_t);
-               r->out.picxr = talloc_zero(mem_ctx, uint32_t);
-               r->out.pulTimeStamp = talloc_zero(mem_ctx, uint32_t);
-               r->out.pcbAuxOut = talloc_zero(mem_ctx, uint32_t);
-
-               *r->out.pcmsPollsMax = 0;
-               *r->out.pcRetry = 0;
-               *r->out.pcmsRetryDelay = 0;
-               *r->out.picxr = 0;
-               r->out.szDNPrefix = NULL;
-               r->out.szDisplayName = NULL;
-               r->out.rgwServerVersion[0] = 0;
-               r->out.rgwServerVersion[1] = 0;
-               r->out.rgwServerVersion[2] = 0;
-               r->out.rgwBestVersion[0] = 0;
-               r->out.rgwBestVersion[1] = 0;
-               r->out.rgwBestVersion[2] = 0;
-               *r->out.pulTimeStamp = 0;
-               r->out.rgbAuxOut = NULL;
-               *r->out.pcbAuxOut = 0;
-
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 1. Initialize the emsmdbp context */
-       emsmdbp_ctx = emsmdbp_init(dce_call->conn->dce_ctx->lp_ctx,
-                                  dce_call->context->conn->auth_state.session_info->info->account_name,
-                                  openchange_ldb_ctx);
-       if (!emsmdbp_ctx) {
-               smb_panic("Unable to initialize emsmdbp context");
-               OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_FAILONEPROVIDER, NULL);
-       }
-
-       /* Step 2. Check if incoming user belongs to the Exchange organization */
-       if (emsmdbp_verify_user(dce_call, emsmdbp_ctx) == false) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       /* Step 3. Check if input user DN belongs to the Exchange organization */
-       if (emsmdbp_verify_userdn(dce_call, emsmdbp_ctx, r->in.szUserDN, &msg) == false) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       emsmdbp_ctx->szUserDN = talloc_strdup(emsmdbp_ctx, r->in.szUserDN);
-       emsmdbp_ctx->userLanguage = r->in.ulLcidString;
-
-       /* Step 4. Retrieve the display name of the user */
-       *r->out.szDisplayName = ldb_msg_find_attr_as_string(msg, "displayName", NULL);
-       emsmdbp_ctx->szDisplayName = talloc_strdup(emsmdbp_ctx, *r->out.szDisplayName);
-
-       /* Step 5. Retrieve the distinguished name of the server */
-       cn = ldb_msg_find_attr_as_string(msg, "cn", NULL);
-       userDN = ldb_msg_find_attr_as_string(msg, "legacyExchangeDN", NULL);
-       dnprefix = (char *) strstr(userDN, cn);
-       if (!dnprefix) {
-               talloc_free(emsmdbp_ctx);
-               goto failure;
-       }
-
-       *dnprefix = '\0';
-       *r->out.szDNPrefix = strupper_talloc(mem_ctx, userDN);
-
-       /* Step 6. Fill EcDoConnectEx reply */
-       handle = dcesrv_handle_new(dce_call->context, EXCHANGE_HANDLE_EMSMDB);
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-
-       handle->data = (void *) emsmdbp_ctx;
-       *r->out.handle = handle->wire_handle;
-
-       r->out.pcmsPollsMax = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcmsPollsMax = EMSMDB_PCMSPOLLMAX;
-
-       r->out.pcRetry = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcRetry = EMSMDB_PCRETRY;
-
-       r->out.pcmsRetryDelay = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcmsRetryDelay = EMSMDB_PCRETRYDELAY;
-
-       r->out.picxr = talloc_zero(mem_ctx, uint32_t);
-       *r->out.picxr = 0;
-
-       r->out.rgwServerVersion[0] = 0x8;
-       r->out.rgwServerVersion[1] = 0x82B4;
-       r->out.rgwServerVersion[2] = 0x3;
-
-       r->out.pulTimeStamp = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pulTimeStamp = time(NULL);
-
-       r->out.pcbAuxOut = talloc_zero(mem_ctx, uint32_t);
-       *r->out.pcbAuxOut = 0;
-
-       r->out.rgbAuxOut = NULL;
-
-       if (clientVersionIsTooLow(r->in.rgwClientVersion)) {
-               r->out.rgwBestVersion[0] = 0x000B;
-               r->out.rgwBestVersion[1] = 0x8000;
-               r->out.rgwBestVersion[2] = 0x0000;
-               
-               r->out.result = MAPI_E_VERSION;
-       } else {
-               r->out.rgwBestVersion[0] = r->in.rgwClientVersion[0];
-               r->out.rgwBestVersion[1] = r->in.rgwClientVersion[1];
-               r->out.rgwBestVersion[2] = r->in.rgwClientVersion[2];
-
-               r->out.result = MAPI_E_SUCCESS;
-       }
-       /* Search for an existing session and increment ref_count, otherwise create it */
-       for (session = emsmdb_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       DEBUG(0, ("[exchange_emsmdb]: Increment session ref count for %d\n",
-                                 session->session->context_id));
-                       mpm_session_increment_ref_count(session->session);
-                       found = true;
-                       break;
-               }
-       }
-
-       if (found == false) {
-               /* Step 7. Associate this emsmdbp context to the session */
-               session = talloc((TALLOC_CTX *)emsmdb_session, struct exchange_emsmdb_session);
-               OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-
-               session->pullTimeStamp = *r->out.pulTimeStamp;
-               session->session = mpm_session_init((TALLOC_CTX *)emsmdb_session, dce_call);
-               OPENCHANGE_RETVAL_IF(!session->session, MAPI_E_NOT_ENOUGH_RESOURCES, emsmdbp_ctx);
-               
-               mpm_session_set_private_data(session->session, (void *) emsmdbp_ctx);
-               mpm_session_set_destructor(session->session, emsmdbp_destructor);
-
-               DEBUG(0, ("[exchange_emsmdb]: New session added: %d\n", session->session->context_id));
-
-               DLIST_ADD_END(emsmdb_session, session, struct exchange_emsmdb_session *);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details exchange_emsmdb EcDoRpcExt2 (0xB) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoRpcExt2 request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoRpcExt2(struct dcesrv_call_state *dce_call,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct EcDoRpcExt2 *r)
-{
-       struct exchange_emsmdb_session  *session;
-       struct emsmdbp_context          *emsmdbp_ctx = NULL;
-       struct mapi2k7_request          mapi2k7_request;
-       struct mapi_response            *mapi_response;
-       struct RPC_HEADER_EXT           RPC_HEADER_EXT;
-       struct ndr_pull                 *ndr_pull = NULL;
-       struct ndr_push                 *ndr_uncomp_rgbOut;
-       struct ndr_push                 *ndr_comp_rgbOut;
-       struct ndr_push                 *ndr_rgbOut;
-       uint32_t                        pulFlags = 0x0;
-       uint32_t                        pulTransTime = 0;
-       DATA_BLOB                       rgbIn;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_emsmdb: EcDoRpcExt2 (0xB)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Retrieve the emsmdbp_context from the session management system */
-       for (session = emsmdb_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsmdbp_ctx = (struct emsmdbp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Extract mapi_request from rgbIn */
-       rgbIn.data = r->in.rgbIn;
-       rgbIn.length = r->in.cbIn;
-       ndr_pull = ndr_pull_init_blob(&rgbIn, mem_ctx);
-       ndr_set_flags(&ndr_pull->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REF_ALLOC);
-       ndr_pull_mapi2k7_request(ndr_pull, NDR_SCALARS|NDR_BUFFERS, &mapi2k7_request);
-       talloc_free(ndr_pull);
-
-       mapi_response = EcDoRpc_process_transaction(mem_ctx, emsmdbp_ctx, mapi2k7_request.mapi_request);
-       talloc_free(mapi2k7_request.mapi_request);
-
-       /* Fill EcDoRpcExt2 reply */
-       r->out.handle = r->in.handle;
-       r->out.pulFlags = &pulFlags;
-
-       /* Push MAPI response into a DATA blob */
-       ndr_uncomp_rgbOut = ndr_push_init_ctx(mem_ctx);
-       ndr_set_flags(&ndr_uncomp_rgbOut->flags, LIBNDR_FLAG_NOALIGN);
-       ndr_push_mapi_response(ndr_uncomp_rgbOut, NDR_SCALARS|NDR_BUFFERS, mapi_response);
-       talloc_free(mapi_response);
-
-       /* TODO: compress */
-       ndr_comp_rgbOut = ndr_uncomp_rgbOut;
-
-       /* Build RPC_HEADER_EXT header for MAPI response DATA blob */
-       RPC_HEADER_EXT.Version = 0x0000;
-       // RPC_HEADER_EXT.Flags = RHEF_XorMagic|RHEF_Last;
-       RPC_HEADER_EXT.Flags = RHEF_Last;
-       RPC_HEADER_EXT.Flags |= (mapi2k7_request.header.Flags & RHEF_XorMagic);
-       RPC_HEADER_EXT.Size = ndr_comp_rgbOut->offset;
-       RPC_HEADER_EXT.SizeActual = ndr_comp_rgbOut->offset;
-
-       /* Obfuscate content if applicable */
-       if (RPC_HEADER_EXT.Flags & RHEF_XorMagic) {
-               DEBUG(0, ("obfuscate_data() called\n"));
-               obfuscate_data(ndr_comp_rgbOut->data, ndr_comp_rgbOut->offset, 0xA5);
-       }
-       
-       /* Push the constructed blob */
-       ndr_rgbOut = ndr_push_init_ctx(mem_ctx);
-       ndr_set_flags(&ndr_rgbOut->flags, LIBNDR_FLAG_NOALIGN);
-       ndr_push_RPC_HEADER_EXT(ndr_rgbOut, NDR_SCALARS|NDR_BUFFERS, &RPC_HEADER_EXT);
-       ndr_push_bytes(ndr_rgbOut, ndr_comp_rgbOut->data, ndr_comp_rgbOut->offset);
-
-       /* Push MAPI response into a DATA blob */
-       r->out.rgbOut = ndr_rgbOut->data;
-       r->out.pcbOut = &ndr_rgbOut->offset;
-
-       r->out.rgbAuxOut = NULL;
-       *r->out.pcbAuxOut = 0;
-       r->out.pulTransTime = &pulTransTime;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details exchange_emsmdb EcUnknown0xC (0xc) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcUnknown0xC request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcUnknown0xC(struct dcesrv_call_state *dce_call,
-                                     TALLOC_CTX *mem_ctx,
-                                     struct EcUnknown0xC *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcUnknown0xC (0xc) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcUnknown0xD (0xc) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcUnknown0xD request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static void dcesrv_EcUnknown0xD(struct dcesrv_call_state *dce_call,
-                                     TALLOC_CTX *mem_ctx,
-                                     struct EcUnknown0xD *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcUnknown0xC (0xd) not implemented\n"));
-       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_emsmdb EcGetMoreRpc (0xe) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the EcDoAsyncConnectExt request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_EcDoAsyncConnectEx(struct dcesrv_call_state *dce_call,
-                                                TALLOC_CTX *mem_ctx,
-                                                struct EcDoAsyncConnectEx *r)
-{
-       DEBUG(3, ("exchange_emsmdb: EcDoAsyncConnectEx (0xe) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Dispatch incoming EMSMDB call to the correct OpenChange
-   server function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r generic pointer on EMSMDB data
-   \param mapiproxy pointer to the mapiproxy structure controlling
-   mapiproxy behavior
-
-   \return NT_STATUS_OK;
- */
-static NTSTATUS dcesrv_exchange_emsmdb_dispatch(struct dcesrv_call_state *dce_call,
-                                               TALLOC_CTX *mem_ctx,
-                                               void *r, struct mapiproxy *mapiproxy)
-{
-       enum MAPISTATUS                         retval;
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-
-       table = (const struct ndr_interface_table *) dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       /* Sanity checks */
-       if (!table) return NT_STATUS_UNSUCCESSFUL;
-       if (table->name && strcmp(table->name, NDR_EXCHANGE_EMSMDB_NAME)) return NT_STATUS_UNSUCCESSFUL;
-
-       switch (opnum) {
-       case NDR_ECDOCONNECT:
-               retval = dcesrv_EcDoConnect(dce_call, mem_ctx, (struct EcDoConnect *)r);
-               break;
-       case NDR_ECDODISCONNECT:
-               retval = dcesrv_EcDoDisconnect(dce_call, mem_ctx, (struct EcDoDisconnect *)r);
-               break;
-       case NDR_ECDORPC:
-               retval = dcesrv_EcDoRpc(dce_call, mem_ctx, (struct EcDoRpc *)r);
-               break;
-       case NDR_ECGETMORERPC:
-               dcesrv_EcGetMoreRpc(dce_call, mem_ctx, (struct EcGetMoreRpc *)r);
-               break;
-       case NDR_ECRREGISTERPUSHNOTIFICATION:
-               retval = dcesrv_EcRRegisterPushNotification(dce_call, mem_ctx, (struct EcRRegisterPushNotification *)r);
-               break;
-       case NDR_ECRUNREGISTERPUSHNOTIFICATION:
-               retval = dcesrv_EcRUnregisterPushNotification(dce_call, mem_ctx, (struct EcRUnregisterPushNotification *)r);
-               break;
-       case NDR_ECDUMMYRPC:
-               dcesrv_EcDummyRpc(dce_call, mem_ctx, (struct EcDummyRpc *)r);
-               break;
-       case NDR_ECRGETDCNAME:
-               dcesrv_EcRGetDCName(dce_call, mem_ctx, (struct EcRGetDCName *)r);
-               break;
-       case NDR_ECRNETGETDCNAME:
-               dcesrv_EcRNetGetDCName(dce_call, mem_ctx, (struct EcRNetGetDCName *)r);
-               break;
-       case NDR_ECDORPCEXT:
-               dcesrv_EcDoRpcExt(dce_call, mem_ctx, (struct EcDoRpcExt *)r);
-               break;
-       case NDR_ECDOCONNECTEX:
-               retval = dcesrv_EcDoConnectEx(dce_call, mem_ctx, (struct EcDoConnectEx *)r);
-               break;
-       case NDR_ECDORPCEXT2:
-               retval = dcesrv_EcDoRpcExt2(dce_call, mem_ctx, (struct EcDoRpcExt2 *)r);
-               break;
-       case NDR_ECUNKNOWN0XC:
-               dcesrv_EcUnknown0xC(dce_call, mem_ctx, (struct EcUnknown0xC *)r);
-               break;
-       case NDR_ECUNKNOWN0XD:
-               dcesrv_EcUnknown0xD(dce_call, mem_ctx, (struct EcUnknown0xD *)r);
-               break;
-       case NDR_ECDOASYNCCONNECTEX:
-               dcesrv_EcDoAsyncConnectEx(dce_call, mem_ctx, (struct EcDoAsyncConnectEx *)r);
-               break;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the EMSMDB OpenChange server
-
-   \param dce_ctx pointer to the server context
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS dcesrv_exchange_emsmdb_init(struct dcesrv_context *dce_ctx)
-{
-       /* Initialize exchange_emsmdb session */
-       emsmdb_session = talloc_zero(dce_ctx, struct exchange_emsmdb_session);
-       if (!emsmdb_session) return NT_STATUS_NO_MEMORY;
-       emsmdb_session->session = NULL;
-
-       /* Open read/write context on OpenChange dispatcher database */
-       openchange_ldb_ctx = emsmdbp_openchange_ldb_init(dce_ctx->lp_ctx);
-       if (!openchange_ldb_ctx) {
-               smb_panic("unable to initialize 'openchange.ldb' context");
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Terminate the EMSMDB connection and release the associated
-   session and context if still available. This case occurs when the
-   client doesn't call EcDoDisconnect but quit unexpectedly.
-
-   \param server_id reference to the server identifier structure
-   \param context_id the connection context identifier
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS dcesrv_exchange_emsmdb_unbind(struct server_id server_id, uint32_t context_id)
-{
-       struct exchange_emsmdb_session  *session;
-
-       for (session = emsmdb_session; session; session = session->next) {
-               if ((mpm_session_cmp_sub(session->session, server_id, context_id) == true)) {
-                       mpm_session_release(session->session);
-                       DLIST_REMOVE(emsmdb_session, session);
-                       DEBUG(6, ("[%s:%d]: Session found and released\n", __FUNCTION__, __LINE__));
-                       return NT_STATUS_OK;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Entry point for the default OpenChange EMSMDB server
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module server;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       server.name = "exchange_emsmdb";
-       server.status = MAPIPROXY_DEFAULT;
-       server.description = "OpenChange EMSMDB server";
-       server.endpoint = "exchange_emsmdb";
-
-       /* Fill in all the operations */
-       server.init = dcesrv_exchange_emsmdb_init;
-       server.unbind = dcesrv_exchange_emsmdb_unbind;
-       server.dispatch = dcesrv_exchange_emsmdb_dispatch;
-       server.push = NULL;
-       server.pull = NULL;
-       server.ndr_pull = NULL;
-
-       /* Register ourselves with the MAPIPROXY server subsystem */
-       ret = mapiproxy_server_register(&server);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'exchange_emsmdb' default mapiproxy server!\n"));
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.h b/branches/plugfest/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.h
deleted file mode 100644 (file)
index 6e7436f..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
-   MAPI Proxy - Exchange EMSMDB Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __DCESRV_EXCHANGE_EMSMDB_H
-#define        __DCESRV_EXCHANGE_EMSMDB_H
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-#include "mapiproxy/libmapistore/mapistore.h"
-#include <ldb.h>
-#include <ldb_errors.h>
-#include <util/debug.h>
-#include <time.h>
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-struct emsmdbp_context {
-       char                            *szUserDN;
-       char                            *szDisplayName;
-       uint32_t                        userLanguage;
-       char                            *username;
-       struct loadparm_context         *lp_ctx;
-       void                            *oc_ctx;
-       struct ldb_context              *samdb_ctx;
-       struct mapistore_context        *mstore_ctx;
-       struct mapi_handles_context     *handles_ctx;
-       TALLOC_CTX                      *mem_ctx;
-};
-
-
-struct exchange_emsmdb_session {
-       uint32_t                        pullTimeStamp;
-       struct mpm_session              *session;
-       struct exchange_emsmdb_session  *prev;
-       struct exchange_emsmdb_session  *next;
-};
-
-enum emsmdbp_object_type {
-       EMSMDBP_OBJECT_UNDEF            = 0x0,
-       EMSMDBP_OBJECT_MAILBOX          = 0x1,
-       EMSMDBP_OBJECT_FOLDER           = 0x2,
-       EMSMDBP_OBJECT_MESSAGE          = 0x3,
-       EMSMDBP_OBJECT_TABLE            = 0x4,
-       EMSMDBP_OBJECT_STREAM           = 0x5
-};
-
-struct emsmdbp_object_mailbox {
-       uint64_t                        folderID;
-       char                            *owner_Name;
-       char                            *owner_EssDN;
-       char                            *szUserDN;
-       bool                            mailboxstore;
-};
-
-
-struct emsmdbp_object_folder {
-       uint64_t                        folderID;
-       uint32_t                        contextID;
-       bool                            mapistore;
-       bool                            mapistore_root; /* root mapistore container or not */
-       bool                            mailboxstore;
-};
-
-struct emsmdbp_object_message {
-       uint64_t                        folderID;
-       uint64_t                        messageID;
-       uint32_t                        contextID;
-       bool                            mapistore;
-};
-
-struct emsmdbp_object_table {
-       uint64_t                        folderID;
-       uint8_t                         ulType;
-       uint32_t                        contextID;
-       bool                            IsSystemTable;
-       uint16_t                        prop_count;
-       uint32_t                        *properties;
-       uint32_t                        numerator;
-       uint32_t                        denominator;
-       bool                            mapistore;
-};
-
-struct emsmdbp_object_stream {
-       uint32_t                        property;
-       uint32_t                        contextID;
-       bool                            mapistore;
-};
-
-union emsmdbp_objects {
-       struct emsmdbp_object_mailbox   *mailbox;
-       struct emsmdbp_object_folder    *folder;
-       struct emsmdbp_object_message   *message;
-       struct emsmdbp_object_table     *table;
-       struct emsmdbp_object_stream    *stream;
-};
-
-struct emsmdbp_object {
-       enum emsmdbp_object_type        type;
-       union emsmdbp_objects           object;
-       struct mapistore_context        *mstore_ctx;
-       void                            *private_data;
-};
-
-
-#define        EMSMDB_PCMSPOLLMAX              60000
-#define        EMSMDB_PCRETRY                  6
-#define        EMSMDB_PCRETRYDELAY             10000
-
-#define        EMSMDBP_MAILBOX_ROOT            0x1
-#define        EMSMDBP_DEFERRED_ACTIONS        0x2
-#define        EMSMDBP_SPOOLER_QUEUE           0x3
-#define        EMSMDBP_TODO_SEARCH             0x4
-#define        EMSMDBP_TOP_INFORMATION_STORE   0x5
-#define        EMSMDBP_INBOX                   0x6
-#define        EMSMDBP_OUTBOX                  0x7
-#define        EMSMDBP_SENT_ITEMS              0x8
-#define        EMSMDBP_DELETED_ITEMS           0x9
-#define        EMSMDBP_COMMON_VIEWS            0xA
-#define        EMSMDBP_SCHEDULE                0xB
-#define        EMSMDBP_SEARCH                  0xC
-#define        EMSMDBP_VIEWS                   0xD
-#define        EMSMDBP_SHORTCUTS               0xE
-
-#define EMSMDBP_PF_ROOT                        0x0
-#define EMSMDBP_PF_IPMSUBTREE          0x1
-#define EMSMDBP_PF_NONIPMSUBTREE       0x2
-#define EMSMDBP_PF_EFORMSREGISTRY      0x3
-#define EMSMDBP_PF_FREEBUSY            0x4
-#define EMSMDBP_PF_OAB                 0x5
-#define EMSMDBP_PF_LOCALEFORMS         0x6
-#define EMSMDBP_PF_LOCALFREEBUSY       0x7
-#define EMSMDBP_PF_LOCALOAB            0x8
-
-
-#define        EMSMDBP_TABLE_FOLDER_TYPE       0x1
-#define        EMSMDBP_TABLE_MESSAGE_TYPE      0x2
-
-__BEGIN_DECLS
-
-NTSTATUS       samba_init_module(void);
-struct ldb_context *samdb_connect(TALLOC_CTX *, struct tevent_context *, struct loadparm_context *, struct auth_session_info *, int);
-
-/* definitions from emsmdbp.c */
-struct emsmdbp_context *emsmdbp_init(struct loadparm_context *, const char *, void *);
-void                   *emsmdbp_openchange_ldb_init(struct loadparm_context *);
-bool                   emsmdbp_destructor(void *);
-bool                   emsmdbp_verify_user(struct dcesrv_call_state *, struct emsmdbp_context *);
-bool                   emsmdbp_verify_userdn(struct dcesrv_call_state *, struct emsmdbp_context *, const char *, struct ldb_message **);
-enum MAPISTATUS                emsmdbp_resolve_recipient(TALLOC_CTX *, struct emsmdbp_context *, char *, struct mapi_SPropTagArray *, struct RecipientRow *);
-
-/* definitions from emsmdbp_object.c */
-const char           *emsmdbp_getstr_type(struct emsmdbp_object *);
-bool                 emsmdbp_is_mapistore(struct mapi_handles *);
-bool                 emsmdbp_is_mailboxstore(struct mapi_handles *);
-uint32_t             emsmdbp_get_contextID(struct mapi_handles *);
-struct mapi_handles   *emsmdbp_object_get_folder_handle_by_fid(struct mapi_handles_context *, uint64_t);
-struct emsmdbp_object *emsmdbp_object_init(TALLOC_CTX *, struct emsmdbp_context *);
-struct emsmdbp_object *emsmdbp_object_mailbox_init(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, bool);
-struct emsmdbp_object *emsmdbp_object_folder_init(TALLOC_CTX *, struct emsmdbp_context *, uint64_t, struct mapi_handles *);
-struct emsmdbp_object *emsmdbp_object_table_init(TALLOC_CTX *, struct emsmdbp_context *, struct mapi_handles *);
-struct emsmdbp_object *emsmdbp_object_message_init(TALLOC_CTX *, struct emsmdbp_context *, uint64_t, struct mapi_handles *);
-struct emsmdbp_object *emsmdbp_object_stream_init(TALLOC_CTX *, struct emsmdbp_context *, uint32_t, struct mapi_handles *);
-
-/* definitions from oxcfold.c */
-enum MAPISTATUS EcDoRpc_RopOpenFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopGetHierarchyTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopGetContentsTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopCreateFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopDeleteFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopDeleteMessages(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSetSearchCriteria(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopGetSearchCriteria(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopEmptyFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxcmsg.c */
-enum MAPISTATUS EcDoRpc_RopOpenMessage(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopCreateMessage(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSaveChangesMessage(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopModifyRecipients(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopReloadCachedInformation(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSetMessageReadFlag(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopGetAttachmentTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxcnotif.c */
-enum MAPISTATUS EcDoRpc_RopRegisterNotification(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxcprpt.c */
-enum MAPISTATUS EcDoRpc_RopGetPropertiesSpecific(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSetProperties(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopDeleteProperties(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopOpenStream(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopReadStream(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopWriteStream(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopGetPropertyIdsFromNames(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxcstor.c */
-enum MAPISTATUS        EcDoRpc_RopLogon(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopRelease(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopGetReceiveFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopSetReceiveFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopGetPerUserLongTermIds(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopGetPerUserGuid(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopReadPerUserInformation(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definition from oxctabl.c */
-enum MAPISTATUS EcDoRpc_RopSetColumns(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSortTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopRestrict(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopQueryRows(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopQueryPosition(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopSeekRow(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopFindRow(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definition from oxomsg.c */
-enum MAPISTATUS        EcDoRpc_RopSubmitMessage(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopSetSpooler(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopGetAddressTypes(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopGetTransportFolder(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS        EcDoRpc_RopOptionsData(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxorule.c */
-enum MAPISTATUS EcDoRpc_RopGetRulesTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-enum MAPISTATUS EcDoRpc_RopModifyRules(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-/* definitions from oxcperm.c */
-enum MAPISTATUS EcDoRpc_RopGetPermissionsTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
-
-
-__END_DECLS
-
-#endif /* __DCESRV_EXCHANGE_EMSMDB_H */
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp.c
deleted file mode 100644 (file)
index 33e2749..0000000
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file emsmdbp.c
-
-   \brief EMSMDB Provider implementation
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_emsmdb.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-
-/**
-   \details Release the MAPISTORE context used by EMSMDB provider
-   context
-
-   \param data pointer on data to destroy
-
-   \return 0 on success, otherwise -1
- */
-static int emsmdbp_mapi_store_destructor(void *data)
-{
-       struct mapistore_context *mstore_ctx = (struct mapistore_context *) data;
-
-       mapistore_release(mstore_ctx);
-       DEBUG(6, ("[%s:%d]: MAPISTORE context released\n", __FUNCTION__, __LINE__));
-       return true;
-}
-
-/**
-   \details Release the MAPI handles context used by EMSMDB provider
-   context
-
-   \param data pointer on data to destroy
-
-   \return 0 on success, otherwise -1
- */
-static int emsmdbp_mapi_handles_destructor(void *data)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles_context     *handles_ctx = (struct mapi_handles_context *) data;
-
-       retval = mapi_handles_release(handles_ctx);
-       DEBUG(6, ("[%s:%d]: MAPI handles context released (%s)\n", __FUNCTION__, __LINE__,
-                 mapi_get_errstr(retval)));
-
-       return (retval == MAPI_E_SUCCESS) ? 0 : -1;
-}
-
-/**
-   \details Initialize the EMSMDBP context and open connections to
-   Samba databases.
-
-   \param lp_ctx pointer to the loadparm_context
-   \param username account name for current session
-   \param ldb_ctx pointer to the openchange dispatcher ldb database
-   
-   \return Allocated emsmdbp_context pointer on success, otherwise
-   NULL
- */
-_PUBLIC_ struct emsmdbp_context *emsmdbp_init(struct loadparm_context *lp_ctx,
-                                             const char *username,
-                                             void *ldb_ctx)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct emsmdbp_context  *emsmdbp_ctx;
-       struct tevent_context   *ev;
-       int                     ret;
-
-       /* Sanity Checks */
-       if (!lp_ctx) return NULL;
-
-       mem_ctx  = talloc_named(NULL, 0, "emsmdbp_init");
-
-       emsmdbp_ctx = talloc_zero(mem_ctx, struct emsmdbp_context);
-       if (!emsmdbp_ctx) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       emsmdbp_ctx->mem_ctx = mem_ctx;
-
-       ev = tevent_context_init(mem_ctx);
-       if (!ev) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Save a pointer to the loadparm context */
-       emsmdbp_ctx->lp_ctx = lp_ctx;
-
-       /* return an opaque context pointer on samDB database */
-       emsmdbp_ctx->samdb_ctx = samdb_connect(mem_ctx, ev, lp_ctx, system_session(lp_ctx), 0);
-       if (!emsmdbp_ctx->samdb_ctx) {
-               talloc_free(mem_ctx);
-               DEBUG(0, ("[%s:%d]: Connection to \"sam.ldb\" failed\n", __FUNCTION__, __LINE__));
-               return NULL;
-       }
-
-       /* Reference global OpenChange dispatcher database pointer within current context */
-       emsmdbp_ctx->oc_ctx = ldb_ctx;
-
-       /* Initialize the mapistore context */          
-       emsmdbp_ctx->mstore_ctx = mapistore_init(mem_ctx, NULL);
-       if (!emsmdbp_ctx->mstore_ctx) {
-               DEBUG(0, ("[%s:%d]: MAPISTORE initialization failed\n", __FUNCTION__, __LINE__));
-
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-       talloc_set_destructor((void *)emsmdbp_ctx->mstore_ctx, (int (*)(void *))emsmdbp_mapi_store_destructor);
-
-       /* Initialize the mapistore user's indexing database */
-       ret = mapistore_indexing_add(emsmdbp_ctx->mstore_ctx, username);
-       if (ret != MAPI_E_SUCCESS) {
-               DEBUG(0, ("[%s:%d]: MAPISTORE indexing database initialization failed\n", __FUNCTION__, __LINE__));
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Initialize MAPI handles context */
-       emsmdbp_ctx->handles_ctx = mapi_handles_init(mem_ctx);
-       if (!emsmdbp_ctx->handles_ctx) {
-               DEBUG(0, ("[%s:%d]: MAPI handles context initialization failed\n", __FUNCTION__, __LINE__));
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-       talloc_set_destructor((void *)emsmdbp_ctx->handles_ctx, (int (*)(void *))emsmdbp_mapi_handles_destructor);
-
-       return emsmdbp_ctx;
-}
-
-
-/**
-   \details Open openchange.ldb database
-
-   \param lp_ctx pointer on the loadparm_context
-
-   \note This function is just a wrapper over
-   mapiproxy_server_openchange_ldb_init
-
-   \return Allocated LDB context on success, otherwise NULL
- */
-_PUBLIC_ void *emsmdbp_openchange_ldb_init(struct loadparm_context *lp_ctx)
-{
-       /* Sanity checks */
-       if (!lp_ctx) return NULL;
-
-       return mapiproxy_server_openchange_ldb_init(lp_ctx);
-}
-
-
-_PUBLIC_ bool emsmdbp_destructor(void *data)
-{
-       struct emsmdbp_context  *emsmdbp_ctx = (struct emsmdbp_context *)data;
-
-       if (!emsmdbp_ctx) return false;
-
-       talloc_free(emsmdbp_ctx);
-       DEBUG(0, ("[%s:%d]: emsmdbp_ctx found and released\n", __FUNCTION__, __LINE__));
-
-       return true;
-}
-
-
-/**
-   \details Check if the authenticated user belongs to the Exchange
-   organization and is enabled
-
-   \param dce_call pointer to the session context
-   \param emsmdbp_ctx pointer to the EMSMDBP context
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool emsmdbp_verify_user(struct dcesrv_call_state *dce_call,
-                                 struct emsmdbp_context *emsmdbp_ctx)
-{
-       int                     ret;
-       const char              *username = NULL;
-       int                     msExchUserAccountControl;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "msExchUserAccountControl", NULL };
-
-       username = dce_call->context->conn->auth_state.session_info->info->account_name;
-
-       ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res,
-                        ldb_get_default_basedn(emsmdbp_ctx->samdb_ctx),
-                        LDB_SCOPE_SUBTREE, recipient_attrs, "CN=%s", username);
-
-       /* If the search failed */
-       if (ret != LDB_SUCCESS || !res->count) {
-               return false;
-       }
-
-       /* If msExchUserAccountControl attribute is not found */
-       if (!res->msgs[0]->num_elements) {
-               return false;
-       }
-
-       /* If the attribute exists check its value */
-       msExchUserAccountControl = ldb_msg_find_attr_as_int(res->msgs[0], "msExchUserAccountControl", 2);
-       if (msExchUserAccountControl == 2) {
-               return false;
-       }
-
-       /* Get a copy of the username for later use */
-       emsmdbp_ctx->username = talloc_strdup(emsmdbp_ctx, username);
-
-       return true;
-}
-
-
-/**
-   \details Check if the user record which legacyExchangeDN points to
-   belongs to the Exchange organization and is enabled
-
-   \param dce_call pointer to the session context
-   \param emsmdbp_ctx pointer to the EMSMDBP context
-   \param legacyExchangeDN pointer to the userDN to lookup
-   \param msg pointer on pointer to the LDB message matching the record
-
-   \note Users can set msg to NULL if they do not intend to retrieve
-   the message
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool emsmdbp_verify_userdn(struct dcesrv_call_state *dce_call,
-                                   struct emsmdbp_context *emsmdbp_ctx,
-                                   const char *legacyExchangeDN,
-                                   struct ldb_message **msg)
-{
-       int                     ret;
-       int                     msExchUserAccountControl;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "*", NULL };
-
-       /* Sanity Checks */
-       if (!legacyExchangeDN) return false;
-
-       ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res,
-                        ldb_get_default_basedn(emsmdbp_ctx->samdb_ctx),
-                        LDB_SCOPE_SUBTREE, recipient_attrs, "(legacyExchangeDN=%s)",
-                        legacyExchangeDN);
-
-       /* If the search failed */
-       if (ret != LDB_SUCCESS || !res->count) {
-               return false;
-       }
-
-       /* Checks msExchUserAccountControl value */
-       msExchUserAccountControl = ldb_msg_find_attr_as_int(res->msgs[0], "msExchUserAccountControl", 2);
-       if (msExchUserAccountControl == 2) {
-               return false;
-       }
-
-       if (msg) {
-               *msg = res->msgs[0];
-       }
-
-       return true;
-}
-
-
-/**
-   \details Resolve a recipient and build the associated RecipientRow
-   structure
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the EMSMDBP context
-   \param recipient pointer to the recipient string
-   \param properties array of properties to lookup for a recipient
-   \param row the RecipientRow to fill in
-
-   \note This is a very preliminary implementation with a lot of
-   pseudo-hardcoded things. Lot of work is required to make this
-   function generic and to cover all different cases
-
-   \return Allocated RecipientRow on success, otherwise NULL
- */
-_PUBLIC_ enum MAPISTATUS emsmdbp_resolve_recipient(TALLOC_CTX *mem_ctx,
-                                                  struct emsmdbp_context *emsmdbp_ctx,
-                                                  char *recipient,
-                                                  struct mapi_SPropTagArray *properties,
-                                                  struct RecipientRow *row)
-{
-       enum MAPISTATUS         retval;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "*", NULL };
-       int                     ret;
-       uint32_t                i;
-       uint32_t                property = 0;
-       void                    *data;
-       char                    *str;
-       char                    *username;
-       char                    *legacyExchangeDN;
-       uint32_t                org_length;
-       uint32_t                l;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx->samdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!properties, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!row, MAPI_E_INVALID_PARAMETER, NULL);
-
-       ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res,
-                        ldb_get_default_basedn(emsmdbp_ctx->samdb_ctx),
-                        LDB_SCOPE_SUBTREE, recipient_attrs,
-                        "(&(objectClass=user)(sAMAccountName=*%s*)(!(objectClass=computer)))",
-                        recipient);
-
-       /* If the search failed, build an external recipient: very basic for the moment */
-       if (ret != LDB_SUCCESS || !res->count) {
-       failure:
-               row->RecipientFlags = 0x07db;
-               row->EmailAddress.lpszW = talloc_strdup(mem_ctx, recipient);
-               row->DisplayName.lpszW = talloc_strdup(mem_ctx, recipient);
-               row->SimpleDisplayName.lpszW = talloc_strdup(mem_ctx, recipient);
-               row->prop_count = properties->cValues;
-               row->layout = 0x1;
-               row->prop_values.length = 0;
-               for (i = 0; i < properties->cValues; i++) {
-                       switch (properties->aulPropTag[i]) {
-                       case PR_SMTP_ADDRESS:
-                       case PR_SMTP_ADDRESS_UNICODE:
-                               property = properties->aulPropTag[i];
-                               data = (void *) recipient;
-                               break;
-                       default:
-                               retval = MAPI_E_NOT_FOUND;
-                               property = (properties->aulPropTag[i] & 0xFFFF0000) + PT_ERROR;
-                               data = (void *)&retval;
-                               break;
-                       }
-
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   property, (const void *)data, &row->prop_values, 
-                                                   row->layout, 0);
-               }
-
-               return MAPI_E_SUCCESS;
-       }
-
-       /* Otherwise build a RecipientRow for resolved username */
-
-       username = (char *) ldb_msg_find_attr_as_string(res->msgs[0], "mailNickname", NULL);
-       legacyExchangeDN = (char *) ldb_msg_find_attr_as_string(res->msgs[0], "legacyExchangeDN", NULL);
-       if (!username || !legacyExchangeDN) {
-               DEBUG(0, ("record found but mailNickname or legacyExchangeDN is missing for %s\n", recipient));
-               goto failure;
-       }
-       org_length = strlen(legacyExchangeDN) - strlen(username);
-
-       /* Check if we need a flagged blob */
-       row->layout = 0;
-       for (i = 0; i < properties->cValues; i++) {
-               switch (properties->aulPropTag[i]) {
-               case PR_DISPLAY_TYPE:
-               case PR_OBJECT_TYPE:
-               case PR_7BIT_DISPLAY_NAME:
-               case PR_7BIT_DISPLAY_NAME_UNICODE:
-               case PR_SMTP_ADDRESS:
-               case PR_SMTP_ADDRESS_UNICODE:
-                       break;
-               default:
-                       row->layout = 1;
-                       break;
-               }
-       }
-
-       row->RecipientFlags = 0x06d1;
-       row->AddressPrefixUsed.prefix_size = org_length;
-       row->DisplayType.display_type = SINGLE_RECIPIENT;
-       row->X500DN.recipient_x500name = talloc_strdup(mem_ctx, username);
-
-       row->DisplayName.lpszW = talloc_strdup(mem_ctx, username);
-       row->SimpleDisplayName.lpszW = talloc_strdup(mem_ctx, username);
-       row->prop_count = properties->cValues;
-       row->prop_values.length = 0;
-
-       /* Add this very small set of properties */
-       for (i = 0; i < properties->cValues; i++) {
-               switch (properties->aulPropTag[i]) {
-               case PR_DISPLAY_TYPE:
-                       property = properties->aulPropTag[i];
-                       l = 0x0;
-                       data = (void *)&l;
-                       break;
-               case PR_OBJECT_TYPE:
-                       property = properties->aulPropTag[i];
-                       l = MAPI_MAILUSER;
-                       data = (void *)&l;
-                       break;
-               case PR_7BIT_DISPLAY_NAME:
-               case PR_7BIT_DISPLAY_NAME_UNICODE:
-                       property = properties->aulPropTag[i];
-                       str = (char *) ldb_msg_find_attr_as_string(res->msgs[0], "mailNickname", NULL);
-                       data = (void *) str;
-                       break;
-               case PR_SMTP_ADDRESS:
-               case PR_SMTP_ADDRESS_UNICODE:
-                       property = properties->aulPropTag[i];
-                       str = (char *) ldb_msg_find_attr_as_string(res->msgs[0], "legacyExchangeDN", NULL);
-                       data = (void *) str;
-                       break;
-               default:
-                       retval = MAPI_E_NOT_FOUND;
-                       property = (properties->aulPropTag[i] & 0xFFFF0000) + PT_ERROR;
-                       data = (void *)&retval;
-                       break;
-               }
-               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                           property, (const void *)data, &row->prop_values, 
-                                           row->layout, 0);
-       }
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp_object.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/emsmdbp_object.c
deleted file mode 100644 (file)
index ba528ee..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file emsmdbp_object.c
-
-   \brief Server-side specific objects init/release routines
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-const char *emsmdbp_getstr_type(struct emsmdbp_object *object)
-{
-       switch (object->type) {
-       case EMSMDBP_OBJECT_UNDEF:
-               return "undefined";
-       case EMSMDBP_OBJECT_MAILBOX:
-               return "mailbox";
-       case EMSMDBP_OBJECT_FOLDER:
-               return "folder";
-       case EMSMDBP_OBJECT_MESSAGE:
-               return "message";
-       case EMSMDBP_OBJECT_TABLE:
-               return "table";
-       case EMSMDBP_OBJECT_STREAM:
-               return "stream";
-       default:
-               return "unknown";
-       }
-}
-
-
-/**
-   \details Convenient function to determine whether specified
-   mapi_handles refers to object using mapistore or not
-
-   \param handles pointer to the MAPI handle to lookup
-
-   \return true if parent is using mapistore, otherwise false
- */
-bool emsmdbp_is_mapistore(struct mapi_handles *handles)
-{
-       void                    *data;
-       struct emsmdbp_object   *object;
-
-       /* Sanity checks - probably pointless */
-       if (!handles) {
-               return false;
-       }
-
-       mapi_handles_get_private_data(handles, &data);
-       object = (struct emsmdbp_object *)data;
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_MAILBOX:
-               return false;
-       case EMSMDBP_OBJECT_FOLDER:
-               return object->object.folder->mapistore;
-       case EMSMDBP_OBJECT_TABLE:
-               return object->object.table->mapistore;
-       case EMSMDBP_OBJECT_MESSAGE:
-               return object->object.message->mapistore;
-       case EMSMDBP_OBJECT_STREAM:
-               return object->object.stream->mapistore;
-       default:
-               return false;
-       }
-
-       return false;
-}
-
-
-/**
-   \details Convenient function to determine whether specified
-   mapi_handles refers to object within mailbox or public folders
-   store.
-
-   \param handles pointer to the MAPI handle to lookup
-
-   \return true if parent is within mailbox store, otherwise false
- */
-bool emsmdbp_is_mailboxstore(struct mapi_handles *handles)
-{
-       void                    *data;
-       struct emsmdbp_object   *object;
-
-       /* Sanity checks - irrelevant */
-
-       mapi_handles_get_private_data(handles, &data);
-       object = (struct emsmdbp_object *)data;
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_MAILBOX:
-               return  object->object.mailbox->mailboxstore;
-       case EMSMDBP_OBJECT_FOLDER:
-               return object->object.folder->mailboxstore;
-       default:
-               break;
-       }
-       
-       /* We should never hit this case */
-       return true;
-}
-
-
-/**
-   \details Return the contextID associated to a handle
-
-   \param handles pointer to the MAPI handle to lookup
-
-   \return contextID value on success, otherwise -1
- */
-uint32_t emsmdbp_get_contextID(struct mapi_handles *handles)
-{
-       void                    *data;
-       struct emsmdbp_object   *object;
-
-       mapi_handles_get_private_data(handles, &data);
-       object = (struct emsmdbp_object *) data;
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_MAILBOX:
-               return -1;
-       case EMSMDBP_OBJECT_FOLDER:
-               return object->object.folder->contextID;
-       case EMSMDBP_OBJECT_MESSAGE:
-               return object->object.message->contextID;
-       case EMSMDBP_OBJECT_STREAM:
-               return object->object.stream->contextID;
-       default:
-               return -1;
-       }
-
-       return -1;
-}
-
-
-/**
-   \details Retrieve the folder handle matching given fid
-
-   \param handles_ctx pointer to the handles context
-   \param fid folder identifier to lookup
-
-   \return pointer to valid mapi_handles structure on success, otherwise NULL
- */
-struct mapi_handles *emsmdbp_object_get_folder_handle_by_fid(struct mapi_handles_context *handles_ctx,
-                                                            uint64_t fid)
-{
-       struct mapi_handles     *handle;
-       struct emsmdbp_object   *object;
-       void                    *data;
-
-       for (handle = handles_ctx->handles; handle; handle = handle->next) {
-               mapi_handles_get_private_data(handle, &data);
-               if (data) {
-                       object = (struct emsmdbp_object *) data;
-                       if (object->type == EMSMDBP_OBJECT_FOLDER && object->object.folder->folderID == fid) {
-                               return handle;
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-/**
-   \details talloc destructor for emsmdbp_objects
-
-   \param data generic pointer on data
-
-   \return 0 on success, otherwise -1
- */
-static int emsmdbp_object_destructor(void *data)
-{
-       struct emsmdbp_object   *object = (struct emsmdbp_object *) data;
-       int                     ret;
-
-       if (!data) return -1;
-       
-       DEBUG(4, ("[%s:%d]: emsmdbp %s object released\n", __FUNCTION__, __LINE__,
-                 emsmdbp_getstr_type(object)));
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_FOLDER:
-               ret = mapistore_del_context(object->mstore_ctx, object->object.folder->contextID);
-               DEBUG(4, ("[%s:%d] mapistore folder context retval = %d\n", __FUNCTION__, __LINE__, ret));
-               break;
-       case EMSMDBP_OBJECT_MESSAGE:
-               ret = mapistore_release_record(object->mstore_ctx, object->object.message->contextID,
-                                              object->object.message->messageID, MAPISTORE_MESSAGE);
-               ret = mapistore_del_context(object->mstore_ctx, object->object.message->contextID);
-               DEBUG(4, ("[%s:%d] mapistore message context retval = %d\n", __FUNCTION__, __LINE__, ret));
-       default:
-               break;
-       }
-
-       talloc_free(object);
-
-       return 0;
-}
-
-/**
-   \details Initialize an emsmdbp_object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-
-   \return Allocated emsmdbp object on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_init(TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx)
-{
-       struct emsmdbp_object   *object = NULL;
-
-       object = talloc_zero(mem_ctx, struct emsmdbp_object);
-       if (!object) return NULL;
-
-       talloc_set_destructor((void *)object, (int (*)(void *))emsmdbp_object_destructor);
-
-       object->type = EMSMDBP_OBJECT_UNDEF;
-       object->mstore_ctx = emsmdbp_ctx->mstore_ctx;
-       object->object.mailbox = NULL;
-       object->object.folder = NULL;
-       object->object.message = NULL;
-       object->object.stream = NULL;
-       object->private_data = NULL;
-
-       return object;
-}
-
-
-/**
-   \details Initialize a mailbox object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request pointer to the Logon MAPI request
-   \param mailboxstore boolean which specifies whether the mailbox
-   object is a PF store or a private mailbox store
-
-   \return Allocated emsmdbp object on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_mailbox_init(TALLOC_CTX *mem_ctx,
-                                                           struct emsmdbp_context *emsmdbp_ctx,
-                                                           struct EcDoRpc_MAPI_REQ *request,
-                                                           bool mailboxstore)
-{
-       struct emsmdbp_object           *object;
-       const char                      *displayName;
-       const char * const              recipient_attrs[] = { "*", NULL };
-       int                             ret;
-       struct ldb_result               *res = NULL;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-       if (!request) return NULL;
-
-       object = emsmdbp_object_init(mem_ctx, emsmdbp_ctx);
-       if (!object) return NULL;
-
-       /* Initialize the mailbox object */
-       object->object.mailbox = talloc_zero(object, struct emsmdbp_object_mailbox);
-       if (!object->object.mailbox) {
-               talloc_free(object);
-               return NULL;
-       }
-
-       object->type = EMSMDBP_OBJECT_MAILBOX;
-       object->object.mailbox->owner_Name = NULL;
-       object->object.mailbox->owner_EssDN = NULL;
-       object->object.mailbox->szUserDN = NULL;
-       object->object.mailbox->folderID = 0x0;
-       object->object.mailbox->mailboxstore = mailboxstore;
-
-       if (mailboxstore == true) {
-               object->object.mailbox->owner_EssDN = talloc_strdup(object->object.mailbox, 
-                                                                   request->u.mapi_Logon.EssDN);
-               ret = ldb_search(emsmdbp_ctx->samdb_ctx, mem_ctx, &res,
-                                ldb_get_default_basedn(emsmdbp_ctx->samdb_ctx),
-                                LDB_SCOPE_SUBTREE, recipient_attrs, "legacyExchangeDN=%s", 
-                                object->object.mailbox->owner_EssDN);
-
-               if (res->count == 1) {
-                       displayName = ldb_msg_find_attr_as_string(res->msgs[0], "displayName", NULL);
-                       if (displayName) {
-                               object->object.mailbox->owner_Name = talloc_strdup(object->object.mailbox, 
-                                                                                  displayName);
-
-                               /* Retrieve Mailbox folder identifier */
-                               openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, 
-                                                               object->object.mailbox->owner_Name,
-                                                               0x1, &object->object.mailbox->folderID);
-                       }
-               }
-       } else {
-               /* Retrieve Public folder identifier */
-               openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, 0x1, &object->object.mailbox->folderID);
-       }
-
-       object->object.mailbox->szUserDN = talloc_strdup(object->object.mailbox, emsmdbp_ctx->szUserDN);
-
-       talloc_free(res);
-
-       return object;
-}
-
-
-/**
-   \details Initialize a folder object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param folderID the folder identifier
-   \param parent handle to the parent folder for this folder
-
-   \return Allocated emsmdbp object on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_folder_init(TALLOC_CTX *mem_ctx,
-                                                          struct emsmdbp_context *emsmdbp_ctx,
-                                                          uint64_t folderID,
-                                                          struct mapi_handles *parent)
-{
-       enum MAPISTATUS                 retval;
-       struct emsmdbp_object           *object;
-       char                            *mapistore_uri = NULL;
-       uint32_t                        context_id;
-       int                             ret;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-
-       object = emsmdbp_object_init(mem_ctx, emsmdbp_ctx);
-       if (!object) return NULL;
-
-       object->object.folder = talloc_zero(object, struct emsmdbp_object_folder);
-       if (!object->object.folder) {
-               talloc_free(object);
-               return NULL;
-       }
-
-       object->type = EMSMDBP_OBJECT_FOLDER;
-       object->object.folder->contextID = -1;
-       object->object.folder->folderID = folderID;
-       object->object.folder->mapistore_root = false;
-       object->object.folder->mailboxstore = emsmdbp_is_mailboxstore(parent);
-
-       /* system folders acting as containers don't have
-        * mapistore_uri attributes (Mailbox, IPM Subtree) 
-        */
-       retval = openchangedb_get_mapistoreURI(mem_ctx, emsmdbp_ctx->oc_ctx,
-                                              object->object.folder->folderID, 
-                                              &mapistore_uri, object->object.folder->mailboxstore);
-
-       if (retval == MAPI_E_SUCCESS) {
-               if (!mapistore_uri) {
-                       DEBUG(0, ("This is not a mapistore container\n"));
-                       object->object.folder->mapistore = false;
-               } else {
-                       DEBUG(0, ("This is a mapistore container: uri = %s\n", mapistore_uri));
-                       object->object.folder->mapistore = true;
-                       object->object.folder->mapistore_root = true;
-                       ret = mapistore_search_context_by_uri(emsmdbp_ctx->mstore_ctx, mapistore_uri, 
-                                                             &context_id);
-                       if (ret == MAPISTORE_SUCCESS) {
-                               ret = mapistore_add_context_ref_count(emsmdbp_ctx->mstore_ctx, context_id);
-                       } else {
-                               ret = mapistore_add_context(emsmdbp_ctx->mstore_ctx, mapistore_uri, &context_id);
-                               DEBUG(0, ("context id: %d (%s)\n", context_id, mapistore_uri));
-                               if (ret != MAPISTORE_SUCCESS) {
-                                       talloc_free(object);
-                                       return NULL;
-                               }
-                               ret = mapistore_add_context_indexing(emsmdbp_ctx->mstore_ctx, 
-                                                                    emsmdbp_ctx->username,
-                                                                    context_id);
-                               ret = mapistore_indexing_record_add_fid(emsmdbp_ctx->mstore_ctx,
-                                                                       context_id, folderID);
-                       }
-                       object->object.folder->contextID = context_id;
-               }
-       } else {
-               if (emsmdbp_is_mapistore(parent)) {
-                       object->object.folder->mapistore = true;
-                       object->object.folder->contextID = emsmdbp_get_contextID(parent);
-                       ret = mapistore_add_context_ref_count(emsmdbp_ctx->mstore_ctx, 
-                                                             object->object.folder->contextID);
-               } else {
-                       object->object.folder->mapistore = false;
-               }
-       }
-
-       return object;
-}
-
-
-/**
-   \details Initialize a table object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param parent pointer to the parent MAPI handle
-
-   \return Allocated emsmdbp object on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_table_init(TALLOC_CTX *mem_ctx,
-                                                         struct emsmdbp_context *emsmdbp_ctx,
-                                                         struct mapi_handles *parent)
-{
-       enum MAPISTATUS         retval;
-       struct emsmdbp_object   *object;
-       struct emsmdbp_object   *folder;
-       void                    *data = NULL;
-       bool                    mapistore = false;
-       int                     ret;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-
-       /* Retrieve parent object */
-       retval = mapi_handles_get_private_data(parent, &data);
-       if (retval) return NULL;
-       folder = (struct emsmdbp_object *) data;
-
-       /* Initialize table object */
-       object = emsmdbp_object_init(mem_ctx, emsmdbp_ctx);
-       if (!object) return NULL;
-       
-       object->object.table = talloc_zero(object, struct emsmdbp_object_table);
-       if (!object->object.table) {
-               talloc_free(object);
-               return NULL;
-       }
-
-       object->type = EMSMDBP_OBJECT_TABLE;
-       object->object.table->folderID = folder->object.folder->folderID;
-       object->object.table->prop_count = 0;
-       object->object.table->properties = NULL;
-       object->object.table->numerator = 0;
-       object->object.table->denominator = 0;
-       object->object.table->ulType = 0;
-       object->object.table->mapistore = false;
-       object->object.table->contextID = -1;
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       if (mapistore == true) {
-               object->object.table->mapistore = true;
-               object->object.table->contextID = folder->object.folder->contextID;             
-               ret = mapistore_add_context_ref_count(emsmdbp_ctx->mstore_ctx, 
-                                                     folder->object.folder->contextID);
-       }
-
-       return object;
-}
-
-
-/**
-   \details Initialize a message object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param messageID the message identifier
-   \param parent pointer to the parent MAPI handle
-
-   \return Allocated emsmdbp object on success, otherwise NULL
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_message_init(TALLOC_CTX *mem_ctx,
-                                                           struct emsmdbp_context *emsmdbp_ctx,
-                                                           uint64_t messageID,
-                                                           struct mapi_handles *parent)
-{
-       enum MAPISTATUS         retval;
-       struct emsmdbp_object   *object;
-       struct emsmdbp_object   *folder;
-       void                    *data = NULL;
-       bool                    mapistore = false;
-       int                     ret;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-
-       /* Retrieve parent object */
-       retval = mapi_handles_get_private_data(parent, &data);
-       if (retval) return NULL;
-       folder = (struct emsmdbp_object *) data;
-
-       /* Initialize message object */
-       object = emsmdbp_object_init(mem_ctx, emsmdbp_ctx);
-       if (!object) return NULL;
-
-       object->object.message = talloc_zero(object, struct emsmdbp_object_message);
-       if (!object->object.message) {
-               talloc_free(object);
-               return NULL;
-       }
-
-       object->type = EMSMDBP_OBJECT_MESSAGE;
-       object->object.message->folderID = folder->object.folder->folderID;
-       object->object.message->messageID = messageID;
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       if (mapistore == true) {
-               object->object.message->mapistore = true;
-               object->object.message->contextID = folder->object.folder->contextID;           
-               ret = mapistore_add_context_ref_count(emsmdbp_ctx->mstore_ctx, 
-                                                     folder->object.folder->contextID);
-       } 
-
-       return object;  
-}
-
-
-/**
-   \details Initialize a stream object
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider cotnext
-   \param property the stream property identifier
-   \param parent pointer to the parent MAPI handle
- */
-_PUBLIC_ struct emsmdbp_object *emsmdbp_object_stream_init(TALLOC_CTX *mem_ctx,
-                                                          struct emsmdbp_context *emsmdbp_ctx,
-                                                          uint32_t property,
-                                                          struct mapi_handles *parent)
-{
-       enum MAPISTATUS         retval;
-       struct emsmdbp_object   *object;
-       void                    *data;
-       bool                    mapistore = false;
-
-       /* Sanity checks */
-       if (!emsmdbp_ctx) return NULL;
-
-       /* Retrieve parent object */
-       retval = mapi_handles_get_private_data(parent, &data);
-       if (retval) return NULL;
-       
-       object = emsmdbp_object_init(mem_ctx, emsmdbp_ctx);
-       if (!object) return NULL;
-
-       object->object.stream = talloc_zero(object, struct emsmdbp_object_stream);
-       if (!object->object.stream) {
-               talloc_free(object);
-               return NULL;
-       }
-
-       object->type = EMSMDBP_OBJECT_STREAM;
-       object->object.stream->property = property;
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       if (mapistore == true) {
-               object->object.stream->mapistore = true;
-               object->object.stream->contextID = emsmdbp_get_contextID(parent);
-       }
-
-       return object;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcfold.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcfold.c
deleted file mode 100644 (file)
index ff3f72a..0000000
+++ /dev/null
@@ -1,1165 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcfold.c
-
-   \brief Folder object routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-
-/**
-   \details Open a System or Special folder object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request OpenFolder request
-   \param response pointer to the OpenFolder response
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopOpenFolder_SystemSpecialFolder(TALLOC_CTX *mem_ctx, 
-                                                        struct emsmdbp_context *emsmdbp_ctx,
-                                                        struct OpenFolder_req request,
-                                                        struct OpenFolder_repl *response)
-{
-       /* Find parent record */
-       /* Set parent record as basedn */
-       /* Look for systemfolder given its FolderID */
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static enum MAPISTATUS RopOpenFolder_GenericFolder(TALLOC_CTX *mem_ctx,
-                                                  struct emsmdbp_context *emsmdbp_ctx,
-                                                  struct OpenFolder_req request,
-                                                  struct OpenFolder_repl *response,
-                                                  struct mapi_handles *parent)
-{
-       struct emsmdbp_object   *parent_object = NULL;
-       void                    *data;
-       uint64_t                parent_fid;
-       int                     retval;
-       uint32_t                context_id;
-
-       /* Step 1. Retrieve the parent fid given the handle */
-       mapi_handles_get_private_data(parent, &data);
-       parent_object = (struct emsmdbp_object *) data;
-       if (!parent_object) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] OpenFolder null object"));
-               return MAPI_E_NO_SUPPORT;
-       }
-
-       if (parent_object->type != EMSMDBP_OBJECT_FOLDER) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] OpenFolder wrong object type: 0x%x\n", parent_object->type));
-               return MAPI_E_NO_SUPPORT;
-       }
-       parent_fid = parent_object->object.folder->folderID;
-       context_id = parent_object->object.folder->contextID;
-
-       /* Step 2. Open folder from mapistore */
-       retval = mapistore_opendir(emsmdbp_ctx->mstore_ctx, context_id, parent_fid, request.folder_id);
-       if (retval) return MAPI_E_NOT_FOUND;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc OpenFolder (0x02) Rop. This operation opens an
-   existing folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the OpenFolder EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the OpenFolder EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopOpenFolder(TALLOC_CTX *mem_ctx,
-                                              struct emsmdbp_context *emsmdbp_ctx,
-                                              struct EcDoRpc_MAPI_REQ *mapi_req,
-                                              struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                              uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *rec = NULL;
-       struct emsmdbp_object           *object;
-       uint32_t                        handle;
-       bool                            mapistore = false;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] OpenFolder (0x02)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->u.mapi_OpenFolder.HasRules = 0;
-       mapi_repl->u.mapi_OpenFolder.IsGhosted = 0;
-
-       /* Step 1. Retrieve parent handle in the hierarchy */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               DEBUG(0, ("Opening system/special folder\n"));
-               retval = RopOpenFolder_SystemSpecialFolder(mem_ctx, emsmdbp_ctx, 
-                                                          mapi_req->u.mapi_OpenFolder, 
-                                                          &mapi_repl->u.mapi_OpenFolder);
-               mapi_repl->error_code = retval;
-               break;
-       case true:
-               /* handled by mapistore */
-               DEBUG(0, ("Opening Generic folder\n"));
-               retval = RopOpenFolder_GenericFolder(mem_ctx, emsmdbp_ctx, 
-                                                    mapi_req->u.mapi_OpenFolder,
-                                                    &mapi_repl->u.mapi_OpenFolder, parent);
-               mapi_repl->error_code = retval;
-               break;
-       }
-
-       *size += libmapiserver_RopOpenFolder_size(mapi_repl);
-
-       /* Fill EcDoRpc_MAPI_REPL reply */
-       if (!mapi_repl->error_code) {
-               retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-
-               object = emsmdbp_object_folder_init((TALLOC_CTX *)emsmdbp_ctx, emsmdbp_ctx, 
-                                                   mapi_req->u.mapi_OpenFolder.folder_id, parent);
-               if (object) {
-                       retval = mapi_handles_set_private_data(rec, object);
-               }
-               mapi_repl->opnum = mapi_req->opnum;
-               mapi_repl->handle_idx = mapi_req->u.mapi_OpenFolder.handle_idx;
-
-               handles[mapi_repl->handle_idx] = rec->handle;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetHierarchyTable (0x04) Rop. This operation gets
-   the subfolder hierarchy table for a folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetHierarchyTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetHierarchyTable EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetHierarchyTable(TALLOC_CTX *mem_ctx,
-                                                     struct emsmdbp_context *emsmdbp_ctx,
-                                                     struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                     struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                     uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         ret;
-       enum MAPISTORE_ERROR    retval;
-       struct mapi_handles     *parent;
-       struct mapi_handles     *rec = NULL;
-       struct emsmdbp_object   *object = NULL;
-       void                    *data;
-       uint64_t                folderID;
-       uint32_t                contextID;
-       uint32_t                handle;
-       bool                    mapistore = false;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] GetHierarchyTable (0x04)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(ret, ret, NULL);
-
-       /* Initialize default empty GetHierarchyTable reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_GetHierarchyTable.handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* GetHierarchyTable can only be called for mailbox/folder objects */
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *)data;
-       if (!object) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopGetHierarchyTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_MAILBOX:
-               folderID = object->object.mailbox->folderID;
-               contextID = object->object.folder->contextID;
-               break;
-       case EMSMDBP_OBJECT_FOLDER:
-               folderID = object->object.folder->folderID;
-               contextID = object->object.folder->contextID;
-               break;
-       default:
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopGetHierarchyTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               ret = openchangedb_get_folder_count(emsmdbp_ctx->oc_ctx, folderID, 
-                                                   &mapi_repl->u.mapi_GetHierarchyTable.RowCount);
-               break;
-       case true:
-               /* handled by mapistore */
-               retval = mapistore_get_folder_count(emsmdbp_ctx->mstore_ctx, contextID, folderID, 
-                                                   &mapi_repl->u.mapi_GetHierarchyTable.RowCount);
-               break;
-       }
-
-       /* Initialize Table object */
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       object = emsmdbp_object_table_init((TALLOC_CTX *)rec, emsmdbp_ctx, parent);
-       if (object) {
-               ret = mapi_handles_set_private_data(rec, object);
-               object->object.table->denominator = mapi_repl->u.mapi_GetHierarchyTable.RowCount;
-               object->object.table->ulType = EMSMDBP_TABLE_FOLDER_TYPE;
-       }
-
-       *size += libmapiserver_RopGetHierarchyTable_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetContentsTable (0x05) Rop. This operation get
-   the content table of a container.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetContentsTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetContentsTable EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetContentsTable(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                    struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                    uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTORE_ERROR    retval;
-       enum MAPISTATUS         ret;
-       struct mapi_handles     *parent;
-       struct mapi_handles     *rec = NULL;
-       struct emsmdbp_object   *object = NULL;
-       void                    *data;
-       uint64_t                folderID;
-       uint32_t                contextID;
-       uint32_t                handle;
-       bool                    mapistore = false;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] GetContentsTable (0x05)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Initialize default empty GetContentsTable reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_GetContentsTable.handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_GetContentsTable.RowCount = 0;
-
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (ret) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopGetContentsTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       /* GetContentsTable can only be called for folder objects */
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *)data;
-       if (!object) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopGetContentsTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_FOLDER:
-               folderID = object->object.folder->folderID;
-               contextID = object->object.folder->contextID;
-               break;
-       default:
-               mapi_repl->u.mapi_GetContentsTable.RowCount = 0;
-               *size += libmapiserver_RopGetContentsTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               mapi_repl->u.mapi_GetContentsTable.RowCount = 0;
-               break;
-       case true:
-               /* handled by mapistore */
-               retval = mapistore_get_message_count(emsmdbp_ctx->mstore_ctx, contextID, folderID,
-                                                    &mapi_repl->u.mapi_GetContentsTable.RowCount);
-               break;
-       }
-
-       /* Initialize Table object */
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       object = emsmdbp_object_table_init((TALLOC_CTX *)rec, emsmdbp_ctx, parent);
-       if (object) {
-               ret = mapi_handles_set_private_data(rec, object);
-               object->object.table->denominator = mapi_repl->u.mapi_GetHierarchyTable.RowCount;
-               object->object.table->ulType = EMSMDBP_TABLE_MESSAGE_TYPE;
-       }
-       
-       *size += libmapiserver_RopGetContentsTable_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static enum MAPISTATUS EcDoRpc_RopCreateSystemSpecialFolder(struct emsmdbp_context *emsmdbp_ctx,
-                                                           struct SRow *aRow, 
-                                                           enum FOLDER_FLAGS folderFlags,
-                                                           uint64_t parentFolder,
-                                                           struct CreateFolder_repl *response)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct ldb_message              *msg;
-       struct ldb_dn                   *basedn;
-       char                            *dn;
-       char                            *parentfid;
-       int                             ret = 0;
-       char                            *displayName;
-       char                            *comment;
-       uint32_t                        *folderType;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateSystemSpecialFolder\n"));
-
-       displayName = (char *) find_SPropValue_data(aRow, PR_DISPLAY_NAME);
-       if (!displayName) {
-               displayName = (char *) find_SPropValue_data(aRow, PR_DISPLAY_NAME_UNICODE);
-       }
-
-       /* Step 0. Determine if the folder already exists */
-       if (openchangedb_get_fid_by_name(emsmdbp_ctx->oc_ctx, parentFolder,
-                                        displayName, &response->folder_id) == MAPI_E_SUCCESS) {
-               /* this folder already exists */
-               if ( folderFlags & OPEN_IF_EXISTS ) {
-                       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder Duplicate Folder\n"));
-                       response->IsExistingFolder = true;
-                       return MAPI_E_SUCCESS;
-               } else {
-                       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder Duplicate Folder error\n"));
-                       return MAPI_E_COLLISION;
-               }
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "RopCreateSystemSpecialFolder");
-
-       /* Step 1. Retrieve the next available folderID */
-       retval = openchangedb_get_new_folderID(emsmdbp_ctx->oc_ctx, &response->folder_id);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Retrieve dn of parentfolder */
-       retval = openchangedb_get_distinguishedName(mem_ctx, emsmdbp_ctx->oc_ctx, parentFolder, &parentfid);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Step 2. Create the folder LDB record for openchange.ldb */
-       dn = talloc_asprintf(mem_ctx, "CN=0x%016"PRIx64",%s", response->folder_id, parentfid);
-
-       /* Ensure dn is within user mailbox / prevent from creating
-        * folders in other mailboxes: check dn vs emsmdbp_ctx->username */
-
-       basedn = ldb_dn_new(mem_ctx, (struct ldb_context *)emsmdbp_ctx->oc_ctx, dn);
-       talloc_free(dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(basedn), MAPI_E_BAD_VALUE, mem_ctx);
-       
-       msg = ldb_msg_new(mem_ctx);
-       msg->dn = ldb_dn_copy(mem_ctx, basedn);
-       ldb_msg_add_string(msg, "objectClass", "systemfolder");
-       ldb_msg_add_fmt(msg, "cn", "0x%.16"PRIx64, response->folder_id);
-       ldb_msg_add_string(msg, "PidTagContentUnreadCount", "0");
-       ldb_msg_add_string(msg, "PidTagContentCount", "0");
-       ldb_msg_add_string(msg, "PidTagContainerClass", "IPF.Note");
-       ldb_msg_add_string(msg, "PidTagAttrHidden", "0");
-       ldb_msg_add_string(msg, "PidTagAccess", "63");
-       ldb_msg_add_string(msg, "PidTagRights", "2043");
-       ldb_msg_add_string(msg, "PidTagDisplayName", displayName);
-
-       folderType = (uint32_t *) find_SPropValue_data(aRow, PR_FOLDER_TYPE);
-       ldb_msg_add_fmt(msg, "PidTagFolderType", "%d", *folderType);
-
-       comment = (char *) find_SPropValue_data(aRow, PR_COMMENT);
-       if (!comment) {
-               comment = (char *) find_SPropValue_data(aRow, PR_COMMENT_UNICODE);
-       }
-       ldb_msg_add_string(msg, "PidTagComment", comment);
-
-       ldb_msg_add_fmt(msg, "PidTagParentFolderId", "0x%.16"PRIx64, parentFolder);
-       ldb_msg_add_fmt(msg, "PidTagFolderId", "0x%.16"PRIx64, response->folder_id);
-       ldb_msg_add_fmt(msg, "mapistore_uri", "fsocpf:///usr/local/samba/private/mapistore/%s/0x%.16"PRIx64, 
-                       emsmdbp_ctx->username, response->folder_id);
-       ldb_msg_add_string(msg, "PidTagSubFolders", "0");
-       ldb_msg_add_string(msg, "FolderType", "1");
-       ldb_msg_add_fmt(msg, "distinguishedName", "%s", ldb_dn_get_linearized(msg->dn));
-
-       msg->elements[0].flags = LDB_FLAG_MOD_ADD;
-
-       ret = ldb_add((struct ldb_context *)emsmdbp_ctx->oc_ctx, msg);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-
-       talloc_free(parentfid);
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static enum MAPISTATUS EcDoRpc_RopCreateGenericFolder(struct emsmdbp_context *emsmdbp_ctx,
-                                                     struct mapi_handles *parent,
-                                                     struct SRow *aRow,
-                                                     enum FOLDER_FLAGS folderFlags,
-                                                     struct CreateFolder_repl *response)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTORE_ERROR    retval;
-       enum MAPISTATUS         retmapi;
-       int                     ret;
-       struct ldb_result       *res = NULL;
-       struct ldb_message      *msg;
-       const char              *new_folder_name = NULL;
-       struct ldb_dn           *ldb_dn;
-       struct emsmdbp_object   *parent_object = NULL;
-       const char * const      attrs[] = { "*", NULL };
-       void                    *data;
-       uint64_t                parent_fid;
-       uint64_t                folder_fid;
-       uint32_t                context_id;
-       char                    *parentfid;
-       int                     count;
-       uint32_t                i;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateGenericFolder\n"));
-
-       /* Step 1. Retrieve the parent fid given the handle */
-       mapi_handles_get_private_data(parent, &data);
-       parent_object = (struct emsmdbp_object *) data;
-       /* checks are already done in upper function / code factorization required */
-
-       parent_fid = parent_object->object.folder->folderID;
-       context_id = parent_object->object.folder->contextID;
-
-       /* Step 2. Get the name of the folder we have to create */
-       for (i = 0; i < aRow->cValues; ++i) {
-               if (aRow->lpProps[i].ulPropTag == PR_DISPLAY_NAME) {
-                       new_folder_name = aRow->lpProps[i].value.lpszA;
-               }
-       }
-       DEBUG(4, ("target folder name: %s\n", new_folder_name));
-       if (folderFlags & OPEN_IF_EXISTS) {
-               /* Determine if the folder already exists */
-               retval = mapistore_get_fid_by_name(emsmdbp_ctx->mstore_ctx, context_id, parent_fid,
-                                                  new_folder_name, &folder_fid);
-               if (retval == MAPISTORE_SUCCESS) {
-                       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder Duplicate Folder at 0x%.16"PRIx64"\n", folder_fid));
-                       /* Open the folder using folder_fid */
-                       retval = mapistore_opendir(emsmdbp_ctx->mstore_ctx, context_id, parent_fid, folder_fid);
-                       if (retval != MAPISTORE_SUCCESS) {
-                               return MAPI_E_NOT_FOUND; /* shouldn't happen */
-                       }
-                       response->IsExistingFolder = true;
-                       return MAPI_E_SUCCESS;
-               }
-       }
-       /* Step 3. Retrieve the next available folderID */
-       retmapi = openchangedb_get_new_folderID(emsmdbp_ctx->oc_ctx, &response->folder_id);
-       OPENCHANGE_RETVAL_IF(retmapi, retmapi, NULL);
-
-       /* Step 4. Create folder in mapistore */
-       retval = mapistore_mkdir(emsmdbp_ctx->mstore_ctx, context_id, parent_fid, response->folder_id, 
-                                aRow);
-       if (retval == MAPISTORE_ERR_EXIST) {
-               /* folder with this name already exists */
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder Duplicate Folder error\n"));
-               return MAPI_E_COLLISION;
-       }
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CALL_FAILED, NULL);
-
-       /* Step 5. Update openchangedb record if needed */
-       if (parent_object->type == EMSMDBP_OBJECT_FOLDER && parent_object->object.folder->mapistore_root == true) {
-               mem_ctx = talloc_named(NULL, 0, "RopCreateGenericFolder");
-
-               /* Retrieve previous value */
-               ret = ldb_search((struct ldb_context *)emsmdbp_ctx->oc_ctx, mem_ctx, &res, 
-                                ldb_get_default_basedn((struct ldb_context *)emsmdbp_ctx->oc_ctx),
-                                LDB_SCOPE_SUBTREE, attrs, "PidTagFolderId=0x%.16"PRIx64, parent_fid);
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, mem_ctx);
-
-               count = ldb_msg_find_attr_as_int(res->msgs[0], "PidTagFolderChildCount", 0);
-               
-               /* Update record */
-               retmapi = openchangedb_get_distinguishedName(mem_ctx, emsmdbp_ctx->oc_ctx, parent_fid, &parentfid);
-               OPENCHANGE_RETVAL_IF(retmapi, retmapi, mem_ctx);
-
-               ldb_dn = ldb_dn_new(mem_ctx, (struct ldb_context *)emsmdbp_ctx->oc_ctx, parentfid);
-               OPENCHANGE_RETVAL_IF(!ldb_dn_validate(ldb_dn), MAPI_E_BAD_VALUE, mem_ctx);
-
-               msg = ldb_msg_new(mem_ctx);
-               msg->dn = ldb_dn_copy(mem_ctx, ldb_dn);
-               ldb_msg_add_fmt(msg, "PidTagFolderChildCount", "%d", count + 1);
-               ldb_msg_add_fmt(msg, "PidTagSubFolders", "TRUE");
-               msg->elements[0].flags = LDB_FLAG_MOD_REPLACE;
-               msg->elements[1].flags = LDB_FLAG_MOD_REPLACE;
-
-               ret = ldb_modify((struct ldb_context *)emsmdbp_ctx->oc_ctx, msg);
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_NO_SUPPORT, mem_ctx);
-
-               talloc_free(mem_ctx);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc CreateFolder (0x1c) Rop. This operation creates a
-   folder on the remote server.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the CreateFolder EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the CreateFolder EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-
-   \note We do not provide support for GhostInfo
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopCreateFolder(TALLOC_CTX *mem_ctx,
-                                                struct emsmdbp_context *emsmdbp_ctx,
-                                                struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent = NULL;
-       uint32_t                        handle;
-       uint64_t                        parent_fid;
-       struct emsmdbp_object           *parent_object = NULL;
-       struct emsmdbp_object           *object = NULL;
-       struct SRow                     *aRow;
-       void                            *data;
-       struct mapi_handles             *rec = NULL;
-       bool                            mapistore = false;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder (0x1c)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Set up sensible values for the reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_CreateFolder.handle_idx;
-       mapi_repl->u.mapi_CreateFolder.IsExistingFolder = false;
-
-       /* Step 1. Retrieve parent handle in the hierarchy */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       mapi_handles_get_private_data(parent, &data);
-       parent_object = (struct emsmdbp_object *)data;
-       if (!parent_object) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder null object\n"));
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               return MAPI_E_SUCCESS;
-       }
-
-       if (parent_object->type != EMSMDBP_OBJECT_FOLDER) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder wrong object type: 0x%x\n", parent_object->type));
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               return MAPI_E_SUCCESS;
-       }
-       parent_fid = parent_object->object.folder->folderID;
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] CreateFolder parent: 0x%"PRIx64"\n", parent_fid));
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] Creating %s\n", mapi_req->u.mapi_CreateFolder.FolderName.lpszA));
-       
-       /* Step 3. Turn CreateFolder parameters into MAPI property array */
-       aRow = libmapiserver_ROP_request_to_properties(mem_ctx, (void *)&mapi_req->u.mapi_CreateFolder, op_MAPI_CreateFolder);
-       aRow->lpProps = add_SPropValue(mem_ctx, aRow->lpProps, &(aRow->cValues), PR_PARENT_FID, (void *)(&parent_fid));
-
-       /* Step 4. Do effective work here */
-       mapistore = emsmdbp_is_mapistore(parent);
-       switch (mapistore) {
-       case false:
-               switch (mapi_req->u.mapi_CreateFolder.ulFolderType) {
-               case FOLDER_GENERIC:
-                       mapi_repl->error_code = EcDoRpc_RopCreateSystemSpecialFolder(emsmdbp_ctx, aRow,
-                                                                                    mapi_req->u.mapi_CreateFolder.ulFlags,
-                                                                                    parent_fid, &mapi_repl->u.mapi_CreateFolder);
-                       break;
-               case FOLDER_SEARCH:
-                       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] FOLDER_SEARCH not implemented\n"));
-                       mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-                       break;
-               default:
-                       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] Unexpected folder type 0x%x\n", mapi_req->u.mapi_CreateFolder.ulType));
-                       mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               }
-               break;
-       case true:
-               mapi_repl->error_code = EcDoRpc_RopCreateGenericFolder(emsmdbp_ctx, parent, aRow,
-                                                                      mapi_req->u.mapi_CreateFolder.ulFlags,
-                                                                      &mapi_repl->u.mapi_CreateFolder);
-               break;
-       }
-
-       mapi_repl->handle_idx = mapi_req->u.mapi_CreateFolder.handle_idx;
-
-       if (mapi_repl->u.mapi_CreateFolder.IsExistingFolder == true) {
-               mapi_repl->u.mapi_CreateFolder.GhostUnion.GhostInfo.HasRules = false;
-               mapi_repl->u.mapi_CreateFolder.GhostUnion.GhostInfo.IsGhosted = false;
-       }
-
-       if (!mapi_repl->error_code) {
-               retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-               object = emsmdbp_object_folder_init((TALLOC_CTX *)rec, emsmdbp_ctx, 
-                                                   mapi_repl->u.mapi_CreateFolder.folder_id, parent);
-               if (object) {
-                       retval = mapi_handles_set_private_data(rec, object);
-               }
-
-               handles[mapi_repl->handle_idx] = rec->handle;
-       }
-
-       *size += libmapiserver_RopCreateFolder_size(mapi_repl);
-
-       if (aRow) {
-               talloc_free(aRow);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS DoDeleteSystemFolder(struct emsmdbp_context *emsmdbp_ctx,
-                                           uint64_t parent_fid, uint64_t fid,
-                                           uint8_t flags)
-{
-       TALLOC_CTX                      *mem_ctx;
-       char                            *parentdn;
-       enum MAPISTATUS                 retval;
-       struct ldb_dn                   *dn;
-       char                            *dn_str;
-       int                             ret = 0;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder parent FID: 0x%"PRIx64"\n", parent_fid));
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder target FID: 0x%"PRIx64"\n", fid));
-
-       mem_ctx = talloc_named(NULL, 0, "DoDeleteFolder");
-
-       /* TODO:
-               1. We should be careful not to delete special folders
-               2. We need to handle deleting associated folders and messages (based on the flags)
-       */
-       /* Retrieve dn of parentfolder */
-       retval = openchangedb_get_distinguishedName(mem_ctx, emsmdbp_ctx->oc_ctx, parent_fid, &parentdn);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       /* Create the folder dn record for openchange.ldb */
-       dn_str = talloc_asprintf(mem_ctx, "CN=0x%016"PRIx64",%s", fid, parentdn);
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder target DN: %s\n", dn_str));
-       dn = ldb_dn_new(mem_ctx, (struct ldb_context *)emsmdbp_ctx->oc_ctx, dn_str);
-       talloc_free(dn_str);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(dn), MAPI_E_BAD_VALUE, mem_ctx);
-
-       ret = ldb_delete((struct ldb_context *)emsmdbp_ctx->oc_ctx, dn);
-       if (ret != LDB_SUCCESS) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder failed ldb_delete, ret: 0x%x\n", ret));
-               talloc_free(mem_ctx);
-               return MAPI_E_NO_SUPPORT;
-       }
-
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc DeleteFolder (0x1d) Rop. This operation deletes a
-   folder on the remote server.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the DeleteFolder EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the DeleteFolder EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopDeleteFolder(TALLOC_CTX *mem_ctx,
-                                                struct emsmdbp_context *emsmdbp_ctx,
-                                                struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTORE_ERROR    retval;
-       enum MAPISTATUS         ret;
-       struct mapi_handles     *rec = NULL;
-       uint32_t                handle;
-       void                    *handle_priv_data;
-       struct emsmdbp_object   *handle_object = NULL;
-       uint64_t                parent_fid = 0;
-       bool                    mapistore = false;
-       uint32_t                context_id;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder (0x1d)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* TODO: factor this out to be convenience API */
-       /* Convert the handle index into a handle, and then get the folder id */
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       OPENCHANGE_RETVAL_IF(ret, ret, NULL);
-
-       mapi_handles_get_private_data(rec, &handle_priv_data);
-       handle_object = (struct emsmdbp_object *)handle_priv_data;
-       if (!handle_object) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder null object\n"));
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               return MAPI_E_SUCCESS;
-       }
-
-       if (handle_object->type != EMSMDBP_OBJECT_FOLDER) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder wrong object type: 0x%x\n", handle_object->type));
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               return MAPI_E_SUCCESS;
-       }
-       parent_fid = handle_object->object.folder->folderID;
-       context_id = handle_object->object.folder->contextID;
-
-       /* Initialize default empty DeleteFolder reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_DeleteFolder.PartialCompletion = false;
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               DEBUG(0, ("Deleting system/special folder\n"));
-               mapi_repl->error_code = DoDeleteSystemFolder(emsmdbp_ctx, parent_fid,
-                                                            mapi_req->u.mapi_DeleteFolder.FolderId,
-                                                            mapi_req->u.mapi_DeleteFolder.DeleteFolderFlags);
-
-               break;
-       case true:
-               /* handled by mapistore */
-               DEBUG(0, ("Deleting mapistore folder\n"));
-               retval = mapistore_rmdir(emsmdbp_ctx->mstore_ctx, context_id, parent_fid,
-                                        mapi_req->u.mapi_DeleteFolder.FolderId,
-                                        mapi_req->u.mapi_DeleteFolder.DeleteFolderFlags);
-               if (retval) {
-                         DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteFolder failed to delete fid 0x%"PRIx64" (0x%x)",
-                                   mapi_req->u.mapi_DeleteFolder.FolderId, retval));
-                         mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               } else {
-                       mapi_repl->error_code = MAPI_E_SUCCESS;
-               }
-               break;
-       }
-
-       *size += libmapiserver_RopDeleteFolder_size(mapi_repl);
-
-       return ret;
-}
-
-
-/**
-   \details EcDoRpc DeleteMessage (0x1e) Rop. This operation (soft) deletes
-   a message on the server.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the DeleteMessage EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the DeleteMessage EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopDeleteMessages(TALLOC_CTX *mem_ctx,
-                                                  struct emsmdbp_context *emsmdbp_ctx,
-                                                  struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                  struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                  uint32_t *handles, uint16_t *size)
-{
-       uint32_t                parent_folder_handle;
-       struct mapi_handles     *parent_folder = NULL;
-       void                    *parent_folder_private_data;
-       struct emsmdbp_object   *parent_object;
-       enum MAPISTATUS         retval;
-       uint64_t                parent_folderID;
-       uint32_t                contextID;
-       int                     i;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] DeleteMessage (0x1e)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_DeleteMessages.PartialCompletion = false;
-
-       parent_folder_handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, parent_folder_handle, &parent_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto delete_message_response;
-       }
-
-       retval = mapi_handles_get_private_data(parent_folder, &parent_folder_private_data);
-       parent_object = (struct emsmdbp_object *)parent_folder_private_data;
-       if (!parent_object || parent_object->type != EMSMDBP_OBJECT_FOLDER) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto delete_message_response;
-       }
-
-       if (! emsmdbp_is_mapistore(parent_folder) ) {
-               DEBUG(0, ("Got parent folder not in mapistore\n"));
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto delete_message_response;
-       }
-
-       parent_folderID = parent_object->object.folder->folderID;
-       contextID = parent_object->object.folder->contextID;
-
-       for (i = 0; i < mapi_req->u.mapi_DeleteMessages.cn_ids; ++i) {
-               int ret;
-               uint64_t mid = mapi_req->u.mapi_DeleteMessages.message_ids[i];
-               DEBUG(0, ("MID %i to delete: 0x%016"PRIx64"\n", i, mid));
-               ret = mapistore_deletemessage(emsmdbp_ctx->mstore_ctx, contextID, mid, MAPISTORE_SOFT_DELETE);
-               if (ret != MAPISTORE_SUCCESS) {
-                       mapi_repl->error_code = MAPI_E_CALL_FAILED;
-                       goto delete_message_response;
-               }
-               ret = mapistore_indexing_record_del_mid(emsmdbp_ctx->mstore_ctx, contextID, mid, MAPISTORE_SOFT_DELETE);
-               if (ret != MAPISTORE_SUCCESS) {
-                       mapi_repl->error_code = MAPI_E_CALL_FAILED;
-                       goto delete_message_response;
-               }
-       }
-
-delete_message_response:
-       *size += libmapiserver_RopDeleteMessage_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SetSearchCriteria (0x30) Rop. This operation sets
-   the search criteria for a search folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetSearchCriteria EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SetSearchCriteria EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error  
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetSearchCriteria(TALLOC_CTX *mem_ctx,
-                                                     struct emsmdbp_context *emsmdbp_ctx,
-                                                     struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                     struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                     uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] SetSearchCriteria (0x30)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* TODO: actually implement this */
-
-       *size += libmapiserver_RopSetSearchCriteria_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetSearchCriteria (0x31) Rop. This operation gets
-   the search criteria for a search folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetSearchCriteria EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetSearchCriteria EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error  
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetSearchCriteria(TALLOC_CTX *mem_ctx,
-                                                     struct emsmdbp_context *emsmdbp_ctx,
-                                                     struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                     struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                     uint32_t *handles, uint16_t *size)
-{
-       struct mapi_SRestriction *res;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] GetSearchCriteria (0x31)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       res = NULL;
-       mapi_repl->u.mapi_GetSearchCriteria.RestrictionDataSize = 0;
-       mapi_repl->u.mapi_GetSearchCriteria.LogonId = mapi_req->logon_id;
-       mapi_repl->u.mapi_GetSearchCriteria.FolderIdCount = 0;
-       mapi_repl->u.mapi_GetSearchCriteria.FolderIds = NULL;
-       mapi_repl->u.mapi_GetSearchCriteria.SearchFlags = 0;
-
-       /* TODO: actually implement this */
-
-       *size += libmapiserver_RopGetSearchCriteria_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS RopEmptyFolder_GenericFolder(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EmptyFolder_req request,
-                                                    struct EmptyFolder_repl *response,
-                                                    struct mapi_handles *folder)
-{
-       void                    *folder_priv;
-       struct emsmdbp_object   *folder_object = NULL;
-       uint64_t                fid;
-       uint32_t                context_id;
-       int                     retval;
-       uint64_t                *childFolders;
-       uint32_t                childFolderCount;
-       uint32_t                i;
-       uint8_t                 flags = DELETE_HARD_DELETE| DEL_MESSAGES | DEL_FOLDERS;
-
-       /* Step 1. Retrieve the fid for the folder, given the handle */
-       mapi_handles_get_private_data(folder, &folder_priv);
-       folder_object = (struct emsmdbp_object *) folder_priv;
-       if (!folder_object) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder null object"));
-               return MAPI_E_NO_SUPPORT;
-       }
-
-       if (folder_object->type != EMSMDBP_OBJECT_FOLDER) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder wrong object type: 0x%x\n", folder_object->type));
-               return MAPI_E_NO_SUPPORT;
-       }
-       fid = folder_object->object.folder->folderID;
-       context_id = folder_object->object.folder->contextID;
-
-       retval = mapistore_get_child_fids(emsmdbp_ctx->mstore_ctx, context_id, fid,
-                                         &childFolders, &childFolderCount);
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder fid: 0x%"PRIx64", count: %d\n", fid, childFolderCount));
-       if (retval) {
-               DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder bad retval: 0x%x", retval));
-               return MAPI_E_NOT_FOUND;
-       }
-
-       /* Step 3. Delete contents of the folder in mapistore */
-       for (i = 0; i < childFolderCount; ++i) {
-               retval = mapistore_rmdir(emsmdbp_ctx->mstore_ctx, context_id, fid, childFolders[i],
-                                        flags);
-               if (retval) {
-                         DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder failed to delete fid 0x%"PRIx64" (0x%x)", childFolders[i], retval));
-                         talloc_free(childFolders);
-                         return MAPI_E_NOT_FOUND;
-               }
-       }
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc EmptyFolder (0x58) Rop. This operation removes the sub-folders
-   and messages from a given parent folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the EmptyFolder EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the EmptyFolder EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopEmptyFolder(TALLOC_CTX *mem_ctx,
-                                                struct emsmdbp_context *emsmdbp_ctx,
-                                                struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *folder = NULL;
-       bool                            mapistore = false;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCFOLD] EmptyFolder (0x58)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_EmptyFolder.PartialCompletion = 0;
-
-       /* Step 1. Retrieve folder handle */
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handles[mapi_req->handle_idx], &folder);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       mapistore = emsmdbp_is_mapistore(folder);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               DEBUG(0, ("TODO Empty system/special folder\n"));
-#if 0
-                retval = RopEmptyFolder_SystemSpecialFolder(mem_ctx, emsmdbp_ctx,
-                                                           mapi_req->u.mapi_EmptyFolder,
-                                                           &mapi_repl->u.mapi_EmptyFolder);
-#endif
-               retval = MAPI_E_SUCCESS; // TODO: temporary hack.
-               mapi_repl->error_code = retval;
-               break;
-       case true:
-               /* handled by mapistore */
-               retval = RopEmptyFolder_GenericFolder(mem_ctx, emsmdbp_ctx,
-                                                      mapi_req->u.mapi_EmptyFolder,
-                                                      &mapi_repl->u.mapi_EmptyFolder,
-                                                      folder);
-               mapi_repl->error_code = retval;
-               break;
-       }
-
-       *size += libmapiserver_RopEmptyFolder_size(mapi_repl);
-
-       /* reply filled in above */
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcmsg.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcmsg.c
deleted file mode 100644 (file)
index 9d45b30..0000000
+++ /dev/null
@@ -1,722 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcmsg.c
-
-   \brief Message and Attachment object routines and Rops
- */
-
-#include <sys/time.h>
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-
-/**
-   \details EcDoRpc OpenMessage (0x03) Rop. This operation opens an
-   existing message in a mailbox.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the OpenMessage EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the OpenMessage EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopOpenMessage(TALLOC_CTX *mem_ctx,
-                                               struct emsmdbp_context *emsmdbp_ctx,
-                                               struct EcDoRpc_MAPI_REQ *mapi_req,
-                                               struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                               uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTORE_ERROR            retval;
-       enum MAPISTATUS                 ret;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *parent_handle = NULL;
-       struct mapi_handles             *rec = NULL;
-       struct emsmdbp_object           *object = NULL;
-       struct emsmdbp_object           *parent_object = NULL;
-       struct mapistore_message        msg;
-       void                            *data;
-       uint64_t                        folderID;
-       uint64_t                        messageID = 0;
-       uint32_t                        contextID;
-       uint32_t                        handle;
-       bool                            mapistore = false;
-       struct indexing_folders_list    *flist;
-       struct SPropTagArray            *SPropTagArray;
-       char                            *subject = NULL;
-       uint32_t                        i;
-
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] OpenMessage (0x03)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(ret, ret, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->u.mapi_OpenMessage.handle_idx;
-       messageID = mapi_req->u.mapi_OpenMessage.MessageId;
-       folderID = mapi_req->u.mapi_OpenMessage.FolderId;
-
-       /* OpenMessage can only be called for mailbox/folder objects */
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *)data;
-       if (!object) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopOpenMessage_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       switch (object->type) {
-       case EMSMDBP_OBJECT_MAILBOX:
-               retval = mapistore_indexing_get_folder_list(emsmdbp_ctx->mstore_ctx, emsmdbp_ctx->username,
-                                                           messageID, &flist);
-               if (retval || !flist->count) {
-                       DEBUG(0, ("No parent folder found for 0x%.16"PRIx64"\n", messageID));
-               }
-               /* If last element in the list doesn't match folderID, that's incorrect */
-               if (folderID != flist->folderID[flist->count - 1]) {
-                       DEBUG(0, ("Last parent folder 0x%.16"PRIx64" doesn't match " \
-                                 "with expected 0x%.16"PRIx64"\n", 
-                                 flist->folderID[flist->count - 1], folderID));
-               }
-
-               /* Look if we have a parent folder already opened */
-               for (i = flist->count - 1 ; i >= 0; i--) {
-                       parent_handle = emsmdbp_object_get_folder_handle_by_fid(emsmdbp_ctx->handles_ctx, 
-                                                                               flist->folderID[i]);
-                       if (parent_handle) {
-                               break; 
-                       }
-                       
-               }
-
-               /* If we have a parent handle, we have a context_id
-                * and we can call subsequent OpenFolder - this will
-                * increment ref_count whereas needed */
-               if (parent_handle) {
-               recursive_open:
-                       for (i = i + 1; i < flist->count; i++) {
-                               mapi_handles_get_private_data(parent_handle, &data);
-                               parent_object = (struct emsmdbp_object *) data;
-                               folderID = parent_object->object.folder->folderID;
-                               contextID = parent_object->object.folder->contextID;
-                               retval = mapistore_opendir(emsmdbp_ctx->mstore_ctx, contextID, folderID,
-                                                          flist->folderID[i]);
-                               mapi_handles_add(emsmdbp_ctx->handles_ctx, parent_handle->handle, &rec);
-                               object = emsmdbp_object_folder_init((TALLOC_CTX *)emsmdbp_ctx, emsmdbp_ctx,
-                                                                   flist->folderID[i], parent_handle);
-                               if (object) {
-                                       ret = mapi_handles_set_private_data(rec, object);
-                               }
-
-                               parent_handle = rec;
-                               
-                       }
-               } else {
-                       ret = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-                       object = emsmdbp_object_folder_init((TALLOC_CTX *)emsmdbp_ctx, emsmdbp_ctx,
-                                                           flist->folderID[0], parent);
-                       if (object) {
-                               ret = mapi_handles_set_private_data(rec, object);
-                       }
-                       parent_handle = rec;
-                       i = 0;
-                       /* now we have a context_id, we can use code above to open subfolders subsequently */
-                       goto recursive_open;
-               }
-
-               /* Add this stage our new parent_handle should point to the message */
-
-               mapi_handles_get_private_data(parent_handle, &data);
-               parent_object = (struct emsmdbp_object *) data;
-               folderID = parent_object->object.folder->folderID;
-               contextID = parent_object->object.folder->contextID;
-               parent = parent_handle;
-               break;
-       case EMSMDBP_OBJECT_FOLDER:
-               folderID = object->object.folder->folderID;
-               contextID = object->object.folder->contextID;
-               break;
-       default:
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               *size += libmapiserver_RopGetHierarchyTable_size(NULL);
-               return MAPI_E_SUCCESS;
-       }
-
-       mapistore = emsmdbp_is_mapistore(parent);
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               DEBUG(0, ("Not implemented yet - shouldn't occur\n"));
-               break;
-       case true:
-               /* mapistore implementation goes here */
-               mapistore_openmessage(emsmdbp_ctx->mstore_ctx, contextID, folderID, messageID, &msg);
-
-               /* Build the OpenMessage reply */
-               subject = (char *) find_SPropValue_data(msg.properties, PR_SUBJECT);
-
-               mapi_repl->u.mapi_OpenMessage.HasNamedProperties = false;
-               mapi_repl->u.mapi_OpenMessage.SubjectPrefix.StringType = StringType_EMPTY;
-               mapi_repl->u.mapi_OpenMessage.NormalizedSubject.StringType = StringType_UNICODE_REDUCED;
-               mapi_repl->u.mapi_OpenMessage.NormalizedSubject.String.lpszW_reduced = talloc_strdup(mem_ctx, subject);
-               mapi_repl->u.mapi_OpenMessage.RecipientCount = msg.recipients->cRows;
-
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x4,
-                                                 PR_DISPLAY_TYPE,
-                                                 PR_OBJECT_TYPE,
-                                                 PR_7BIT_DISPLAY_NAME_UNICODE,
-                                                 PR_SMTP_ADDRESS_UNICODE);
-               mapi_repl->u.mapi_OpenMessage.RecipientColumns.cValues = SPropTagArray->cValues;
-               mapi_repl->u.mapi_OpenMessage.RecipientColumns.aulPropTag = SPropTagArray->aulPropTag;
-               mapi_repl->u.mapi_OpenMessage.RowCount = msg.recipients->cRows;
-               mapi_repl->u.mapi_OpenMessage.recipients = talloc_array(mem_ctx, 
-                                                                       struct OpenMessage_recipients, 
-                                                                       msg.recipients->cRows + 1);
-               for (i = 0; i < msg.recipients->cRows; i++) {
-                       mapi_repl->u.mapi_OpenMessage.recipients[i].RecipClass = (enum ulRecipClass) msg.recipients->aRow[i].lpProps[0].value.l;
-                       mapi_repl->u.mapi_OpenMessage.recipients[i].codepage = CP_USASCII;
-                       mapi_repl->u.mapi_OpenMessage.recipients[i].Reserved = 0;
-                       emsmdbp_resolve_recipient(mem_ctx, emsmdbp_ctx, 
-                                                 (char *)msg.recipients->aRow[i].lpProps[1].value.lpszA,
-                                                 &(mapi_repl->u.mapi_OpenMessage.RecipientColumns),
-                                                 &(mapi_repl->u.mapi_OpenMessage.recipients[i].RecipientRow));
-               }
-
-               break;
-       }
-
-       /* Initialize Message object */
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       if (messageID) {
-               object = emsmdbp_object_message_init((TALLOC_CTX *)rec, emsmdbp_ctx, messageID, parent_handle);
-               if (object) {
-                       ret = mapi_handles_set_private_data(rec, object);
-               }
-       }
-
-       *size += libmapiserver_RopOpenMessage_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc CreateMessage (0x06) Rop. This operation creates a
-   message object in the mailbox.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the CreateMessage EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the CreateMessage EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopCreateMessage(TALLOC_CTX *mem_ctx,
-                                                 struct emsmdbp_context *emsmdbp_ctx,
-                                                 struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                 struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                 uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *rec = NULL;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *parent_handle = NULL;
-       struct emsmdbp_object           *object = NULL;
-       uint32_t                        handle;
-       uint64_t                        folderID;
-       uint64_t                        messageID;
-       uint32_t                        contextID;
-       bool                            mapistore = false;
-       void                            *data;
-       struct SRow                     aRow;
-       uint32_t                        pt_long;
-       bool                            pt_boolean;
-       struct timeval                  tv;
-       struct FILETIME                 ft;
-       NTTIME                          time;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] CreateMessage (0x06)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->u.mapi_CreateMessage.handle_idx;
-       mapi_repl->u.mapi_CreateMessage.HasMessageId = 0;
-
-       folderID = mapi_req->u.mapi_CreateMessage.FolderId;
-
-       /* CreateMessage can only be called for a mailbox/folder object */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *)data;
-       if (!object) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto end;
-       }
-
-       /* FIXME: we can't assume the folder is already opened */
-       parent_handle = emsmdbp_object_get_folder_handle_by_fid(emsmdbp_ctx->handles_ctx, folderID);
-       if (!parent_handle) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-       contextID = emsmdbp_get_contextID(parent_handle);
-       mapistore = emsmdbp_is_mapistore(parent_handle);
-
-       switch (mapistore) {
-       case false:
-               /* system/special folder */
-               DEBUG(0, ("Not implemented yet - shouldn't occur\n"));
-               break;
-       case true:
-               /* This should be handled differently here: temporary hack */
-               retval = openchangedb_get_new_folderID(emsmdbp_ctx->oc_ctx, &messageID);
-               if (retval) {
-                       mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-                       goto end;
-               }
-               mapi_repl->u.mapi_CreateMessage.HasMessageId = 1;
-               mapi_repl->u.mapi_CreateMessage.MessageId.MessageId = messageID;
-               mapistore_createmessage(emsmdbp_ctx->mstore_ctx, contextID, folderID, messageID);
-
-               /* Set default properties for message: MS-OXCMSG 3.2.5.2 */
-               aRow.lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-               aRow.cValues = 0;
-
-               pt_long = 0x1;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_IMPORTANCE, (const void *)&pt_long);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_MESSAGE_CLASS, (const void *)"IPM.Note");
-               pt_long = 0x0;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_SENSITIVITY, (const void *)&pt_long);
-               pt_long = 0x9;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_MESSAGE_FLAGS, (const void *)&pt_long);
-               pt_boolean = false;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_HASATTACH, (const void *)&pt_boolean);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_URL_COMP_NAME_SET, (const void *)&pt_boolean);
-               pt_long = 0x1;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_TRUST_SENDER, (const void *)&pt_long);
-               pt_long = 0x3;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_ACCESS, (const void *)&pt_long);
-               pt_long = 0x1;
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_ACCESS_LEVEL, (const void *)&pt_long);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_URL_COMP_NAME, (const void *)"No Subject.EML");
-
-               gettimeofday(&tv, NULL);
-               time = timeval_to_nttime(&tv);
-               ft.dwLowDateTime = (time << 32) >> 32;
-               ft.dwHighDateTime = time >> 32;         
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_CREATION_TIME, (const void *)&ft);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_LAST_MODIFICATION_TIME, (const void *)&ft);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_LOCAL_COMMIT_TIME, (const void *)&ft);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_MESSAGE_LOCALE_ID, (const void *)&mapi_req->u.mapi_CreateMessage.CodePageId);
-               aRow.lpProps = add_SPropValue(mem_ctx, aRow.lpProps, &aRow.cValues, PR_LOCALE_ID, (const void *)&mapi_req->u.mapi_CreateMessage.CodePageId);
-
-               mapistore_setprops(emsmdbp_ctx->mstore_ctx, contextID, messageID, MAPISTORE_MESSAGE, &aRow);
-               break;
-       }
-
-       DEBUG(0, ("CreateMessage: 0x%.16"PRIx64": mapistore = %s\n", folderID, 
-                 emsmdbp_is_mapistore(parent_handle) == true ? "true" : "false"));
-
-       /* Initialize Message object */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       if (messageID) {
-               object = emsmdbp_object_message_init((TALLOC_CTX *)rec, emsmdbp_ctx, messageID, parent_handle);
-               if (object) {
-                       /* Add default properties to message MS-OXCMSG 3.2.5.2 */
-                       retval = mapi_handles_set_private_data(rec, object);
-               }
-       }
-
-end:
-       *size += libmapiserver_RopCreateMessage_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SaveChangesMessage (0x0c) Rop. This operation
-   operation commits the changes made to a message.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SaveChangesMessage EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SaveChangesMessage
-   EcDoRpc_MAPI_REPL structure
-
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSaveChangesMessage(TALLOC_CTX *mem_ctx,
-                                                      struct emsmdbp_context *emsmdbp_ctx,
-                                                      struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                      struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                      uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       uint32_t                handle;
-       struct mapi_handles     *rec = NULL;
-       void                    *private_data;
-       bool                    mapistore = false;
-       struct emsmdbp_object   *object;
-       uint64_t                messageID;
-       uint32_t                contextID;
-       uint8_t                 flags;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] SaveChangesMessage (0x0c)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-
-       handle = handles[mapi_req->u.mapi_SaveChangesMessage.handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *)private_data;
-       if (!object || object->type != EMSMDBP_OBJECT_MESSAGE) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto end;
-       }
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       switch (mapistore) {
-       case false:
-               DEBUG(0, ("Not implement yet - shouldn't occur\n"));
-               break;
-       case true:
-               messageID = object->object.message->messageID;
-               contextID = object->object.message->contextID;
-               flags = mapi_req->u.mapi_SaveChangesMessage.SaveFlags;
-               mapistore_savechangesmessage(emsmdbp_ctx->mstore_ctx, contextID, messageID, flags);
-               mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, messageID);
-               break;
-       }
-
-       mapi_repl->u.mapi_SaveChangesMessage.handle_idx = mapi_req->u.mapi_SaveChangesMessage.handle_idx;
-       mapi_repl->u.mapi_SaveChangesMessage.MessageId = object->object.message->messageID;
-
-end:
-       *size += libmapiserver_RopSaveChangesMessage_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc ModifyRecipients (0x0e) Rop. This operation modifies an
-   existing message to add recipients (TO, CC, BCC).
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the ModifyRecipients EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the ModifyRecipients EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopModifyRecipients(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                    struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                    uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] ModifyRecipients (0x0e)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* TODO: actually implement this */
-
-       *size += libmapiserver_RopModifyRecipients_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc ReloadCachedInformation (0x10) Rop. This operation
-   gets message and recipient information from a message.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the ReloadCachedInformation
-   EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the ReloadCachedInformation
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopReloadCachedInformation(TALLOC_CTX *mem_ctx,
-                                                           struct emsmdbp_context *emsmdbp_ctx,
-                                                           struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                           struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                           uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       uint32_t                        handle;
-       struct mapi_handles             *rec = NULL;
-       void                            *private_data;
-       bool                            mapistore = false;
-       struct mapistore_message        msg;
-       struct emsmdbp_object           *object;
-       uint64_t                        folderID;
-       uint64_t                        messageID;
-       uint32_t                        contextID;
-       struct SPropTagArray            *SPropTagArray;
-       char                            *subject = NULL;
-       uint32_t                        i;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] ReloadCachedInformation (0x10)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *)private_data;
-       if (!object || object->type != EMSMDBP_OBJECT_MESSAGE) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto end;
-       }
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       switch (mapistore) {
-       case false:
-               DEBUG(0, ("Not implemented yet - shouldn't occur\n"));
-               break;
-       case true:
-               folderID = object->object.message->folderID;
-               messageID = object->object.message->messageID;
-               contextID = object->object.message->contextID;
-               mapistore_openmessage(emsmdbp_ctx->mstore_ctx, contextID, folderID, messageID, &msg);
-
-               /* Build the ReloadCachedInformation reply */
-               subject = (char *) find_SPropValue_data(msg.properties, PR_SUBJECT);
-               mapi_repl->u.mapi_ReloadCachedInformation.HasNamedProperties = false;
-               mapi_repl->u.mapi_ReloadCachedInformation.SubjectPrefix.StringType = StringType_EMPTY;
-               if (subject) {
-                       mapi_repl->u.mapi_ReloadCachedInformation.NormalizedSubject.StringType = StringType_UNICODE_REDUCED;
-                       mapi_repl->u.mapi_ReloadCachedInformation.NormalizedSubject.String.lpszW_reduced = talloc_strdup(mem_ctx, subject);
-               } else {
-                       mapi_repl->u.mapi_ReloadCachedInformation.NormalizedSubject.StringType = StringType_EMPTY;
-               }
-               mapi_repl->u.mapi_ReloadCachedInformation.RecipientCount = msg.recipients->cRows;
-
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x4,
-                                                 PR_DISPLAY_TYPE,
-                                                 PR_OBJECT_TYPE,
-                                                 PR_7BIT_DISPLAY_NAME_UNICODE,
-                                                 PR_SMTP_ADDRESS_UNICODE);
-               mapi_repl->u.mapi_ReloadCachedInformation.RecipientColumns.cValues = SPropTagArray->cValues;
-               mapi_repl->u.mapi_ReloadCachedInformation.RecipientColumns.aulPropTag = SPropTagArray->aulPropTag;
-               mapi_repl->u.mapi_ReloadCachedInformation.RowCount = msg.recipients->cRows;
-               mapi_repl->u.mapi_ReloadCachedInformation.RecipientRows = talloc_array(mem_ctx, 
-                                                                                      struct OpenRecipientRow, 
-                                                                                      msg.recipients->cRows + 1);
-               for (i = 0; i < msg.recipients->cRows; i++) {
-                       mapi_repl->u.mapi_ReloadCachedInformation.RecipientRows[i].RecipientType = (enum ulRecipClass) msg.recipients->aRow[i].lpProps[0].value.l;
-                       mapi_repl->u.mapi_ReloadCachedInformation.RecipientRows[i].CodePageId = CP_USASCII;
-                       mapi_repl->u.mapi_ReloadCachedInformation.RecipientRows[i].Reserved = 0;
-                       emsmdbp_resolve_recipient(mem_ctx, emsmdbp_ctx, 
-                                                 (char *)msg.recipients->aRow[i].lpProps[1].value.lpszA,
-                                                 &(mapi_repl->u.mapi_ReloadCachedInformation.RecipientColumns),
-                                                 &(mapi_repl->u.mapi_ReloadCachedInformation.RecipientRows[i].RecipientRow));
-               }
-               break;
-       }
-
-end:
-       *size += libmapiserver_RopReloadCachedInformation_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SetMessageReadFlag (0x11) Rop. This operation sets
-   or clears the message read flag.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetMessageReadFlag EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SetMessageReadFlag
-   EcDoRpc_MAPI_REPL structure
-
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetMessageReadFlag(TALLOC_CTX *mem_ctx,
-                                                      struct emsmdbp_context *emsmdbp_ctx,
-                                                      struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                      struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                      uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] SetMessageReadFlag (0x11)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-
-       /* TODO: actually implement this */
-       mapi_repl->u.mapi_SetMessageReadFlag.ReadStatusChanged = false;
-
-       *size += libmapiserver_RopSetMessageReadFlag_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetAttachmentTable (0x21) Rop. This operation gets
-   the attachment table of a message.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetAttachmentTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetAttachmentTable
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetAttachmentTable(TALLOC_CTX *mem_ctx,
-                                                      struct emsmdbp_context *emsmdbp_ctx,
-                                                      struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                      struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                      uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *rec = NULL;
-       uint32_t                handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] GetAttachmentTable (0x21)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* TODO: actually implement this */
-
-       *size += libmapiserver_RopGetAttachmentTable_size(mapi_repl);
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       return MAPI_E_SUCCESS;  
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcnotif.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcnotif.c
deleted file mode 100644 (file)
index c92507b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcnotif.c
-
-   \brief Core Notifications routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-
-/**
-   \details EcDoRpc RegisterNotification (0x29) Rop. This operation
-   subscribes for specified notifications on the server and returns a
-   handle of the subscription to the client.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the RegisterNotification
-   EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the RegisterNotification
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopRegisterNotification(TALLOC_CTX *mem_ctx,
-                                                        struct emsmdbp_context *emsmdbp_ctx,
-                                                        struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                        struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                        uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *rec = NULL;
-       uint32_t                handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCNOTIF] RegisterNotification (0x29)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* FIXME: Handle this call properly */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_RegisterNotification.handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) {
-               mapi_repl->error_code = retval;
-               goto end;
-       }
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-end:
-       *size += libmapiserver_RopRegisterNotification_size();
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcperm.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcperm.c
deleted file mode 100644 (file)
index 6a7e08d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcperm.c
-
-   \brief Access and Operation Permissions Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-
-/**
-   \details EcDoRpc GetPermissionsTable (0x3e) Rop. This operation get
-   the permissions table of a folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetPermissionsTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetPermissionsTable
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPermissionsTable(TALLOC_CTX *mem_ctx,
-                                                       struct emsmdbp_context *emsmdbp_ctx,
-                                                       struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                       struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                       uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *rec = NULL;
-       uint32_t                handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPERM] GetPermissionsTable (0x3e)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_GetPermissionsTable.handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       *size += libmapiserver_RopGetPermissionsTable_size(mapi_repl);
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcprpt.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcprpt.c
deleted file mode 100644 (file)
index 9e374a9..0000000
+++ /dev/null
@@ -1,799 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcprpt.c
-
-   \brief Property and Stream Object routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-/**
-   \details Retrieve properties on a mapistore object
-   
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request GetProps request
-   \param response pointer to the GetProps reply
-   \param private_data pointer tot eh private data stored for this
-   object
-
-   \note We do not handle anything yet. This is just a skeleton.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopGetPropertiesSpecific_mapistore(TALLOC_CTX *mem_ctx,
-                                                         struct emsmdbp_context *emsmdbp_ctx,
-                                                         struct GetProps_req request,
-                                                         struct GetProps_repl *response,
-                                                         void *private_data)
-{
-       enum MAPISTATUS         retval;
-       struct emsmdbp_object   *object;
-       uint32_t                contextID = -1;
-       uint64_t                fmid = 0;
-       void                    *data;
-       struct SPropTagArray    SPropTagArray;
-       struct SRow             *aRow;
-       uint32_t                i;
-       uint32_t                j;
-       uint8_t                 type;
-       bool                    found = false;
-
-       object = (struct emsmdbp_object *) private_data;
-       if (object) {
-               switch (object->type) {
-               case EMSMDBP_OBJECT_FOLDER:
-                       /* contextID = object->object.folder->contextID; */
-                       /* fmid = object->object.folder->folderID; */
-                       /* type = MAPISTORE_FOLDER; */
-                       break;
-               case EMSMDBP_OBJECT_MESSAGE:
-                       contextID = object->object.message->contextID;
-                       fmid = object->object.message->messageID;
-                       type = MAPISTORE_MESSAGE;
-                       break;
-               default:
-                       break;
-               }
-       }
-
-       SPropTagArray.cValues = request.prop_count;
-       SPropTagArray.aulPropTag = request.properties;
-
-       /* TODO: Fix contextID signed */
-       if ((int)contextID != -1) {
-               aRow = talloc_zero(mem_ctx, struct SRow);
-               aRow->cValues = 0;
-               mapistore_getprops(emsmdbp_ctx->mstore_ctx, contextID, fmid, type, &SPropTagArray, aRow);
-               /* Check if we need the layout */
-               for (i = 0; i < request.prop_count; i++) {
-                       for (j = 0; j < aRow->cValues; j++) {
-                               if (request.properties[i] == aRow->lpProps[j].ulPropTag) {
-                                       found = true;
-                                       response->layout = 0x0;
-                               }
-                       }
-                       if (found == false) {
-                               response->layout = 0x1;
-                               break;
-                       }
-               }
-               
-               for (i = 0; i < request.prop_count; i++) {
-                       response->layout = 0x1;
-                       data = (void *) find_SPropValue_data(aRow, request.properties[i]);
-                       if (data == NULL) {
-                               request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                               retval = MAPI_E_NOT_FOUND;
-                               data = (void *)&retval;
-                       } 
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   request.properties[i], (const void *)data,
-                                                   &response->prop_data, response->layout, 0);
-               }
-
-       } else {
-               response->layout = 0x1;
-               for (i = 0; i < request.prop_count; i++) {
-                       request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                       retval = MAPI_E_NOT_FOUND;
-                       response->layout = 0x1;
-                       data = (void *)&retval;
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   request.properties[i], (const void *)data,
-                                                   &response->prop_data, response->layout, 0);
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve properties on a mailbox object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request GetProps request
-   \param response pointer to the GetProps reply
-   \param private_data pointer to the private data stored for this
-   object
-
-   \note Mailbox objects have a limited set of supported properties.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopGetPropertiesSpecific_Mailbox(TALLOC_CTX *mem_ctx,
-                                                       struct emsmdbp_context *emsmdbp_ctx,
-                                                       struct GetProps_req request,
-                                                       struct GetProps_repl *response,
-                                                       void *private_data)
-{
-       enum MAPISTATUS                 retval;
-       struct emsmdbp_object           *object;
-       void                            *data;
-       struct SBinary_short            bin;
-       uint32_t                        i;
-       uint32_t                        error = 0;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!private_data, MAPI_E_INVALID_PARAMETER, NULL);
-
-       object = (struct emsmdbp_object *) private_data;
-
-       /* Step 1. Check if we need a layout */
-       response->layout = 0;
-       for (i = 0; i < request.prop_count; i++) {
-               switch (request.properties[i]) {
-               case PR_MAPPING_SIGNATURE:
-               case PR_IPM_PUBLIC_FOLDERS_ENTRYID:
-                       response->layout = 0x1;
-                       break;
-               case PR_USER_ENTRYID:
-                       break;
-               case PR_MAILBOX_OWNER_ENTRYID:
-               case PR_MAILBOX_OWNER_NAME:
-               case PR_MAILBOX_OWNER_NAME_UNICODE:
-                       if (object->object.mailbox->mailboxstore == false) {
-                               response->layout = 0x1;
-                       }
-                       break;
-               default:
-                       retval = openchangedb_get_folder_property(mem_ctx, emsmdbp_ctx->oc_ctx,
-                                                                 emsmdbp_ctx->szDisplayName, 
-                                                                 request.properties[i],
-                                                                 object->object.mailbox->folderID, 
-                                                                 (void **)&data);
-                       if (retval) {
-                               response->layout = 0x1;
-                       }
-                       break;
-               }
-               if (response->layout == 1) {
-                       break;
-               }
-       }
-
-       /* Step 2. Fill the GetProps blob */
-       for (i = 0; i < request.prop_count; i++) {
-               switch (request.properties[i]) {
-               case PR_MAPPING_SIGNATURE:
-               case PR_IPM_PUBLIC_FOLDERS_ENTRYID:
-                       error = MAPI_E_NO_ACCESS;
-                       request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   request.properties[i], (const void *)&error, 
-                                                   &response->prop_data, response->layout, 0);
-                       break;
-               case PR_USER_ENTRYID:
-                       retval = entryid_set_AB_EntryID(mem_ctx, object->object.mailbox->szUserDN, &bin);
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   request.properties[i], (const void *)&bin,
-                                                   &response->prop_data, response->layout, 0);
-                       talloc_free(bin.lpb);
-                       break;
-               case PR_MAILBOX_OWNER_ENTRYID:
-                       if (object->object.mailbox->mailboxstore == false) {
-                               error = MAPI_E_NO_ACCESS;
-                               request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           request.properties[i], (const void *)&error,
-                                                           &response->prop_data, response->layout, 0);
-                       } else {
-                               retval = entryid_set_AB_EntryID(mem_ctx, object->object.mailbox->owner_EssDN,
-                                                               &bin);
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           request.properties[i], (const void *)&bin,
-                                                           &response->prop_data, response->layout, 0);
-                               talloc_free(bin.lpb);
-                       }
-                       break;
-               case PR_MAILBOX_OWNER_NAME:
-               case PR_MAILBOX_OWNER_NAME_UNICODE:
-                       if (object->object.mailbox->mailboxstore == false) {
-                               error = MAPI_E_NO_ACCESS;
-                               request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           request.properties[i], (const void *)&error,
-                                                           &response->prop_data, response->layout, 0);
-                       } else {
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           request.properties[i], 
-                                                           (const void *)object->object.mailbox->owner_Name,
-                                                           &response->prop_data, response->layout, 0);
-                       }
-                       break;
-               default:
-                       retval = openchangedb_get_folder_property(mem_ctx, emsmdbp_ctx->oc_ctx,
-                                                                 emsmdbp_ctx->szDisplayName, request.properties[i],
-                                                                 object->object.mailbox->folderID, (void **)&data);
-                       if (retval) {
-                               request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                               data = (void *)&retval;
-                       }
-                       libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                   request.properties[i], (const void *)data, 
-                                                   &response->prop_data, response->layout, 0);
-                       break;
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve properties on a systemfolder object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request GetProps request
-   \param response pointer to the GetProps reply
-   \param private_data pointer to the private data stored for this
-   object
-   \param private_data pointer to the private data stored for this
-   object
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopGetPropertiesSpecific_SystemSpecialFolder(TALLOC_CTX *mem_ctx,
-                                                                   struct emsmdbp_context *emsmdbp_ctx,
-                                                                   struct GetProps_req request,
-                                                                   struct GetProps_repl *response,
-                                                                   void *private_data)
-{
-       enum MAPISTATUS                 retval;
-       struct emsmdbp_object           *object;
-       struct emsmdbp_object_folder    *folder;
-       void                            *data;
-       int                             i;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!private_data, MAPI_E_INVALID_PARAMETER, NULL);
-
-       object = (struct emsmdbp_object *) private_data;
-       folder = (struct emsmdbp_object_folder *) object->object.folder;
-
-       /* Step 1. Lookup properties and set layout */
-       response->layout = 0x0;
-       for (i = 0; i < request.prop_count; i++) {
-               if (openchangedb_lookup_folder_property(emsmdbp_ctx->oc_ctx, request.properties[i], 
-                                                       folder->folderID)) {
-                       response->layout = 0x1;
-                       break;
-               }
-       }
-
-       /* Step 2. Fetch properties values */
-       for (i = 0; i < request.prop_count; i++) {
-               retval = openchangedb_get_folder_property(mem_ctx, emsmdbp_ctx->oc_ctx, 
-                                                         emsmdbp_ctx->szDisplayName, request.properties[i],
-                                                         folder->folderID, (void **)&data);
-               if (retval) {
-                       request.properties[i] = (enum MAPITAGS)((int)(request.properties[i] & 0xFFFF0000) + PT_ERROR);
-                       data = (void *)&retval;
-               }
-               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                           request.properties[i], (const void *)data,
-                                           &response->prop_data, response->layout, 0);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetPropertiesSpecific (0x07) Rop. This operation
-   retrieves from properties data from specified object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetPropertiesSpecific
-   EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the GetPropertiesSpecific
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPropertiesSpecific(TALLOC_CTX *mem_ctx,
-                                                         struct emsmdbp_context *emsmdbp_ctx,
-                                                         struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                         struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                         uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct GetProps_req     request;
-       struct GetProps_repl    response;
-       uint32_t                handle;
-       struct mapi_handles     *rec = NULL;
-       void                    *private_data = NULL;
-       bool                    mapistore = false;
-       struct emsmdbp_object   *object;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] GetPropertiesSpecific (0x07)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       request = mapi_req->u.mapi_GetProps;
-       response = mapi_repl->u.mapi_GetProps;
-
-       /* Initialize GetProps response blob */
-       response.prop_data.length = 0;
-       response.prop_data.data = NULL;
-
-       /* Fill EcDoRpc_MAPI_REPL reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_NOT_FOUND;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) goto end;
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       /* Nasty hack */
-       if (!private_data) {
-               mapistore = true;
-       }
-
-       /* Temporary hack: If this is a mapistore root container
-        * (e.g. Inbox, Calendar etc.), directly stored under
-        * IPM.Subtree, then fetch properties from openchange
-        * dispatcher db, not mapistore */
-       object = (struct emsmdbp_object *) private_data;
-       if (object && object->type == EMSMDBP_OBJECT_FOLDER &&
-           object->object.folder->mapistore_root == true) {
-               retval = RopGetPropertiesSpecific_SystemSpecialFolder(mem_ctx, emsmdbp_ctx, 
-                                                                     request, &response, private_data);
-       } else {
-               switch (mapistore) {
-               case false:
-                       switch (object->type) {
-                       case EMSMDBP_OBJECT_MAILBOX:
-                               retval = RopGetPropertiesSpecific_Mailbox(mem_ctx, emsmdbp_ctx, request, &response, private_data);
-                               break;
-                       case EMSMDBP_OBJECT_FOLDER:
-                               retval = RopGetPropertiesSpecific_SystemSpecialFolder(mem_ctx, emsmdbp_ctx, request, &response, private_data);
-                               break;
-                       default:
-                               break;
-                       }
-                       break;
-               case true:
-                       /* folder or messages handled by mapistore */
-                       retval = RopGetPropertiesSpecific_mapistore(mem_ctx, emsmdbp_ctx, request, &response, private_data);
-                       break;
-               }
-       }
-
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_GetProps = response;
-
- end:
-       *size += libmapiserver_RopGetPropertiesSpecific_size(mapi_req, mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SetProperties (0x0a) Rop. This operation sets
-   property values for an object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetProperties EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SetProperties EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetProperties(TALLOC_CTX *mem_ctx,
-                                                 struct emsmdbp_context *emsmdbp_ctx,
-                                                 struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                 struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                 uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       uint32_t                handle;
-       struct mapi_handles     *rec = NULL;
-       void                    *private_data = NULL;
-       bool                    mapistore = false;
-       struct emsmdbp_object   *object;
-       uint64_t                messageID;
-       uint32_t                contextID;
-       uint16_t                i;
-       struct SRow             aRow;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] SetProperties (0x0a)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       
-       mapi_repl->u.mapi_SetProps.PropertyProblemCount = 0;
-       mapi_repl->u.mapi_SetProps.PropertyProblem = NULL;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *)private_data;
-       if (!object) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto end;
-       }
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       switch (mapistore) {
-       case false:
-               DEBUG(0, ("SetProps on openchangedb not implemented yet\n"));
-               break;
-       case true:
-               if (object->type == EMSMDBP_OBJECT_MESSAGE) {
-                       messageID = object->object.message->messageID;
-                       contextID = object->object.message->contextID;
-
-                       aRow.cValues = mapi_req->u.mapi_SetProps.values.cValues;
-                       aRow.lpProps = talloc_array(mem_ctx, struct SPropValue, aRow.cValues + 2);
-                       for (i = 0; i < mapi_req->u.mapi_SetProps.values.cValues; i++) {
-                         cast_SPropValue(aRow.lpProps, &(mapi_req->u.mapi_SetProps.values.lpProps[i]),
-                                         &(aRow.lpProps[i]));
-                       }
-
-                       mapistore_setprops(emsmdbp_ctx->mstore_ctx, contextID, messageID, 
-                                          MAPISTORE_MESSAGE, &aRow);
-               } 
-               break;
-       }
-       
-
-end:
-       *size += libmapiserver_RopSetProperties_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc DeleteProperties (0x0b) Rop. This operation
-   deletes property values for an object.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the DeleteProperties EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the DeleteProperties EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopDeleteProperties(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                    struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                    uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] DeleteProperties (0x0b)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       
-       mapi_repl->u.mapi_DeleteProps.PropertyProblemCount = 0;
-       mapi_repl->u.mapi_DeleteProps.PropertyProblem = NULL;
-
-       *size += libmapiserver_RopDeleteProperties_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc OpenStream (0x2b) Rop. This operation opens a
-   property for streaming access.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the OpenStream EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the OpenStream EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopOpenStream(TALLOC_CTX *mem_ctx,
-                                              struct emsmdbp_context *emsmdbp_ctx,
-                                              struct EcDoRpc_MAPI_REQ *mapi_req,
-                                              struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                              uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *rec = NULL;
-       struct emsmdbp_object           *object = NULL;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] OpenStream (0x2b)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_OpenStream.StreamSize = 0;
-
-       /* Step 1. Retrieve parent handle in the hierarchy */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       if (!mapi_repl->error_code) {
-               retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-               object = emsmdbp_object_stream_init((TALLOC_CTX *)rec, emsmdbp_ctx,
-                                                   mapi_req->u.mapi_OpenStream.PropertyTag, parent);
-               
-               if (object) {
-                       retval = mapi_handles_set_private_data(rec, object);
-               }
-
-               mapi_repl->handle_idx = mapi_req->u.mapi_OpenStream.handle_idx;
-               handles[mapi_repl->handle_idx] = rec->handle;
-       }
-
-       *size += libmapiserver_RopOpenStream_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc ReadStream (0x2c) Rop. This operation reads bytes
-   from a stream.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the ReadStream EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the ReadStream EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopReadStream(TALLOC_CTX *mem_ctx,
-                                              struct emsmdbp_context *emsmdbp_ctx,
-                                              struct EcDoRpc_MAPI_REQ *mapi_req,
-                                              struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                              uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *rec = NULL;
-       void                            *private_data;
-       struct emsmdbp_object           *object = NULL;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] ReadStream (0x2c)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_ReadStream.data.length = 0;
-       mapi_repl->u.mapi_ReadStream.data.data = NULL;
-
-       /* Step 1. Retrieve parent handle in the hierarchy */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (retval) goto end;
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *) private_data;
-       if (!object || object->type != EMSMDBP_OBJECT_STREAM) goto end;
-
-       /* TODO effective work goes here */
-end:
-       *size += libmapiserver_RopReadStream_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc WriteStream (0x2d) Rop. This operation writes bytes
-   to a stream.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the WriteStream EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the WriteStream EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopWriteStream(TALLOC_CTX *mem_ctx,
-                                               struct emsmdbp_context *emsmdbp_ctx,
-                                               struct EcDoRpc_MAPI_REQ *mapi_req,
-                                               struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                               uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent = NULL;
-       struct mapi_handles             *rec = NULL;
-       void                            *private_data;
-       struct emsmdbp_object           *object = NULL;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] WriteStream (0x2d)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_WriteStream.WrittenSize = mapi_req->u.mapi_WriteStream.data.length;
-
-       /* Step 1. Retrieve parent handle in the hierarchy */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (retval) goto end;
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *) private_data;
-       if (!object || object->type != EMSMDBP_OBJECT_STREAM) goto end;
-
-       /* TODO effective work goes here */
-end:
-       *size += libmapiserver_RopWriteStream_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetPropertyIdsFromNames (0x56) Rop. This operation
-   gets property IDs for specified property names.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetPropertyIdsFromNames
-   EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the GetPropertyIdsFromNames
-   EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
-*/
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPropertyIdsFromNames(TALLOC_CTX *mem_ctx,
-                                                           struct emsmdbp_context *emsmdbp_ctx,
-                                                           struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                           struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                           uint32_t *handles, uint16_t *size)
-{
-       int             i;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] GetPropertyIdsFromNames (0x56)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->u.mapi_GetIDsFromNames.count = mapi_req->u.mapi_GetIDsFromNames.count;
-       mapi_repl->u.mapi_GetIDsFromNames.propID = talloc_array(mem_ctx, uint16_t, 
-                                                               mapi_req->u.mapi_GetIDsFromNames.count);
-
-       for (i = 0; i < mapi_req->u.mapi_GetIDsFromNames.count; i++) {
-               mapistore_namedprops_get_mapped_id(emsmdbp_ctx->mstore_ctx->nprops_ctx, 
-                                                  mapi_req->u.mapi_GetIDsFromNames.nameid[i],
-                                                  &mapi_repl->u.mapi_GetIDsFromNames.propID[i]);
-       }
-
-       *size += libmapiserver_RopGetPropertyIdsFromNames_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcstor.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxcstor.c
deleted file mode 100644 (file)
index bce9c0c..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxcstor.c
-
-   \brief Server-side store objects routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-#include <string.h>
-
-
-/**
-   \details Logs on a private mailbox
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the RopLogon EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the RopLogon EcDoRpc_MAPI_REPL
-   structure the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopLogon_Mailbox(TALLOC_CTX *mem_ctx,
-                                       struct emsmdbp_context *emsmdbp_ctx,
-                                       struct EcDoRpc_MAPI_REQ *mapi_req,
-                                       struct EcDoRpc_MAPI_REPL *mapi_repl)
-{
-       enum MAPISTATUS         retval;
-       char                    *recipient;
-       struct Logon_req        request;
-       struct Logon_repl       response;
-       struct tm               *LogonTime;
-       time_t                  t;
-       NTTIME                  nttime;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!mapi_req->u.mapi_Logon.EssDN, MAPI_E_INVALID_PARAMETER, NULL);
-
-       request = mapi_req->u.mapi_Logon;
-       response = mapi_repl->u.mapi_Logon;
-
-       OPENCHANGE_RETVAL_IF(strcmp(request.EssDN, emsmdbp_ctx->szUserDN), MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 0. Retrieve recipient name */
-       recipient = x500_get_dn_element(mem_ctx, request.EssDN, "/cn=Recipients/cn=");
-       OPENCHANGE_RETVAL_IF(!recipient, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Step 1. Check if mailbox pointed by recipient belongs to the Exchange organisation */
-
-       /* Step 2. Set LogonFlags */
-       response.LogonFlags = request.LogonFlags;
-
-       /* Step 3. Build FolderIds list */
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_MAILBOX_ROOT, &response.LogonType.store_mailbox.FolderIds[0]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_DEFERRED_ACTIONS, &response.LogonType.store_mailbox.FolderIds[1]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_SPOOLER_QUEUE, &response.LogonType.store_mailbox.FolderIds[2]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_TOP_INFORMATION_STORE, &response.LogonType.store_mailbox.FolderIds[3]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_INBOX, &response.LogonType.store_mailbox.FolderIds[4]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_OUTBOX, &response.LogonType.store_mailbox.FolderIds[5]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_SENT_ITEMS, &response.LogonType.store_mailbox.FolderIds[6]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_DELETED_ITEMS, &response.LogonType.store_mailbox.FolderIds[7]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_COMMON_VIEWS, &response.LogonType.store_mailbox.FolderIds[8]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_SCHEDULE, &response.LogonType.store_mailbox.FolderIds[9]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_SEARCH, &response.LogonType.store_mailbox.FolderIds[10]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_VIEWS, &response.LogonType.store_mailbox.FolderIds[11]);
-       retval = openchangedb_get_SystemFolderID(emsmdbp_ctx->oc_ctx, recipient, EMSMDBP_SHORTCUTS, &response.LogonType.store_mailbox.FolderIds[12]);
-
-       /* Step 4. Set ResponseFlags */
-       response.LogonType.store_mailbox.ResponseFlags = ResponseFlags_Reserved | ResponseFlags_OwnerRight | ResponseFlags_SendAsRight;
-
-       /* Step 5. Retrieve MailboxGuid */
-       retval = openchangedb_get_MailboxGuid(emsmdbp_ctx->oc_ctx, recipient, &response.LogonType.store_mailbox.MailboxGuid);
-
-       /* Step 6. Retrieve mailbox replication information */
-       retval = openchangedb_get_MailboxReplica(emsmdbp_ctx->oc_ctx, recipient,
-                                                &response.LogonType.store_mailbox.ReplId,
-                                                &response.LogonType.store_mailbox.ReplGUID);
-
-       /* Step 7. Set LogonTime both in openchange dispatcher database and reply */
-       t = time(NULL);
-       LogonTime = localtime(&t);
-       response.LogonType.store_mailbox.LogonTime.Seconds = LogonTime->tm_sec;
-       response.LogonType.store_mailbox.LogonTime.Minutes = LogonTime->tm_min;
-       response.LogonType.store_mailbox.LogonTime.Hour = LogonTime->tm_hour;
-       response.LogonType.store_mailbox.LogonTime.DayOfWeek = (enum DayOfWeek)LogonTime->tm_wday;
-       response.LogonType.store_mailbox.LogonTime.Day = LogonTime->tm_mday;
-       response.LogonType.store_mailbox.LogonTime.Month = LogonTime->tm_mon + 1;
-       response.LogonType.store_mailbox.LogonTime.Year = LogonTime->tm_year + 1900;
-
-       /* Step 8. Retrieve GwartTime */
-       unix_to_nt_time(&nttime, t);
-       response.LogonType.store_mailbox.GwartTime = nttime - 1000000;
-
-       /* Step 9. Set StoreState */
-       response.LogonType.store_mailbox.StoreState = 0x0;
-
-       mapi_repl->u.mapi_Logon = response;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Logs on a public folder store
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the RopLogon EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the RopLogon EcDoRpc_MAPI_REPL 
-   structure that the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopLogon_PublicFolder(TALLOC_CTX *mem_ctx,
-                                            struct emsmdbp_context *emsmdbp_ctx,
-                                            struct EcDoRpc_MAPI_REQ *mapi_req,
-                                            struct EcDoRpc_MAPI_REPL *mapi_repl)
-{
-       struct Logon_req        request;
-       struct Logon_repl       response;
-
-       request = mapi_req->u.mapi_Logon;
-       response = mapi_repl->u.mapi_Logon;
-
-       response.LogonFlags = request.LogonFlags;
-
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_ROOT, &(response.LogonType.store_pf.FolderIds[0]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_IPMSUBTREE, &(response.LogonType.store_pf.FolderIds[1]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_NONIPMSUBTREE, &(response.LogonType.store_pf.FolderIds[2]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_EFORMSREGISTRY, &(response.LogonType.store_pf.FolderIds[3]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_FREEBUSY, &(response.LogonType.store_pf.FolderIds[4]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_OAB, &(response.LogonType.store_pf.FolderIds[5]));
-       response.LogonType.store_pf.FolderIds[6] = 0x00000000000000000000; /* Eforms Registry */
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_LOCALFREEBUSY, &(response.LogonType.store_pf.FolderIds[7]));
-       openchangedb_get_PublicFolderID(emsmdbp_ctx->oc_ctx, EMSMDBP_PF_LOCALOAB, &(response.LogonType.store_pf.FolderIds[8]));
-       response.LogonType.store_pf.FolderIds[9] = 0x00000000000000000000; /* NNTP Article Index */
-       response.LogonType.store_pf.FolderIds[10] = 0x00000000000000000000; /* Empty */
-       response.LogonType.store_pf.FolderIds[11] = 0x00000000000000000000; /* Empty */
-       response.LogonType.store_pf.FolderIds[12] = 0x00000000000000000000; /* Empty */
-
-       openchangedb_get_PublicFolderReplica(emsmdbp_ctx->oc_ctx,
-                                            &(response.LogonType.store_pf.ReplId),
-                                            &(response.LogonType.store_pf.Guid));
-       memset(&(response.LogonType.store_pf.PerUserGuid), 0, sizeof(struct GUID));
-
-       mapi_repl->u.mapi_Logon = response;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc Logon (0xFE) Rop. This operation logs on to a
-   private mailbox or public folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the Logon EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the Logon EcDoRpc_MAPI_REPL structure
-   the function returns
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \note Users are only allowed to open their own mailbox at the
-   moment. This limitation will be removed when significant progress
-   have been made.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopLogon(TALLOC_CTX *mem_ctx,
-                                         struct emsmdbp_context *emsmdbp_ctx,
-                                         struct EcDoRpc_MAPI_REQ *mapi_req,
-                                         struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                         uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct Logon_req                request;
-       struct mapi_handles             *rec = NULL;
-       struct emsmdbp_object           *object;
-       bool                            mailboxstore = true;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] Logon (0xFE)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       request = mapi_req->u.mapi_Logon;
-
-       /* Fill EcDoRpc_MAPI_REPL reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-
-       if (request.LogonFlags & LogonPrivate) {
-               retval = RopLogon_Mailbox(mem_ctx, emsmdbp_ctx, mapi_req, mapi_repl);
-               mapi_repl->error_code = retval;
-               *size += libmapiserver_RopLogon_size(mapi_req, mapi_repl);
-       } else {
-               retval = RopLogon_PublicFolder(mem_ctx, emsmdbp_ctx, mapi_req, mapi_repl);
-               mapi_repl->error_code = retval;
-               mailboxstore = false;
-               *size += libmapiserver_RopLogon_size(mapi_req, mapi_repl);
-       }
-
-       if (!mapi_repl->error_code) {
-               retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, 0, &rec);
-               object = emsmdbp_object_mailbox_init((TALLOC_CTX *)rec, emsmdbp_ctx, mapi_req, mailboxstore);
-               retval = mapi_handles_set_private_data(rec, object);
-
-               handles[mapi_repl->handle_idx] = rec->handle;
-       }
-
-       return retval;
-}
-
-
-/**
-   \details EcDoRpc Release (0x01) Rop. This operation releases an
-   existing MAPI handle.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param request pointer to the Release EcDoRpc_MAPI_REQ
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopRelease(TALLOC_CTX *mem_ctx,
-                                           struct emsmdbp_context *emsmdbp_ctx,
-                                           struct EcDoRpc_MAPI_REQ *request,
-                                           uint32_t *handles,
-                                           uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       uint32_t                handle;
-
-       handle = handles[request->handle_idx];
-       retval = mapi_handles_delete(emsmdbp_ctx->handles_ctx, handle);
-       OPENCHANGE_RETVAL_IF(retval && retval != MAPI_E_NOT_FOUND, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-/* Test MessageClass string according to [MS-OXCSTOR] section 2.2.1.2.1.1 and 2.2.1.3.1.2 */
-static bool MessageClassIsValid(const char *MessageClass)
-{
-       size_t          len = strlen(MessageClass);
-       uint32_t        i;
-       
-       if (len + 1 > 255) {
-               return false;
-       }
-
-       for (i = 0; i < len; i++) {
-               if ((MessageClass[i] < 32) || (MessageClass[i] > 126)) {
-                       return false;
-               }
-               if ((MessageClass[i] == '.') && (MessageClass[i + 1]) && (MessageClass[i + 1] == '.')) {
-                       return false;
-               }
-       }
-       
-       if (MessageClass[0] && (MessageClass[0] == '.')) {
-               return false;
-       }
-       if (MessageClass[0] && (MessageClass[len] == '.')) {
-               return false;
-       }
-       
-       return true;
-}
-
-/**
-   \details EcDoRpc SetReceiveFolder (0x26) Rop Internals. This
-   routine performs the SetReceiveFolder internals.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetReceiveFolder EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the SetReceiveFolder EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopSetReceiveFolder(TALLOC_CTX *mem_ctx,
-                                          struct emsmdbp_context *emsmdbp_ctx,
-                                          struct EcDoRpc_MAPI_REQ *mapi_req,
-                                          struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                          uint32_t *handles)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *rec = NULL;
-       struct emsmdbp_object   *object = NULL;
-       const char              *MessageClass = NULL;
-       void                    *private_data = NULL;
-       uint32_t                handle;
-       uint64_t                fid;
-
-       /* Step 1. Ensure the referring MAPI handle is mailbox one */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       retval = mapi_handles_get_private_data(rec, (void **)&private_data);
-       object = (struct emsmdbp_object *) private_data;
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-       OPENCHANGE_RETVAL_IF(object->type != EMSMDBP_OBJECT_MAILBOX, MAPI_E_NO_SUPPORT, NULL);
-       
-       /* Step 2. Verify MessageClass string */
-       fid = mapi_req->u.mapi_SetReceiveFolder.fid;
-       MessageClass = mapi_req->u.mapi_SetReceiveFolder.lpszMessageClass;
-       if (!MessageClass || (strcmp(MessageClass, "") == 0)) {
-               MessageClass="All";
-       }
-       if ((fid == 0x0) && (strcmp(MessageClass, "All"))) {
-               return MAPI_E_CALL_FAILED;
-       }
-       if (strcasecmp(MessageClass, "IPM") == 0) {
-               return MAPI_E_NO_ACCESS;
-       }
-       if (strcasecmp(MessageClass, "Report.IPM") == 0) {
-               return MAPI_E_NO_ACCESS;
-       }
-       if (! MessageClassIsValid(MessageClass) ) {
-               return MAPI_E_INVALID_PARAMETER;
-       }
-
-       /* Step 3.Set the receive folder for this message class within user mailbox */
-       retval = openchangedb_set_ReceiveFolder(mem_ctx, emsmdbp_ctx->oc_ctx, object->object.mailbox->owner_Name,
-                                               MessageClass, fid);
-       OPENCHANGE_RETVAL_IF(retval, ecNoReceiveFolder, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc SetReceiveFolder (0x26) Rop. This operation sets
-   the receive folder for incoming messages of a particular message
-   class
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetReceiveFolder EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the SetReceiveFolder EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetReceiveFolder(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                    struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                    uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] SetReceiveFolder (0x26)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       /* Call effective code */
-       retval = RopSetReceiveFolder(mem_ctx, emsmdbp_ctx, mapi_req, mapi_repl, handles);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = retval;
-
-       *size += libmapiserver_RopSetReceiveFolder_size(mapi_repl);
-       
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return retval;
-}
-
-/**
-   \details EcDoRpc GetReceiveFolder (0x27) Rop Internals. This
-   routine performs the GetReceiveFolder internals.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetReceiveFolder EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the GetReceiveFolder EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-static enum MAPISTATUS RopGetReceiveFolder(TALLOC_CTX *mem_ctx,
-                                          struct emsmdbp_context *emsmdbp_ctx,
-                                          struct EcDoRpc_MAPI_REQ *mapi_req,
-                                          struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                          uint32_t *handles)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *rec = NULL;
-       struct emsmdbp_object   *object = NULL;
-       const char              *MessageClass = NULL;
-       void                    *private_data = NULL;
-       uint32_t                handle;
-
-       /* Step 1. Ensure the referring MAPI handle is mailbox one */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       retval = mapi_handles_get_private_data(rec, (void **)&private_data);
-       object = (struct emsmdbp_object *) private_data;
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-       OPENCHANGE_RETVAL_IF(object->type != EMSMDBP_OBJECT_MAILBOX, MAPI_E_NO_SUPPORT, NULL);
-       
-       /* Step 2. Verify MessageClass string */
-       MessageClass = mapi_req->u.mapi_GetReceiveFolder.MessageClass;
-       if (!MessageClass || !strcmp(MessageClass, "")) {
-               MessageClass="All";
-       }
-
-       if (! MessageClassIsValid(MessageClass) ) {
-               return MAPI_E_INVALID_PARAMETER;
-       }
-       
-       /* Step 3. Search for the specified MessageClass substring within user mailbox */
-       retval = openchangedb_get_ReceiveFolder(mem_ctx, emsmdbp_ctx->oc_ctx, object->object.mailbox->owner_Name,
-                                               MessageClass, &mapi_repl->u.mapi_GetReceiveFolder.folder_id,
-                                               &mapi_repl->u.mapi_GetReceiveFolder.MessageClass);
-       OPENCHANGE_RETVAL_IF(retval, ecNoReceiveFolder, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetReceiveFolder (0x27) Rop. This operation gets
-   the receive folder for incoming messages of a particular message
-   class
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetReceiveFolder EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the GetReceiveFolder EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetReceiveFolder(TALLOC_CTX *mem_ctx,
-                                                    struct emsmdbp_context *emsmdbp_ctx,
-                                                    struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                    struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                    uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] GetReceiveFolder (0x27)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       /* Call effective code */
-       retval = RopGetReceiveFolder(mem_ctx, emsmdbp_ctx, mapi_req, mapi_repl, handles);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = retval;
-
-       *size += libmapiserver_RopGetReceiveFolder_size(mapi_repl);
-       
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return retval;
-}
-
-
-/**
-   \details EcDoRpc GetPerUserLongTermIds (0x60) Rop. This operations
-   gets the long-term ID of a public folder that is identified by the
-   per-user GUID of the logged on user.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPerUserLongTermIds(TALLOC_CTX *mem_ctx,
-                                                         struct emsmdbp_context *emsmdbp_ctx,
-                                                         struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                         struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                         uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] GetPerUserLongTermIds (0x60)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Ensure the request is performed against a private mailbox
-        * logon, not a public folders logon. If the operation is
-        * performed against a public folders logon, return
-        * MAPI_E_NO_SUPPORT */
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* TODO effective work here */
-       mapi_repl->u.mapi_GetPerUserLongTermIds.LongTermIdCount = 0;
-       mapi_repl->u.mapi_GetPerUserLongTermIds.LongTermIds = NULL;
-
-       *size += libmapiserver_RopGetPerUserLongTermIds_size(mapi_repl);
-
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetPerUserGuid (0x61) Rop. This operation
-   gets the GUID of a public folder's per-user information.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPerUserGuid(TALLOC_CTX *mem_ctx,
-                                                  struct emsmdbp_context *emsmdbp_ctx,
-                                                  struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                  struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                  uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] GetPerUserGuid (0x61)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Ensure the request is performed against a private mailbox
-        * logon, not a public folders logon. If the operation is
-        * performed against a public folders logon, return
-        * MAPI_E_NO_SUPPORT */
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_NOT_FOUND;
-
-       /* TODO effective work here */
-
-       *size += libmapiserver_RopGetPerUserGuid_size(mapi_repl);
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details EcDoRpc ReadPerUserInformation (0x63) Rop. This operation
-   gets per-user information for a public folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the ReadPerUserInformation EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the ReadPerUserInformation EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopReadPerUserInformation(TALLOC_CTX *mem_ctx,
-                                                          struct emsmdbp_context *emsmdbp_ctx,
-                                                          struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                          struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                          uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCSTOR] ReadPerUserInformation (0x63)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       mapi_repl->u.mapi_ReadPerUserInformation.HasFinished = true;
-       mapi_repl->u.mapi_ReadPerUserInformation.DataSize = 0x0;
-       mapi_repl->u.mapi_ReadPerUserInformation.Data.length = 0x0;
-       mapi_repl->u.mapi_ReadPerUserInformation.Data.data = NULL;
-
-       *size += libmapiserver_RopReadPerUserInformation_size(mapi_repl);
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxctabl.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxctabl.c
deleted file mode 100644 (file)
index 3a7ff9b..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxctabl.c
-
-   \brief Table object routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \details EcDoRpc SetColumns (0x12) Rop. This operation sets the
-   properties to be included in the table.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SetColumns EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SetColumns EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetColumns(TALLOC_CTX *mem_ctx,
-                                              struct emsmdbp_context *emsmdbp_ctx,
-                                              struct EcDoRpc_MAPI_REQ *mapi_req,
-                                              struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                              uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent;
-       struct emsmdbp_object           *object;
-       struct emsmdbp_object_table     *table;
-       struct SetColumns_req           request;
-       void                            *data = NULL;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] SetColumns (0x12)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       /* Initialize default empty SetColumns reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_SetColumns.TableStatus = TBLSTAT_COMPLETE;
-
-       *size += libmapiserver_RopSetColumns_size(mapi_repl);
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       retval = mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *) data;
-
-       if (object) {
-               table = object->object.table;
-               OPENCHANGE_RETVAL_IF(!table, MAPI_E_INVALID_PARAMETER, NULL);
-
-               request = mapi_req->u.mapi_SetColumns;
-               if (request.prop_count) {
-                       table->prop_count = request.prop_count;
-                       table->properties = (uint32_t *) talloc_memdup(table, request.properties, 
-                                                                      request.prop_count * sizeof (uint32_t));
-               }
-       }
-
-       DEBUG(0, ("RopSetColumns: returns MAPI_E_SUCCESS\n"));
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SortTable (0x13) Rop. This operation defines the
-   order of rows of a table based on sort criteria.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SortTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SortTable EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSortTable(TALLOC_CTX *mem_ctx,
-                                             struct emsmdbp_context *emsmdbp_ctx,
-                                             struct EcDoRpc_MAPI_REQ *mapi_req,
-                                             struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                             uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] SortTable (0x13)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_SortTable.TableStatus = TBLSTAT_COMPLETE;
-
-       *size += libmapiserver_RopSortTable_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SortTable (0x14) Rop. This operation establishes a
-   filter for a table.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the Restrict EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the Restrict EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopRestrict(TALLOC_CTX *mem_ctx,
-                                            struct emsmdbp_context *emsmdbp_ctx,
-                                            struct EcDoRpc_MAPI_REQ *mapi_req,
-                                            struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                            uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] Restrict (0x14)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_Restrict.TableStatus = TBLSTAT_COMPLETE;
-
-       *size += libmapiserver_RopRestrict_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;  
-}
-
-
-/**
-   \details EcDoRpc QueryRows (0x15) Rop. This operation retrieves
-   rows from a table.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the QueryRows EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the QueryRows EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopQueryRows(TALLOC_CTX *mem_ctx,
-                                             struct emsmdbp_context *emsmdbp_ctx,
-                                             struct EcDoRpc_MAPI_REQ *mapi_req,
-                                             struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                             uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTORE_ERROR            retval;
-       enum MAPISTATUS                 ret;
-       struct mapi_handles             *parent;
-       struct emsmdbp_object           *object;
-       struct emsmdbp_object_table     *table;
-       struct QueryRows_req            request;
-       struct QueryRows_repl           response;
-       void                            *data;
-       char                            *table_filter = NULL;
-       uint32_t                        handle;
-       uint32_t                        count;
-       uint32_t                        property;
-       uint8_t                         flagged;
-       uint32_t                        i, j;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] QueryRows (0x15)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       request = mapi_req->u.mapi_QueryRows;
-       response = mapi_repl->u.mapi_QueryRows;
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_NOT_FOUND;
-       
-       response.RowData.length = 0;
-
-       handle = handles[mapi_req->handle_idx];
-       ret = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (ret) goto end;
-
-       ret = mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *) data;
-
-       /* Ensure referring object exists and is a table */
-       if (!object || (object->type != EMSMDBP_OBJECT_TABLE)) {
-               goto end;
-       }
-
-       table = object->object.table;
-       if (!table->folderID) {
-               goto end;
-       }
-
-       if ((request.RowCount + table->numerator) > table->denominator) {
-               request.RowCount = table->denominator - table->numerator;
-       }
-
-       /* If parent folder has a mapistore context */
-       if (table->mapistore == true) {
-               /* Lookup the properties and check if we need to flag the PropertyRow blob */
-               for (i = 0, count = 0; i < request.RowCount; i++, count++) {
-                       flagged = 0;
-
-                       /* Lookup for flagged property row */
-                       for (j = 0; j < table->prop_count; j++) {
-                               retval = mapistore_get_table_property(emsmdbp_ctx->mstore_ctx, table->contextID,
-                                                                     table->ulType, table->folderID, 
-                                                                     (enum MAPITAGS) table->properties[j],
-                                                                     table->numerator, &data);
-                               if (retval == MAPISTORE_ERR_INVALID_OBJECT || retval == MAPISTORE_ERROR) {
-                                       goto finish;
-                               }
-
-                               if (retval == MAPISTORE_ERR_NOT_FOUND) {
-                                       flagged = 1;
-                                       libmapiserver_push_property(mem_ctx, 
-                                                                   lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                                   0x0000000b, (const void *)&flagged,
-                                                                   &response.RowData, 0, 0);
-                                       break;
-                               }
-                       }
-
-                       /* StandardPropertyRow hack */
-                       if (!flagged) {
-                               libmapiserver_push_property(mem_ctx, 
-                                                           lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           0x00000000, (const void *)&flagged,
-                                                           &response.RowData, 0, 1);
-                       }
-
-                       /* Push the properties */
-                       for (j = 0; j < table->prop_count; j++) {
-                               property = table->properties[j];
-                               retval = mapistore_get_table_property(emsmdbp_ctx->mstore_ctx, table->contextID,
-                                                                     table->ulType, table->folderID,
-                                                                     (enum MAPITAGS) table->properties[j],
-                                                                     table->numerator, &data);
-                               if (retval == MAPISTORE_ERR_INVALID_OBJECT || retval == MAPISTORE_ERROR) {
-                                       goto finish;
-                               }
-                               if (retval == MAPISTORE_ERR_NOT_FOUND) {
-                                       property = (property & 0xFFFF0000) + PT_ERROR;
-                                       data = (void *)&retval;
-                               }
-
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           property, (const void *)data, &response.RowData,
-                                                           flagged?PT_ERROR:0, flagged);
-                       }
-
-                       table->numerator++;
-               }
-
-       /* parent folder doesn't have any mapistore context associated */
-       } else {
-               table_filter = talloc_asprintf(mem_ctx, "(&(PidTagParentFolderId=0x%.16"PRIx64")(PidTagFolderId=*))", table->folderID);
-               /* Lookup the properties and check if we need to flag the PropertyRow blob */
-               for (i = 0, count = 0; i < request.RowCount; i++, count++) {
-                       flagged = 0;
-
-                       /* Lookup for flagged property row */
-                       for (j = 0; j < table->prop_count; j++) {
-                               ret = openchangedb_get_table_property(mem_ctx, emsmdbp_ctx->oc_ctx, 
-                                                                     emsmdbp_ctx->szDisplayName,
-                                                                     table_filter, table->properties[j], 
-                                                                     table->numerator, &data);
-                               if (ret == MAPI_E_INVALID_OBJECT) {
-                                       goto finish;
-                               }
-                               if (ret == MAPI_E_NOT_FOUND) {
-                                       flagged = 1;
-                                       libmapiserver_push_property(mem_ctx, 
-                                                                   lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                                   0x0000000b, (const void *)&flagged, 
-                                                                   &response.RowData, 0, 0);
-                                       break;
-                               }                       
-                       }
-
-                       /* SandardPropertyRow hack */
-                       if (!flagged) {
-                               libmapiserver_push_property(mem_ctx, 
-                                                           lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           0x00000000, (const void *)&flagged,
-                                                           &response.RowData, 0, 1);
-                       }
-
-                       /* Push the property */
-                       for (j = 0; j < table->prop_count; j++) {
-                               property = table->properties[j];
-                               ret = openchangedb_get_table_property(mem_ctx, emsmdbp_ctx->oc_ctx, 
-                                                                     emsmdbp_ctx->szDisplayName,
-                                                                     table_filter, table->properties[j], 
-                                                                     table->numerator, &data);
-                               if (ret == MAPI_E_INVALID_OBJECT) {
-                                       count = 0;
-                                       goto finish;
-                               }
-                               if (ret == MAPI_E_NOT_FOUND) {
-                                       property = (property & 0xFFFF0000) + PT_ERROR;
-                                       data = (void *)&retval;
-                               }
-                               
-                               libmapiserver_push_property(mem_ctx, lpcfg_iconv_convenience(emsmdbp_ctx->lp_ctx),
-                                                           property, (const void *)data,
-                                                           &response.RowData, flagged?PT_ERROR:0, flagged);
-                               
-                       }
-                       
-                       table->numerator++;
-               }
-       }
-
-finish:
-       talloc_free(table_filter);
-
-       /* QueryRows reply parameters */
-       if (count) {
-               if (count < request.RowCount) {
-                       mapi_repl->u.mapi_QueryRows.Origin = 0;
-               } else {
-                       mapi_repl->u.mapi_QueryRows.Origin = 2;
-               }
-               mapi_repl->error_code = MAPI_E_SUCCESS;
-               mapi_repl->u.mapi_QueryRows.RowCount = count;
-               mapi_repl->u.mapi_QueryRows.RowData.length = response.RowData.length;
-               mapi_repl->u.mapi_QueryRows.RowData.data = response.RowData.data;
-               dump_data(0, response.RowData.data, response.RowData.length);
-       } else {
-               /* useless code for the moment */
-               mapi_repl->error_code = MAPI_E_SUCCESS;
-               mapi_repl->u.mapi_QueryRows.Origin = 2;
-               mapi_repl->u.mapi_QueryRows.RowCount = 0;
-               mapi_repl->u.mapi_QueryRows.RowData.length = 0;
-               mapi_repl->u.mapi_QueryRows.RowData.data = NULL;
-       }
-
-end:
-       *size += libmapiserver_RopQueryRows_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc QueryPosition (0x17) Rop. This operation returns
-   the location of cursor in the table.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the QueryPosition EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the QueryPosition EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopQueryPosition(TALLOC_CTX *mem_ctx,
-                                                 struct emsmdbp_context *emsmdbp_ctx,
-                                                 struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                 struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                 uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent;
-       struct emsmdbp_object           *object;
-       struct emsmdbp_object_table     *table;
-       void                            *data;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] QueryPosition (0x17)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_NOT_FOUND;
-       
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (retval) goto end;
-
-       retval = mapi_handles_get_private_data(parent, &data);
-       if (retval) goto end;
-       object = (struct emsmdbp_object *) data;
-
-       /* Ensure object exists and is table type */
-       if (!object || (object->type != EMSMDBP_OBJECT_TABLE)) goto end;
-
-       table = object->object.table;
-       if (!table->folderID) goto end;
-
-       mapi_repl->u.mapi_QueryPosition.Numerator = table->numerator;
-       mapi_repl->u.mapi_QueryPosition.Denominator = table->denominator;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-end:
-       *size += libmapiserver_RopQueryPosition_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc SeekRow (0x18) Rop. This operation moves the
-   cursor to a specific position in a table.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SeekRow EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the SeekRow EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSeekRow(TALLOC_CTX *mem_ctx,
-                                           struct emsmdbp_context *emsmdbp_ctx,
-                                           struct EcDoRpc_MAPI_REQ *mapi_req,
-                                           struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                           uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] SeekRow (0x18)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_SeekRow.HasSoughtLess = 0;
-       mapi_repl->u.mapi_SeekRow.RowsSought = 0;
-
-       *size += libmapiserver_RopSeekRow_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc FindRow (0x4f) Rop. This operation moves the
-   cursor to a row in a table that matches specific search criteria.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the FindRow EcDoRpc_MAPI_REQ structure
-   \param mapi_repl pointer to the FindRow EcDoRpc_MAPI_REPL structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopFindRow(TALLOC_CTX *mem_ctx,
-                                           struct emsmdbp_context *emsmdbp_ctx,
-                                           struct EcDoRpc_MAPI_REQ *mapi_req,
-                                           struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                           uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS                 retval;
-       struct mapi_handles             *parent;
-       struct emsmdbp_object           *object;
-       struct emsmdbp_object_table     *table;
-       void                            *data;
-       uint32_t                        handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCTABL] FindRow (0x4f)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->u.mapi_FindRow.RowNoLongerVisible = 0;
-       mapi_repl->u.mapi_FindRow.HasRowData = 0;
-       mapi_repl->u.mapi_FindRow.row.length = 0;
-       mapi_repl->u.mapi_FindRow.row.data = 0;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       if (retval) goto end;
-
-       retval = mapi_handles_get_private_data(parent, &data);
-       if (retval) goto end;
-       object = (struct emsmdbp_object *) data;
-
-       /* Ensure object exists and is table type */
-       if (!object || (object->type != EMSMDBP_OBJECT_TABLE)) goto end;
-
-       /* We don't handle backward/forward yet , just go through the
-        * entire table, nor do we handle bookmarks */
-
-       /* Handle PropertyRestriction */
-       if (mapi_req->u.mapi_FindRow.res.rt != 0x4) goto end;   
-       /* Ensure the property we search exists in the array */
-
-       table = object->object.table;
-       if (!table->folderID) goto end;
-
-       switch (table->mapistore) {
-       case true:
-               break;
-       case false:
-               break;
-       }
-
-end:
-       *size += libmapiserver_RopFindRow_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxomsg.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxomsg.c
deleted file mode 100644 (file)
index 87a4818..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxomsg.c
-
-   \brief Server-side message routines and Rops
- */
-
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-/**
-   \details EcDoRpc SubmitMessage (0x32) Rop. This operation marks a message
-   as being ready to send (subject to some flags).
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the SubmitMessage EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the SubmitMessage EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSubmitMessage(TALLOC_CTX *mem_ctx,
-                                                 struct emsmdbp_context *emsmdbp_ctx,
-                                                 struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                 struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                 uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       uint32_t                handle;
-       struct mapi_handles     *rec = NULL;
-       void                    *private_data;
-       bool                    mapistore = false;
-       struct emsmdbp_object   *object;
-       uint64_t                messageID;
-       uint32_t                contextID;
-       uint8_t                 flags;
-
-       DEBUG(4, ("exchange_emsmdb: [OXCMSG] SubmitMessage (0x32)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
-       if (retval) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       retval = mapi_handles_get_private_data(rec, &private_data);
-       object = (struct emsmdbp_object *)private_data;
-       if (!object || object->type != EMSMDBP_OBJECT_MESSAGE) {
-               mapi_repl->error_code = MAPI_E_NO_SUPPORT;
-               goto end;
-       }
-
-       mapistore = emsmdbp_is_mapistore(rec);
-       switch (mapistore) {
-       case false:
-               DEBUG(0, ("Not implemented yet - shouldn't occur\n"));
-               break;
-       case true:
-               messageID = object->object.message->messageID;
-               contextID = object->object.message->contextID;
-               flags = mapi_req->u.mapi_SubmitMessage.SubmitFlags;
-               mapistore_submitmessage(emsmdbp_ctx->mstore_ctx, contextID, messageID, flags);
-               mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, messageID);
-               break;
-       }
-
- end:
-       *size += libmapiserver_RopSubmitMessage_size(mapi_repl);
-
-       return MAPI_E_SUCCESS;
-}
-
-/* Get the organisation name (like "First Organization") as a DN. */
-static bool mapiserver_get_org_dn(struct emsmdbp_context *emsmdbp_ctx,
-                                           struct ldb_dn **basedn)
-{
-       int                     ret;
-       struct ldb_result       *res = NULL;
-
-       ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res,
-                        ldb_get_config_basedn(emsmdbp_ctx->samdb_ctx),
-                         LDB_SCOPE_SUBTREE, NULL,
-                        "(|(objectClass=msExchOrganizationContainer))");
-
-       /* If the search failed */
-        if (ret != LDB_SUCCESS) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] mapiserver_get_org_dn ldb_search failure.\n"));
-               return false;
-        }
-        /* If we didn't get the expected entry */
-       if (res->count != 1) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] mapiserver_get_org_dn unexpected entry count: %i (expected 1).\n", res->count));
-               return false;
-       }
-       
-       *basedn = ldb_dn_new(emsmdbp_ctx, emsmdbp_ctx->samdb_ctx,
-                            ldb_msg_find_attr_as_string(res->msgs[0], "distinguishedName", NULL));
-       return true;
-}
-
-
-/**
-   \details EcDoRpc SetSpooler (0x47) Rop. This operation informs the
-   server that the client intends to act as a mail spooler
-   
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdbp provider context
-   \param mapi_req pointer to the SeSpooler EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the SetSpooler EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetSpooler(TALLOC_CTX *mem_ctx,
-                                              struct emsmdbp_context *emsmdbp_ctx,
-                                              struct EcDoRpc_MAPI_REQ *mapi_req,
-                                              struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                              uint32_t *handles, uint16_t *size)
-{
-       DEBUG(4, ("exchange_emsmdb: [OXOMSG] SetSpooler (0x47)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       /* TODO: actually implement related server-side behavior */
-
-       *size += libmapiserver_RopSetSpooler_size(NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc GetAddressTypes (0x49) Rop. This operation gets
-   the valid address types (e.g. "SMTP", "X400", "EX")
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the AddressTypes EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the AddressTypes EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetAddressTypes(TALLOC_CTX *mem_ctx,
-                                                   struct emsmdbp_context *emsmdbp_ctx,
-                                                   struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                   struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                   uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval = MAPI_E_SUCCESS;
-       int                     ret;
-       struct ldb_result       *res = NULL;
-       const char * const      attrs[] = { "msExchTemplateRDNs", NULL };
-        uint32_t                j;
-       struct ldb_dn           *basedn = 0;
-       
-       DEBUG(4, ("exchange_emsmdb: [OXOMSG] AddressTypes (0x49)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mapiserver_get_org_dn(emsmdbp_ctx, &basedn);
-       ldb_dn_add_child_fmt(basedn, "CN=ADDRESSING");
-       ldb_dn_add_child_fmt(basedn, "CN=ADDRESS-TEMPLATES");
-
-       ret = ldb_search(emsmdbp_ctx->samdb_ctx, emsmdbp_ctx, &res, basedn,
-                         LDB_SCOPE_SUBTREE, attrs, "CN=%x", emsmdbp_ctx->userLanguage);
-        /* If the search failed */
-        if (ret != LDB_SUCCESS) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] AddressTypes ldb_search failure.\n"));
-               return MAPI_E_CORRUPT_STORE;
-        }
-        /* If we didn't get the expected entry */
-       if (res->count != 1) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] AddressTypes unexpected entry count: %i (expected 1).\n", res->count));
-               return MAPI_E_CORRUPT_STORE;
-       }
-       /* If we didn't get the expected number of elements in our record */
-       if (res->msgs[0]->num_elements != 1) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] AddressTypes unexpected element count: %i (expected 1).\n", res->msgs[0]->num_elements));
-               return MAPI_E_CORRUPT_STORE;
-       }
-       /* If we didn't get at least one address type, things are probably bad. It _could_ be allowable though. */
-       if (res->msgs[0]->elements[0].num_values < 1) {
-               DEBUG(1, ("exchange_emsmdb: [OXOMSG] AddressTypes unexpected values count: %i (expected 1).\n", res->msgs[0]->num_elements));
-       }
-
-       /* If we got to here, it looks sane. Build the reply message. */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = retval;
-       mapi_repl->u.mapi_AddressTypes.cValues = res->msgs[0]->elements[0].num_values;
-       mapi_repl->u.mapi_AddressTypes.size = 0;
-       mapi_repl->u.mapi_AddressTypes.transport = talloc_array(mem_ctx, struct mapi_LPSTR, mapi_repl->u.mapi_AddressTypes.cValues);
-       for (j = 0; j < mapi_repl->u.mapi_AddressTypes.cValues; ++j) {
-               const char *addr_type;
-               addr_type = (const char *)res->msgs[0]->elements[0].values[j].data;
-               mapi_repl->u.mapi_AddressTypes.transport[j].lppszA = talloc_asprintf(mem_ctx, "%s", addr_type);
-               mapi_repl->u.mapi_AddressTypes.size += (strlen(mapi_repl->u.mapi_AddressTypes.transport[j].lppszA) + 1);
-       }
-       *size += libmapiserver_RopGetAddressTypes_size(mapi_repl);
-
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return retval;
-}
-
-
-/**
-   \details EcDoRpc OptionsData (0x6f) Rop. This doesn't really do anything,
-   but could be used to provide HelpData if we wanted to do something like that
-   later.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the OptionsData EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the OptionsData EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopOptionsData(TALLOC_CTX *mem_ctx,
-                                               struct emsmdbp_context *emsmdbp_ctx,
-                                               struct EcDoRpc_MAPI_REQ *mapi_req,
-                                               struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                               uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval = MAPI_E_SUCCESS;
-
-       DEBUG(4, ("exchange_emsmdb: [OXOMSG] OptionsData (0x6f)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-       
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = retval;
-       mapi_repl->u.mapi_OptionsData.Reserved = 0x00;
-       mapi_repl->u.mapi_OptionsData.OptionsInfo.cb = 0x0000;
-       mapi_repl->u.mapi_OptionsData.OptionsInfo.lpb = talloc_array(mem_ctx, uint8_t, mapi_repl->u.mapi_OptionsData.OptionsInfo.cb);
-       mapi_repl->u.mapi_OptionsData.HelpFileSize = 0x0000;
-       mapi_repl->u.mapi_OptionsData.HelpFile = talloc_array(mem_ctx, uint8_t, mapi_repl->u.mapi_OptionsData.HelpFileSize);
-
-       *size += libmapiserver_RopOptionsData_size(mapi_repl);
-
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return retval;
-}
-
-/**
-   \details EcDoRpc GetTransportFolder (0x6d) ROP.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetTransportFolder EcDoRpc_MAPI_REQ
-   \param mapi_repl pointer to the GetTransportFolder EcDoRpc_MAPI_REPL
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetTransportFolder(TALLOC_CTX *mem_ctx,
-                                                      struct emsmdbp_context *emsmdbp_ctx,
-                                                      struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                      struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                      uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval = MAPI_E_SUCCESS;
-
-       DEBUG(4, ("exchange_emsmdb: [OXOMSG] GetTransportFolder (0x6d)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* TODO: check if the login is a valid (private?) login */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = retval;
-       /* TODO: find the real FID */
-       mapi_repl->u.mapi_GetTransportFolder.FolderId = 0x12345678;
-
-       *size += libmapiserver_RopGetTransportFolder_size(mapi_repl);
-
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-       return retval;
-}
-
diff --git a/branches/plugfest/mapiproxy/servers/default/emsmdb/oxorule.c b/branches/plugfest/mapiproxy/servers/default/emsmdb/oxorule.c
deleted file mode 100644 (file)
index ca66163..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-   OpenChange Server implementation
-
-   EMSMDBP: EMSMDB Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file oxctabl.c
-
-   \brief E-mail rules object routines and Rops
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include "mapiproxy/libmapiserver/libmapiserver.h"
-#include "dcesrv_exchange_emsmdb.h"
-
-
-/**
-   \details EcDoRpc GetRulesTable (0x3f) Rop. This operation gets the
-   rules table of a folder.
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the GetRulesTable EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the GetRulesTable EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetRulesTable(TALLOC_CTX *mem_ctx,
-                                                 struct emsmdbp_context *emsmdbp_ctx,
-                                                 struct EcDoRpc_MAPI_REQ *mapi_req,
-                                                 struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                                 uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *parent;
-       struct mapi_handles     *rec;
-       struct emsmdbp_object   *object;
-       void                    *data = NULL;
-       uint32_t                handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXORULE] GetRulesTable (0x3f)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Ensure parent handle references a folder object */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Initialize default GetRulesTable reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->u.mapi_GetRulesTable.handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *) data;
-       if (!object || object->type != EMSMDBP_OBJECT_FOLDER) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &rec);
-       handles[mapi_repl->handle_idx] = rec->handle;
-
-end:
-       *size += libmapiserver_RopGetRulesTable_size();
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details EcDoRpc ModifyRules (0x41) Rop. This operation modifies
-   the rules associated with a folder
-
-
-   \param mem_ctx pointer to the memory context
-   \param emsmdbp_ctx pointer to the emsmdb provider context
-   \param mapi_req pointer to the ModifyRules EcDoRpc_MAPI_REQ
-   structure
-   \param mapi_repl pointer to the ModifyRules EcDoRpc_MAPI_REPL
-   structure
-   \param handles pointer to the MAPI handles array
-   \param size pointer to the mapi_response size to update
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS EcDoRpc_RopModifyRules(TALLOC_CTX *mem_ctx,
-                                               struct emsmdbp_context *emsmdbp_ctx,
-                                               struct EcDoRpc_MAPI_REQ *mapi_req,
-                                               struct EcDoRpc_MAPI_REPL *mapi_repl,
-                                               uint32_t *handles, uint16_t *size)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_handles     *parent;
-       struct emsmdbp_object   *object;
-       void                    *data = NULL;
-       uint32_t                handle;
-
-       DEBUG(4, ("exchange_emsmdb: [OXORULE] ModifyRules (0x41)\n"));
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Ensure parent handle references a folder object */
-       handle = handles[mapi_req->handle_idx];
-       retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &parent);
-       OPENCHANGE_RETVAL_IF(retval, retval, NULL);
-
-       /* Initialize default ModifyRules reply */
-       mapi_repl->opnum = mapi_req->opnum;
-       mapi_repl->handle_idx = mapi_req->handle_idx;
-       mapi_repl->error_code = MAPI_E_SUCCESS;
-
-       mapi_handles_get_private_data(parent, &data);
-       object = (struct emsmdbp_object *) data;
-       if (!object || object->type != EMSMDBP_OBJECT_FOLDER) {
-               mapi_repl->error_code = MAPI_E_NOT_FOUND;
-               goto end;
-       }
-
-       handles[mapi_repl->handle_idx] = handles[mapi_req->handle_idx];
-
-end:
-       *size += libmapiserver_RopModifyRules_size();
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c b/branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c
deleted file mode 100644 (file)
index adc4a36..0000000
+++ /dev/null
@@ -1,1164 +0,0 @@
-/*
-   MAPI Proxy - Exchange NSPI Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009-2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file dcesrv_exchange_nsp.c
-
-   \brief OpenChange NSPI Server implementation
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_nsp.h"
-
-struct exchange_nsp_session    *nsp_session = NULL;
-TDB_CONTEXT                    *emsabp_tdb_ctx = NULL;
-
-/**
-   \details exchange_nsp NspiBind (0x0) function, Initiates a NSPI
-   session with the client.
-
-   This function checks if the user is an Exchange user and input
-   parameters like codepage are valid. If it passes the tests, the
-   function initializes an emsabp context and returns to the client a
-   valid policy_handle and expected reply parameters.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiBind call structure
-
-   \return MAPI_E_SUCCESS on success, otherwise a MAPI error
- */
-static enum MAPISTATUS dcesrv_NspiBind(struct dcesrv_call_state *dce_call,
-                                      TALLOC_CTX *mem_ctx,
-                                      struct NspiBind *r)
-{
-       struct GUID                     *guid = (struct GUID *) NULL;
-       struct emsabp_context           *emsabp_ctx;
-       struct dcesrv_handle            *handle;
-       struct policy_handle            wire_handle;
-       struct exchange_nsp_session     *session;
-       bool                            found = false;
-
-       DEBUG(5, ("exchange_nsp: NspiBind (0x0)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-
-               wire_handle.handle_type = EXCHANGE_HANDLE_NSP;
-               wire_handle.uuid = GUID_zero();
-               *r->out.handle = wire_handle;
-
-               r->out.mapiuid = r->in.mapiuid;
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;             
-       }
-
-       /* Step 1. Initialize the emsabp context */
-       emsabp_ctx = emsabp_init(dce_call->conn->dce_ctx->lp_ctx, emsabp_tdb_ctx);
-       if (!emsabp_ctx) {
-               smb_panic("unable to initialize emsabp context");
-               OPENCHANGE_RETVAL_IF(!emsabp_ctx, MAPI_E_FAILONEPROVIDER, NULL);
-       }
-
-       /* Step 2. Check if incoming user belongs to the Exchange organization */
-       if (emsabp_verify_user(dce_call, emsabp_ctx) == false) {
-               talloc_free(emsabp_ctx);
-
-               wire_handle.handle_type = EXCHANGE_HANDLE_NSP;
-               wire_handle.uuid = GUID_zero();
-               *r->out.handle = wire_handle;
-
-               r->out.mapiuid = r->in.mapiuid;
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 3. Check if valid cpID has been supplied */
-       if (emsabp_verify_codepage(emsabp_ctx, r->in.pStat->CodePage) == false) {
-               talloc_free(emsabp_ctx);
-
-               wire_handle.handle_type = EXCHANGE_HANDLE_NSP;
-               wire_handle.uuid = GUID_zero();
-               *r->out.handle = wire_handle;
-
-               r->out.mapiuid = r->in.mapiuid;
-               r->out.result = MAPI_E_UNKNOWN_CPID;
-               return MAPI_E_UNKNOWN_CPID;
-       }
-
-       /* Step 4. Retrieve OpenChange server GUID */
-       guid = (struct GUID *) samdb_ntds_objectGUID(emsabp_ctx->samdb_ctx);
-       OPENCHANGE_RETVAL_IF(!guid, MAPI_E_FAILONEPROVIDER, emsabp_ctx);
-
-       /* Step 5. Fill NspiBind reply */
-       handle = dcesrv_handle_new(dce_call->context, EXCHANGE_HANDLE_NSP);
-       OPENCHANGE_RETVAL_IF(!handle, MAPI_E_NOT_ENOUGH_RESOURCES, emsabp_ctx);
-
-       handle->data = (void *) emsabp_ctx;
-       *r->out.handle = handle->wire_handle;
-       r->out.mapiuid = guid;
-       r->out.result = MAPI_E_SUCCESS;
-
-       /* Search for an existing session and increment ref_count, otherwise create it */
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call) == true)) {
-                       mpm_session_increment_ref_count(session->session);
-                       found = true;
-                       break;
-               }
-       }
-
-       if (found == false) {
-               /* Step 6. Associate this emsabp context to the session */
-               session = talloc((TALLOC_CTX *)nsp_session, struct exchange_nsp_session);
-               OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_ENOUGH_RESOURCES, emsabp_ctx);
-
-               DEBUG(0, ("Creating new session\n"));
-               session->session = mpm_session_init((TALLOC_CTX *)nsp_session, dce_call);
-               OPENCHANGE_RETVAL_IF(!session->session, MAPI_E_NOT_ENOUGH_RESOURCES, emsabp_ctx);
-
-               mpm_session_set_private_data(session->session, (void *) emsabp_ctx);
-               mpm_session_set_destructor(session->session, emsabp_destructor);
-
-               DLIST_ADD_END(nsp_session, session, struct exchange_nsp_session *);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_nsp NspiUnbind (0x1) function, Terminates a NSPI
-   session with the client
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiUnbind call structure
- */
-static enum MAPISTATUS dcesrv_NspiUnbind(struct dcesrv_call_state *dce_call,
-                                        TALLOC_CTX *mem_ctx,
-                                        struct NspiUnbind *r)
-{
-       struct dcesrv_handle            *h;
-       struct exchange_nsp_session     *session;
-       bool                            ret;
-
-       DEBUG(5, ("exchange_nsp: NspiUnbind (0x1)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 1. Retrieve handle and free if emsabp context and session are available */
-       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
-       if (h) {
-               for (session = nsp_session; session; session = session->next) {
-                       if ((mpm_session_cmp(session->session, dce_call) == true)) {
-                               ret = mpm_session_release(session->session);
-                               if (ret == true) {
-                                       DLIST_REMOVE(nsp_session, session);
-                                       DEBUG(0, ("[%s:%d]: Session found and released\n", 
-                                                 __FUNCTION__, __LINE__));
-                               } else {
-                                       DEBUG(0, ("[%s:%d]: Session found and ref_count decreased\n",
-                                                 __FUNCTION__, __LINE__));
-                               }
-                               break;
-                       }
-               }
-       }
-
-       r->out.result = (enum MAPISTATUS) 1;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_nsp NspiUpdateStat (0x2) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiUpdateStat request data
-
-   \return MAPI_E_SUCCESS on success
-*/
-static enum MAPISTATUS dcesrv_NspiUpdateStat(struct dcesrv_call_state *dce_call, 
-                                            TALLOC_CTX *mem_ctx,
-                                            struct NspiUpdateStat *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiUpdateStat (0x2) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiQueryRows (0x3) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiQueryRows request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiQueryRows(struct dcesrv_call_state *dce_call,
-                                           TALLOC_CTX *mem_ctx,
-                                           struct NspiQueryRows *r)
-{
-       enum MAPISTATUS                 retval = MAPI_E_SUCCESS;
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       struct SPropTagArray            *pPropTags;
-       struct SRowSet                  *pRows;
-       uint32_t                        i;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_nsp: NspiQueryRows (0x3)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Step 1. Sanity Checks (MS-NSPI Server Processing Rules) */
-       if (r->in.pStat->ContainerID && (emsabp_tdb_lookup_MId(emsabp_ctx->tdb_ctx, r->in.pStat->ContainerID) == false)) {
-               retval = MAPI_E_INVALID_BOOKMARK;
-               goto failure;
-       }
-
-       if (r->in.pPropTags == NULL) {
-               pPropTags = set_SPropTagArray(mem_ctx, 0x7,
-                                             PR_EMS_AB_CONTAINERID,
-                                             PR_OBJECT_TYPE,
-                                             PR_DISPLAY_TYPE,
-                                             PR_DISPLAY_NAME,
-                                             PR_OFFICE_TELEPHONE_NUMBER,
-                                             PR_COMPANY_NAME,
-                                             PR_OFFICE_LOCATION);
-       } else {
-               pPropTags = r->in.pPropTags;
-       }
-
-       /* Allocate RowSet to be filled in */
-       pRows = talloc_zero(mem_ctx, struct SRowSet);
-
-       /* Step 2. Fill ppRows  */
-       if (r->in.lpETable == NULL) {
-               /* Step 2.1 Fill ppRows for supplied Container ID */
-               struct ldb_result       *ldb_res;
-               
-               retval = emsabp_ab_container_enum(mem_ctx, emsabp_ctx,
-                                                 r->in.pStat->ContainerID, &ldb_res);
-               if (!MAPI_STATUS_IS_OK(retval))  {
-                       goto failure;
-               }
-               if (ldb_res->count) {
-                       pRows->cRows = ldb_res->count;
-                       pRows->aRow = talloc_array(mem_ctx, struct SRow, ldb_res->count);
-               }
-
-               /* fetch required attributes for every entry found */
-               for (i = 0; i < ldb_res->count; i++) {
-                       retval = emsabp_fetch_attrs_from_msg(mem_ctx, emsabp_ctx, &(pRows->aRow[i]),
-                                                            ldb_res->msgs[i], 0, r->in.dwFlags, pPropTags);
-                       if (!MAPI_STATUS_IS_OK(retval)) {
-                               goto failure;
-                       }
-               }
-       } else {
-               /* Step 2.2 Fill ppRows for supplied table of MIds */
-               pRows->cRows = r->in.dwETableCount;
-               pRows->aRow = talloc_array(mem_ctx, struct SRow, r->in.dwETableCount);
-               for (i = 0; i < r->in.dwETableCount; i++) {
-                       retval = emsabp_fetch_attrs(mem_ctx, emsabp_ctx, &(pRows->aRow[i]), r->in.lpETable[i], r->in.dwFlags, pPropTags);
-                       if (retval != MAPI_E_SUCCESS) {
-                               goto failure;
-                       }
-               }
-       }
-
-       /* Step 3. Fill output params */
-       *r->out.ppRows = pRows;
-
-       memcpy(r->out.pStat, r->in.pStat, sizeof (struct STAT));
-       r->out.pStat->TotalRecs = pRows->cRows;
-       r->out.pStat->NumPos = r->out.pStat->Delta + pRows->cRows;
-       r->out.pStat->CurrentRec = MID_END_OF_TABLE;
-
-       return MAPI_E_SUCCESS;
-
-failure:
-       r->out.pStat = r->in.pStat;
-       *r->out.ppRows = NULL;
-       r->out.result = retval;
-
-       return retval;
-}
-
-
-/**
-   \details exchange_nsp NspiSeekEntries (0x4) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiSeekEntries request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiSeekEntries(struct dcesrv_call_state *dce_call,
-                                             TALLOC_CTX *mem_ctx,
-                                             struct NspiSeekEntries *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiSeekEntries (0x4) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiGetMatches (0x5) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetMatches request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiGetMatches(struct dcesrv_call_state *dce_call,
-                                            TALLOC_CTX *mem_ctx,
-                                            struct NspiGetMatches *r)
-{
-       enum MAPISTATUS                 retval;
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       struct SPropTagArray            *ppOutMIds = NULL;
-       uint32_t                        i;
-       bool                            found = false;
-       
-
-       DEBUG(3, ("exchange_nsp: NspiGetMatches (0x5)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Step 1. Retrieve MIds array given search criterias */
-       ppOutMIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       ppOutMIds->cValues = 0;
-       ppOutMIds->aulPropTag = NULL;
-
-       retval = emsabp_search(mem_ctx, emsabp_ctx, ppOutMIds, r->in.Filter, r->in.pStat, r->in.ulRequested);
-       if (retval != MAPI_E_SUCCESS) {
-       failure:
-               r->out.pStat = r->in.pStat;
-               *r->out.ppOutMIds = ppOutMIds;  
-               r->out.ppRows = talloc(mem_ctx, struct SRowSet *);
-               r->out.ppRows[0] = NULL;
-               r->out.result = retval;
-               
-               return retval;
-       }
-
-       *r->out.ppOutMIds = ppOutMIds;
-
-       /* Step 2. Retrieve requested properties for these MIds */
-       r->out.ppRows = talloc_zero(mem_ctx, struct SRowSet *);
-       r->out.ppRows[0] = talloc_zero(mem_ctx, struct SRowSet);
-       r->out.ppRows[0]->cRows = ppOutMIds->cValues;
-       r->out.ppRows[0]->aRow = talloc_array(mem_ctx, struct SRow, ppOutMIds->cValues);
-       
-
-       for (i = 0; i < ppOutMIds->cValues; i++) {
-               retval = emsabp_fetch_attrs(mem_ctx, emsabp_ctx, &(r->out.ppRows[0]->aRow[i]), 
-                                           ppOutMIds->aulPropTag[i], fEphID, r->in.pPropTags);
-               if (retval) goto failure;
-       }
-
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_nsp NspiResortRestriction (0x6) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiResortRestriction request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiResortRestriction(struct dcesrv_call_state *dce_call,
-                                                   TALLOC_CTX *mem_ctx,
-                                                   struct NspiResortRestriction *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiResortRestriction (0x6) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiDNToMId (0x7) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiDNToMId request data
-
-   \note Only searches within configuration.ldb are supported at the
-   moment.
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiDNToMId(struct dcesrv_call_state *dce_call,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct NspiDNToMId *r)
-{
-       enum MAPISTATUS                 retval;
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       struct ldb_message              *msg;
-       uint32_t                        i;
-       uint32_t                        MId;
-       const char                      *dn;
-       bool                            pbUseConfPartition;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_nsp: NspiDNToMId (0x7)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-       
-       r->out.ppMIds = talloc_array(mem_ctx, struct SPropTagArray *, 2);
-       r->out.ppMIds[0] = talloc_zero(mem_ctx, struct SPropTagArray);
-       r->out.ppMIds[0]->cValues = r->in.pNames->Count;
-       r->out.ppMIds[0]->aulPropTag = (enum MAPITAGS *) talloc_array(mem_ctx, uint32_t, r->in.pNames->Count);
-
-       for (i = 0; i < r->in.pNames->Count; i++) {
-               /* Step 1. Check if the input legacyDN exists */
-         retval = emsabp_search_legacyExchangeDN(emsabp_ctx, r->in.pNames->Strings[i], &msg, &pbUseConfPartition);
-               if (retval != MAPI_E_SUCCESS) {
-                 r->out.ppMIds[0]->aulPropTag[i] = (enum MAPITAGS) 0;
-               } else {
-                       TDB_CONTEXT *tdb_ctx = (pbUseConfPartition ? emsabp_ctx->tdb_ctx : emsabp_ctx->ttdb_ctx);
-                       dn = ldb_msg_find_attr_as_string(msg, "distinguishedName", NULL);
-                       retval = emsabp_tdb_fetch_MId(tdb_ctx, dn, &MId);
-                       if (retval) {
-                               retval = emsabp_tdb_insert(tdb_ctx, dn);
-                               retval = emsabp_tdb_fetch_MId(tdb_ctx, dn, &MId);
-                       }
-                       r->out.ppMIds[0]->aulPropTag[i] = (enum MAPITAGS) MId;
-               }
-       }
-
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_nsp NspiGetPropList (0x8) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetPropList request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiGetPropList(struct dcesrv_call_state *dce_call,
-                                             TALLOC_CTX *mem_ctx,
-                                             struct NspiGetPropList *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiGetPropList (0x8) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiGetProps (0x9) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetProps request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_NspiGetProps(struct dcesrv_call_state *dce_call,
-                                          TALLOC_CTX *mem_ctx,
-                                          struct NspiGetProps *r)
-{
-       enum MAPISTATUS                 retval;
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       uint32_t                        MId;
-       uint32_t                        i;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_nsp: NspiGetProps (0x9)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       MId = r->in.pStat->CurrentRec;
-       
-       /* Step 1. Sanity Checks (MS-NSPI Server Processing Rules) */
-       if (r->in.pStat->ContainerID && (emsabp_tdb_lookup_MId(emsabp_ctx->tdb_ctx, r->in.pStat->ContainerID) == false)) {
-               retval = MAPI_E_INVALID_BOOKMARK;
-               r->out.result = retval;
-               return retval;
-       }
-
-       /* Step 2. Fetch properties */
-       r->out.ppRows = talloc_array(mem_ctx, struct SRow *, 2);
-       r->out.ppRows[0] = talloc_zero(r->out.ppRows, struct SRow);
-       r->out.ppRows[0]->ulAdrEntryPad = 0;
-
-       retval = emsabp_fetch_attrs(mem_ctx, emsabp_ctx, r->out.ppRows[0], MId, r->in.dwFlags, r->in.pPropTags);
-       if (retval != MAPI_E_SUCCESS) {
-               /* Is MId is not found, proceed as if no attributes were found */
-               if (retval == MAPI_E_INVALID_BOOKMARK) {
-                       uint32_t        ulPropTag;
-                       struct SRow     *aRow;
-                       
-                       aRow = r->out.ppRows[0];
-                       aRow->ulAdrEntryPad = 0x0;
-                       aRow->cValues = r->in.pPropTags->cValues;
-                       aRow->lpProps = talloc_array(mem_ctx, struct SPropValue, aRow->cValues);
-                       for (i = 0; i < aRow->cValues; i++) {
-                               ulPropTag = r->in.pPropTags->aulPropTag[i];
-                               ulPropTag = (ulPropTag & 0xFFFF0000) | PT_ERROR;
-
-                               aRow->lpProps[i].ulPropTag = (enum MAPITAGS) ulPropTag;
-                               aRow->lpProps[i].dwAlignPad = 0x0;
-                               set_SPropValue(&(aRow->lpProps[i]), NULL);
-                       }
-                       retval = MAPI_W_ERRORS_RETURNED;
-               } else {
-                       talloc_free(r->out.ppRows);
-                       r->out.ppRows = NULL;
-               }
-               r->out.result = retval;
-               return r->out.result;
-       }
-
-       /* Step 3. Properties are fetched. Provide proper return
-        value.  ErrorsReturned should be returned when at least one
-        property is not found */
-       for (i = 0; i < r->out.ppRows[0]->cValues; i++) {
-               if ((r->out.ppRows[0]->lpProps[i].ulPropTag & 0xFFFF) == PT_ERROR) {
-                       retval = MAPI_W_ERRORS_RETURNED;
-                       break;
-               }
-       }
-
-       r->out.result = retval;
-       return retval;
-}
-
-
-/**
-   \details exchange_nsp NspiCompareMIds (0xA) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiCompareMIds request data
-
-   \return MAPI_E_SUCCESS on success
-*/
-static enum MAPISTATUS dcesrv_NspiCompareMIds(struct dcesrv_call_state *dce_call,
-                                             TALLOC_CTX *mem_ctx,
-                                             struct NspiCompareMIds *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiCompareMIds (0xA) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiModProps (0xB) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiModProps request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiModProps(struct dcesrv_call_state *dce_call,
-                                          TALLOC_CTX *mem_ctx,
-                                          struct NspiModProps *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiModProps (0xB) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiGetSpecialTable (0xC) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetSpecialTable request data
-
-   \note MS-NSPI specifies lpVersion "holds the value of the version
-   number of the hierarchy table that the client has." We will ignore
-   this for the moment.
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiGetSpecialTable(struct dcesrv_call_state *dce_call,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 struct NspiGetSpecialTable *r)
-{
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       bool                            found = false;
-
-       DEBUG(3, ("exchange_nsp: NspiGetSpecialTable (0xC)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Step 1. (FIXME) We arbitrary set lpVersion to 0x1 */
-       r->out.lpVersion = talloc_zero(mem_ctx, uint32_t);
-       *r->out.lpVersion = 0x1;
-
-       /* Step 2. Allocate output SRowSet and call associated emsabp function */
-       r->out.ppRows = talloc_zero(mem_ctx, struct SRowSet *);
-       OPENCHANGE_RETVAL_IF(!r->out.ppRows, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-       r->out.ppRows[0] = talloc_zero(mem_ctx, struct SRowSet);
-       OPENCHANGE_RETVAL_IF(!r->out.ppRows[0], MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-
-       switch (r->in.dwFlags) {
-       case NspiAddressCreationTemplates:
-       case NspiAddressCreationTemplates|NspiUnicodeStrings:
-               DEBUG(0, ("CreationTemplates Table requested\n"));
-               r->out.result = emsabp_get_CreationTemplatesTable(mem_ctx, emsabp_ctx, r->in.dwFlags, r->out.ppRows);
-               break;
-       case NspiUnicodeStrings:
-       case 0x0:
-               DEBUG(0, ("Hierarchy Table requested\n"));
-               r->out.result = emsabp_get_HierarchyTable(mem_ctx, emsabp_ctx, r->in.dwFlags, r->out.ppRows);
-               break;
-       default:
-               talloc_free(r->out.ppRows);
-               talloc_free(r->out.ppRows[0]);
-               return MAPI_E_NO_SUPPORT;
-       }
-
-       return r->out.result;
-}
-
-
-/**
-   \details exchange_nsp NspiGetTemplateInfo (0xD) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetTemplateInfo request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiGetTemplateInfo(struct dcesrv_call_state *dce_call,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 struct NspiGetTemplateInfo *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiGetTemplateInfo (0xD) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiModLinkAtt (0xE) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiModLinkAtt request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiModLinkAtt(struct dcesrv_call_state *dce_call,
-                                            TALLOC_CTX *mem_ctx,
-                                            struct NspiModLinkAtt *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiModLinkAtt (0xE) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiDeleteEntries (0xF) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiDeleteEntries request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiDeleteEntries(struct dcesrv_call_state *dce_call,
-                                               TALLOC_CTX *mem_ctx,
-                                               struct NspiDeleteEntries *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiDeleteEntries (0xF) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiQueryColumns (0x10) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiQueryColumns request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiQueryColumns(struct dcesrv_call_state *dce_call,
-                                              TALLOC_CTX *mem_ctx,
-                                              struct NspiQueryColumns *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiQueryColumns (0x10) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiGetNamesFromIDs (0x11) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetNamesFromIDs request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiGetNamesFromIDs(struct dcesrv_call_state *dce_call,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 struct NspiGetNamesFromIDs *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiGetNamesFromIDs (0x11) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiGetIDsFromNames (0x12) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiGetIDsFromNames request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiGetIDsFromNames(struct dcesrv_call_state *dce_call,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 struct NspiGetIDsFromNames *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiGetIDsFromNames (0x12) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiResolveNames (0x13) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiResolveNames request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiResolveNames(struct dcesrv_call_state *dce_call,
-                                              TALLOC_CTX *mem_ctx,
-                                              struct NspiResolveNames *r)
-{
-       DEBUG(3, ("exchange_nsp: NspiResolveNames (0x13) not implemented\n"));
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/**
-   \details exchange_nsp NspiResolveNamesW (0x14) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the NspiResolveNamesW request data
-
-   \return MAPI_E_SUCCESS on success
-
- */
-static enum MAPISTATUS dcesrv_NspiResolveNamesW(struct dcesrv_call_state *dce_call,
-                                               TALLOC_CTX *mem_ctx,
-                                               struct NspiResolveNamesW *r)
-{
-       enum MAPISTATUS                 retval = MAPI_E_SUCCESS;
-       struct exchange_nsp_session     *session;
-       struct emsabp_context           *emsabp_ctx = NULL;
-       struct ldb_message              *ldb_msg_ab;
-       struct SPropTagArray            *pPropTags;
-       const char                      *purportedSearch;
-       struct PropertyTagArray_r       *pMIds = NULL;
-       struct SRowSet                  *pRows = NULL;
-       struct WStringsArray_r          *paWStr;
-       uint32_t                        i;
-       int                             ret;
-       bool                            found = false;
-       const char * const              recipient_attrs[] = { "*", NULL };
-       const char * const              search_attr[] = { "mailNickName", "mail", "name", 
-                                                         "displayName", "givenName", "sAMAccountName" };
-
-       DEBUG(3, ("exchange_nsp: NspiResolveNamesW (0x14)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp(session->session, dce_call)) == true) {
-                       emsabp_ctx = (struct emsabp_context *)session->session->private_data;
-                       found = true;
-               }
-       }
-
-       OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
-
-       /* Step 1. Prepare in/out data */
-       retval = emsabp_ab_container_by_id(mem_ctx, emsabp_ctx, r->in.pStat->ContainerID, &ldb_msg_ab);
-       OPENCHANGE_RETVAL_IF(!MAPI_STATUS_IS_OK(retval), MAPI_E_INVALID_BOOKMARK, NULL);
-
-       purportedSearch = ldb_msg_find_attr_as_string(ldb_msg_ab, "purportedSearch", NULL);
-       OPENCHANGE_RETVAL_IF(!purportedSearch, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       /* Set default list of property tags if none were provided in input */
-       if (!r->in.pPropTags) {
-               pPropTags = set_SPropTagArray(mem_ctx, 0x7,
-                                             PR_EMS_AB_CONTAINERID,
-                                             PR_OBJECT_TYPE,
-                                             PR_DISPLAY_TYPE,
-                                             PR_DISPLAY_NAME,
-                                             PR_OFFICE_TELEPHONE_NUMBER,
-                                             PR_COMPANY_NAME,
-                                             PR_OFFICE_LOCATION);
-       } else {
-               pPropTags = r->in.pPropTags;
-       }
-
-       /* Allocate output MIds */
-       paWStr = r->in.paWStr;
-       pMIds = talloc(mem_ctx, struct PropertyTagArray_r);
-       pMIds->cValues = paWStr->Count;
-       pMIds->aulPropTag = talloc_array(mem_ctx, uint32_t, pMIds->cValues);
-       pRows = talloc(mem_ctx, struct SRowSet);
-       pRows->cRows = 0;
-       pRows->aRow = talloc_array(mem_ctx, struct SRow, pMIds->cValues);
-
-       /* Step 2. Fetch AB container records */
-       for (i = 0; i < paWStr->Count; i++) {
-               struct ldb_result       *ldb_res;
-               char                    *filter = talloc_strdup(mem_ctx, "");
-               uint32_t                j;
-
-               /* Build search filter */
-               for (j = 0; j < ARRAY_SIZE(search_attr); j++) {
-                       char    *attr_filter = talloc_asprintf(mem_ctx, "(%s=%s)", search_attr[j], paWStr->Strings[i]);
-                       filter = talloc_strdup_append(filter, attr_filter);
-                       talloc_free(attr_filter);
-               }
-
-               /* Search AD */
-               filter = talloc_asprintf(mem_ctx, "(&%s(|%s))", purportedSearch, filter);
-               ret = ldb_search(emsabp_ctx->samdb_ctx, mem_ctx, &ldb_res,
-                                ldb_get_default_basedn(emsabp_ctx->samdb_ctx),
-                                LDB_SCOPE_SUBTREE, recipient_attrs, "%s", filter);
-
-               /* Determine name resolutation status and fetch object upon success */
-               if (ret != LDB_SUCCESS || ldb_res->count == 0) {
-                       pMIds->aulPropTag[i] = MAPI_UNRESOLVED;
-               } else if (ldb_res->count > 1) {
-                       pMIds->aulPropTag[i] = MAPI_AMBIGUOUS;
-               } else {
-                       pMIds->aulPropTag[i] = MAPI_RESOLVED;
-                       emsabp_fetch_attrs_from_msg(mem_ctx, emsabp_ctx, &pRows->aRow[pRows->cRows],
-                                                   ldb_res->msgs[0], 0, 0, pPropTags);
-                       pRows->cRows++;
-               }
-       }
-
-       *r->out.ppMIds = pMIds;
-       if (pRows->cRows) {
-               *r->out.ppRows = pRows;
-       }
-
-       r->out.result = retval;
-       return retval;
-}
-
-
-/**
-   \details Dispatch incoming NSPI call to the correct OpenChange
-   server function.
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r generic pointer on NSPI data
-   \param mapiproxy pointer to the mapiproxy structure controlling 
-   mapiproxy behavior
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS dcesrv_exchange_nsp_dispatch(struct dcesrv_call_state *dce_call,
-                                            TALLOC_CTX *mem_ctx,
-                                            void *r, struct mapiproxy *mapiproxy)
-{
-       enum MAPISTATUS                         retval;
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-
-       table = (const struct ndr_interface_table *) dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       /* Sanity checks */
-       if (!table) return NT_STATUS_UNSUCCESSFUL;
-       if (table->name && strcmp(table->name, NDR_EXCHANGE_NSP_NAME)) return NT_STATUS_UNSUCCESSFUL;
-
-       switch (opnum) {
-       case NDR_NSPIBIND:
-               retval = dcesrv_NspiBind(dce_call, mem_ctx, (struct NspiBind *)r);
-               break;
-       case NDR_NSPIUNBIND:
-               retval = dcesrv_NspiUnbind(dce_call, mem_ctx, (struct NspiUnbind *)r);
-               break;
-       case NDR_NSPIUPDATESTAT:
-               retval = dcesrv_NspiUpdateStat(dce_call, mem_ctx, (struct NspiUpdateStat *)r);
-               break;
-       case NDR_NSPIQUERYROWS:
-               retval = dcesrv_NspiQueryRows(dce_call, mem_ctx, (struct NspiQueryRows *)r);
-               break;
-       case NDR_NSPISEEKENTRIES:
-               retval = dcesrv_NspiSeekEntries(dce_call, mem_ctx, (struct NspiSeekEntries *)r);
-               break;
-       case NDR_NSPIGETMATCHES:
-               retval = dcesrv_NspiGetMatches(dce_call, mem_ctx, (struct NspiGetMatches *)r);
-               break;
-       case NDR_NSPIRESORTRESTRICTION:
-               retval = dcesrv_NspiResortRestriction(dce_call, mem_ctx, (struct NspiResortRestriction *)r);
-               break;
-       case NDR_NSPIDNTOMID:
-               retval = dcesrv_NspiDNToMId(dce_call, mem_ctx, (struct NspiDNToMId *)r);
-               break;
-       case NDR_NSPIGETPROPLIST:
-               retval = dcesrv_NspiGetPropList(dce_call, mem_ctx, (struct NspiGetPropList *)r);
-               break;
-       case NDR_NSPIGETPROPS:
-               retval = dcesrv_NspiGetProps(dce_call, mem_ctx, (struct NspiGetProps *)r);
-               break;
-       case NDR_NSPICOMPAREMIDS:
-               retval = dcesrv_NspiCompareMIds(dce_call, mem_ctx, (struct NspiCompareMIds *)r);
-               break;
-       case NDR_NSPIMODPROPS:
-               retval = dcesrv_NspiModProps(dce_call, mem_ctx, (struct NspiModProps *)r);
-               break;
-       case NDR_NSPIGETSPECIALTABLE:
-               retval = dcesrv_NspiGetSpecialTable(dce_call, mem_ctx, (struct NspiGetSpecialTable *)r);
-               break;
-       case NDR_NSPIGETTEMPLATEINFO:
-               retval = dcesrv_NspiGetTemplateInfo(dce_call, mem_ctx, (struct NspiGetTemplateInfo *)r);
-               break;
-       case NDR_NSPIMODLINKATT:
-               retval = dcesrv_NspiModLinkAtt(dce_call, mem_ctx, (struct NspiModLinkAtt *)r);
-               break;
-       case NDR_NSPIDELETEENTRIES:
-               retval = dcesrv_NspiDeleteEntries(dce_call, mem_ctx, (struct NspiDeleteEntries *)r);
-               break;
-       case NDR_NSPIQUERYCOLUMNS:
-               retval = dcesrv_NspiQueryColumns(dce_call, mem_ctx, (struct NspiQueryColumns *)r);
-               break;
-       case NDR_NSPIGETNAMESFROMIDS:
-               retval = dcesrv_NspiGetNamesFromIDs(dce_call, mem_ctx, (struct NspiGetNamesFromIDs *)r);
-               break;
-       case NDR_NSPIGETIDSFROMNAMES:
-               retval = dcesrv_NspiGetIDsFromNames(dce_call, mem_ctx, (struct NspiGetIDsFromNames *)r);
-               break;
-       case NDR_NSPIRESOLVENAMES:
-               retval = dcesrv_NspiResolveNames(dce_call, mem_ctx, (struct NspiResolveNames *)r);
-               break;
-       case NDR_NSPIRESOLVENAMESW:
-               retval = dcesrv_NspiResolveNamesW(dce_call, mem_ctx, (struct NspiResolveNamesW *)r);
-               break;
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the NSPI OpenChange server
-
-   \param dce_ctx pointer to the server context
-
-   \return NT_STATUS_OK on success, otherwise NT_STATUS_NO_MEMORY
- */
-static NTSTATUS dcesrv_exchange_nsp_init(struct dcesrv_context *dce_ctx)
-{
-       /* Initialize exchange_nsp session */
-       nsp_session = talloc_zero(dce_ctx, struct exchange_nsp_session);
-       if (!nsp_session) return NT_STATUS_NO_MEMORY;
-       nsp_session->session = NULL;
-
-       /* Open a read-write pointer on the EMSABP TDB database */
-       emsabp_tdb_ctx = emsabp_tdb_init((TALLOC_CTX *)dce_ctx, dce_ctx->lp_ctx);
-       if (!emsabp_tdb_ctx) {
-               smb_panic("unable to initialize EMSABP context");
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Terminates the NSPI connection and release the associated
-   session and context if still available. This case occurs when the
-   client doesn't call NspiUnbind but quit unexpectedly.
-
-   \param server_id reference to the server identifier structure
-   \param context_id the connection context identifier
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS dcesrv_exchange_nsp_unbind(struct server_id server_id, uint32_t context_id)
-{
-       struct exchange_nsp_session     *session;
-
-       for (session = nsp_session; session; session = session->next) {
-               if ((mpm_session_cmp_sub(session->session, server_id, context_id) == true)) {
-                       mpm_session_release(session->session);
-                       DLIST_REMOVE(nsp_session, session);
-                       DEBUG(6, ("[%s:%d]: Session found and released\n", __FUNCTION__, __LINE__));
-                       return NT_STATUS_OK;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Entry point for the default OpenChange NSPI server
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module server;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       server.name = "exchange_nsp";
-       server.status = MAPIPROXY_DEFAULT;
-       server.description = "OpenChange NSPI server";
-       server.endpoint = "exchange_nsp";
-
-       /* Fill in all the operations */
-       server.init = dcesrv_exchange_nsp_init;
-       server.unbind = dcesrv_exchange_nsp_unbind;
-       server.dispatch = dcesrv_exchange_nsp_dispatch;
-       server.push = NULL;
-       server.pull = NULL;
-       server.ndr_pull = NULL;
-
-       /* Register ourselves with the MAPIPROXY server subsystem */
-       ret = mapiproxy_server_register(&server);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'exchange_nsp' default mapiproxy server!\n"));
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.h b/branches/plugfest/mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.h
deleted file mode 100644 (file)
index 1bc3517..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-   MAPI Proxy - Exchange NSPI Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __DCESRV_EXCHANGE_NSP_H
-#define        __DCESRV_EXCHANGE_NSP_H
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include <ldb.h>
-#include <ldb_errors.h>
-#include <fcntl.h>
-#include <util/debug.h>
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-struct emsabp_context {
-       const char              *account_name;
-       struct loadparm_context *lp_ctx;
-       struct ldb_context      *samdb_ctx;
-       void                    *ldb_ctx;
-       TDB_CONTEXT             *tdb_ctx;
-       TDB_CONTEXT             *ttdb_ctx;
-       TALLOC_CTX              *mem_ctx;
-};
-
-
-struct exchange_nsp_session {
-       struct mpm_session              *session;
-       struct exchange_nsp_session     *prev;
-       struct exchange_nsp_session     *next;
-};
-
-
-struct emsabp_MId {
-       uint32_t        MId;
-       char            *dn;
-};
-
-/**
-   PermanentEntryID structure 
- */
-struct PermanentEntryID {
-       uint8_t                 ID_type;        /* constant: 0x0        */
-       uint8_t                 R1;             /* reserved: 0x0        */
-       uint8_t                 R2;             /* reserved: 0x0        */
-       uint8_t                 R3;             /* reserved: 0x0        */
-       struct FlatUID_r        ProviderUID;    /* constant: GUID_NSPI  */
-       uint32_t                R4;             /* constant: 0x1        */
-       uint32_t                DisplayType;    /* must match one of the existing Display Type value */
-       char                    *dn;            /* DN string representing the object GUID */
-};
-
-
-/**
-   EphemeralEntryID structure
- */
-struct EphemeralEntryID {
-       uint8_t                 ID_type;        /* constant: 0x87       */
-       uint8_t                 R1;             /* reserved: 0x0        */
-       uint8_t                 R2;             /* reserved: 0x0        */
-       uint8_t                 R3;             /* reserved: 0x0        */
-       struct FlatUID_r        ProviderUID;    /* NSPI server GUID     */
-       uint32_t                R4;             /* constant: 0x1        */
-       uint32_t                DisplayType;    /* must match one of the existing Display Type value */
-       uint32_t                MId;            /* MId of this object   */
-};
-
-#define        EMSABP_DN       "/guid=%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X"
-#define        EMSABP_ADDRTYPE "EX"
-
-/**
-   NSPI PR_CONTAINER_FLAGS values
- */
-#define        AB_RECIPIENTS           0x1
-#define        AB_SUBCONTAINERS        0x2
-#define        AB_UNMODIFIABLE         0x8
-
-#define        EMSABP_TDB_MID_START            0x1b28
-#define        EMSABP_TDB_TMP_MID_START        0x5000
-#define        EMSABP_TDB_DATA_REC             "MId_index"
-
-__BEGIN_DECLS
-
-NTSTATUS       samba_init_module(void);
-struct ldb_context *samdb_connect(TALLOC_CTX *, struct tevent_context *, struct loadparm_context *, struct auth_session_info *, int);
-const struct GUID *samdb_ntds_objectGUID(struct ldb_context *);
-
-/* definitions from emsabp.c */
-struct emsabp_context  *emsabp_init(struct loadparm_context *, TDB_CONTEXT *);
-bool                   emsabp_destructor(void *);
-enum MAPISTATUS                emsabp_get_account_info(TALLOC_CTX *, struct emsabp_context *, const char *, struct ldb_message **);
-bool                   emsabp_verify_user(struct dcesrv_call_state *, struct emsabp_context *);
-bool                   emsabp_verify_codepage(struct emsabp_context *, uint32_t);
-bool                   emsabp_verify_lcid(struct emsabp_context *, uint32_t);
-enum MAPISTATUS                emsabp_set_EphemeralEntryID(struct emsabp_context *, uint32_t, uint32_t, struct EphemeralEntryID *);
-enum MAPISTATUS                emsabp_set_PermanentEntryID(struct emsabp_context *, uint32_t, struct ldb_message *, struct PermanentEntryID *);
-enum MAPISTATUS                emsabp_EphemeralEntryID_to_Binary_r(TALLOC_CTX *, struct EphemeralEntryID *, struct Binary_r *);
-enum MAPISTATUS                emsabp_PermanentEntryID_to_Binary_r(TALLOC_CTX *, struct PermanentEntryID *, struct Binary_r *);
-enum MAPISTATUS                emsabp_get_HierarchyTable(TALLOC_CTX *, struct emsabp_context *, uint32_t, struct SRowSet **);
-enum MAPISTATUS                emsabp_get_CreationTemplatesTable(TALLOC_CTX *, struct emsabp_context *, uint32_t, struct SRowSet **);
-void                   *emsabp_query(TALLOC_CTX *, struct emsabp_context *, struct ldb_message *, uint32_t, uint32_t, uint32_t);
-enum MAPISTATUS                emsabp_fetch_attrs_from_msg(TALLOC_CTX *, struct emsabp_context *, struct SRow *, struct ldb_message *, uint32_t, uint32_t, struct SPropTagArray *);
-enum MAPISTATUS                emsabp_fetch_attrs(TALLOC_CTX *, struct emsabp_context *, struct SRow *, uint32_t, uint32_t, struct SPropTagArray *);
-enum MAPISTATUS                emsabp_table_fetch_attrs(TALLOC_CTX *, struct emsabp_context *, struct SRow *, uint32_t, struct PermanentEntryID *, 
-                                                struct PermanentEntryID *, struct ldb_message *, bool);
-enum MAPISTATUS                emsabp_search(TALLOC_CTX *, struct emsabp_context *, struct SPropTagArray *, struct Restriction_r *, struct STAT *, uint32_t);
-enum MAPISTATUS                emsabp_search_dn(struct emsabp_context *, const char *, struct ldb_message **);
-enum MAPISTATUS                emsabp_search_legacyExchangeDN(struct emsabp_context *, const char *, struct ldb_message **, bool *);
-enum MAPISTATUS                emsabp_ab_container_by_id(TALLOC_CTX *, struct emsabp_context *, uint32_t, struct ldb_message **);
-enum MAPISTATUS                emsabp_ab_container_enum(TALLOC_CTX *, struct emsabp_context *, uint32_t, struct ldb_result **);
-
-
-/* definitions from emsabp_tdb.c */
-TDB_CONTEXT            *emsabp_tdb_init(TALLOC_CTX *, struct loadparm_context *);
-enum MAPISTATUS                emsabp_tdb_close(TDB_CONTEXT *);
-enum MAPISTATUS                emsabp_tdb_fetch(TDB_CONTEXT *, const char *, TDB_DATA *);
-enum MAPISTATUS                emsabp_tdb_insert(TDB_CONTEXT *, const char *);
-enum MAPISTATUS                emsabp_tdb_fetch_MId(TDB_CONTEXT *, const char *, uint32_t *);
-bool                   emsabp_tdb_lookup_MId(TDB_CONTEXT *, uint32_t);
-enum MAPISTATUS                emsabp_tdb_fetch_dn_from_MId(TALLOC_CTX *, TDB_CONTEXT *, uint32_t, char **);
-
-TDB_CONTEXT            *emsabp_tdb_init_tmp(TALLOC_CTX *);
-
-/* definitions from emsabp_property.c */
-const char             *emsabp_property_get_attribute(uint32_t);
-uint32_t               emsabp_property_get_ulPropTag(const char *);
-int                    emsabp_property_is_ref(uint32_t);
-const char             *emsabp_property_get_ref_attr(uint32_t);
-
-__END_DECLS
-
-#endif /* __DCESRV_EXCHANGE_NSP_H */
diff --git a/branches/plugfest/mapiproxy/servers/default/nspi/emsabp.c b/branches/plugfest/mapiproxy/servers/default/nspi/emsabp.c
deleted file mode 100644 (file)
index 2bbcfcc..0000000
+++ /dev/null
@@ -1,1261 +0,0 @@
-/*
-   OpenChange Server implementation.
-
-   EMSABP: Address Book Provider implementation
-
-   Copyright (C) Julien Kerihuel 2006-2011.
-   Copyright (C) Pauline Khun 2006.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file emsabp.c
-
-   \brief Address Book Provider implementation
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_nsp.h"
-
-/**
-   \details Initialize the EMSABP context and open connections to
-   Samba databases.
-
-   \param lp_ctx pointer to the loadparm context
-   \param tdb_ctx pointer to the EMSABP TDB context
-
-   \return Allocated emsabp_context on success, otherwise NULL
- */
-_PUBLIC_ struct emsabp_context *emsabp_init(struct loadparm_context *lp_ctx,
-                                           TDB_CONTEXT *tdb_ctx)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct emsabp_context   *emsabp_ctx;
-       struct tevent_context   *ev;
-
-       /* Sanity checks */
-       if (!lp_ctx) return NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "emsabp_init");
-       
-       emsabp_ctx = talloc_zero(mem_ctx, struct emsabp_context);
-       if (!emsabp_ctx) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       emsabp_ctx->mem_ctx = mem_ctx;
-
-       ev = tevent_context_init(mem_ctx);
-       if (!ev) {
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       /* Save a pointer to the loadparm context */
-       emsabp_ctx->lp_ctx = lp_ctx;
-
-       /* Return an opaque context pointer on samDB database */
-       emsabp_ctx->samdb_ctx = samdb_connect(mem_ctx, ev, lp_ctx, system_session(lp_ctx), 0);
-       if (!emsabp_ctx->samdb_ctx) {
-               talloc_free(mem_ctx);
-               DEBUG(0, ("[%s:%d]: Connection to \"sam.ldb\" failed\n", __FUNCTION__, __LINE__));
-               return NULL;
-       }
-
-       /* Reference the global TDB context to the current emsabp context */
-       emsabp_ctx->tdb_ctx = tdb_ctx;
-
-       /* Initialize a temporary (on-memory) TDB database to store
-        * temporary MId used within EMSABP */
-       emsabp_ctx->ttdb_ctx = emsabp_tdb_init_tmp(emsabp_ctx->mem_ctx);
-       if (!emsabp_ctx->ttdb_ctx) {
-               smb_panic("unable to create on-memory TDB database");
-       }
-
-       return emsabp_ctx;
-}
-
-
-_PUBLIC_ bool emsabp_destructor(void *data)
-{
-       struct emsabp_context   *emsabp_ctx = (struct emsabp_context *)data;
-
-       if (emsabp_ctx) {
-               if (emsabp_ctx->ttdb_ctx) {
-                       tdb_close(emsabp_ctx->ttdb_ctx);
-               }
-
-               talloc_free(emsabp_ctx->mem_ctx);
-               return true;
-       }
-
-       return false;
-}
-
-/**
-   \details Get AD record for Mail-enabled account
-
-   \param mem_ctx pointer to the session context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param username User common name
-   \param ldb_msg Pointer on pointer to ldb_message to return result to
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_NOT_ENOUGH_RESOURCES, MAPI_E_NOT_FOUND or
-   MAPI_E_CORRUPT_STORE
- */
-_PUBLIC_ enum MAPISTATUS emsabp_get_account_info(TALLOC_CTX *mem_ctx,
-                                                struct emsabp_context *emsabp_ctx,
-                                                const char *username,
-                                                struct ldb_message **ldb_msg)
-{
-       int                     ret;
-       int                     msExchUserAccountControl;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "*", NULL };
-
-       ret = ldb_search(emsabp_ctx->samdb_ctx, mem_ctx, &res,
-                        ldb_get_default_basedn(emsabp_ctx->samdb_ctx),
-                        LDB_SCOPE_SUBTREE, recipient_attrs, "CN=%s",
-                        username);
-       OPENCHANGE_RETVAL_IF((ret != LDB_SUCCESS || !res->count), MAPI_E_NOT_FOUND, NULL);
-
-       /* Check if more than one record was found */
-       OPENCHANGE_RETVAL_IF(res->count != 1, MAPI_E_CORRUPT_STORE, NULL);
-
-       msExchUserAccountControl = ldb_msg_find_attr_as_int(res->msgs[0], "msExchUserAccountControl", -1);
-       switch (msExchUserAccountControl) {
-       case -1: /* msExchUserAccountControl attribute is not found */
-               return MAPI_E_NOT_FOUND;
-       case 0:
-               *ldb_msg = res->msgs[0];
-               return MAPI_E_SUCCESS;
-       case 2: /* Account is disabled */
-               *ldb_msg = res->msgs[0];
-               return MAPI_E_ACCOUNT_DISABLED;
-       default: /* Unknown value for msExchUserAccountControl attribute */
-               return MAPI_E_CORRUPT_STORE;
-       }
-       
-       /* We should never get here anyway */
-       return MAPI_E_CORRUPT_STORE;
-}
-
-/**
-   \details Check if the authenticated user belongs to the Exchange
-   organization
-
-   \param dce_call pointer to the session context
-   \param emsabp_ctx pointer to the EMSABP context
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool emsabp_verify_user(struct dcesrv_call_state *dce_call,
-                                struct emsabp_context *emsabp_ctx)
-{
-       int                     ret;
-       TALLOC_CTX              *mem_ctx;
-       const char              *username = NULL;
-       struct ldb_message      *ldb_msg = NULL;
-
-       username = dce_call->context->conn->auth_state.session_info->info->account_name;
-
-       mem_ctx = talloc_named(emsabp_ctx->mem_ctx, 0, "emsabp_verify_user");
-
-       ret = emsabp_get_account_info(mem_ctx, emsabp_ctx, username, &ldb_msg);
-       
-       /* cache account_name upon success */
-       if (MAPI_STATUS_IS_OK(ret)) {
-               emsabp_ctx->account_name = talloc_strdup(emsabp_ctx->mem_ctx, username);
-       }
-
-       talloc_free(mem_ctx);
-       return MAPI_STATUS_IS_OK(ret);
-}
-
-
-/**
-   \details Check if the provided codepage is correct
-
-   \param emsabp_ctx pointer to the EMSABP context
-   \param CodePage the codepage identifier
-
-   \note The prototype is currently incorrect, but we are looking for
-   a better way to check codepage, maybe within AD. At the moment this
-   function is just a wrapper over libmapi valid_codepage function.
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool emsabp_verify_codepage(struct emsabp_context *emsabp_ctx,
-                                    uint32_t CodePage)
-{
-       return mapi_verify_cpid(CodePage);
-}
-
-
-/**
-   \details Build an EphemeralEntryID structure
-
-   \param emsabp_ctx pointer to the EMSABP context
-   \param DisplayType the AB object display type
-   \param MId the MId value
-   \param ephEntryID pointer to the EphemeralEntryID returned by the
-   function
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_NOT_ENOUGH_RESOURCES or MAPI_E_CORRUPT_STORE
- */
-_PUBLIC_ enum MAPISTATUS emsabp_set_EphemeralEntryID(struct emsabp_context *emsabp_ctx,
-                                                    uint32_t DisplayType, uint32_t MId,
-                                                    struct EphemeralEntryID *ephEntryID)
-{
-       struct GUID     *guid = (struct GUID *) NULL;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ephEntryID, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-
-       guid = (struct GUID *) samdb_ntds_objectGUID(emsabp_ctx->samdb_ctx);
-       OPENCHANGE_RETVAL_IF(!guid, MAPI_E_CORRUPT_STORE, NULL);
-
-       ephEntryID->ID_type = 0x87;
-       ephEntryID->R1 = 0x0;
-       ephEntryID->R2 = 0x0;
-       ephEntryID->R3 = 0x0;
-       ephEntryID->ProviderUID.ab[0] = (guid->time_low & 0xFF);
-       ephEntryID->ProviderUID.ab[1] = ((guid->time_low >> 8)  & 0xFF);
-       ephEntryID->ProviderUID.ab[2] = ((guid->time_low >> 16) & 0xFF);
-       ephEntryID->ProviderUID.ab[3] = ((guid->time_low >> 24) & 0xFF);
-       ephEntryID->ProviderUID.ab[4] = (guid->time_mid & 0xFF);
-       ephEntryID->ProviderUID.ab[5] = ((guid->time_mid >> 8)  & 0xFF);
-       ephEntryID->ProviderUID.ab[6] = (guid->time_hi_and_version & 0xFF);
-       ephEntryID->ProviderUID.ab[7] = ((guid->time_hi_and_version >> 8) & 0xFF);
-       memcpy(ephEntryID->ProviderUID.ab + 8,  guid->clock_seq, sizeof (uint8_t) * 2);
-       memcpy(ephEntryID->ProviderUID.ab + 10, guid->node, sizeof (uint8_t) * 6);
-       ephEntryID->R4 = 0x1;
-       ephEntryID->DisplayType = DisplayType;
-       ephEntryID->MId = MId;
-
-       talloc_free(guid);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Map an EphemeralEntryID structure into a Binary_r structure
-
-   \param mem_ctx pointer to the memory context
-   \param ephEntryID pointer to the Ephemeral EntryID structure
-   \param bin pointer to the Binary_r structure the server will return
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS emsabp_EphemeralEntryID_to_Binary_r(TALLOC_CTX *mem_ctx,
-                                                            struct EphemeralEntryID *ephEntryID,
-                                                            struct Binary_r *bin)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!ephEntryID, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!bin, MAPI_E_INVALID_PARAMETER, NULL);
-
-       bin->cb = sizeof (*ephEntryID);
-       bin->lpb = talloc_array(mem_ctx, uint8_t, bin->cb);
-
-       /* Copy EphemeralEntryID into bin->lpb */
-       memset(bin->lpb, 0, bin->cb);
-       bin->lpb[0] = ephEntryID->ID_type;
-       bin->lpb[1] = ephEntryID->R1;
-       bin->lpb[2] = ephEntryID->R2;
-       bin->lpb[3] = ephEntryID->R3;
-       memcpy(bin->lpb + 4, ephEntryID->ProviderUID.ab, 16);
-       bin->lpb[20] = (ephEntryID->R4 & 0xFF);
-       bin->lpb[21] = ((ephEntryID->R4 >> 8)  & 0xFF);
-       bin->lpb[22] = ((ephEntryID->R4 >> 16) & 0xFF);
-       bin->lpb[23] = ((ephEntryID->R4 >> 24) & 0xFF);
-       bin->lpb[24] = (ephEntryID->DisplayType & 0xFF);
-       bin->lpb[25] = ((ephEntryID->DisplayType >> 8)  & 0xFF);
-       bin->lpb[26] = ((ephEntryID->DisplayType >> 16) & 0xFF);
-       bin->lpb[27] = ((ephEntryID->DisplayType >> 24) & 0xFF);
-       bin->lpb[28] = (ephEntryID->MId & 0xFF);
-       bin->lpb[29] = ((ephEntryID->MId >> 8)  & 0xFF);
-       bin->lpb[30] = ((ephEntryID->MId >> 16) & 0xFF);
-       bin->lpb[31] = ((ephEntryID->MId >> 24) & 0xFF);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Build a PermanentEntryID structure
-
-   \param emsabp_ctx pointer to the EMSABP context
-   \param DisplayType the AB object display type
-   \param msg pointer to the LDB message
-   \param permEntryID pointer to the PermanentEntryID returned by the
-   function
-
-   \note This function only covers DT_CONTAINER AddressBook
-   objects. It should be extended in the future to support more
-   containers.
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_NOT_ENOUGH_RESOURCES or MAPI_E_CORRUPT_STORE
- */
-_PUBLIC_ enum MAPISTATUS emsabp_set_PermanentEntryID(struct emsabp_context *emsabp_ctx, 
-                                                    uint32_t DisplayType, struct ldb_message *msg, 
-                                                    struct PermanentEntryID *permEntryID)
-{
-       struct GUID             *guid = (struct GUID *) NULL;
-       const struct ldb_val    *ldb_value = NULL;
-       const char              *dn_str;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!permEntryID, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-       
-
-       permEntryID->ID_type = 0x0;
-       permEntryID->R1 = 0x0;
-       permEntryID->R2 = 0x0;
-       permEntryID->R3 = 0x0;
-       memcpy(permEntryID->ProviderUID.ab, GUID_NSPI, 16);
-       permEntryID->R4 = 0x1;
-       permEntryID->DisplayType = DisplayType;
-
-       if (!msg) {
-               permEntryID->dn = talloc_strdup(emsabp_ctx->mem_ctx, "/");
-       } else if (DisplayType == DT_CONTAINER) {
-               ldb_value = ldb_msg_find_ldb_val(msg, "objectGUID");
-               OPENCHANGE_RETVAL_IF(!ldb_value, MAPI_E_CORRUPT_STORE, NULL);
-
-               guid = talloc_zero(emsabp_ctx->mem_ctx, struct GUID);
-               GUID_from_data_blob(ldb_value, guid);
-               permEntryID->dn = talloc_asprintf(emsabp_ctx->mem_ctx, EMSABP_DN, 
-                                                 guid->time_low, guid->time_mid,
-                                                 guid->time_hi_and_version,
-                                                 guid->clock_seq[0],
-                                                 guid->clock_seq[1],
-                                                 guid->node[0], guid->node[1],
-                                                 guid->node[2], guid->node[3],
-                                                 guid->node[4], guid->node[5]);
-               talloc_free(guid);
-
-       }  else {
-               dn_str = ldb_msg_find_attr_as_string(msg, "legacyExchangeDN", NULL);
-               OPENCHANGE_RETVAL_IF(!dn_str, MAPI_E_CORRUPT_STORE, NULL);
-               permEntryID->dn = talloc_strdup(emsabp_ctx->mem_ctx, dn_str);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Map a PermanentEntryID structure into a Binary_r
-   structure (for PR_ENTRYID and PR_EMS_AB_PARENT_ENTRYID properties)
-
-   \param mem_ctx pointer to the memory context
-   \param permEntryID pointer to the Permanent EntryID structure
-   \param bin pointer to the Binary_r structure the server will return
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS emsabp_PermanentEntryID_to_Binary_r(TALLOC_CTX *mem_ctx,
-                                                            struct PermanentEntryID *permEntryID,
-                                                            struct Binary_r *bin)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!permEntryID, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!bin, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* Remove const char * size and replace it with effective dn string length */
-       bin->cb = sizeof (*permEntryID) - 4 + strlen(permEntryID->dn) + 1;
-       bin->lpb = talloc_array(mem_ctx, uint8_t, bin->cb);
-
-       /* Copy PermanantEntryID intro bin->lpb */
-       memset(bin->lpb, 0, bin->cb);
-       bin->lpb[0] = permEntryID->ID_type;
-       bin->lpb[1] = permEntryID->R1;
-       bin->lpb[2] = permEntryID->R2;
-       bin->lpb[3] = permEntryID->R3;
-       memcpy(bin->lpb + 4, permEntryID->ProviderUID.ab, 16);
-       bin->lpb[20] = (permEntryID->R4 & 0xFF);
-       bin->lpb[21] = ((permEntryID->R4 >> 8)  & 0xFF);
-       bin->lpb[22] = ((permEntryID->R4 >> 16) & 0xFF);
-       bin->lpb[23] = ((permEntryID->R4 >> 24) & 0xFF);
-       bin->lpb[24] = (permEntryID->DisplayType & 0xFF);
-       bin->lpb[25] = ((permEntryID->DisplayType >> 8)  & 0xFF);
-       bin->lpb[26] = ((permEntryID->DisplayType >> 16) & 0xFF);
-       bin->lpb[27] = ((permEntryID->DisplayType >> 24) & 0xFF);
-       memcpy(bin->lpb + 28, permEntryID->dn, strlen(permEntryID->dn) + 1);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Find the attribute matching the specified property tag and
-   return the associated data.
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param msg pointer to the LDB message
-   \param ulPropTag the property tag to lookup
-   \param MId Minimal Entry ID associated to the current message
-   \param dwFlags bit flags specifying whether or not the server must
-   return the values of the property PidTagEntryId in the Ephemeral
-   or Permanent Entry ID format
-
-
-   \note This implementation is at the moment limited to MAILUSER,
-   which means we arbitrary set PR_OBJECT_TYPE and PR_DISPLAY_TYPE
-   while we should have a generic method to fill these properties.
-
-   \return Valid generic pointer on success, otherwise NULL
- */
-_PUBLIC_ void *emsabp_query(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                           struct ldb_message *msg, uint32_t ulPropTag, uint32_t MId,
-                           uint32_t dwFlags)
-{
-       enum MAPISTATUS                 retval;
-       void                            *data = (void *) NULL;
-       const char                      *attribute;
-       const char                      *ref_attribute;
-       const char                      *ldb_string = NULL;
-       char                            *tmp_str;
-       struct Binary_r                 *bin;
-       struct StringArray_r            *mvszA;
-       struct EphemeralEntryID         ephEntryID;
-       struct PermanentEntryID         permEntryID;
-       struct ldb_message              *msg2 = NULL;
-       struct ldb_message_element      *ldb_element;
-       int                             ret;
-       const char                      *dn = NULL;
-       uint32_t                        i;
-
-       /* Step 1. Fill attributes not in AD but created using EMSABP databases */
-       switch (ulPropTag) {
-       case PR_ADDRTYPE:
-       case PR_ADDRTYPE_UNICODE:
-               data = (void *) talloc_strdup(mem_ctx, EMSABP_ADDRTYPE);
-               return data;
-       case PR_OBJECT_TYPE:
-               data = talloc_zero(mem_ctx, uint32_t);
-               *((uint32_t *)data) = MAPI_MAILUSER;
-               return data;
-       case PR_DISPLAY_TYPE:
-               data = talloc_zero(mem_ctx, uint32_t);
-               *((uint32_t *)data) = DT_MAILUSER;
-               return data;
-       case PR_ENTRYID:
-               bin = talloc(mem_ctx, struct Binary_r);
-               if (dwFlags & fEphID) {
-                       retval = emsabp_set_EphemeralEntryID(emsabp_ctx, DT_MAILUSER, MId, &ephEntryID);
-                       retval = emsabp_EphemeralEntryID_to_Binary_r(mem_ctx, &ephEntryID, bin);
-               } else {
-                       retval = emsabp_set_PermanentEntryID(emsabp_ctx, DT_MAILUSER, msg, &permEntryID);
-                       retval = emsabp_PermanentEntryID_to_Binary_r(mem_ctx, &permEntryID, bin);
-               }
-               return bin;
-       case PR_SEARCH_KEY:
-               /* retrieve email address attribute, i.e. legacyExchangeDN */
-               ldb_string = ldb_msg_find_attr_as_string(msg, emsabp_property_get_attribute(PR_EMAIL_ADDRESS), NULL);
-               if (!ldb_string) return NULL;
-               tmp_str = talloc_strdup_upper(mem_ctx, ldb_string);
-               if (!tmp_str) return NULL;
-               /* make binary for PR_SEARCH_KEY */
-               bin = talloc(mem_ctx, struct Binary_r);
-               bin->lpb = (uint8_t *)talloc_asprintf(mem_ctx, "EX:%s", tmp_str);
-               bin->cb = strlen((const char *)bin->lpb) + 1;
-               talloc_free(tmp_str);
-               return bin;
-       case PR_INSTANCE_KEY:
-               bin = talloc_zero(mem_ctx, struct Binary_r);
-               bin->cb = 4;
-               bin->lpb = talloc_array(mem_ctx, uint8_t, bin->cb);
-               memset(bin->lpb, 0, bin->cb);
-               bin->lpb[0] = MId & 0xFF;
-               bin->lpb[1] = (MId >> 8)  & 0xFF;
-               bin->lpb[2] = (MId >> 16) & 0xFF;
-               bin->lpb[3] = (MId >> 24) & 0xFF;
-               return bin;
-       default:
-               break;
-       }
-
-       /* Step 2. Retrieve the attribute name associated to ulPropTag and handle the ref case */
-       attribute = emsabp_property_get_attribute(ulPropTag);
-       if (!attribute) return NULL;
-
-       ret = emsabp_property_is_ref(ulPropTag);
-       if (ret == 1) {
-               ref_attribute = emsabp_property_get_ref_attr(ulPropTag);
-               if (ref_attribute) {
-                       dn = ldb_msg_find_attr_as_string(msg, attribute, NULL);
-                       retval = emsabp_search_dn(emsabp_ctx, dn, &msg2);
-                       if (retval != MAPI_E_SUCCESS) {
-                               return NULL;
-                       }
-                       attribute = ref_attribute;
-               }
-       } else {
-               msg2 = msg;
-       }
-
-       /* Step 3. Retrieve data associated to the attribute/tag */
-       switch (ulPropTag & 0xFFFF) {
-       case PT_STRING8:
-       case PT_UNICODE:
-               ldb_string = ldb_msg_find_attr_as_string(msg2, attribute, NULL);
-               if (!ldb_string) return NULL;
-               data = talloc_strdup(mem_ctx, ldb_string);
-               break;
-       case PT_MV_STRING8:
-       case PT_MV_UNICODE:
-               ldb_element = ldb_msg_find_element(msg2, attribute);
-               if (!ldb_element) return NULL;
-
-               mvszA = talloc(mem_ctx, struct StringArray_r);
-               mvszA->cValues = ldb_element[0].num_values & 0xFFFFFFFF;
-               mvszA->lppszA = talloc_array(mem_ctx, const char *, mvszA->cValues);
-               for (i = 0; i < mvszA->cValues; i++) {
-                       mvszA->lppszA[i] = talloc_strdup(mem_ctx, (char *)ldb_element->values[i].data);
-               }
-               data = (void *) mvszA;
-               break;
-       default:
-               DEBUG(3, ("[%s:%d]: Unsupported property type: 0x%x\n", __FUNCTION__, __LINE__,
-                         (ulPropTag & 0xFFFF)));
-               break;
-       }
-
-       return data;
-}
-
-
-/**
-   \details Build the SRow array entry for the specified ldb_message.
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param aRow pointer to the SRow structure where results will be stored
-   \param ldb_msg ldb_message record to fetch results from
-   \param MId MId of the entry to fetch (may be 0)
-   \param dwFlags input call flags (default to 0)
-   \param pPropTags pointer to the property tags array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_fetch_attrs_from_msg(TALLOC_CTX *mem_ctx,
-                                                    struct emsabp_context *emsabp_ctx,
-                                                    struct SRow *aRow,
-                                                    struct ldb_message *ldb_msg,
-                                                    uint32_t MId, uint32_t dwFlags,
-                                                    struct SPropTagArray *pPropTags)
-{
-       enum MAPISTATUS retval;
-       const char      *dn;
-       void            *data;
-       uint32_t        ulPropTag;
-       uint32_t        i;
-
-       /* Step 0. Create MId if necessary */
-       if (MId == 0) {
-               dn = ldb_msg_find_attr_as_string(ldb_msg, "distinguishedName", NULL);
-               OPENCHANGE_RETVAL_IF(!dn, MAPI_E_CORRUPT_DATA, NULL);
-               retval = emsabp_tdb_fetch_MId(emsabp_ctx->ttdb_ctx, dn, &MId);
-               if (retval) {
-                       retval = emsabp_tdb_insert(emsabp_ctx->ttdb_ctx, dn);
-                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-
-                       retval = emsabp_tdb_fetch_MId(emsabp_ctx->ttdb_ctx, dn, &MId);
-                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-               }
-       }
-
-       /* Step 1. Retrieve property values and build aRow */
-       aRow->ulAdrEntryPad = 0x0;
-       aRow->cValues = pPropTags->cValues;
-       aRow->lpProps = talloc_array(mem_ctx, struct SPropValue, aRow->cValues);
-
-       for (i = 0; i < aRow->cValues; i++) {
-               ulPropTag = pPropTags->aulPropTag[i];
-               data = emsabp_query(mem_ctx, emsabp_ctx, ldb_msg, ulPropTag, MId, dwFlags);
-               if (!data) {
-                       ulPropTag = (ulPropTag & 0xFFFF0000) | PT_ERROR;
-               }
-               
-               aRow->lpProps[i].ulPropTag = (enum MAPITAGS) ulPropTag;
-               aRow->lpProps[i].dwAlignPad = 0x0;
-               set_SPropValue(&(aRow->lpProps[i]), data);
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
-   \details Builds the SRow array entry for the specified MId.
-
-   The function retrieves the DN associated to the specified MId
-   within its on-memory TDB database. It next fetches the LDB record
-   matching the DN and finally retrieve the requested properties for
-   this record.
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param aRow pointer to the SRow structure where results will be
-   stored
-   \param MId MId to fetch properties for
-   \param dwFlags bit flags specifying whether or not the server must
-   return the values of the property PidTagEntryId in the Ephemeral
-   or Permanent Entry ID format
-   \param pPropTags pointer to the property tags array
-
-   \note We currently assume records are users.ldb
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_fetch_attrs(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                           struct SRow *aRow, uint32_t MId, uint32_t dwFlags,
-                                           struct SPropTagArray *pPropTags)
-{
-       enum MAPISTATUS         retval;
-       char                    *dn;
-       const char * const      recipient_attrs[] = { "*", NULL };
-       struct ldb_result       *res = NULL;
-       struct ldb_dn           *ldb_dn = NULL;
-       int                     ret;
-       uint32_t                ulPropTag;
-       void                    *data;
-       uint32_t                i;
-
-       /* Step 0. Try to Retrieve the dn associated to the MId first from temp TDB (users) */
-       retval = emsabp_tdb_fetch_dn_from_MId(mem_ctx, emsabp_ctx->ttdb_ctx, MId, &dn);
-       if (!MAPI_STATUS_IS_OK(retval)) {
-               /* If it fails try to retrieve it from the on-disk TDB database (conf) */
-               retval = emsabp_tdb_fetch_dn_from_MId(mem_ctx, emsabp_ctx->tdb_ctx, MId, &dn);
-       }
-       OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       /* Step 1. Fetch the LDB record */
-       ldb_dn = ldb_dn_new(mem_ctx, emsabp_ctx->samdb_ctx, dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(ldb_dn), MAPI_E_CORRUPT_STORE, NULL);
-
-       ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res, ldb_dn, LDB_SCOPE_BASE,
-                        recipient_attrs, NULL);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count || res->count != 1, MAPI_E_CORRUPT_STORE, NULL);
-
-       /* Step 2. Retrieve property values and build aRow */
-       aRow->ulAdrEntryPad = 0x0;
-       aRow->cValues = pPropTags->cValues;
-       aRow->lpProps = talloc_array(mem_ctx, struct SPropValue, aRow->cValues);
-
-       for (i = 0; i < aRow->cValues; i++) {
-               ulPropTag = pPropTags->aulPropTag[i];
-               data = emsabp_query(mem_ctx, emsabp_ctx, res->msgs[0], ulPropTag, MId, dwFlags);
-               if (!data) {
-                       ulPropTag &= 0xFFFF0000;
-                       ulPropTag += PT_ERROR;
-               }
-
-               aRow->lpProps[i].ulPropTag = (enum MAPITAGS) ulPropTag;
-               aRow->lpProps[i].dwAlignPad = 0x0;
-               set_SPropValue(&(aRow->lpProps[i]), data);
-       }
-
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Builds the SRow array entry for the specified table
-   record.
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param aRow pointer to the SRow structure where results will be
-   stored
-   \param dwFlags flags controlling whether strings should be unicode
-   encoded or not
-   \param permEntryID pointer to the current record Permanent
-   EntryID
-   \param parentPermEntryID pointer to the parent record Permanent
-   EntryID
-   \param msg pointer to the LDB message for current record
-   \param child boolean value specifying whether current record is
-   root or child within containers hierarchy
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_table_fetch_attrs(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                                 struct SRow *aRow, uint32_t dwFlags,
-                                                 struct PermanentEntryID *permEntryID,
-                                                 struct PermanentEntryID *parentPermEntryID,
-                                                 struct ldb_message *msg, bool child)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SPropValue               lpProps;
-       int                             proptag;
-       uint32_t                        i;
-       uint32_t                        containerID = 0;
-       const char                      *dn = NULL;
-
-       /* Step 1. Build the array of properties to fetch and map */
-       if (child == false) {
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x6,
-                                                 PR_ENTRYID,
-                                                 PR_CONTAINER_FLAGS,
-                                                 PR_DEPTH,
-                                                 PR_EMS_AB_CONTAINERID,
-                                                 ((dwFlags & NspiUnicodeStrings) ? PR_DISPLAY_NAME_UNICODE : PR_DISPLAY_NAME),
-                                                 PR_EMS_AB_IS_MASTER);
-       } else {
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x7,
-                                                 PR_ENTRYID,
-                                                 PR_CONTAINER_FLAGS,
-                                                 PR_DEPTH,
-                                                 PR_EMS_AB_CONTAINERID,
-                                                 ((dwFlags & NspiUnicodeStrings) ? PR_DISPLAY_NAME_UNICODE : PR_DISPLAY_NAME),
-                                                 PR_EMS_AB_IS_MASTER,
-                                                 PR_EMS_AB_PARENT_ENTRYID);
-       }
-
-       /* Step 2. Allocate SPropValue array and update SRow cValues field */
-       aRow->ulAdrEntryPad = 0x0;
-       aRow->cValues = 0x0;
-       aRow->lpProps = talloc_zero(mem_ctx, struct SPropValue);
-
-       /* Step 3. Global Address List or real container */
-       if (!msg) {
-               /* Global Address List record is constant */
-               for (i = 0; i < SPropTagArray->cValues; i++) {
-                       lpProps.ulPropTag = SPropTagArray->aulPropTag[i];
-                       lpProps.dwAlignPad = 0x0;
-
-                       switch (SPropTagArray->aulPropTag[i]) {
-                       case PR_ENTRYID:
-                               emsabp_PermanentEntryID_to_Binary_r(mem_ctx, permEntryID, &(lpProps.value.bin));
-                               break;
-                       case PR_CONTAINER_FLAGS:
-                               lpProps.value.l =  AB_RECIPIENTS | AB_UNMODIFIABLE;
-                               break;
-                       case PR_DEPTH:
-                               lpProps.value.l = 0x0;
-                               break;
-                       case PR_EMS_AB_CONTAINERID:
-                               lpProps.value.l = 0x0;
-                               break;
-                       case PR_DISPLAY_NAME:
-                               lpProps.value.lpszA = NULL;
-                               break;
-                       case PR_DISPLAY_NAME_UNICODE:
-                               lpProps.value.lpszW = NULL;
-                               break;
-                       case PR_EMS_AB_IS_MASTER:
-                               lpProps.value.b = false;
-                               break;
-                       default:
-                               break;
-                       }
-                       SRow_addprop(aRow, lpProps);
-                       /* SRow_addprop internals overwrite with MAPI_E_NOT_FOUND when data is NULL */
-                       if (SPropTagArray->aulPropTag[i] == PR_DISPLAY_NAME || 
-                           SPropTagArray->aulPropTag[i] == PR_DISPLAY_NAME_UNICODE) {
-                               aRow->lpProps[aRow->cValues - 1].value.lpszA = NULL;
-                               aRow->lpProps[aRow->cValues - 1].value.lpszW = NULL;
-                       }
-               }
-       } else {
-               for (i = 0; i < SPropTagArray->cValues; i++) {
-                       lpProps.ulPropTag = SPropTagArray->aulPropTag[i];
-                       lpProps.dwAlignPad = 0x0;
-
-                       switch (SPropTagArray->aulPropTag[i]) {
-                       case PR_ENTRYID:
-                               emsabp_PermanentEntryID_to_Binary_r(mem_ctx, permEntryID, &(lpProps.value.bin));
-                               break;
-                       case PR_CONTAINER_FLAGS:
-                               switch (child) {
-                               case true:
-                                       lpProps.value.l = AB_RECIPIENTS | AB_SUBCONTAINERS | AB_UNMODIFIABLE;
-                                       break;
-                               case false:
-                                       lpProps.value.l = AB_RECIPIENTS | AB_UNMODIFIABLE;
-                               }
-                               break;
-                       case PR_DEPTH:
-                               switch (child) {
-                               case true:
-                                       lpProps.value.l = 0x1;
-                                       break;
-                               case false:
-                                       lpProps.value.l = 0x0;
-                                       break;
-                               }
-                               break;
-                       case PR_EMS_AB_CONTAINERID:
-                               dn = ldb_msg_find_attr_as_string(msg, "distinguishedName", NULL);
-                               retval = emsabp_tdb_fetch_MId(emsabp_ctx->tdb_ctx, dn, &containerID);
-                               if (retval) {
-                                       retval = emsabp_tdb_insert(emsabp_ctx->tdb_ctx, dn);
-                                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-                                       retval = emsabp_tdb_fetch_MId(emsabp_ctx->tdb_ctx, dn, &containerID);
-                                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-                               }
-                               lpProps.value.l = containerID;
-                               break;
-                       case PR_DISPLAY_NAME:
-                               lpProps.value.lpszA = talloc_strdup(mem_ctx, ldb_msg_find_attr_as_string(msg, "displayName", NULL));
-                               if (!lpProps.value.lpszA) {
-                                       proptag = (int) lpProps.ulPropTag;
-                                       proptag &= 0xFFFF0000;
-                                       proptag += PT_ERROR;
-                                       lpProps.ulPropTag = (enum MAPITAGS) proptag;
-                               }
-                               break;
-                       case PR_DISPLAY_NAME_UNICODE:
-                               lpProps.value.lpszW = talloc_strdup(mem_ctx, ldb_msg_find_attr_as_string(msg, "displayName", NULL));
-                               if (!lpProps.value.lpszW) {
-                                       proptag = (int) lpProps.ulPropTag;
-                                       proptag &= 0xFFFF0000;
-                                       proptag += PT_ERROR;
-                                       lpProps.ulPropTag = (enum MAPITAGS) proptag;
-                               }
-                               break;
-                       case PR_EMS_AB_IS_MASTER:
-                               /* FIXME: harcoded value - no load balancing */
-                               lpProps.value.l = 0x0;
-                               break;
-                       case PR_EMS_AB_PARENT_ENTRYID:
-                               emsabp_PermanentEntryID_to_Binary_r(mem_ctx, parentPermEntryID, &lpProps.value.bin);
-                               break;
-                       default:
-                               break;
-                       }
-                       SRow_addprop(aRow, lpProps);
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve and build the HierarchyTable requested by
-   GetSpecialTable NSPI call
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param dwFlags flags controlling whether strings should be UNICODE
-   or not
-   \param SRowSet pointer on pointer to the output SRowSet array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_CORRUPT_STORE
- */
-_PUBLIC_ enum MAPISTATUS emsabp_get_HierarchyTable(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                                  uint32_t dwFlags, struct SRowSet **SRowSet)
-{
-       enum MAPISTATUS                 retval;
-       struct SRow                     *aRow;
-       struct PermanentEntryID         gal;
-       struct PermanentEntryID         parentPermEntryID;
-       struct PermanentEntryID         permEntryID;
-       enum ldb_scope                  scope = LDB_SCOPE_SUBTREE;
-       struct ldb_request              *req;
-       struct ldb_result               *res = NULL;
-       struct ldb_dn                   *ldb_dn = NULL;
-       struct ldb_control              **controls;
-       const char * const              recipient_attrs[] = { "*", NULL };
-       const char                      *control_strings[2] = { "server_sort:0:0:displayName", NULL };
-       const char                      *addressBookRoots;
-       int                             ret;
-       uint32_t                        aRow_idx;
-       uint32_t                        i;
-
-       /* Step 1. Build the 'Global Address List' object using PermanentEntryID */
-       aRow = talloc_zero(mem_ctx, struct SRow);
-       OPENCHANGE_RETVAL_IF(!aRow, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-       aRow_idx = 0;
-
-       retval = emsabp_set_PermanentEntryID(emsabp_ctx, DT_CONTAINER, NULL, &gal);
-       OPENCHANGE_RETVAL_IF(retval, retval, aRow);
-
-       retval = emsabp_table_fetch_attrs(mem_ctx, emsabp_ctx, &aRow[aRow_idx], dwFlags, &gal, NULL, NULL, false);
-       aRow_idx++;
-
-       /* Step 2. Retrieve the object pointed by addressBookRoots attribute: 'All Address Lists' */
-       ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res,
-                        ldb_get_config_basedn(emsabp_ctx->samdb_ctx),
-                        scope, recipient_attrs, "(addressBookRoots=*)");
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_CORRUPT_STORE, aRow);
-
-       addressBookRoots = ldb_msg_find_attr_as_string(res->msgs[0], "addressBookRoots", NULL);
-       OPENCHANGE_RETVAL_IF(!addressBookRoots, MAPI_E_CORRUPT_STORE, aRow);
-
-       ldb_dn = ldb_dn_new(emsabp_ctx->mem_ctx, emsabp_ctx->samdb_ctx, addressBookRoots);
-       talloc_free(res);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(ldb_dn), MAPI_E_CORRUPT_STORE, aRow);
-
-       scope = LDB_SCOPE_BASE;
-       ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res, ldb_dn, 
-                        scope, recipient_attrs, NULL);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count || res->count != 1, MAPI_E_CORRUPT_STORE, aRow);
-
-       aRow = talloc_realloc(mem_ctx, aRow, struct SRow, aRow_idx + 1);
-       retval = emsabp_set_PermanentEntryID(emsabp_ctx, DT_CONTAINER, res->msgs[0], &parentPermEntryID);
-       emsabp_table_fetch_attrs(mem_ctx, emsabp_ctx, &aRow[aRow_idx], dwFlags, &parentPermEntryID, NULL, res->msgs[0], false);
-       aRow_idx++;
-       talloc_free(res);
-
-       /* Step 3. Retrieve 'All Address Lists' subcontainers */
-       res = talloc_zero(mem_ctx, struct ldb_result);
-       OPENCHANGE_RETVAL_IF(!res, MAPI_E_NOT_ENOUGH_RESOURCES, aRow);
-
-       controls = ldb_parse_control_strings(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, control_strings);
-       ret = ldb_build_search_req(&req, emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx,
-                                  ldb_dn, LDB_SCOPE_SUBTREE, "(purportedSearch=*)",
-                                  recipient_attrs, controls, res, ldb_search_default_callback, NULL);
-
-       if (ret != LDB_SUCCESS) {
-               talloc_free(res);
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS, MAPI_E_CORRUPT_STORE, aRow);
-       }
-
-       ret = ldb_request(emsabp_ctx->samdb_ctx, req);
-       if (ret == LDB_SUCCESS) {
-               ret = ldb_wait(req->handle, LDB_WAIT_ALL);
-       }
-       talloc_free(req);
-       
-       if (ret != LDB_SUCCESS || !res->count) {
-               talloc_free(res);
-               OPENCHANGE_RETVAL_IF(1, MAPI_E_CORRUPT_STORE, aRow);
-       }
-
-       aRow = talloc_realloc(mem_ctx, aRow, struct SRow, aRow_idx + res->count + 1);
-
-       for (i = 0; res->msgs[i]; i++) {
-               retval = emsabp_set_PermanentEntryID(emsabp_ctx, DT_CONTAINER, res->msgs[i], &permEntryID);
-               emsabp_table_fetch_attrs(mem_ctx, emsabp_ctx, &aRow[aRow_idx], dwFlags, &permEntryID, &parentPermEntryID, res->msgs[i], true);
-               talloc_free(permEntryID.dn);
-               memset(&permEntryID, 0, sizeof (permEntryID));
-               aRow_idx++;
-       }
-       talloc_free(res);
-       talloc_free(parentPermEntryID.dn);
-
-       /* Step 4. Build output SRowSet */
-       SRowSet[0]->cRows = aRow_idx;
-       SRowSet[0]->aRow = aRow;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve and build the CreationTemplates Table requested
-   by GetSpecialTable NSPI call
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param dwFlags flags controlling whether strings should be UNICODE
-   or not
-   \param SRowSet pointer on pointer to the output SRowSet array
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_CORRUPT_STORE 
- */
-_PUBLIC_ enum MAPISTATUS emsabp_get_CreationTemplatesTable(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                                          uint32_t dwFlags, struct SRowSet **SRowSet)
-{
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Search Active Directory given input search criterias. The
-   function associates for each records returned by the search a
-   unique session Minimal Entry ID and a LDB message.
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param MIds pointer to the list of MIds the function returns
-   \param restriction pointer to restriction rules to apply to the
-   search
-   \param pStat pointer the STAT structure associated to the search
-   \param limit the limit number of results the function can return
-
-   \note SortTypePhoneticDisplayName sort type is currently not supported.
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_search(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                      struct SPropTagArray *MIds, struct Restriction_r *restriction,
-                                      struct STAT *pStat, uint32_t limit)
-{
-       enum MAPISTATUS                 retval;
-       struct ldb_result               *res = NULL;
-       struct PropertyRestriction_r    *res_prop = NULL;
-       const char                      *recipient = NULL;
-       const char * const              recipient_attrs[] = { "*", NULL };
-       int                             ret;
-       uint32_t                        i;
-       const char                      *dn;
-
-       /* Step 0. Sanity Checks (MS-NSPI Server Processing Rules) */
-       if (pStat->SortType == SortTypePhoneticDisplayName) {
-               return MAPI_E_CALL_FAILED;
-       }
-
-       if (((pStat->SortType == SortTypeDisplayName) || (pStat->SortType == SortTypePhoneticDisplayName)) &&
-           (pStat->ContainerID && (emsabp_tdb_lookup_MId(emsabp_ctx->tdb_ctx, pStat->ContainerID) == false))) {
-               return MAPI_E_INVALID_BOOKMARK;
-       }
-
-       if (restriction && (pStat->SortType != SortTypeDisplayName) && 
-           (pStat->SortType != SortTypePhoneticDisplayName)) {
-               return MAPI_E_CALL_FAILED;
-       }
-
-       /* Step 1. Apply restriction and retrieve results from AD */
-       if (restriction) {
-               /* FIXME: We only support RES_PROPERTY restriction */
-               if ((uint32_t)restriction->rt != RES_PROPERTY) {
-                       return MAPI_E_TOO_COMPLEX;
-               }
-
-               /* FIXME: We only support PR_ANR */
-               res_prop = (struct PropertyRestriction_r *)&(restriction->res.resProperty);
-               if ((res_prop->ulPropTag != PR_ANR) && (res_prop->ulPropTag != PR_ANR_UNICODE)) {
-                       return MAPI_E_NO_SUPPORT;
-               }
-               
-               recipient = (res_prop->ulPropTag == PR_ANR) ?
-                       res_prop->lpProp->value.lpszA :
-                       res_prop->lpProp->value.lpszW;
-
-               ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res,
-                                ldb_get_default_basedn(emsabp_ctx->samdb_ctx),
-                                LDB_SCOPE_SUBTREE, recipient_attrs,
-                                "(&(objectClass=user)(sAMAccountName=*%s*)(!(objectClass=computer)))",
-                                recipient);
-
-               if (ret != LDB_SUCCESS) {
-                       return MAPI_E_NOT_FOUND;
-               }
-               if (res == NULL) {
-                       return MAPI_E_INVALID_OBJECT;
-               }
-               if (!res->count) {
-                       return MAPI_E_NOT_FOUND;
-               }
-       } else {
-               /* FIXME Check restriction == NULL */
-               return MAPI_E_INVALID_OBJECT;
-       }
-
-       if (limit && res->count > limit) {
-               return MAPI_E_TABLE_TOO_BIG;
-       }
-
-       MIds->aulPropTag = (enum MAPITAGS *) talloc_array(emsabp_ctx->mem_ctx, uint32_t, res->count);
-       MIds->cValues = res->count;
-
-       /* Step 2. Create session MId for all fetched records */
-       for (i = 0; i < res->count; i++) {
-               dn = ldb_msg_find_attr_as_string(res->msgs[i], "distinguishedName", NULL);
-               retval = emsabp_tdb_fetch_MId(emsabp_ctx->ttdb_ctx, dn, (uint32_t *)&(MIds->aulPropTag[i]));
-               if (retval) {
-                       retval = emsabp_tdb_insert(emsabp_ctx->ttdb_ctx, dn);
-                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-                       retval = emsabp_tdb_fetch_MId(emsabp_ctx->ttdb_ctx, dn, (uint32_t *) &(MIds->aulPropTag[i]));
-                       OPENCHANGE_RETVAL_IF(retval, MAPI_E_CORRUPT_STORE, NULL);
-               }
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Search for a given DN within AD and return the associated
-   LDB message.
-
-   \param emsabp_ctx pointer to the EMSABP context
-   \param dn pointer to the DN string to search for
-   \param ldb_res pointer on pointer to the LDB message returned by
-   the function
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_search_dn(struct emsabp_context *emsabp_ctx, const char *dn, 
-                                         struct ldb_message **ldb_res)
-{
-       struct ldb_dn           *ldb_dn = NULL;
-       struct ldb_result       *res = NULL;
-       const char * const      recipient_attrs[] = { "*", NULL };
-       int                     ret;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!dn, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ldb_res, MAPI_E_INVALID_PARAMETER, NULL);
-
-       ldb_dn = ldb_dn_new(emsabp_ctx->mem_ctx, emsabp_ctx->samdb_ctx, dn);
-       OPENCHANGE_RETVAL_IF(!ldb_dn_validate(ldb_dn), MAPI_E_CORRUPT_STORE, NULL);
-
-       ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res, ldb_dn,
-                        LDB_SCOPE_BASE, recipient_attrs, NULL);
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count || res->count != 1, MAPI_E_CORRUPT_STORE, NULL);
-
-       *ldb_res = res->msgs[0];
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Search for a given AD record given its legacyDN parameter
-   and return the associated LDB message.
-
-   \param emsabp_ctx pointer to the EMSABP context
-   \param legacyDN pointer to the legacyDN attribute value to lookup
-   \param ldb_res pointer on pointer to the LDB message returned by 
-   the function
-   \param pbUseConfPartition pointer on boolean specifying whether the
-   legacyExchangeDN was retrieved from the Configuration parition or
-   not
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_search_legacyExchangeDN(struct emsabp_context *emsabp_ctx, const char *legacyDN,
-                                                       struct ldb_message **ldb_res, bool *pbUseConfPartition)
-{
-       const char * const      recipient_attrs[] = { "*", NULL };
-       int                     ret;
-       struct ldb_result       *res = NULL;
-
-       /* Sanity Checks */
-       OPENCHANGE_RETVAL_IF(!legacyDN, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!ldb_res, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!pbUseConfPartition, MAPI_E_INVALID_PARAMETER, NULL);
-
-       *pbUseConfPartition = true;
-       ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res,
-                        ldb_get_config_basedn(emsabp_ctx->samdb_ctx), 
-                        LDB_SCOPE_SUBTREE, recipient_attrs, "(legacyExchangeDN=%s)",
-                        legacyDN);
-
-       if (ret != LDB_SUCCESS || res->count == 0) {
-               *pbUseConfPartition = false;
-               ret = ldb_search(emsabp_ctx->samdb_ctx, emsabp_ctx->mem_ctx, &res,
-                                ldb_get_default_basedn(emsabp_ctx->samdb_ctx),
-                                LDB_SCOPE_SUBTREE, recipient_attrs, "(legacyExchangeDN=%s)",
-                                legacyDN);
-       }
-       OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_NOT_FOUND, NULL);
-
-       *ldb_res = res->msgs[0];
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Fetch Address Book container record for given ContainerID
-
-   \param mem_ctx memory context for allocation
-   \param emsabp_ctx pointer to the EMSABP context
-   \param ContainerID id of the container to fetch
-   \param ldb_msg pointer on pointer to the LDB message returned by
-   the function
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_ERROR
- */
-_PUBLIC_ enum MAPISTATUS emsabp_ab_container_by_id(TALLOC_CTX *mem_ctx,
-                                                  struct emsabp_context *emsabp_ctx,
-                                                  uint32_t ContainerID,
-                                                  struct ldb_message **ldb_msg)
-{
-       int                     ret;
-       char                    *dn;
-       const char * const      recipient_attrs[] = { "globalAddressList", NULL };
-       struct ldb_result       *res = NULL;
-
-       if (!ContainerID) {
-               /* if GAL is requested */
-               ret = ldb_search(emsabp_ctx->samdb_ctx, mem_ctx, &res,
-                                ldb_get_config_basedn(emsabp_ctx->samdb_ctx),
-                                LDB_SCOPE_SUBTREE, recipient_attrs, "(globalAddressList=*)");
-               OPENCHANGE_RETVAL_IF(ret != LDB_SUCCESS || !res->count, MAPI_E_CORRUPT_STORE, NULL);
-
-               /* TODO: If more than one GAL, determine the most appropriate */
-
-               dn = (char *) ldb_msg_find_attr_as_string(res->msgs[0], "globalAddressList", NULL);
-               OPENCHANGE_RETVAL_IF(!dn, MAPI_E_CORRUPT_STORE, NULL);
-       } else {
-               /* fetch a container we have already recorded */
-               ret = emsabp_tdb_fetch_dn_from_MId(mem_ctx, emsabp_ctx->tdb_ctx, ContainerID, &dn);
-               OPENCHANGE_RETVAL_IF(!MAPI_STATUS_IS_OK(ret), MAPI_E_INVALID_BOOKMARK, NULL);
-       }
-
-       ret = emsabp_search_dn(emsabp_ctx, dn, ldb_msg);
-       OPENCHANGE_RETVAL_IF(!MAPI_STATUS_IS_OK(ret), MAPI_E_CORRUPT_STORE, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Enumerate AB container entries
-
-   \param mem_ctx pointer to the memory context
-   \param emsabp_ctx pointer to the EMSABP context
-   \param ContainerID id of the container to fetch
-   \param ldb_res pointer on pointer to the LDB result returned by the
-   function
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_ab_container_enum(TALLOC_CTX *mem_ctx,
-                                                 struct emsabp_context *emsabp_ctx,
-                                                 uint32_t ContainerID,
-                                                 struct ldb_result **ldb_res)
-{
-       enum MAPISTATUS         retval;
-       int                     ldb_ret;
-       struct ldb_message      *ldb_msg_ab;
-       const char              *purportedSearch;
-       const char * const      recipient_attrs[] = { "*", NULL };
-
-       /* Fetch AB container record */
-       retval = emsabp_ab_container_by_id(mem_ctx, emsabp_ctx, ContainerID, &ldb_msg_ab);
-       OPENCHANGE_RETVAL_IF(!MAPI_STATUS_IS_OK(retval), MAPI_E_INVALID_BOOKMARK, NULL);
-
-       purportedSearch = ldb_msg_find_attr_as_string(ldb_msg_ab, "purportedSearch", NULL);
-       if (!purportedSearch) {
-               *ldb_res = talloc_zero(mem_ctx, struct ldb_result);
-               return MAPI_E_SUCCESS;
-       }
-       OPENCHANGE_RETVAL_IF(!purportedSearch, MAPI_E_INVALID_BOOKMARK, NULL);
-
-       /* Search AD with purportedSearch filter */
-       ldb_ret = ldb_search(emsabp_ctx->samdb_ctx, mem_ctx, ldb_res,
-                            ldb_get_default_basedn(emsabp_ctx->samdb_ctx),
-                            LDB_SCOPE_SUBTREE, recipient_attrs, 
-                            "%s", purportedSearch);
-
-       return (ldb_ret != LDB_SUCCESS) ? MAPI_E_NOT_FOUND : MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/nspi/emsabp_property.c b/branches/plugfest/mapiproxy/servers/default/nspi/emsabp_property.c
deleted file mode 100644 (file)
index 9413b0f..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-   OpenChange Server implementation.
-
-   EMSABP: Address Book Provider implementation
-
-   Copyright (C) Julien Kerihuel 2009.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file emsabp_property.c
-
-   \brief Property Tag to AD attributes mapping
- */
-
-#include "dcesrv_exchange_nsp.h"
-
-struct emsabp_property {
-       uint32_t        ulPropTag;
-       const char      *attribute;
-       bool            ref;
-       const char      *ref_attr;
-};
-
-static const struct emsabp_property emsabp_property[] = {
-       { PR_ACCOUNT,                           "sAMAccountName",       false,  NULL                    },
-       { PR_COMPANY_NAME,                      "company",              false,  NULL                    },
-       { PR_DISPLAY_NAME,                      "displayName",          false,  NULL                    },
-       { PR_EMAIL_ADDRESS,                     "legacyExchangeDN",     false,  NULL                    },
-       { PR_EMS_AB_HOME_MDB,                   "homeMDB",              true,   "legacyExchangeDN"      },
-       { PR_EMS_AB_PROXY_ADDRESSES,            "proxyAddresses",       false,  NULL                    },
-       { PR_EMS_AB_PROXY_ADDRESSES_UNICODE,    "proxyAddresses",       false,  NULL                    },
-       { PR_EMS_AB_NETWORK_ADDRESS,            "networkAddress",       false,  NULL                    },
-       { PR_TITLE,                             "personalTitle",        false,  NULL                    },
-       { 0,                                    NULL,                   false,  NULL                    }
-};
-
-
-/**
-   \details Return the AD attribute name associated to a property tag
-
-   \param ulPropTag the property tag to lookup
-
-   \return valid pointer to the attribute name on success, otherwise
-   NULL
- */
-_PUBLIC_ const char *emsabp_property_get_attribute(uint32_t ulPropTag)
-{
-       int             i;
-
-       /* if ulPropTag type is PT_UNICODE, turn it to PT_STRING8 */
-       if ((ulPropTag & 0xFFFF) == PT_UNICODE) {
-               ulPropTag &= 0xFFFF0000;
-               ulPropTag += PT_STRING8;
-       }
-
-       for (i = 0; emsabp_property[i].attribute; i++) {
-               if (ulPropTag == emsabp_property[i].ulPropTag) {
-                       return emsabp_property[i].attribute;
-               }
-       }
-
-       return NULL;
-}
-
-
-/**
-   \details Return the property tag associated to AD attribute name
-
-   \param attribute the AD attribute name to lookup
-
-   \return property tag value on success, otherwise PT_ERROR
- */
-_PUBLIC_ uint32_t emsabp_property_get_ulPropTag(const char *attribute)
-{
-       int             i;
-
-       if (!attribute) return PT_ERROR;
-
-       for (i = 0; emsabp_property[i].attribute; i++) {
-               if (!strcmp(attribute, emsabp_property[i].attribute)) {
-                       return emsabp_property[i].ulPropTag;
-               }
-       }
-
-       return PT_ERROR;
-}
-
-
-/**
-   \details Returns whether the given attribute's value references
-   another AD record
-
-   \param ulPropTag the property tag to lookup
-
-   \return 1 if the attribute is a reference, 0 if not and -1 if an
-   error occurred.
- */
-_PUBLIC_ int emsabp_property_is_ref(uint32_t ulPropTag)
-{
-       int             i;
-
-       if (!ulPropTag) return -1;
-
-       for (i = 0; emsabp_property[i].attribute; i++) {
-               if (ulPropTag == emsabp_property[i].ulPropTag) {
-                       return (emsabp_property[i].ref == true) ? 1 : 0;
-               }
-       }
-
-       return -1;
-}
-
-
-/**
-   \details Returns the reference attr for a given attribute
-
-   \param ulPropTag property tag to lookup
-
-   \return pointer to a valid reference attribute on success,
-   otherwise NULL
- */
-_PUBLIC_ const char *emsabp_property_get_ref_attr(uint32_t ulPropTag)
-{
-       int             i;
-
-       if (!ulPropTag) return NULL;
-
-       for (i = 0; emsabp_property[i].attribute; i++) {
-               if (ulPropTag == emsabp_property[i].ulPropTag) {
-                       return emsabp_property[i].ref_attr;
-               }
-       }
-
-       return NULL;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/nspi/emsabp_tdb.c b/branches/plugfest/mapiproxy/servers/default/nspi/emsabp_tdb.c
deleted file mode 100644 (file)
index 640df2d..0000000
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
-   OpenChange Server implementation.
-
-   EMSABP: Address Book Provider implementation
-
-   Copyright (C) Julien Kerihuel 2006-2009.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-   \file emsabp_tdb.c
-
-   \brief EMSABP TDB database API
-*/
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_nsp.h"
-#include <util/debug.h>
-
-/**
-   \details Structure to be used for MId traversal within TDB
- */
-struct traverse_MId {
-       uint32_t        MId;
-       bool            found;
-};
-
-/**
-   \details Open EMSABP TDB database
-
-   \param mem_ctx pointer to the memory context
-   \param lp_ctx pointer to the loadparm context
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ TDB_CONTEXT *emsabp_tdb_init(TALLOC_CTX *mem_ctx, 
-                                     struct loadparm_context *lp_ctx)
-{
-       enum MAPISTATUS                 retval;
-       TDB_CONTEXT                     *tdb_ctx;
-       TDB_DATA                        key;
-       TDB_DATA                        dbuf;
-       int                             ret;
-
-       /* Sanity checks */
-       if (!lp_ctx) return NULL;
-
-       /* Step 0. Retrieve a TDB context pointer on the emsabp_tdb database */
-       tdb_ctx = mapiproxy_server_emsabp_tdb_init(lp_ctx);
-       if (!tdb_ctx) return NULL;
-
-       /* Step 1. If EMSABP_TDB_DATA_REC doesn't exist, create it */
-       retval = emsabp_tdb_fetch(tdb_ctx, EMSABP_TDB_DATA_REC, &dbuf);
-       if (retval == MAPI_E_NOT_FOUND) {
-               key.dptr = (unsigned char *) EMSABP_TDB_DATA_REC;
-               key.dsize = strlen(EMSABP_TDB_DATA_REC);
-
-               dbuf.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", EMSABP_TDB_MID_START);
-               dbuf.dsize = strlen((const char *)dbuf.dptr);
-
-               ret = tdb_store(tdb_ctx, key, dbuf, TDB_INSERT);
-               if (ret == -1) {
-                       DEBUG(3, ("[%s:%d]: Unable to create %s record: %s\n", __FUNCTION__, __LINE__,
-                                 EMSABP_TDB_DATA_REC, tdb_errorstr(tdb_ctx)));
-                       tdb_close(tdb_ctx);
-                       return NULL;
-               }
-       } else {
-               free (dbuf.dptr);
-       }
-
-       return tdb_ctx;
-}
-
-
-/**
-   \details Initialize a temporary (on-memory) TDB database. This
-   database is used to store temporary MId used within a session
-   lifetime.
-
-   \param mem_ctx pointer to the memory context
-
-   \return Allocated TDB context on success, otherwise NULL
- */
-_PUBLIC_ TDB_CONTEXT *emsabp_tdb_init_tmp(TALLOC_CTX *mem_ctx)
-{
-       TDB_CONTEXT     *tdb_ctx;
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       int             ret;
-
-       /* Step 0. Initialize the temporary TDB database */
-       tdb_ctx = tdb_open(NULL, 0, TDB_INTERNAL, O_RDWR|O_CREAT, 0600);
-       
-       /* Step 1. Create EMSABP_TMP_TDB_DATA_REC record */
-       key.dptr = (unsigned char *) EMSABP_TDB_DATA_REC;
-       key.dsize = strlen(EMSABP_TDB_DATA_REC);
-
-       dbuf.dptr = (unsigned char *) talloc_asprintf(mem_ctx, "0x%x", EMSABP_TDB_TMP_MID_START);
-       dbuf.dsize = strlen((const char *)dbuf.dptr);
-       
-       ret = tdb_store(tdb_ctx, key, dbuf, TDB_INSERT);
-       if (ret == -1) {
-               DEBUG(3, ("[%s:%d]: Unable to create %s record: %s\n", __FUNCTION__, __LINE__,
-                         EMSABP_TDB_DATA_REC, tdb_errorstr(tdb_ctx)));
-               tdb_close(tdb_ctx);
-               return NULL;
-       } 
-       
-       return tdb_ctx;
-}
-
-
-/**
-   \details Close EMSABP TDB database
-
-   \return MAPI_E_SUCCESS on success, otherwise
-   MAPI_E_INVALID_PARAMETER
- */
-_PUBLIC_ enum MAPISTATUS emsabp_tdb_close(TDB_CONTEXT *tdb_ctx)
-{
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!tdb_ctx, MAPI_E_INVALID_PARAMETER, NULL);
-
-       tdb_close(tdb_ctx);
-       DEBUG(0, ("TDB database closed\n"));
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Fetch an element within a TDB database given its key
-
-   \param tdb_ctx pointer to the EMSABP TDB context
-   \param keyname pointer to the TDB key to fetch
-   \param result pointer on TDB results
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
- */
-_PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch(TDB_CONTEXT *tdb_ctx,
-                                         const char *keyname,
-                                         TDB_DATA *result)
-{
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       size_t          keylen;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!keyname, MAPI_E_INVALID_PARAMETER, NULL);
-
-       keylen = strlen(keyname);
-       OPENCHANGE_RETVAL_IF(!keylen, MAPI_E_INVALID_PARAMETER, NULL);
-
-       key.dptr = (unsigned char *)keyname;
-       key.dsize = keylen;
-
-       dbuf = tdb_fetch(tdb_ctx, key);
-       OPENCHANGE_RETVAL_IF(!dbuf.dptr, MAPI_E_NOT_FOUND, NULL);
-       OPENCHANGE_RETVAL_IF(!dbuf.dsize, MAPI_E_NOT_FOUND, NULL);
-
-       if (!result) {
-               free (dbuf.dptr);
-       } else {
-               *result = dbuf;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Retrieve the Minimal EntryID associated to a given DN
-
-   \param tdb_ctx pointer to the EMSABP TDB context
-   \param keyname pointer to the TDB key to search for
-   \param MId pointer on the integer the function returns
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch_MId(TDB_CONTEXT *tdb_ctx,
-                                             const char *keyname,
-                                             uint32_t *MId)
-{
-       TALLOC_CTX      *mem_ctx;
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       char            *str;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!keyname, MAPI_E_INVALID_PARAMETER, NULL);
-       OPENCHANGE_RETVAL_IF(!MId, MAPI_E_INVALID_PARAMETER, NULL);
-
-       key.dptr = (unsigned char *) keyname;
-       key.dsize = strlen(keyname);
-
-       dbuf = tdb_fetch(tdb_ctx, key);
-       OPENCHANGE_RETVAL_IF(!dbuf.dptr, MAPI_E_NOT_FOUND, NULL);
-       OPENCHANGE_RETVAL_IF(!dbuf.dsize, MAPI_E_NOT_FOUND, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "emsabp_tdb_fetch_MId");
-       str = talloc_strndup(mem_ctx, (char *)dbuf.dptr, dbuf.dsize);
-       *MId = strtol((const char *)str, NULL, 16);
-       talloc_free(mem_ctx);
-       free(dbuf.dptr);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static int emsabp_tdb_traverse_MId(TDB_CONTEXT *tdb_ctx, 
-                                  TDB_DATA key, TDB_DATA dbuf, 
-                                  void *state)
-{
-       TALLOC_CTX              *mem_ctx;
-       uint32_t                value;
-       char                    *value_str = NULL;
-       struct traverse_MId     *mid_trav = (struct traverse_MId *) state;
-
-       mem_ctx = talloc_named(NULL, 0, "emsabp_tdb_traverse_MId");
-       value_str = talloc_strndup(mem_ctx, (char *)dbuf.dptr, dbuf.dsize);
-       value = strtol((const char *)value_str, NULL, 16);
-       talloc_free(mem_ctx);
-
-       if (value == mid_trav->MId) {
-               mid_trav->found = true;
-               return 1;
-       }
-
-       return 0;
-}
-
-
-/**
-   \details Traverse the EMSABP TDB database and look for the input
-   MId
-
-   \param tdb_ctx pointer to the EMSABP TDB context
-   \param MId MID to lookup
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool emsabp_tdb_lookup_MId(TDB_CONTEXT *tdb_ctx,
-                                   uint32_t MId)
-{
-       int                     ret;
-       struct traverse_MId     mid_trav = { MId, false };
-
-       ret = tdb_traverse(tdb_ctx, emsabp_tdb_traverse_MId, (void *)&mid_trav);
-
-       return (ret > 0) && mid_trav.found;
-}
-
-
-static int emsabp_tdb_traverse_MId_DN(TDB_CONTEXT *tdb_ctx,
-                                     TDB_DATA key, TDB_DATA dbuf,
-                                     void *state)
-{
-       char                    *MId;
-       uint32_t                value;
-       struct emsabp_MId       *emsabp_MId = (struct emsabp_MId *) state;
-
-       if (key.dptr && strncmp((const char *)key.dptr, EMSABP_TDB_DATA_REC, key.dsize)) {
-               MId = talloc_strndup(emsabp_MId, (char *)dbuf.dptr, dbuf.dsize);
-               value = strtol((const char *)MId, NULL, 16);
-               talloc_free(MId);
-               if (value == emsabp_MId->MId) {
-                       emsabp_MId->dn = talloc_strndup(emsabp_MId, (char *)key.dptr, key.dsize);
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-
-/**
-   \details Traverse the EMSABP TDB and fetch the DN associated with
-   the MId
-
-   \param mem_ctx pointer to the memory context
-   \param tdb_ctx pointer to the EMSABP TDB context
-   \param MId MID to search
-   \param dn pointer on pointer to the dn to return
-
-   \return MAPI_E_SUCCESS on success, otherwise false
- */
-_PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch_dn_from_MId(TALLOC_CTX *mem_ctx,
-                                                     TDB_CONTEXT *tdb_ctx,
-                                                     uint32_t MId,
-                                                     char **dn)
-{
-       int                     ret;
-       struct emsabp_MId       *emsabp_MId;
-       
-       emsabp_MId = talloc_zero(mem_ctx, struct emsabp_MId);
-       emsabp_MId->dn = NULL;
-       emsabp_MId->MId = MId;
-       
-       ret = tdb_traverse(tdb_ctx, emsabp_tdb_traverse_MId_DN, (void *)emsabp_MId);
-       if (ret > -1 && emsabp_MId->dn) {
-               *dn = talloc_strdup(mem_ctx, emsabp_MId->dn);
-               talloc_free(emsabp_MId);
-               return MAPI_E_SUCCESS;
-       }
-
-       *dn = NULL;
-       talloc_free(emsabp_MId);
-
-       return MAPI_E_NOT_FOUND;
-}
-
-
-/**
-   \details Insert an element into TDB database
-
-   \param tdb_ctx pointer to the EMSABP TDB context
-   \param keyname pointer to the TDB key name string
-
-   \return MAPI_E_SUCCESS on success, otherwise MAPI error
- */
-_PUBLIC_ enum MAPISTATUS emsabp_tdb_insert(TDB_CONTEXT *tdb_ctx,
-                                          const char *keyname)
-{
-       enum MAPISTATUS retval;
-       TALLOC_CTX      *mem_ctx;
-       TDB_DATA        key;
-       TDB_DATA        dbuf;
-       char            *str;
-       int             index;
-       int             ret;
-
-       /* Sanity checks */
-       OPENCHANGE_RETVAL_IF(!tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
-       OPENCHANGE_RETVAL_IF(!keyname, MAPI_E_INVALID_PARAMETER, NULL);
-
-       mem_ctx = talloc_named(NULL, 0, "emsabp_tdb_insert");
-       OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
-
-       /* Step 1. Check if the record already exists */
-       retval = emsabp_tdb_fetch(tdb_ctx, keyname, &dbuf);
-       OPENCHANGE_RETVAL_IF(!retval, ecExiting, mem_ctx);
-
-       /* Step 2. Retrieve the latest TDB data value inserted */
-       retval = emsabp_tdb_fetch(tdb_ctx, EMSABP_TDB_DATA_REC, &dbuf);
-       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-
-       str = talloc_strndup(mem_ctx, (char *)dbuf.dptr, dbuf.dsize);
-       index = strtol(str, NULL, 16);
-       index += 1;
-       talloc_free(str);
-       free(dbuf.dptr);
-
-       dbuf.dptr = (unsigned char *)talloc_asprintf(mem_ctx, "0x%x", index);
-       dbuf.dsize = strlen((const char *)dbuf.dptr);
-
-       /* Step 3. Insert the new record */
-       key.dptr = (unsigned char *)keyname;
-       key.dsize = strlen(keyname);
-       
-       ret = tdb_store(tdb_ctx, key, dbuf, TDB_INSERT);
-       OPENCHANGE_RETVAL_IF(ret == -1, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       /* Step 4. Update Data record */
-       key.dptr = (unsigned char *) EMSABP_TDB_DATA_REC;
-       key.dsize = strlen((const char *)key.dptr);
-
-       ret = tdb_store(tdb_ctx, key, dbuf, TDB_MODIFY);
-       OPENCHANGE_RETVAL_IF(ret == -1, MAPI_E_CORRUPT_STORE, mem_ctx);
-
-       talloc_free(mem_ctx);
-
-       return MAPI_E_SUCCESS;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.c b/branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.c
deleted file mode 100644 (file)
index dbb19b4..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
-   MAPI Proxy - Exchange RFR Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
-   \file dcesrv_exchange_ds_rfr.c
-
-   \brief OpenChange RFR Server implementation
- */
-
-#include "mapiproxy/dcesrv_mapiproxy.h"
-#include "dcesrv_exchange_ds_rfr.h"
-
-/**
-   \details exchange_ds_rfr RfrGetNewDSA (0x0) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the RfrGetNewDSA request data
-
-   \note We incorrectly assume input pUserDN is correct and available,
-   but it is OK for now.
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_RfrGetNewDSA(struct dcesrv_call_state *dce_call,
-                                          TALLOC_CTX *mem_ctx,
-                                          struct RfrGetNewDSA *r)
-{
-       const char              *netbiosname = NULL;
-       const char              *realm = NULL;
-       char                    *fqdn = NULL;
-
-       DEBUG(5, ("exchange_ds_rfr: RfrGetNewDSA (0x0)\n"));
-
-       /* Step 0. Ensure incoming user is authenticated */
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-
-               r->out.ppszUnused = NULL;
-               r->out.ppszServer = NULL;
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       /* Step 1. We don't have load-balancing support yet, just return Samba FQDN name */
-       netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
-       realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
-       if (!netbiosname || !realm) {
-               r->out.ppszUnused = NULL;
-               r->out.ppszServer = NULL;
-               r->out.result = MAPI_E_NO_SUPPORT;
-               return MAPI_E_NO_SUPPORT;                       
-       }
-
-       fqdn = talloc_asprintf(mem_ctx, "%s.%s", netbiosname, realm);
-       r->out.ppszUnused = NULL;
-       r->out.ppszServer = talloc_array(mem_ctx, const char *, 2);
-       r->out.ppszServer[0] = strlower_talloc(mem_ctx, fqdn);
-       r->out.ppszServer[1] = NULL;
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details exchange_ds_rrf RfrGetFQDNFromLegacyDN (0x1) function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r pointer to the RfrGetFQDNFromLegacyDN request data
-
-   \return MAPI_E_SUCCESS on success
- */
-static enum MAPISTATUS dcesrv_RfrGetFQDNFromLegacyDN(struct dcesrv_call_state *dce_call,
-                                                    TALLOC_CTX *mem_ctx,
-                                                    struct RfrGetFQDNFromLegacyDN *r)
-{
-       char            *fqdn;
-       const char      *netbiosname;
-       const char      *realm;
-
-       DEBUG(3, ("exchange_ds_rfr: RfrGetFQDNFromLegacyDN (0x1)\n"));
-
-       if (!NTLM_AUTH_IS_OK(dce_call)) {
-               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
-
-       failure:
-               r->out.ppszServerFQDN = talloc_array(mem_ctx, const char *, 2);
-               r->out.ppszServerFQDN[0] = NULL;
-               r->out.result = MAPI_E_LOGON_FAILED;
-               return MAPI_E_LOGON_FAILED;
-       }
-
-       netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
-       realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
-       if (!netbiosname || !realm) {
-               goto failure;
-       }
-
-       fqdn = talloc_asprintf(mem_ctx, "%s.%s", netbiosname, realm);
-       r->out.ppszServerFQDN = talloc_array(mem_ctx, const char *, 2);
-       r->out.ppszServerFQDN[0] = strlower_talloc(mem_ctx, fqdn);
-       talloc_free(fqdn);
-       r->out.result = MAPI_E_SUCCESS;
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
-   \details Dispatch incoming RFR call to the correct OpenChange server function
-
-   \param dce_call pointer to the session context
-   \param mem_ctx pointer to the memory context
-   \param r generic pointer on RFR data
-   \param mapiproxy pointer to the mapiproxy structure controlling
-   mapiproxy behavior
-
-   \return NT_STATUS_OK
- */
-static NTSTATUS dcesrv_exchange_ds_rfr_dispatch(struct dcesrv_call_state *dce_call,
-                                               TALLOC_CTX *mem_ctx,
-                                               void *r, struct mapiproxy *mapiproxy)
-{
-       enum MAPISTATUS                         retval;
-       const struct ndr_interface_table        *table;
-       uint16_t                                opnum;
-
-       table = (const struct ndr_interface_table *) dce_call->context->iface->private_data;
-       opnum = dce_call->pkt.u.request.opnum;
-
-       /* Sanity checks */
-       if (!table) return NT_STATUS_UNSUCCESSFUL;
-       if (table->name && strcmp(table->name, NDR_EXCHANGE_DS_RFR_NAME)) return NT_STATUS_UNSUCCESSFUL;
-
-       switch (opnum) {
-       case NDR_RFRGETNEWDSA:
-               retval = dcesrv_RfrGetNewDSA(dce_call, mem_ctx, (struct RfrGetNewDSA *)r);
-               break;
-       case NDR_RFRGETFQDNFROMLEGACYDN:
-               retval = dcesrv_RfrGetFQDNFromLegacyDN(dce_call, mem_ctx, (struct RfrGetFQDNFromLegacyDN *)r);
-               break;
-       }
-
-
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Initialize the RFR OpenChange server
-
-   \param dce_ctx pointer to the server context
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS dcesrv_exchange_ds_rfr_init(struct dcesrv_context *dce_ctx)
-{
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Terminate the RFR connection
-
-   \param server_id reference to the server identifier structure
-   \param context_id the connection context identifier
-
-   \return NT_STATUS_OK on success
- */
-static NTSTATUS dcesrv_exchange_ds_rfr_unbind(struct server_id server_id, 
-                                             uint32_t context_id)
-{
-       return NT_STATUS_OK;
-}
-
-
-/**
-   \details Entry point for the default OpenChange RFR server
-
-   \return NT_STATUS_OK on success, otherwise NTSTATUS error
- */
-NTSTATUS samba_init_module(void)
-{
-       struct mapiproxy_module server;
-       NTSTATUS                ret;
-
-       /* Fill in our name */
-       server.name = "exchange_ds_rfr";
-       server.status = MAPIPROXY_DEFAULT;
-       server.description = "OpenChange RFR server";
-       server.endpoint = "exchange_ds_rfr";
-
-       /* Fill in all the operations */
-       server.init = dcesrv_exchange_ds_rfr_init;
-       server.unbind = dcesrv_exchange_ds_rfr_unbind;
-       server.dispatch = dcesrv_exchange_ds_rfr_dispatch;
-       server.push = NULL;
-       server.pull = NULL;
-       server.ndr_pull = NULL;
-
-       /* Register ourselves with the MAPIPROXY server subsystem */
-       ret = mapiproxy_server_register(&server);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(0, ("Failed to register the 'exchange_ds_rfr' default mapiproxy server!\n"));
-               return ret;
-       }
-
-       return ret;
-}
diff --git a/branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.h b/branches/plugfest/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.h
deleted file mode 100644 (file)
index 4c16423..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-   MAPI Proxy - Exchange RFR Server
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef        __DCESRV_EXCHANGE_DS_RFR_H
-#define        __DCESRV_EXCHANGE_DS_RFR_H
-
-#include "mapiproxy/libmapiproxy/libmapiproxy.h"
-#include <util/debug.h>
-
-#ifndef        __BEGIN_DECLS
-#ifdef __cplusplus
-#define        __BEGIN_DECLS           extern "C" {
-#define        __END_DECLS             }
-#else
-#define        __BEGIN_DECLS
-#define        __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-
-NTSTATUS       samba_init_module(void);
-
-__END_DECLS
-
-#endif /* __DCESRV_EXCHANGE_DS_RFR_H */
diff --git a/branches/plugfest/missing b/branches/plugfest/missing
deleted file mode 100755 (executable)
index 894e786..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/branches/plugfest/ndr_mapi.c b/branches/plugfest/ndr_mapi.c
deleted file mode 100644 (file)
index 9d6cedd..0000000
+++ /dev/null
@@ -1,1942 +0,0 @@
-/* 
-   OpenChange implementation.
-
-   libndr mapi support
-
-   Copyright (C) Julien Kerihuel 2005-2010
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include <ndr.h>
-#include "gen_ndr/ndr_exchange.h"
-
-#define MIN(a,b) ((a)<(b)?(a):(b))
-
-_PUBLIC_ void obfuscate_data(uint8_t *data, uint32_t size, uint8_t salt)
-{
-       uint32_t i;
-
-       for (i=0; i<size; i++) {
-               data[i] ^= salt;
-       }
-}
-
-ssize_t lzxpress_compress(const uint8_t *input,
-                         uint32_t input_size,
-                         uint8_t *output,
-                         uint32_t max_output_size);
-
-ssize_t lzxpress_decompress(const uint8_t *input,
-                           uint32_t input_size,
-                           uint8_t *output,
-                           uint32_t max_output_size);
-
-/**
-   \details Compress a LZXPRESS chunk
-
-   \param ndrpush pointer to the compressed data to return
-   \param ndrpull pointer to the uncompressed data used for compression
-   \param last pointer on boolean to define whether or not this is the
-   last chunk
-
-   \return NDR_ERR_SUCCESS on success, otherwise NDR error
- */
-static enum ndr_err_code ndr_push_lxpress_chunk(struct ndr_push *ndrpush,
-                                               struct ndr_pull *ndrpull,
-                                               bool *last)
-{
-       DATA_BLOB       comp_chunk;
-       uint32_t        comp_chunk_size_offset;
-       DATA_BLOB       plain_chunk;
-       uint32_t        plain_chunk_size;
-       uint32_t        plain_chunk_offset;
-       uint32_t        max_plain_size = 0x00010000;
-       uint32_t        max_comp_size = 0x00020000 + 2; /* TODO: use the correct value here */
-       ssize_t         ret;
-
-       /* Step 1. Retrieve the uncompressed buf */
-       plain_chunk_size = MIN(max_plain_size, ndrpull->data_size - ndrpull->offset);
-       plain_chunk_offset = ndrpull->offset;
-       NDR_CHECK(ndr_pull_advance(ndrpull, plain_chunk_size));
-
-       plain_chunk.data = ndrpull->data + plain_chunk_offset;
-       plain_chunk.length = plain_chunk_size;
-       
-       if (plain_chunk_size < max_plain_size) {
-               *last = true;
-       };
-
-       comp_chunk_size_offset = ndrpush->offset;
-       NDR_CHECK(ndr_push_expand(ndrpush, max_comp_size));
-
-       comp_chunk.data = ndrpush->data + ndrpush->offset;
-       comp_chunk.length = max_comp_size;
-
-       /* Compressing the buffer using LZ Xpress algorithm */
-       ret = lzxpress_compress(plain_chunk.data,
-                               plain_chunk.length,
-                               comp_chunk.data,
-                               comp_chunk.length);
-
-       if (ret < 0) {
-               return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
-                                     "XPRESS lzxpress_compress() returned %d\n",
-                                     (int)ret);
-       }
-       comp_chunk.length = ret;
-
-       ndrpush->offset += comp_chunk.length;
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_lxpress_chunk(struct ndr_pull *ndrpull,
-                                               struct ndr_push *ndrpush,
-                                               ssize_t decompressed_len,
-                                               bool *last)
-{
-       DATA_BLOB       comp_chunk;
-       DATA_BLOB       plain_chunk;
-       uint32_t        plain_chunk_offset;
-       int             ret;
-
-       /* Step 1. Retrieve the compressed buf */
-       comp_chunk.length = ndrpull->data_size;
-       comp_chunk.data = ndrpull->data;
-
-       plain_chunk_offset = ndrpush->offset;
-       NDR_CHECK(ndr_push_zero(ndrpush, decompressed_len));
-       plain_chunk.length = decompressed_len;
-       plain_chunk.data = ndrpush->data + plain_chunk_offset;
-
-       ret = lzxpress_decompress(comp_chunk.data,
-                                 comp_chunk.length,
-                                 plain_chunk.data,
-                                 plain_chunk.length);
-       if (ret < 0) {
-               return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION,
-                                     "XPRESS lzxpress_decompress() returned %d\n",
-                                     (int)ret);
-       }
-       plain_chunk.length = ret;
-       ndrpush->offset = ret;
-
-       if ((decompressed_len < 0x00010000) || (ndrpull->offset+4 >= ndrpull->data_size)) {
-               /* this is the last chunk */
-               *last = true;
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_lzxpress_decompress(struct ndr_pull *subndr,
-                                                       struct ndr_pull **_comndr,
-                                                       ssize_t decompressed_len)
-{
-       struct ndr_push *ndrpush;
-       struct ndr_pull *comndr;
-       DATA_BLOB       uncompressed;
-       bool            last = false;
-
-       ndrpush = ndr_push_init_ctx(subndr);
-       NDR_ERR_HAVE_NO_MEMORY(ndrpush);
-
-       while (!last) {
-               NDR_CHECK(ndr_pull_lxpress_chunk(subndr, ndrpush, decompressed_len, &last));
-       }
-
-       uncompressed = ndr_push_blob(ndrpush);
-       if (uncompressed.length != decompressed_len) {
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION,
-                                     "Bad uncompressed_len [%u] != [%u](0x%08X) (PULL)",
-                                     (int)uncompressed.length,
-                                     (int)decompressed_len,
-                                     (int)decompressed_len);
-       }
-
-       comndr = talloc_zero(subndr, struct ndr_pull);
-       NDR_ERR_HAVE_NO_MEMORY(comndr);
-       comndr->flags = subndr->flags;
-       comndr->current_mem_ctx = subndr->current_mem_ctx;
-       comndr->data = uncompressed.data;
-       comndr->data_size = uncompressed.length;
-       comndr->offset = 0;
-
-       *_comndr = comndr;
-       return NDR_ERR_SUCCESS;
-}
-
-/**
-   \details Push a compressed LZXPRESS blob
-
-   \param subndr pointer to the compressed blob the function returns
-   \param _uncomndr pointer on pointer to the uncompressed DATA blob
-
-   \return NDR_ERR_SUCCESS on success, otherwise NDR error
- */
-_PUBLIC_ enum ndr_err_code ndr_push_lzxpress_compress(struct ndr_push *subndr,
-                                                     struct ndr_push *uncomndr)
-{
-       struct ndr_pull *ndrpull;
-       bool            last = false;
-
-       ndrpull = talloc_zero(uncomndr, struct ndr_pull);
-       NDR_ERR_HAVE_NO_MEMORY(ndrpull);
-       ndrpull->flags = uncomndr->flags;
-       ndrpull->data = uncomndr->data;
-       ndrpull->data_size = uncomndr->offset;
-       ndrpull->offset = 0;
-
-       while (!last) {
-               NDR_CHECK(ndr_push_lxpress_chunk(subndr, ndrpull, &last));
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_pull_mapi2k7_request(struct ndr_pull *ndr, int ndr_flags, struct mapi2k7_request *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_RPC_HEADER_EXT(ndr, NDR_SCALARS, &r->header));
-               {
-                       uint32_t _flags_save_mapi_request = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
-                       {
-                               struct ndr_pull *_ndr_buffer;
-
-                               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                                       NDR_PULL_ALLOC(ndr, r->mapi_request);
-                               }
-
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 0, -1));
-                               {
-                                       if (r->header.Flags & RHEF_Compressed) {
-                                               struct ndr_pull *_ndr_data_compressed = NULL;
-
-                                               NDR_CHECK(ndr_pull_lzxpress_decompress(_ndr_buffer, &_ndr_data_compressed, r->header.SizeActual));
-                                               NDR_CHECK(ndr_pull_mapi_request(_ndr_data_compressed, NDR_SCALARS|NDR_BUFFERS, r->mapi_request));
-                                       } else if (r->header.Flags & RHEF_XorMagic) {
-                                               obfuscate_data(_ndr_buffer->data, _ndr_buffer->data_size, 0xA5);
-                                               NDR_CHECK(ndr_pull_mapi_request(_ndr_buffer, NDR_SCALARS|NDR_BUFFERS, r->mapi_request));
-                                       } else {
-                                               NDR_CHECK(ndr_pull_mapi_request(_ndr_buffer, NDR_SCALARS|NDR_BUFFERS, r->mapi_request));
-                                               
-                                       }
-                               }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 0, -1));
-                       }
-                       ndr->flags = _flags_save_mapi_request;
-               }
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_pull_mapi2k7_response(struct ndr_pull *ndr, int ndr_flags, struct mapi2k7_response *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_RPC_HEADER_EXT(ndr, NDR_SCALARS, &r->header));
-               {
-                       uint32_t _flags_save_mapi_response = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REMAINING);
-                       {
-                               struct ndr_pull *_ndr_buffer;
-                               
-                               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                                       NDR_PULL_ALLOC(ndr, r->mapi_response);
-                               }
-                               
-                               NDR_CHECK((ndr_pull_subcontext_start(ndr, &_ndr_buffer, 0, -1)));
-                               {
-                                       if (r->header.Flags & RHEF_Compressed) {
-                                               struct ndr_pull *_ndr_data_compressed = NULL;
-                                               
-                                               NDR_CHECK(ndr_pull_lzxpress_decompress(_ndr_buffer, &_ndr_data_compressed, r->header.SizeActual));
-                                               NDR_CHECK(ndr_pull_mapi_response(_ndr_data_compressed, NDR_SCALARS|NDR_BUFFERS, r->mapi_response));
-                                       } else if (r->header.Flags & RHEF_XorMagic) {
-                                               obfuscate_data(_ndr_buffer->data, _ndr_buffer->data_size, 0xA5);
-                                               NDR_CHECK(ndr_pull_mapi_response(_ndr_buffer, NDR_SCALARS|NDR_BUFFERS, r->mapi_response));
-                                       } else {
-                                               NDR_CHECK(ndr_pull_mapi_response(_ndr_buffer, NDR_SCALARS|NDR_BUFFERS, r->mapi_response));                      
-                                       }
-                               }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 0, -1));
-                       }
-                       ndr->flags = _flags_save_mapi_response;
-               }
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ void ndr_print_AUX_HEADER(struct ndr_print *ndr, const char *name, const struct AUX_HEADER *r)
-{
-       ndr_print_struct(ndr, name, "AUX_HEADER");
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               ndr->depth++;
-               ndr_print_uint16(ndr, "Size", r->Size);
-               ndr_print_AUX_VERSION(ndr, "Version", r->Version);
-
-               switch (r->Version) {
-               case AUX_VERSION_1:
-                       ndr_print_AUX_HEADER_TYPE_1(ndr, "Type", (enum AUX_HEADER_TYPE_1) r->Type);
-                       ndr_print_set_switch_value(ndr, &r->Payload_1, r->Type);
-                       ndr_print_AUX_HEADER_TYPE_UNION_1(ndr, "Payload", &r->Payload_1);
-                       break;
-               case AUX_VERSION_2:
-                       ndr_print_AUX_HEADER_TYPE_2(ndr, "Type", (enum AUX_HEADER_TYPE_2) r->Type);
-                       ndr_print_set_switch_value(ndr, &r->Payload_2, r->Type);
-                       ndr_print_AUX_HEADER_TYPE_UNION_2(ndr, "Payload", &r->Payload_2);
-               }
-               ndr->depth--;
-               ndr->flags = _flags_save_STRUCT;
-       }
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_pull_AUX_HEADER(struct ndr_pull *ndr, int ndr_flags, struct AUX_HEADER *r)
-{
-       struct ndr_pull *_ndr_buffer;
-       uint32_t        _flags_save_STRUCT = ndr->flags;
-       TALLOC_CTX      *_mem_save_AUX_HEADER_0;
-
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Size));
-
-               _mem_save_AUX_HEADER_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 0, r->Size - 2));
-               {
-                       NDR_CHECK(ndr_pull_AUX_VERSION(_ndr_buffer, NDR_SCALARS, &r->Version));
-                       NDR_CHECK(ndr_pull_uint8(_ndr_buffer, NDR_SCALARS, &r->Type));
-                       switch (r->Version) {
-                       case AUX_VERSION_1:
-                               NDR_CHECK(ndr_pull_set_switch_value(_ndr_buffer, &r->Payload_1, r->Type));
-                               NDR_CHECK(ndr_pull_AUX_HEADER_TYPE_UNION_1(_ndr_buffer, NDR_SCALARS, &r->Payload_1));
-                               break;
-                       case AUX_VERSION_2:
-                               NDR_CHECK(ndr_pull_set_switch_value(_ndr_buffer, &r->Payload_2, r->Type));
-                               NDR_CHECK(ndr_pull_AUX_HEADER_TYPE_UNION_2(_ndr_buffer, NDR_SCALARS, &r->Payload_2));
-                               break;
-                       }
-               }
-               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 0, -1));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       ndr->flags = _flags_save_STRUCT;
-
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ void ndr_print_mapi2k7_AuxInfo(struct ndr_print *ndr, const char *name, const struct mapi2k7_AuxInfo *r)
-{
-       uint32_t        i;
-
-       if (r && r->AUX_HEADER) {
-               ndr_print_struct(ndr, name, "mapi2k7_AuxInfo");
-               ndr->depth++;
-               ndr_print_RPC_HEADER_EXT(ndr, "RPC_HEADER_EXT", &r->RPC_HEADER_EXT);
-               for (i = 0; r->AUX_HEADER[i].Size; i++) {
-                       ndr_print_AUX_HEADER(ndr, "AUX_HEADER", &r->AUX_HEADER[i]);
-               }
-               ndr->depth--;
-       } else {
-               ndr_print_pointer(ndr, "mapi2k7_AuxInfo", NULL);
-       }
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_pull_mapi2k7_AuxInfo(struct ndr_pull *ndr, int ndr_flags, struct mapi2k7_AuxInfo *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-
-               /* Sanity Checks */
-               if (!ndr->data_size) {
-                       r->AUX_HEADER = NULL;
-                       return NDR_ERR_SUCCESS;
-               }
-
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_RPC_HEADER_EXT(ndr, NDR_SCALARS, &r->RPC_HEADER_EXT));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REMAINING);
-                       if (r->RPC_HEADER_EXT.Size) {
-                               struct ndr_pull *_ndr_buffer;
-                               TALLOC_CTX      *_mem_save_AUX_HEADER_0;
-                               uint32_t        cntr_AUX_HEADER_0 = 0;
-
-                               _mem_save_AUX_HEADER_0 = NDR_PULL_GET_MEM_CTX(ndr);
-
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 0, r->RPC_HEADER_EXT.Size));
-                               {
-                                       r->AUX_HEADER = talloc_array(_mem_save_AUX_HEADER_0, struct AUX_HEADER, 2);
-
-                                       /* lzxpress case */
-                                       if (r->RPC_HEADER_EXT.Flags & RHEF_Compressed) {
-                                               struct ndr_pull *_ndr_data_compressed = NULL;
-
-                                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-                                               NDR_CHECK(ndr_pull_lzxpress_decompress(_ndr_buffer, &_ndr_data_compressed, r->RPC_HEADER_EXT.SizeActual));
-                                               
-                                               for (cntr_AUX_HEADER_0 = 0; _ndr_data_compressed->offset < _ndr_data_compressed->data_size; cntr_AUX_HEADER_0++) {
-                                                       NDR_CHECK(ndr_pull_AUX_HEADER(_ndr_data_compressed, NDR_SCALARS, &r->AUX_HEADER[cntr_AUX_HEADER_0]));
-                                                       r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               }
-                                               r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               r->AUX_HEADER[cntr_AUX_HEADER_0].Size = 0;
-                                               
-                                       /* obfuscation case */
-                                       } else if (r->RPC_HEADER_EXT.Flags & RHEF_XorMagic) {
-                                               obfuscate_data(_ndr_buffer->data, _ndr_buffer->data_size, 0xA5);
-
-                                               for (cntr_AUX_HEADER_0 = 0; _ndr_buffer->offset < _ndr_buffer->data_size; cntr_AUX_HEADER_0++) {
-                                                       NDR_CHECK(ndr_pull_AUX_HEADER(_ndr_buffer, NDR_SCALARS, &r->AUX_HEADER[cntr_AUX_HEADER_0]));
-                                                       r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               }
-                                               r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               r->AUX_HEADER[cntr_AUX_HEADER_0].Size = 0;
-                                       /* plain case */
-                                       } else {
-                                               for (cntr_AUX_HEADER_0 = 0; _ndr_buffer->offset < _ndr_buffer->data_size; cntr_AUX_HEADER_0++) {
-                                                       NDR_CHECK(ndr_pull_AUX_HEADER(_ndr_buffer, NDR_SCALARS, &r->AUX_HEADER[cntr_AUX_HEADER_0]));
-                                                       r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               }
-                                               r->AUX_HEADER = talloc_realloc(_mem_save_AUX_HEADER_0, r->AUX_HEADER, struct AUX_HEADER, cntr_AUX_HEADER_0 + 2);
-                                               r->AUX_HEADER[cntr_AUX_HEADER_0].Size = 0;
-                                       }
-                               }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 0, -1));
-                       } else {
-                               r->AUX_HEADER = NULL;
-                       }
-                       ndr->flags = _flags_save_DATA_BLOB;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  print mapi_request / mapi_response structures
- */
-
-void ndr_print_mapi_request(struct ndr_print *ndr, const char *name, const struct mapi_request *r)
-{
-       uint32_t        rlength;
-
-       rlength = r->mapi_len - r->length;
-
-       ndr_print_uint32(ndr, "mapi_len", r->mapi_len);
-       if (r->length && r->length > sizeof(uint16_t)) {
-               uint32_t cntr_mapi_req_0;
-
-               ndr_print_uint16(ndr, "length", r->length);
-               ndr->depth++;
-               for (cntr_mapi_req_0=0; r->mapi_req[cntr_mapi_req_0].opnum; cntr_mapi_req_0++) {
-                       char    *idx_0 = NULL;
-                       int     ret;
-
-                       ret = asprintf(&idx_0, "[%u]", cntr_mapi_req_0);
-                       if (ret != -1 && idx_0) {
-                               ndr_print_EcDoRpc_MAPI_REQ(ndr, "mapi_request", &r->mapi_req[cntr_mapi_req_0]);
-                               free(idx_0);
-                       } 
-               }
-               ndr->depth--;
-       }
-
-       if (rlength) {
-               uint32_t i;
-
-               ndr->depth++;
-               ndr->print(ndr, "%-25s: (handles) number=%u", name, rlength / 4);
-               ndr->depth++;
-               for (i = 0; i < (rlength / 4); i++) {
-                       ndr_print_uint32(ndr, "handle", r->handles[i]);
-               }
-               ndr->depth--;
-       }
-}
-
-void ndr_print_mapi_response(struct ndr_print *ndr, const char *name, const struct mapi_response *r)
-{
-       uint32_t        rlength;
-
-       rlength = r->mapi_len - r->length;
-
-       ndr->print(ndr, "%-25s: length=%u", name, r->length);
-       if (r->length && r->length > sizeof(uint16_t)) {
-               uint32_t cntr_mapi_repl_0;
-
-               ndr->print(ndr, "%s: ARRAY(%d)", name, r->length - 2);
-               ndr->depth++;
-               for (cntr_mapi_repl_0=0; r->mapi_repl[cntr_mapi_repl_0].opnum; cntr_mapi_repl_0++) {
-                       ndr_print_EcDoRpc_MAPI_REPL(ndr, "mapi_repl", &r->mapi_repl[cntr_mapi_repl_0]);
-               }
-               ndr->depth--;
-       }
-
-       ndr->print(ndr, "%-25s: (handles) number=%u", name, rlength / 4);
-       
-       if (rlength) {
-               uint32_t i;
-
-               ndr->depth++;
-
-               for (i = 0; i < (rlength / 4); i++) {
-                       ndr_print_uint32(ndr, "handle id", r->handles[i]);
-               }
-               ndr->depth--;
-       }
-}
-
-
-/*
-  push mapi_request / mapi_response onto the wire.  
-
-  MAPI length field includes length bytes. 
-  But these bytes do not belong to the mapi content in the user
-  context. We have to add them when pushing mapi content length
-  (uint16_t) and next subtract when pushing the content blob
-*/
-
-enum ndr_err_code ndr_push_mapi_request(struct ndr_push *ndr, int ndr_flags, const struct mapi_request *r)
-{
-       uint32_t                cntr_mapi_req_0;
-       uint32_t                count;
-
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
-       
-       for (count = 0; ndr->offset < r->length - 2; count++) {
-               NDR_CHECK(ndr_push_EcDoRpc_MAPI_REQ(ndr, NDR_SCALARS, &r->mapi_req[count]));
-       }
-
-       count = (r->mapi_len - r->length) / sizeof(uint32_t);
-       for (cntr_mapi_req_0=0; cntr_mapi_req_0 < count; cntr_mapi_req_0++) {
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->handles[cntr_mapi_req_0]));
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_mapi_response(struct ndr_push *ndr, int ndr_flags, const struct mapi_response *r)
-{
-       uint32_t        cntr_mapi_repl_0;
-       uint32_t        count;
-
-       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
-       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
-
-       if (r->length > sizeof (uint16_t)) {
-               for (count = 0; ndr->offset < r->length - 2; count++) {
-                       NDR_CHECK(ndr_push_EcDoRpc_MAPI_REPL(ndr, NDR_SCALARS, &r->mapi_repl[count]));
-               }
-       }
-
-       count = (r->mapi_len - r->length) / sizeof (uint32_t);
-       for (cntr_mapi_repl_0 = 0; cntr_mapi_repl_0 <count; cntr_mapi_repl_0++) {
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->handles[cntr_mapi_repl_0]));
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull mapi_request / mapi_response from the wire
-*/
-
-enum ndr_err_code ndr_pull_mapi_request(struct ndr_pull *ndr, int ndr_flags, struct mapi_request *r)
-{
-       uint32_t length,count;
-       uint32_t cntr_mapi_req_0;
-       TALLOC_CTX *_mem_save_mapi_req_0;
-       TALLOC_CTX *_mem_save_handles_0;
-       struct ndr_pull *_ndr_mapi_req;
-
-       if (ndr->flags & LIBNDR_FLAG_REMAINING) {
-               length = ndr->data_size - ndr->offset;
-       } else {
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
-       }
-       r->mapi_len = length;
-
-       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
-
-       /* If length equals length field then skipping subcontext */
-       if (r->length > sizeof (uint16_t)) {
-               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_mapi_req, 0, r->length - 2));
-               _mem_save_mapi_req_0 = NDR_PULL_GET_MEM_CTX(_ndr_mapi_req);
-               r->mapi_req = talloc_zero(_mem_save_mapi_req_0, struct EcDoRpc_MAPI_REQ);
-               for (cntr_mapi_req_0 = 0; _ndr_mapi_req->offset < _ndr_mapi_req->data_size - 2; cntr_mapi_req_0++) {
-                       NDR_CHECK(ndr_pull_EcDoRpc_MAPI_REQ(_ndr_mapi_req, NDR_SCALARS, &r->mapi_req[cntr_mapi_req_0]));
-                       r->mapi_req = talloc_realloc(_mem_save_mapi_req_0, r->mapi_req, struct EcDoRpc_MAPI_REQ, cntr_mapi_req_0 + 2);
-               }
-               r->mapi_req = talloc_realloc(_mem_save_mapi_req_0, r->mapi_req, struct EcDoRpc_MAPI_REQ, cntr_mapi_req_0 + 2);
-               r->mapi_req[cntr_mapi_req_0].opnum = 0;
-               
-               if (_ndr_mapi_req->offset != r->length - 2) {
-                       return NDR_ERR_BUFSIZE;
-               }
-               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_mapi_req, 4, -1));
-       
-               _mem_save_handles_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               count = (r->mapi_len - r->length) / sizeof(uint32_t);
-               r->handles = talloc_array(_mem_save_handles_0, uint32_t, count + 1);
-               for (cntr_mapi_req_0=0; cntr_mapi_req_0 < count; cntr_mapi_req_0++) {
-                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->handles[cntr_mapi_req_0]));
-               }
-       } else {
-               r->handles = NULL;
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_mapi_response(struct ndr_pull *ndr, int ndr_flags, struct mapi_response *r)
-{
-       uint32_t length,count;
-       uint32_t cntr_mapi_repl_0;
-       TALLOC_CTX *_mem_save_mapi_repl_0;
-       TALLOC_CTX *_mem_save_handles_0;
-       struct ndr_pull *_ndr_mapi_repl;
-
-       if (ndr->flags & LIBNDR_FLAG_REMAINING) {
-               length = ndr->data_size - ndr->offset;
-       } else {
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
-       }
-       r->mapi_len = length;
-
-       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
-       
-       /* If length equals length field then skipping subcontext */
-       if (r->length > sizeof (uint16_t)) {
-               _mem_save_mapi_repl_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               r->mapi_repl = talloc_array(_mem_save_mapi_repl_0, struct EcDoRpc_MAPI_REPL, 2);
-               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_mapi_repl, 0, r->length - 2));
-               for (cntr_mapi_repl_0 = 0; _ndr_mapi_repl->offset < _ndr_mapi_repl->data_size - 2; cntr_mapi_repl_0++) {
-                       NDR_CHECK(ndr_pull_EcDoRpc_MAPI_REPL(_ndr_mapi_repl, NDR_SCALARS, &r->mapi_repl[cntr_mapi_repl_0]));
-                       r->mapi_repl = talloc_realloc(_ndr_mapi_repl, r->mapi_repl, struct EcDoRpc_MAPI_REPL, cntr_mapi_repl_0 + 2);
-               }
-               r->mapi_repl[cntr_mapi_repl_0].opnum = 0;
-               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_mapi_repl, 4, -1));
-               talloc_free(_ndr_mapi_repl);
-       }
-
-       _mem_save_handles_0 = NDR_PULL_GET_MEM_CTX(ndr);
-       count = (r->mapi_len - r->length) / sizeof(uint32_t);
-       NDR_PULL_ALLOC_N(ndr, r->handles, count + 1);
-
-       for (cntr_mapi_repl_0=0; cntr_mapi_repl_0 < count; cntr_mapi_repl_0++) {
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->handles[cntr_mapi_repl_0]));
-       }
-       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handles_0, LIBNDR_FLAG_REF_ALLOC);
-
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  We stop processing the IDL if MAPISTATUS is different from MAPI_E_SUCCESS
- */
-
-_PUBLIC_ enum ndr_err_code ndr_push_EcDoRpc_MAPI_REPL(struct ndr_push *ndr, int ndr_flags, const struct EcDoRpc_MAPI_REPL *r)
-{
-       if (r->opnum != op_MAPI_Release)
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_push_align(ndr, 8));
-                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->opnum));
-                       if ((r->opnum == op_MAPI_Notify) || (r->opnum == op_MAPI_Pending)) {
-                               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->opnum));
-                               NDR_CHECK(ndr_push_EcDoRpc_MAPI_REPL_UNION(ndr, NDR_SCALARS, &r->u));                           
-                       } else {
-                               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->handle_idx));
-                               NDR_CHECK(ndr_push_MAPISTATUS(ndr, NDR_SCALARS, r->error_code));
-                               if (r->error_code == MAPI_E_SUCCESS) {
-                                       NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->opnum));
-                                       NDR_CHECK(ndr_push_EcDoRpc_MAPI_REPL_UNION(ndr, NDR_SCALARS, &r->u));
-                               } else {
-                                       switch (r->opnum) {
-                                       case op_MAPI_Logon: {
-                                               if (r->error_code == ecWrongServer) {
-                                                       NDR_CHECK(ndr_push_Logon_redirect(ndr, NDR_SCALARS, &(r->us.mapi_Logon)));
-                                               }
-                                               break; }
-                                       default:
-                                               break;
-                                       }
-                               }
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-                       NDR_CHECK(ndr_push_EcDoRpc_MAPI_REPL_UNION(ndr, NDR_BUFFERS, &r->u));
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_EcDoRpc_MAPI_REPL(struct ndr_pull *ndr, int ndr_flags, struct EcDoRpc_MAPI_REPL *r)
-{
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_pull_align(ndr, 8));
-                       NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->opnum));
-                       if ((r->opnum == op_MAPI_Notify) || (r->opnum == op_MAPI_Pending)) {
-                               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->opnum));
-                               NDR_CHECK(ndr_pull_EcDoRpc_MAPI_REPL_UNION(ndr, NDR_SCALARS, &r->u));
-                       } else {
-                               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->handle_idx));
-                               NDR_CHECK(ndr_pull_MAPISTATUS(ndr, NDR_SCALARS, &r->error_code));
-                               if ( r->error_code == MAPI_E_SUCCESS) {
-                                       NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->opnum));
-                                       NDR_CHECK(ndr_pull_EcDoRpc_MAPI_REPL_UNION(ndr, NDR_SCALARS, &r->u));
-                               } else {
-                                       switch (r->opnum) {
-                                       case op_MAPI_Logon: {
-                                               if (r->error_code == ecWrongServer) {
-                                                       NDR_CHECK(ndr_pull_Logon_redirect(ndr, NDR_SCALARS, &(r->us.mapi_Logon)));
-                                               }
-                                               break;}
-                                       default:
-                                               break;
-                                       }
-                               }
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-                       ndr->flags = _flags_save_STRUCT;
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_EcDoRpc_MAPI_REPL(struct ndr_print *ndr, const char *name, const struct EcDoRpc_MAPI_REPL *r)
-{
-       ndr_print_struct(ndr, name, "EcDoRpc_MAPI_REPL");
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               ndr->depth++;
-               ndr_print_uint8(ndr, "opnum", r->opnum);
-               if ((r->opnum != op_MAPI_Notify) && (r->opnum != op_MAPI_Pending)) {
-                       ndr_print_uint8(ndr, "handle_idx", r->handle_idx);
-                       ndr_print_MAPISTATUS(ndr, "error_code", r->error_code);
-                       if (r->error_code == MAPI_E_SUCCESS) {
-                               ndr_print_set_switch_value(ndr, &r->u, r->opnum);
-                               ndr_print_EcDoRpc_MAPI_REPL_UNION(ndr, "u", &r->u);
-                       } else {
-                               switch (r->opnum) {
-                               case op_MAPI_Logon: {
-                                       if (r->error_code == ecWrongServer) {
-                                               ndr_print_set_switch_value(ndr, &r->us, r->opnum);
-                                               ndr_print_EcDoRpc_MAPI_REPL_UNION_SPECIAL(ndr, "us", &r->us);
-                                       }
-                                       break;}
-                               default:
-                                       break;
-                               }
-                       }
-               } else {
-                       ndr_print_set_switch_value(ndr, &r->u, r->opnum);
-                       ndr_print_EcDoRpc_MAPI_REPL_UNION(ndr, "u", &r->u);
-               }
-               ndr->depth--;
-               ndr->flags = _flags_save_STRUCT;
-       }
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_pull_EcDoRpc(struct ndr_pull *ndr, int flags, struct EcDoRpc *r)
-{
-       TALLOC_CTX *_mem_save_handle_0;
-       TALLOC_CTX *_mem_save_mapi_request_0;
-       TALLOC_CTX *_mem_save_mapi_response_0;
-       TALLOC_CTX *_mem_save_length_0;
-
-       if (flags & NDR_IN) {
-               ZERO_STRUCT(r->out);
-
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.handle);
-               }
-               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.size));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
-               {
-                       uint32_t _flags_save_mapi_request = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
-                       if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                               NDR_PULL_ALLOC(ndr, r->in.mapi_request);
-                       }
-                       _mem_save_mapi_request_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->in.mapi_request, LIBNDR_FLAG_REF_ALLOC);
-                       {
-                               struct ndr_pull *_ndr_mapi_request;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_mapi_request, 4, -1));
-                               obfuscate_data(_ndr_mapi_request->data, _ndr_mapi_request->data_size, 0xA5);
-                               NDR_CHECK(ndr_pull_mapi_request(_ndr_mapi_request, NDR_SCALARS|NDR_BUFFERS, r->in.mapi_request));
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_mapi_request, 4, -1));
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mapi_request_0, LIBNDR_FLAG_REF_ALLOC);
-                       ndr->flags = _flags_save_mapi_request;
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.length);
-               }
-               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.length));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.max_data));
-               NDR_PULL_ALLOC(ndr, r->out.handle);
-               *r->out.handle = *r->in.handle;
-               NDR_PULL_ALLOC(ndr, r->out.mapi_response);
-               ZERO_STRUCTP(r->out.mapi_response);
-               NDR_PULL_ALLOC(ndr, r->out.length);
-               *r->out.length = *r->in.length;
-       }
-       if (flags & NDR_OUT) {
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.handle);
-               }
-               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.size));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.offset));
-               {
-                       uint32_t _flags_save_mapi_response = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
-                       if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                               NDR_PULL_ALLOC(ndr, r->out.mapi_response);
-                       }
-                       _mem_save_mapi_response_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->out.mapi_response, LIBNDR_FLAG_REF_ALLOC);
-                       {
-                               struct ndr_pull *_ndr_mapi_response;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_mapi_response, 4, -1));
-                               obfuscate_data(_ndr_mapi_response->data, _ndr_mapi_response->data_size, 0xA5);
-                               NDR_CHECK(ndr_pull_mapi_response(_ndr_mapi_response, NDR_SCALARS|NDR_BUFFERS, r->out.mapi_response));
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_mapi_response, 4, -1));
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mapi_response_0, LIBNDR_FLAG_REF_ALLOC);
-                       ndr->flags = _flags_save_mapi_response;
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.length);
-               }
-               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.length, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.length));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_MAPISTATUS(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_push_EcDoRpc(struct ndr_push *ndr, int flags, const struct EcDoRpc *r)
-{
-       if (flags & NDR_IN) {
-               if (r->in.handle == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
-               {
-                       uint32_t _flags_save_mapi_request = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
-                       if (r->in.mapi_request == NULL) {
-                               return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-                       }
-                       {
-                               struct ndr_push *_ndr_mapi_request;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_mapi_request, 4, -1));
-                               NDR_CHECK(ndr_push_mapi_request(_ndr_mapi_request, NDR_SCALARS|NDR_BUFFERS, r->in.mapi_request));
-                               obfuscate_data(_ndr_mapi_request->data, _ndr_mapi_request->offset, 0xA5);
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_mapi_request, 4, -1));
-                       }
-                       ndr->flags = _flags_save_mapi_request;
-               }
-               if (r->in.length == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.length));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.max_data));
-       }
-       if (flags & NDR_OUT) {
-               if (r->out.handle == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.size));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.offset));
-               {
-                       uint32_t _flags_save_mapi_response = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
-                       if (r->out.mapi_response == NULL) {
-                               return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-                       }
-                       {
-                               struct ndr_push *_ndr_mapi_response;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_mapi_response, 4, -1));
-                               NDR_CHECK(ndr_push_mapi_response(_ndr_mapi_response, NDR_SCALARS|NDR_BUFFERS, r->out.mapi_response));
-                               obfuscate_data(_ndr_mapi_response->data, _ndr_mapi_response->alloc_size, 0xA5);
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_mapi_response, 4, -1));
-                       }
-                       ndr->flags = _flags_save_mapi_response;
-               }
-               if (r->out.length == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.length));
-               NDR_CHECK(ndr_push_MAPISTATUS(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ enum ndr_err_code ndr_push_EcDoConnectEx(struct ndr_push *ndr, int flags, const struct EcDoConnectEx *r)
-{
-       uint32_t        cntr_rgwClientVersion_0;
-       uint32_t        cntr_rgwServerVersion_0;
-       uint32_t        cntr_rgwBestVersion_0;
-
-       if (flags & NDR_IN) {
-               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.szUserDN, CH_DOS)));
-               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
-               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.szUserDN, CH_DOS)));
-               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.szUserDN, ndr_charset_length(r->in.szUserDN, CH_DOS), sizeof (uint8_t), CH_DOS));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulFlags));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulConMod));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbLimit));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulCpid));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulLcidString));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulLcidSort));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ulIcxrLink));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.usFCanConvertCodePages));
-               for (cntr_rgwClientVersion_0 = 0; cntr_rgwClientVersion_0 < 3; cntr_rgwClientVersion_0++) {
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.rgwClientVersion[cntr_rgwClientVersion_0]));
-               }
-               if (r->in.pulTimeStamp == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pulTimeStamp));
-               {
-                       uint32_t        _flags_save_mapi2k7_AuxInfo = ndr->flags;
-                       struct ndr_push *_ndr_rgbAuxIn;
-
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REMAINING);
-                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_rgbAuxIn, 4, -1));
-
-                       if (r->in.cbAuxIn) {
-                               if (r->in.rgbAuxIn == NULL) {
-                                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-                               }
-                               NDR_CHECK(ndr_push_mapi2k7_AuxInfo(_ndr_rgbAuxIn, NDR_SCALARS|NDR_BUFFERS, r->in.rgbAuxIn));
-                       }
-                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_rgbAuxIn, 4, -1));
-                       ndr->flags = _flags_save_mapi2k7_AuxInfo;
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbAuxIn));
-               if (r->in.pcbAuxOut == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pcbAuxOut));
-       }               
-
-       if (flags & NDR_OUT) {
-               if (r->out.handle == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
-               if (r->out.pcmsPollsMax == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcmsPollsMax));
-               if (r->out.pcRetry == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcRetry));
-               if (r->out.pcmsRetryDelay == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcmsRetryDelay));
-               if (r->out.picxr == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.picxr));
-               if (r->out.szDNPrefix == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.szDNPrefix));
-               if (r->out.szDNPrefix) {
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.szDNPrefix, CH_DOS)));
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.szDNPrefix, CH_DOS)));
-                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.szDNPrefix, ndr_charset_length(*r->out.szDNPrefix, CH_DOS), sizeof(uint8_t), CH_DOS));
-               }
-               if (r->out.szDisplayName == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.szDisplayName));
-               if (*r->out.szDisplayName) {
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.szDisplayName, CH_DOS)));
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.szDisplayName, CH_DOS)));
-                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.szDisplayName, ndr_charset_length(*r->out.szDisplayName, CH_DOS), sizeof(uint8_t), CH_DOS));
-               }
-               for (cntr_rgwServerVersion_0 = 0; cntr_rgwServerVersion_0 < 3; cntr_rgwServerVersion_0++) {
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.rgwServerVersion[cntr_rgwServerVersion_0]));
-               }
-               for (cntr_rgwBestVersion_0 = 0; cntr_rgwBestVersion_0 < 3; cntr_rgwBestVersion_0++) {
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.rgwBestVersion[cntr_rgwBestVersion_0]));
-               }
-               if (r->out.pulTimeStamp == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pulTimeStamp));
-                       NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.pcbAuxOut));
-               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
-               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.pcbAuxOut));                              
-               /* Only try to fetch rgbAuxOut if pcbAuxOut is > 0 */
-               if (r->out.pcbAuxOut && *r->out.pcbAuxOut) {
-                       NDR_CHECK(ndr_push_mapi2k7_AuxInfo(ndr, NDR_SCALARS, r->out.rgbAuxOut));
-               }
-
-               if (r->out.pcbAuxOut == NULL) {
-                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbAuxOut));
-               NDR_CHECK(ndr_push_MAPISTATUS(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_EcDoConnectEx(struct ndr_pull *ndr, int flags, struct EcDoConnectEx *r)
-{
-       uint32_t        _ptr_szDNPrefix;
-       uint32_t        _ptr_szDisplayName;
-       uint32_t        cntr_rgwClientVersion_0;
-       uint32_t        cntr_rgwServerVersion_0;
-       uint32_t        cntr_rgwBestVersion_0;
-       TALLOC_CTX      *_mem_save_handle_0;
-       TALLOC_CTX      *_mem_save_pcmsPollsMax_0;
-       TALLOC_CTX      *_mem_save_pcRetry_0;
-       TALLOC_CTX      *_mem_save_pcmsRetryDelay_0;
-       TALLOC_CTX      *_mem_save_picxr_0;
-       TALLOC_CTX      *_mem_save_szDNPrefix_0;
-       TALLOC_CTX      *_mem_save_szDNPrefix_1;
-       TALLOC_CTX      *_mem_save_szDisplayName_0;
-       TALLOC_CTX      *_mem_save_szDisplayName_1;
-       TALLOC_CTX      *_mem_save_pulTimeStamp_0;
-       TALLOC_CTX      *_mem_save_rgbAuxIn_0;
-       TALLOC_CTX      *_mem_save_pcbAuxOut_0;
-       TALLOC_CTX      *_mem_save_rgbAuxOut_1;
-
-       if (flags & NDR_IN) {
-               ZERO_STRUCT(r->out);
-
-               NDR_CHECK(ndr_pull_array_size(ndr, &r->in.szUserDN));
-               NDR_CHECK(ndr_pull_array_length(ndr, &r->in.szUserDN));
-               if (ndr_get_array_length(ndr, &r->in.szUserDN) > ndr_get_array_size(ndr, &r->in.szUserDN)) {
-                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.szUserDN), ndr_get_array_length(ndr, &r->in.szUserDN));
-               }
-               NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.szUserDN), sizeof(uint8_t)));
-               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.szUserDN, ndr_get_array_length(ndr, &r->in.szUserDN), sizeof(uint8_t), CH_DOS));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulFlags));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulConMod));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbLimit));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulCpid));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulLcidString));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulLcidSort));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulIcxrLink));
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.usFCanConvertCodePages));
-               for (cntr_rgwClientVersion_0 = 0; cntr_rgwClientVersion_0 < 3; cntr_rgwClientVersion_0++) {
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.rgwClientVersion[cntr_rgwClientVersion_0]));
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.pulTimeStamp);
-               }
-               _mem_save_pulTimeStamp_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.pulTimeStamp, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pulTimeStamp));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pulTimeStamp_0, LIBNDR_FLAG_REF_ALLOC);
-               {
-                       uint32_t _flags_save_mapi2k7_AuxInfo = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REMAINING);
-                       if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                               NDR_PULL_ALLOC(ndr, r->in.rgbAuxIn);
-                       }
-                       _mem_save_rgbAuxIn_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->in.rgbAuxIn, LIBNDR_FLAG_REF_ALLOC);
-                       {
-                               struct ndr_pull *_ndr_rgbAuxIn;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_rgbAuxIn, 4, -1));
-                               NDR_CHECK(ndr_pull_mapi2k7_AuxInfo(_ndr_rgbAuxIn, NDR_SCALARS|NDR_BUFFERS, r->in.rgbAuxIn));
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_rgbAuxIn, 4, -1));
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rgbAuxIn_0, LIBNDR_FLAG_REF_ALLOC);
-                       ndr->flags = _flags_save_mapi2k7_AuxInfo;
-               }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbAuxIn));
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.pcbAuxOut);
-               }
-               _mem_save_pcbAuxOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.pcbAuxOut, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pcbAuxOut));
-               if (*r->in.pcbAuxOut > 0x1008) {
-                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
-               }
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbAuxOut_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_PULL_ALLOC(ndr, r->out.handle);
-               ZERO_STRUCTP(r->out.handle);
-               NDR_PULL_ALLOC(ndr, r->out.pcmsPollsMax);
-               ZERO_STRUCTP(r->out.pcmsPollsMax);
-               NDR_PULL_ALLOC(ndr, r->out.pcRetry);
-               ZERO_STRUCTP(r->out.pcRetry);
-               NDR_PULL_ALLOC(ndr, r->out.pcmsRetryDelay);
-               ZERO_STRUCTP(r->out.pcmsRetryDelay);
-               NDR_PULL_ALLOC(ndr, r->out.picxr);
-               ZERO_STRUCTP(r->out.picxr);
-               NDR_PULL_ALLOC(ndr, r->out.szDNPrefix);
-               ZERO_STRUCTP(r->out.szDNPrefix);
-               NDR_PULL_ALLOC(ndr, r->out.szDisplayName);
-               ZERO_STRUCTP(r->out.szDisplayName);
-               NDR_PULL_ALLOC(ndr, r->out.pulTimeStamp);
-               *r->out.pulTimeStamp = *r->in.pulTimeStamp;
-               NDR_PULL_ALLOC(ndr, r->out.pcbAuxOut);
-               *r->out.pcbAuxOut = *r->in.pcbAuxOut;
-       }               
-
-       if (flags & NDR_OUT) {
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.handle);
-               }
-               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.pcmsPollsMax);
-               }
-               _mem_save_pcmsPollsMax_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.pcmsPollsMax, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcmsPollsMax));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcmsPollsMax_0, LIBNDR_FLAG_REF_ALLOC);
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.pcRetry);
-               }
-               _mem_save_pcRetry_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.pcRetry, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcRetry));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcRetry_0, LIBNDR_FLAG_REF_ALLOC);
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.pcmsRetryDelay);
-               }
-               _mem_save_pcmsRetryDelay_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.pcmsRetryDelay, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcmsRetryDelay));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcmsRetryDelay_0, LIBNDR_FLAG_REF_ALLOC);
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.picxr);
-               }
-               _mem_save_picxr_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.picxr, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.picxr));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_picxr_0, LIBNDR_FLAG_REF_ALLOC);
-
-               _mem_save_szDNPrefix_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.szDNPrefix, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_szDNPrefix));
-               if (_ptr_szDNPrefix) {
-                       NDR_PULL_ALLOC(ndr, *r->out.szDNPrefix);
-               } else {
-                       *r->out.szDNPrefix = NULL;
-               }
-               if (*r->out.szDNPrefix) {
-                       _mem_save_szDNPrefix_1 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, *r->out.szDNPrefix, 0);
-                       NDR_CHECK(ndr_pull_array_size(ndr, r->out.szDNPrefix));
-                       NDR_CHECK(ndr_pull_array_length(ndr, r->out.szDNPrefix));
-                       if (ndr_get_array_length(ndr, r->out.szDNPrefix) > ndr_get_array_size(ndr, r->out.szDNPrefix)) {
-                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.szDNPrefix), ndr_get_array_length(ndr, r->out.szDNPrefix));
-                       }
-                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.szDNPrefix), sizeof(uint8_t)));
-                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDNPrefix, ndr_get_array_length(ndr, r->out.szDNPrefix), sizeof(uint8_t), CH_DOS));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDNPrefix_1, 0);
-               }
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDNPrefix_0, LIBNDR_FLAG_REF_ALLOC);
-
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.szDisplayName);
-               }
-               _mem_save_szDisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.szDisplayName, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_szDisplayName));
-               if (_ptr_szDisplayName) {
-                       NDR_PULL_ALLOC(ndr, *r->out.szDisplayName);
-               } else {
-                       *r->out.szDisplayName = NULL;
-               }
-               if (*r->out.szDisplayName) {
-                       _mem_save_szDisplayName_1 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, *r->out.szDisplayName, 0);
-                       NDR_CHECK(ndr_pull_array_size(ndr, r->out.szDisplayName));
-                       NDR_CHECK(ndr_pull_array_length(ndr, r->out.szDisplayName));
-                       if (ndr_get_array_length(ndr, r->out.szDisplayName) > ndr_get_array_size(ndr, r->out.szDisplayName)) {
-                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.szDisplayName), ndr_get_array_length(ndr, r->out.szDisplayName));
-                       }
-                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.szDisplayName), sizeof(uint8_t)));
-                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDisplayName, ndr_get_array_length(ndr, r->out.szDisplayName), sizeof(uint8_t), CH_DOS));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDisplayName_1, 0);
-               }
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDisplayName_0, LIBNDR_FLAG_REF_ALLOC);
-
-               for (cntr_rgwServerVersion_0 = 0; cntr_rgwServerVersion_0 < 3; cntr_rgwServerVersion_0++) {
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.rgwServerVersion[cntr_rgwServerVersion_0]));
-               }
-               for (cntr_rgwBestVersion_0 = 0; cntr_rgwBestVersion_0 < 3; cntr_rgwBestVersion_0++) {
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.rgwBestVersion[cntr_rgwBestVersion_0]));
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.pulTimeStamp);
-               }
-               _mem_save_pulTimeStamp_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.pulTimeStamp, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pulTimeStamp));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pulTimeStamp_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_array_size(ndr, &r->out.rgbAuxOut));
-               NDR_CHECK(ndr_pull_array_length(ndr, &r->out.rgbAuxOut));
-               if (ndr_get_array_length(ndr, &r->out.rgbAuxOut) > ndr_get_array_size(ndr, &r->out.rgbAuxOut)) {
-                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.rgbAuxOut), ndr_get_array_length(ndr, &r->out.rgbAuxOut));
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC_N(ndr, r->out.rgbAuxOut, ndr_get_array_size(ndr, &r->out.rgbAuxOut));
-               }
-               /* Only try to pull rgbAuxOut if the fake array size is > 0 */
-               if (ndr_get_array_size(ndr, &r->out.rgbAuxOut)) {
-                       _mem_save_rgbAuxOut_1 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->out.rgbAuxOut, 0);
-                       NDR_CHECK(ndr_pull_mapi2k7_AuxInfo(ndr, NDR_SCALARS, r->out.rgbAuxOut));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rgbAuxOut_1, 0);
-               }
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.pcbAuxOut);
-               }
-               _mem_save_pcbAuxOut_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbAuxOut, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbAuxOut));
-               if (*r->out.pcbAuxOut > 0x1008) {
-                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
-               }
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbAuxOut_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_MAPISTATUS(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_EcDoConnectEx(struct ndr_print *ndr, const char *name, int flags, const struct EcDoConnectEx *r)
-{
-       uint32_t        cntr_rgwClientVersion_0;
-       uint32_t        cntr_rgwServerVersion_0;
-       uint32_t        cntr_rgwBestVersion_0;
-
-       ndr_print_struct(ndr, name, "EcDoConnectEx");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "EcDoConnectEx");
-               ndr->depth++;
-               ndr_print_string(ndr, "szUserDN", r->in.szUserDN);
-               ndr_print_uint32(ndr, "ulFlags", r->in.ulFlags);
-               ndr_print_uint32(ndr, "ulConMod", r->in.ulConMod);
-               ndr_print_uint32(ndr, "cbLimit", r->in.cbLimit);
-               ndr_print_uint32(ndr, "ulCpid", r->in.ulCpid);
-               ndr_print_uint32(ndr, "ulLcidString", r->in.ulLcidString);
-               ndr_print_uint32(ndr, "ulLcidSort", r->in.ulLcidSort);
-               ndr_print_uint32(ndr, "ulIcxrLink", r->in.ulIcxrLink);
-               ndr_print_uint16(ndr, "usFCanConvertCodePages", r->in.usFCanConvertCodePages);
-               ndr->print(ndr, "%s: ARRAY(%d)", "rgwClientVersion", (int)3);
-               ndr->depth++;
-               for (cntr_rgwClientVersion_0=0;cntr_rgwClientVersion_0<3;cntr_rgwClientVersion_0++) {
-                       char *idx_0=NULL;
-                       if (asprintf(&idx_0, "[%d]", cntr_rgwClientVersion_0) != -1) {
-                               ndr_print_uint16(ndr, "rgwClientVersion", r->in.rgwClientVersion[cntr_rgwClientVersion_0]);
-                               free(idx_0);
-                       }
-               }
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pulTimeStamp", r->in.pulTimeStamp);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pulTimeStamp", *r->in.pulTimeStamp);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "rgbAuxIn", r->in.rgbAuxIn);
-               if (r->in.rgbAuxIn) {
-                       ndr->depth++;
-                       ndr_print_mapi2k7_AuxInfo(ndr, "rgbAuxIn", r->in.rgbAuxIn);
-                       ndr->depth--;
-               }
-               ndr_print_uint32(ndr, "cbAuxIn", r->in.cbAuxIn);
-               ndr_print_ptr(ndr, "pcbAuxOut", r->in.pcbAuxOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbAuxOut", *r->in.pcbAuxOut);
-               ndr->depth--;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "EcDoConnectEx");
-               ndr->depth++;
-               ndr_print_ptr(ndr, "handle", r->out.handle);
-               ndr->depth++;
-               ndr_print_policy_handle(ndr, "handle", r->out.handle);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pcmsPollsMax", r->out.pcmsPollsMax);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcmsPollsMax", *r->out.pcmsPollsMax);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pcRetry", r->out.pcRetry);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcRetry", *r->out.pcRetry);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pcmsRetryDelay", r->out.pcmsRetryDelay);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcmsRetryDelay", *r->out.pcmsRetryDelay);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "picxr", r->out.picxr);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "picxr", *r->out.picxr);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "szDNPrefix", r->out.szDisplayName);
-               ndr->depth++;
-               if (r->out.szDNPrefix && *r->out.szDNPrefix) {
-                       ndr_print_ptr(ndr, "szDNPrefix", *r->out.szDNPrefix);
-                       ndr->depth++;
-                       ndr_print_string(ndr, "szDNPrefix", *r->out.szDNPrefix);
-                       ndr->depth--;
-               }
-               ndr->depth--;
-               ndr_print_ptr(ndr, "szDisplayName", r->out.szDisplayName);
-               ndr->depth++;
-               if (r->out.szDisplayName && *r->out.szDisplayName) {
-                       ndr_print_ptr(ndr, "szDisplayName", *r->out.szDisplayName);
-                       ndr->depth++;
-                       ndr_print_string(ndr, "szDisplayName", *r->out.szDisplayName);
-                       ndr->depth--;
-               }
-               ndr->depth--;
-               ndr->print(ndr, "%s: ARRAY(%d)", "rgwServerVersion", (int)3);
-               ndr->depth++;
-               for (cntr_rgwServerVersion_0=0;cntr_rgwServerVersion_0<3;cntr_rgwServerVersion_0++) {
-                       char *idx_0=NULL;
-                       if (asprintf(&idx_0, "[%d]", cntr_rgwServerVersion_0) != -1) {
-                               ndr_print_uint16(ndr, "rgwServerVersion", r->out.rgwServerVersion[cntr_rgwServerVersion_0]);
-                               free(idx_0);
-                       }
-               }
-               ndr->depth--;
-               ndr->print(ndr, "%s: ARRAY(%d)", "rgwBestVersion", (int)3);
-               ndr->depth++;
-               for (cntr_rgwBestVersion_0=0;cntr_rgwBestVersion_0<3;cntr_rgwBestVersion_0++) {
-                       char *idx_0=NULL;
-                       if (asprintf(&idx_0, "[%d]", cntr_rgwBestVersion_0) != -1) {
-                               ndr_print_uint16(ndr, "rgwBestVersion", r->out.rgwBestVersion[cntr_rgwBestVersion_0]);
-                               free(idx_0);
-                       }
-               }
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pulTimeStamp", r->out.pulTimeStamp);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pulTimeStamp", *r->out.pulTimeStamp);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "rgbAuxOut", r->out.rgbAuxOut);
-               if (r->out.rgbAuxOut && r->out.pcbAuxOut) {
-                       ndr->depth++;
-                       ndr_print_mapi2k7_AuxInfo(ndr, "rgbAuxOut", r->out.rgbAuxOut);
-                       ndr->depth--;
-               }
-               ndr_print_ptr(ndr, "pcbAuxOut", r->out.pcbAuxOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbAuxOut", *r->out.pcbAuxOut);
-               ndr->depth--;
-               ndr_print_MAPISTATUS(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-_PUBLIC_ void ndr_print_EcDoRpcExt2(struct ndr_print *ndr, const char *name, int flags, const struct EcDoRpcExt2 *r)
-{
-       uint32_t                cntr_rgbAuxOut_0;
-       DATA_BLOB               rgbIn;
-       DATA_BLOB               rgbAuxIn;
-       DATA_BLOB               rgbOut;
-       struct ndr_pull         *ndr_pull;
-       struct mapi2k7_request  *mapi_request;
-       struct mapi2k7_response *mapi_response;
-       TALLOC_CTX              *mem_ctx;
-
-       mem_ctx = talloc_named(NULL, 0, "ndr_print_EcDoRpcExt2");
-
-       ndr_print_struct(ndr, name, "EcDoRpcExt2");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "EcDoRpcExt2");
-               ndr->depth++;
-               ndr_print_ptr(ndr, "handle", r->in.handle);
-               ndr->depth++;
-               ndr_print_policy_handle(ndr, "handle", r->in.handle);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pulFlags", r->in.pulFlags);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pulFlags", *r->in.pulFlags);
-               ndr->depth--;
-
-               /* Put MAPI request blob into a ndr_pull structure */
-               rgbIn.data = (uint8_t *)talloc_memdup(mem_ctx, r->in.rgbIn, r->in.cbIn);
-               rgbIn.length = r->in.cbIn;
-               dump_data(0, rgbIn.data, rgbIn.length);
-               ndr_pull = ndr_pull_init_blob(&rgbIn, mem_ctx);
-               ndr_set_flags(&ndr_pull->flags, LIBNDR_FLAG_NOALIGN);
-               mapi_request = talloc_zero(mem_ctx, struct mapi2k7_request);
-               mapi_request->mapi_request = talloc_zero(mapi_request, struct mapi_request);
-               ndr_pull_mapi2k7_request(ndr_pull, NDR_SCALARS|NDR_BUFFERS, mapi_request);
-               ndr_print_mapi2k7_request(ndr, "mapi_request", (const struct mapi2k7_request *)mapi_request);
-               talloc_free(mapi_request);
-               talloc_free(ndr_pull);
-               talloc_free(rgbIn.data);
-
-               ndr_print_uint32(ndr, "cbIn", r->in.cbIn);
-               ndr_print_ptr(ndr, "pcbOut", r->in.pcbOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbOut", *r->in.pcbOut);
-               ndr->depth--;
-
-               rgbAuxIn.data = r->in.rgbAuxIn;
-               rgbAuxIn.length = r->in.cbAuxIn;
-               ndr_print_DATA_BLOB(ndr, "rgbAuxIn", rgbAuxIn);
-               /* ndr_print_array_uint8(ndr, "rgbAuxIn", r->in.rgbAuxIn, r->in.cbAuxIn); */
-               ndr_print_uint32(ndr, "cbAuxIn", r->in.cbAuxIn);
-               ndr_print_ptr(ndr, "pcbAuxOut", r->in.pcbAuxOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbAuxOut", *r->in.pcbAuxOut);
-               ndr->depth--;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "EcDoRpcExt2");
-               ndr->depth++;
-               ndr_print_ptr(ndr, "handle", r->out.handle);
-               ndr->depth++;
-               ndr_print_policy_handle(ndr, "handle", r->out.handle);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pulFlags", r->out.pulFlags);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pulFlags", *r->out.pulFlags);
-               ndr->depth--;
-
-               /* Put MAPI response blob into a ndr_pull structure */
-               if (*r->out.pcbOut) {
-                 rgbOut.data = (uint8_t *)talloc_memdup(mem_ctx, r->out.rgbOut, *r->out.pcbOut);
-                       rgbOut.length = *r->out.pcbOut;
-                       ndr_pull = ndr_pull_init_blob(&rgbOut, mem_ctx);
-                       ndr_set_flags(&ndr_pull->flags, LIBNDR_FLAG_NOALIGN);
-                       mapi_response = talloc_zero(mem_ctx, struct mapi2k7_response);
-                       mapi_response->mapi_response = talloc_zero(mapi_response, struct mapi_response);
-                       ndr_pull_mapi2k7_response(ndr_pull, NDR_SCALARS|NDR_BUFFERS, mapi_response);
-                       ndr_print_mapi2k7_response(ndr, "mapi_response", 
-                                                  (const struct mapi2k7_response *)mapi_response);
-                       talloc_free(ndr_pull);
-                       talloc_free(rgbOut.data);
-                       talloc_free(mapi_response->mapi_response);
-                       talloc_free(mapi_response);
-               }
-               /* ndr_print_array_uint8(ndr, "rgbOut", r->out.rgbOut, *r->out.pcbOut); */
-               ndr_print_ptr(ndr, "pcbOut", r->out.pcbOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbOut", *r->out.pcbOut);
-               ndr->depth--;
-               if (r->out.rgbAuxOut && r->out.pcbAuxOut) {
-                       ndr->print(ndr, "%s: ARRAY(%d)", "rgbAuxOut", (int)*r->out.pcbAuxOut);
-                       ndr->depth++;
-                       for (cntr_rgbAuxOut_0=0;cntr_rgbAuxOut_0<*r->out.pcbAuxOut;cntr_rgbAuxOut_0++) {
-                               char *idx_0=NULL;
-                               if (asprintf(&idx_0, "[%d]", cntr_rgbAuxOut_0) != -1) {
-                                       ndr_print_uint32(ndr, "rgbAuxOut", r->out.rgbAuxOut[cntr_rgbAuxOut_0]);
-                                       free(idx_0);
-                               }
-                       }
-               } else {
-                       ndr->print(ndr, "%s: NULL", "rgbAuxOut");
-               }
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pcbAuxOut", r->out.pcbAuxOut);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pcbAuxOut", *r->out.pcbAuxOut);
-               ndr->depth--;
-               ndr_print_ptr(ndr, "pulTransTime", r->out.pulTransTime);
-               ndr->depth++;
-               ndr_print_uint32(ndr, "pulTransTime", *r->out.pulTransTime);
-               ndr->depth--;
-               ndr_print_MAPISTATUS(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-
-       talloc_free(mem_ctx);
-}
-
-/*
-  We need to pull QueryRows replies on our own:
-  If we have no results, do not push/pull the DATA_BLOB
-*/
-
-enum ndr_err_code ndr_push_QueryRows_repl(struct ndr_push *ndr, int ndr_flags, const struct QueryRows_repl *r)
-{
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_push_align(ndr, 4));
-                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Origin));
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->RowCount));
-
-                       if (r->RowCount) {
-                               uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
-                               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->RowData));
-                               ndr->flags = _flags_save_DATA_BLOB;
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_QueryRows_repl(struct ndr_pull *ndr, int ndr_flags, struct QueryRows_repl *r)
-{
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_pull_align(ndr, 4));
-                       NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Origin));
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->RowCount));
-
-                       if (r->RowCount)
-                       {
-                               uint32_t _flags_save_DATA_BLOB = ndr->flags;
-
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
-                               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->RowData));
-                               ndr->flags = _flags_save_DATA_BLOB;
-                       } else {
-                               r->RowData.length = 0;
-                               r->RowData.data = NULL;
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-enum ndr_err_code ndr_push_Logon_req(struct ndr_push *ndr, int ndr_flags, const struct Logon_req *r)
-{
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_push_align(ndr, 4));
-                       NDR_CHECK(ndr_push_LogonFlags(ndr, NDR_SCALARS, r->LogonFlags));
-                       NDR_CHECK(ndr_push_OpenFlags(ndr, NDR_SCALARS, r->OpenFlags));
-                       NDR_CHECK(ndr_push_StoreState(ndr, NDR_SCALARS, r->StoreState));
-                       if (r->EssDN && r->EssDN[0] != '\0') {
-                               uint32_t _flags_save_string = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE2);
-                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->EssDN));
-                               ndr->flags = _flags_save_string;
-                       } else {
-                               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ void ndr_print_SBinary_short(struct ndr_print *ndr, const char *name, const struct SBinary_short *r)
-{
-       ndr->print(ndr, "%-25s: SBinary_short cb=%u", name, (unsigned)r->cb);
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               ndr->depth++;
-               dump_data(0, r->lpb, r->cb);
-               ndr->depth--;
-               ndr->flags = _flags_save_STRUCT;
-       }
-}
-
-
-_PUBLIC_ void ndr_print_fuzzyLevel(struct ndr_print *ndr, const char *name, uint32_t r)
-{
-       ndr_print_uint32(ndr, name, r);
-       ndr->depth++;
-       switch ((r & 0x0000FFFF)) {
-       case FL_FULLSTRING:
-               ndr->print(ndr, "%-25s: FL_FULLSTRING", "lower  16 bits");
-               break;
-       case FL_SUBSTRING:
-               ndr->print(ndr, "%-25s: FL_SUBSTRING", "lower  16 bits");
-               break;
-       case FL_PREFIX:
-               ndr->print(ndr, "%-25s: FL_PREFIX", "lower  16 bits");
-               break;
-       }
-       ndr->print(ndr, "%-25s", "higher 16 bits");
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "FL_IGNORECASE", FL_IGNORECASE, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "FL_IGNORENONSPACE", FL_IGNORENONSPACE, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "FL_LOOSE", FL_LOOSE, r);
-       ndr->depth--;
-}
-
-/*
- * Fake wrapper over mapi_SRestriction. Workaround the no-pointer deep
- * recursion problem in pidl
- */
-enum ndr_err_code ndr_push_mapi_SRestriction_wrap(struct ndr_push *ndr, int ndr_flags, const struct mapi_SRestriction_wrap *r)
-{
-       return ndr_push_mapi_SRestriction(ndr, NDR_SCALARS, (const struct mapi_SRestriction *)r);
-}
-
-
-enum ndr_err_code ndr_pull_mapi_SRestriction_wrap(struct ndr_pull *ndr, int ndr_flags, struct mapi_SRestriction_wrap *r)
-{
-       return ndr_pull_mapi_SRestriction(ndr, NDR_SCALARS|NDR_BUFFERS, (struct mapi_SRestriction *)r);
-}
-
-void ndr_print_mapi_SRestriction_wrap(struct ndr_print *ndr, const char *name, const struct mapi_SRestriction_wrap *r)
-{
-       ndr_print_mapi_SRestriction(ndr, name, (const struct mapi_SRestriction *)r);
-}
-
-/*
- * Fake wrapper over mapi_SPropValue. Workaround the no-pointer deep
- * recursion problem in pidl
- */
-enum ndr_err_code ndr_push_mapi_SPropValue_wrap(struct ndr_push *ndr, int ndr_flags, const struct mapi_SPropValue_wrap *r)
-{
-       NDR_CHECK(ndr_push_align(ndr, 8));
-       return ndr_push_mapi_SPropValue(ndr, NDR_SCALARS, (const struct mapi_SPropValue *)r);
-}
-
-enum ndr_err_code ndr_pull_mapi_SPropValue_wrap(struct ndr_pull *ndr, int ndr_flags, struct mapi_SPropValue_wrap *r)
-{
-       return ndr_pull_mapi_SPropValue(ndr, NDR_SCALARS, (struct mapi_SPropValue *)r);
-}
-
-void ndr_print_mapi_SPropValue_wrap(struct ndr_print *ndr, const char *name, const struct mapi_SPropValue_wrap *r)
-{
-       ndr_print_mapi_SPropValue(ndr, name, (const struct mapi_SPropValue *)r);
-}
-
-
-/*
- * Fake wrapper over mapi_SPropValue_array. Workaround the no-pointer deep
- * recursion problem in pidl
- */
-enum ndr_err_code ndr_push_mapi_SPropValue_array_wrap(struct ndr_push *ndr, int ndr_flags, const struct mapi_SPropValue_array_wrap *r)
-{
-       NDR_CHECK(ndr_push_align(ndr, 8));
-       return ndr_push_mapi_SPropValue_array(ndr, NDR_SCALARS, (const struct mapi_SPropValue_array *)r);
-}
-
-enum ndr_err_code ndr_pull_mapi_SPropValue_array_wrap(struct ndr_pull *ndr, int ndr_flags, struct mapi_SPropValue_array_wrap *r)
-{
-       return ndr_pull_mapi_SPropValue_array(ndr, NDR_SCALARS, (struct mapi_SPropValue_array *)r);
-}
-
-void ndr_print_mapi_SPropValue_array_wrap(struct ndr_print *ndr, const char *name, const struct mapi_SPropValue_array_wrap *r)
-{
-       ndr_print_mapi_SPropValue_array(ndr, name, (const struct mapi_SPropValue_array *)r);
-}
-
-enum ndr_err_code ndr_push_RestrictionVariable(struct ndr_push *ndr, int ndr_flags, const union RestrictionVariable *r)
-{
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       int level = ndr_push_get_switch_value(ndr, r);
-                       switch (level) {
-                               case 0x0: {
-                                       break; }
-
-                               case 0x1: {
-                                       NDR_CHECK(ndr_push_mapi_SRestriction_comment(ndr, NDR_SCALARS, &r->res[0]));
-                               break; }
-
-                               default:
-                                       return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-                       int level = ndr_push_get_switch_value(ndr, r);
-                       switch (level) {
-                               case 0x0:
-                               break;
-
-                               case 0x1:
-                                       if (r->res) {
-                                               NDR_CHECK(ndr_push_mapi_SRestriction_comment(ndr, NDR_BUFFERS, &r->res[0]));
-                                       }
-                               break;
-
-                               default:
-                                       return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
-                       }
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code  ndr_pull_RestrictionVariable(struct ndr_pull *ndr, int ndr_flags, union RestrictionVariable *r)
-{
-       int level;
-       TALLOC_CTX *_mem_save_res_0;
-       level = ndr_pull_get_switch_value(ndr, r);
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-
-               if (ndr_flags & NDR_SCALARS) {
-                       switch (level) {
-                               case 0x0: {
-                               break; }
-
-                               case 0x1: {
-                                       NDR_CHECK(ndr_pull_align(ndr, 4));
-                                       NDR_PULL_ALLOC_N(ndr, r->res, 1);
-                                       _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                                       NDR_PULL_SET_MEM_CTX(ndr, r->res, 0);
-                                       NDR_CHECK(ndr_pull_mapi_SRestriction_comment(ndr, NDR_SCALARS, &r->res[0]));
-                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, 0);
-                               break; }
-
-                               default:
-                                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
-                       }
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-                       switch (level) {
-                               case 0x0:
-                               break;
-
-                               case 0x1:
-                                       if (r->res) {
-                                               _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                                               NDR_PULL_SET_MEM_CTX(ndr, r->res, 0);
-                                               NDR_CHECK(ndr_pull_mapi_SRestriction_comment(ndr, NDR_BUFFERS, &r->res[0]));
-                                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, 0);
-                               break; }
-
-                               default:
-                                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
-                       }
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-_PUBLIC_ void ndr_print_RestrictionVariable(struct ndr_print *ndr, const char *name, const union RestrictionVariable *r)
-{
-       int level;
-       level = ndr_print_get_switch_value(ndr, r);
-       ndr_print_union(ndr, name, level, "RestrictionVariable");
-       switch (level) {
-               case 0x0:
-               break;
-
-               case 0x1:
-                       ndr_print_ptr(ndr, "res", r->res);
-                       ndr->depth++;
-                       if (r->res) {
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-                               ndr_print_mapi_SRestriction_comment(ndr, "res", &r->res[0]);
-                       }
-                       ndr->depth--;
-               break;
-       }
-}
-
-enum ndr_err_code ndr_push_Release_req(struct ndr_push *ndr, int ndr_flags, const struct Release_req *r)
-{
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_Release_req(struct ndr_pull *ndr, int ndr_flags, struct Release_req *r)
-{
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_Release_repl(struct ndr_push *ndr, int ndr_flags, const struct Release_repl *r)
-{
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_Release_repl(struct ndr_pull *ndr, int ndr_flags, struct Release_repl *r)
-{
-       return NDR_ERR_SUCCESS;
-}
-
-
-enum ndr_err_code ndr_push_GetSearchCriteria_repl(struct ndr_push *ndr, int ndr_flags, const struct GetSearchCriteria_repl *r)
-{
-       uint32_t cntr_FolderIds_0;
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_push_align(ndr, 8));
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->RestrictionDataSize));
-                       if (r->RestrictionDataSize) {
-                               struct ndr_push *_ndr_RestrictionData;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_RestrictionData, 0, r->RestrictionDataSize));
-                               NDR_CHECK(ndr_push_mapi_SRestriction(_ndr_RestrictionData, NDR_SCALARS|NDR_BUFFERS, &r->RestrictionData));
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_RestrictionData, 0, r->RestrictionDataSize));
-                       }
-                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->LogonId));
-                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->FolderIdCount));
-                       for (cntr_FolderIds_0 = 0; cntr_FolderIds_0 < r->FolderIdCount; cntr_FolderIds_0++) {
-                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->FolderIds[cntr_FolderIds_0]));
-                       }
-                       NDR_CHECK(ndr_push_SearchFlags(ndr, NDR_SCALARS, r->SearchFlags));
-                       NDR_CHECK(ndr_push_trailer_align(ndr, 8));
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-enum ndr_err_code ndr_pull_GetSearchCriteria_repl(struct ndr_pull *ndr, int ndr_flags, struct GetSearchCriteria_repl *r)
-{
-       uint32_t cntr_FolderIds_0;
-       TALLOC_CTX *_mem_save_FolderIds_0;
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               if (ndr_flags & NDR_SCALARS) {
-                       NDR_CHECK(ndr_pull_align(ndr, 8));
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->RestrictionDataSize));
-                       if (r->RestrictionDataSize) {
-                               struct ndr_pull *_ndr_RestrictionData;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_RestrictionData, 0, r->RestrictionDataSize));
-                               NDR_CHECK(ndr_pull_mapi_SRestriction(_ndr_RestrictionData, NDR_SCALARS|NDR_BUFFERS, &r->RestrictionData));
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_RestrictionData, 0, r->RestrictionDataSize));
-                       }
-                       NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->LogonId));
-                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->FolderIdCount));
-                       NDR_PULL_ALLOC_N(ndr, r->FolderIds, r->FolderIdCount);
-                       _mem_save_FolderIds_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->FolderIds, 0);
-                       for (cntr_FolderIds_0 = 0; cntr_FolderIds_0 < r->FolderIdCount; cntr_FolderIds_0++) {
-                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->FolderIds[cntr_FolderIds_0]));
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_FolderIds_0, 0);
-                       NDR_CHECK(ndr_pull_SearchFlags(ndr, NDR_SCALARS, &r->SearchFlags));
-                       NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
-               }
-               if (ndr_flags & NDR_BUFFERS) {
-               }
-               ndr->flags = _flags_save_STRUCT;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-
-void ndr_print_GetSearchCriteria_repl(struct ndr_print *ndr, const char *name, const struct GetSearchCriteria_repl *r)
-{
-       uint32_t cntr_FolderIds_0;
-       ndr_print_struct(ndr, name, "GetSearchCriteria_repl");
-       {
-               uint32_t _flags_save_STRUCT = ndr->flags;
-               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
-               ndr->depth++;
-               ndr_print_uint16(ndr, "RestrictionDataSize", r->RestrictionDataSize);
-               if (r->RestrictionDataSize) {
-                       ndr_print_mapi_SRestriction(ndr, "RestrictionData", &r->RestrictionData);
-               } else {
-                       ndr_print_uint8(ndr, "RestrictionData", 0);
-               }
-               ndr_print_uint8(ndr, "LogonId", r->LogonId);
-               ndr_print_uint16(ndr, "FolderIdCount", r->FolderIdCount);
-               ndr->print(ndr, "%s: ARRAY(%d)", "FolderIds", (int)r->FolderIdCount);
-               ndr->depth++;
-               for (cntr_FolderIds_0=0;cntr_FolderIds_0<r->FolderIdCount;cntr_FolderIds_0++) {
-                       char *idx_0=NULL;
-                       if (asprintf(&idx_0, "[%d]", cntr_FolderIds_0) != -1) {
-                               ndr_print_hyper(ndr, "FolderIds", r->FolderIds[cntr_FolderIds_0]);
-                               free(idx_0);
-                       }
-               }
-               ndr->depth--;
-               ndr_print_SearchFlags(ndr, "SearchFlags", r->SearchFlags);
-               ndr->depth--;
-               ndr->flags = _flags_save_STRUCT;
-       }
-}
diff --git a/branches/plugfest/property.idl b/branches/plugfest/property.idl
deleted file mode 100644 (file)
index 3962ccb..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-#include "idl_types.h"
-
-cpp_quote("#include <gen_ndr/ndr_misc.h>")
-
-import "exchange.idl";
-
-[
-       pointer_default(unique)
-]
-interface property
-{
-       typedef [enum16bit] enum {
-               RecurFrequency_Daily    = 0x200A,
-               RecurFrequency_Weekly   = 0x200B,
-               RecurFrequency_Monthly  = 0x200C,
-               RecurFrequency_Yearly   = 0x200D
-       } RecurFrequency;
-       
-       typedef [enum16bit] enum {
-               PatternType_Day         = 0x0,
-               PatternType_Week        = 0x1,
-               PatternType_Month       = 0x2,
-               PatternType_MonthNth    = 0x3,
-               PatternType_MonthEnd    = 0x4,
-               PatternType_HjMonth     = 0xA,
-               PatternType_HjMonthNth  = 0xB,
-               PatternType_HjMonthEnd  = 0xC
-       } PatternType;
-
-       typedef [enum16bit] enum {
-               CAL_DEFAULT                     = 0x0,
-               CAL_GREGORIAN                   = 0x1,
-               CAL_GREGORIAN_US                = 0x2,
-               CAL_JAPAN                       = 0x3,
-               CAL_TAIWAN                      = 0x4,
-               CAL_KOREA                       = 0x5,
-               CAL_HIJRI                       = 0x6,
-               CAL_THAI                        = 0x7,
-               CAL_HEBREW                      = 0x8,
-               CAL_GREGORIAN_ME_FRENCH         = 0x9,
-               CAL_GREGORIAN_ARABIC            = 0xA,
-               CAL_GREGORIAN_XLIT_ENGLISH      = 0xB,
-               CAL_GREGORIAN_XLIT_FRENCH       = 0xC,
-               CAL_LUNAR_JAPANESE              = 0xE,
-               CAL_CHINESE_LUNAR               = 0xF,
-               CAL_SAKA                        = 0x10,
-               CAL_LUNAR_KOREAN                = 0x14
-       } CalendarType;
-
-       typedef [bitmap32bit] bitmap {
-               Su              = 0x00000001,
-               M               = 0x00000002,
-               Tu              = 0x00000004,
-               W               = 0x00000008,
-               Th              = 0x00000010,
-               F               = 0x00000020,
-               Sa              = 0x00000040
-       } WeekRecurrencePattern;
-
-       typedef [v1_enum] enum {
-               RecurrenceN_First       =       0x1,
-               RecurrenceN_Second      =       0x2,
-               RecurrenceN_Third       =       0x3,
-               RecurrenceN_Fourth      =       0x4,
-               RecurrenceN_Last        =       0x5
-       } RecurrenceN;
-
-       typedef [flag(NDR_NOALIGN)] struct {
-               WeekRecurrencePattern   WeekRecurrencePattern;
-               RecurrenceN             N;
-       } MonthRecurrencePattern;
-
-       typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
-               [case(0x1)] WeekRecurrencePattern               WeekRecurrencePattern;
-               [case(0x2)] uint32                              Day;
-               [case(0x3)] MonthRecurrencePattern              MonthRecurrencePattern;
-               [case(0x4)] uint32                              Day;
-               [case(0xA)] uint32                              Day;
-               [case(0xB)] MonthRecurrencePattern              MonthRecurrencePattern;
-               [case(0xC)] uint32                              Day;
-               [case(0x0)];
-               [default];
-       } PatternTypeSpecific;
-
-       typedef [v1_enum] enum {
-               END_AFTER_DATE          = 0x00002021,
-               END_AFTER_N_OCCURRENCES = 0x00002022,
-               END_NEVER_END           = 0x00002023,
-               NEVER_END               = 0xFFFFFFFF
-       } EndType;
-
-       typedef [v1_enum] enum {
-               FirstDOW_Sunday         = 0x0,
-               FirstDOW_Monday         = 0x1,
-               FirstDOW_Tuesday        = 0x2,
-               FirstDOW_Wednesday      = 0x3,
-               FirstDOW_Thursday       = 0x4,
-               FirstDOW_Friday         = 0x5,
-               FirstDOW_Saturday       = 0x6
-       } FirstDOW;
-
-       typedef [v1_enum] enum {
-               ARO_SUBJECT             = 0x0001,
-               ARO_MEETINGTYPE         = 0x0002,
-               ARO_REMINDERDELTA       = 0x0004,
-               ARO_REMINDER            = 0x0008,
-               ARO_LOCATION            = 0x0010,
-               ARO_BUSYSTATUS          = 0x0020,
-               ARO_ATTACHMENT          = 0x0040,
-               ARO_SUBTYPE             = 0x0080,
-               ARO_APPTCOLOR           = 0x0100,
-               ARO_EXCEPTIONAL_BODY    = 0x0200
-       } OverrideFlags;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint16                                          ReaderVersion;
-               uint16                                          WriterVersion;
-               RecurFrequency                                  RecurFrequency;
-               PatternType                                     PatternType;
-               CalendarType                                    CalendarType;
-               uint32                                          FirstDateTime;
-               uint32                                          Period;
-               uint32                                          SlidingFlag;
-               [switch_is(PatternType)] PatternTypeSpecific    PatternTypeSpecific;
-               EndType                                         EndType;
-               uint32                                          OccurrenceCount;
-               FirstDOW                                        FirstDOW;
-               uint32                                          DeletedInstanceCount;
-               uint32                                          DeletedInstanceDates[DeletedInstanceCount];
-               uint32                                          ModifiedInstanceCount;
-               uint32                                          ModifiedInstanceDates[ModifiedInstanceCount];
-               uint32                                          StartDate;
-               uint32                                          EndDate;
-       } RecurrencePattern;
-       
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint32                                          ChangeHighlightSize;
-               uint32                                          ChangeHighlightValue;
-               uint32                                          Reserved;
-       } ChangeHighlight;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {     
-               ChangeHighlight         ChangeHighlight;
-               uint32                  ReservedBlockEE1Size;
-               uint32                  ReservedBlockEE1;
-               uint32                  StartDateTime;                  
-               uint32                  EndDateTime;
-               uint32                  OriginalStartDate;
-               uint16                  WidCharSubjectLength;
-               uint16                  WideCharSubject;
-               uint16                  WideCharLocationLength;
-               uint16                  WideCharLocation;
-               uint32                  ReservedBlockEE2Size;
-               uint32                  ReservedBlockEE2;
-       } ExtendedException;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [case(0x0000)]                  ;       
-               [case(0x0001)]  uint16          sLength;
-               [case(0x0002)]  uint32          mType;
-               [case(0x0004)]  uint32          rDelta;
-               [case(0x0008)]  uint32          rSet;
-               [case(0x0010)]  uint16          lLength;
-               [case(0x0020)]  uint32          bStatus;
-               [case(0x0040)]  uint32          attachment;
-               [case(0x0080)]  uint32          sType;
-               [case(0x0100)]  uint32          aColor;
-               [default];
-       } Exception_Value;
-
-       typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
-               [default];
-               [case(0x0001)]  uint16          subject;
-               [case(0x0010)]  uint32          location;
-
-       } Exception_Msg;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-                       uint32                                                                  StartDateTime;
-                       uint32                                                                  EndDateTime;
-                       uint32                                                                  OriginalStartDate;
-                       OverrideFlags                                                           OverrideFlags;
-                       [switch_is(OverrideFlags & 0x0001)]     Exception_Value                 SubjectLength;
-                       [switch_is(OverrideFlags & 0x0001)]     Exception_Value                 SubjectLength2;
-                       [switch_is(OverrideFlags & 0x0001)]     Exception_Msg                   Subject;
-                       [switch_is(OverrideFlags & 0x0002)]     Exception_Value                 MeetingType;
-                       [switch_is(OverrideFlags & 0x0004)]     Exception_Value                 ReminderDelta;
-                       [switch_is(OverrideFlags & 0x0008)]     Exception_Value                 ReminderSet;
-                       [switch_is(OverrideFlags & 0x0010)]     Exception_Value                 LocationLength;
-                       [switch_is(OverrideFlags & 0x0010)]     Exception_Value                 LocationLength2;
-                       [switch_is(OverrideFlags & 0x0010)]     Exception_Msg                   Location;
-                       [switch_is(OverrideFlags & 0x0020)]     Exception_Value                 BusyStatus;
-                       [switch_is(OverrideFlags & 0x0040)]     Exception_Value                 Attachment;
-                       [switch_is(OverrideFlags & 0x0080)]     Exception_Value                 SubType;
-                       [switch_is(OverrideFlags & 0x0100)]     Exception_Value                 AppointmentColor;
-       } ExceptionInfo;
-
-
-
-
-       
-       
-       typedef [public,flag(NDR_NOALIGN)] struct {
-
-               RecurrencePattern                               RecurrencePattern;
-               uint32                                          ReaderVersion2;
-               uint32                                          WriterVersion2;
-               uint32                                          StartTimeOffset;
-               uint32                                          EndTimeOffset;
-               uint16                                          ExceptionCount;
-               ExceptionInfo                                   ExceptionInfo[ExceptionCount];
-               uint32                                          ReservedBlock1Size;
-               uint32                                          ReservedBlock1;
-               [flag(NDR_REMAINING)] DATA_BLOB data;
-//             ExtendedException                               ExtendedException[ExceptionCount];
-//             uint32                                          ReservedBlock2Size;
-//             uint32                                          ReservedBlock2;
-       } AppointmentRecurrencePattern;
-       
-       /* [MS-DIF].pdf Section 2.3.6 */
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint16  wYear;
-               uint16  wMonth;
-               uint16  wDayOfWeek;
-               uint16  wDay;
-               uint16  wHour;
-               uint16  wMinute;
-               uint16  wSecond;
-               uint16  wMilliseconds;
-       } SYSTEMTIME;
-
-       /* pidLidTimeZoneStruct */
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint32                  lBias;
-               uint32                  lStandardBias;
-               uint32                  lDaylightBias;
-               uint16                  wStandardYear;
-               SYSTEMTIME              stStandardDate;
-               uint16                  wDaylightYear;
-               SYSTEMTIME              stDaylightDate;
-       } TimeZoneStruct;
-
-       /* pidLidGlobalObjectId */
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               uint8                   ByteArrayID[16];
-               uint8                   YH;
-               uint8                   YL;
-               uint8                   Month;
-               uint8                   D;
-               FILETIME                CreationTime;
-               uint8                   X[8];
-               uint32                  Size;
-               uint8                   Data[Size];
-       } GlobalObjectId;
-}
diff --git a/branches/plugfest/pymapi/msg_store.c b/branches/plugfest/pymapi/msg_store.c
deleted file mode 100644 (file)
index 5cc358f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "pymapi/pymapi.h"
-
-static PyObject *py_is_mailbox_folder(PyMapiObjectObject *self, PyObject *args)
-{
-       uint64_t fid;
-       uint32_t olFolder;
-
-       if (!PyArg_ParseTuple(args, "L", &fid))
-               return NULL;
-
-       if (!IsMailboxFolder(self->object, fid, &olFolder))
-               return Py_None;
-
-       return PyInt_FromLong(olFolder);
-}
-
-static PyMethodDef msg_store_methods[] = {
-       { "is_mailbox_folder", (PyCFunction)py_is_mailbox_folder, METH_VARARGS, NULL },
-       { NULL },
-};
-
-static PyGetSetDef msg_store_getsetters[] = {
-       { NULL }
-};
-
-static PyObject *msg_store_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       PyErr_SetString(PyExc_NotImplementedError, "Message Stores can only be obtained from a MAPI Session");
-       return NULL;
-}
-
-PyTypeObject PyMapiMsgStoreType = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "MessageStore",
-       .tp_basicsize = sizeof(PyMapiObjectObject),
-       .tp_methods = msg_store_methods,
-       .tp_getset = msg_store_getsetters,
-       .tp_doc = "MAPI Message Store",
-       .tp_new = msg_store_new,
-       .tp_base = &PyMapiObjectType,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
diff --git a/branches/plugfest/pymapi/object.c b/branches/plugfest/pymapi/object.c
deleted file mode 100644 (file)
index 7d0072d..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "pymapi/pymapi.h"
-
-static PyObject *PyMapiObject_FromMapiObject(mapi_object_t *obj)
-{
-       return NULL; /* FIXME */
-}      
-
-static PyObject *object_create(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       /* FIXME */
-       return (PyObject *)PyObject_New(PyMapiObjectObject, type);
-}
-
-static void object_dealloc(PyObject *_self)
-{
-       PyMapiObjectObject *self = (PyMapiObjectObject *)_self;
-       mapi_object_release(self->object);
-       PyObject_Del(_self);
-}
-
-mapi_object_t *PyMapiObject_GetMapiObject(PyObject *obj)
-{
-       PyMapiObjectObject *self = (PyMapiObjectObject *)obj;
-       if (!PyMapiObject_Check(obj))
-               return NULL;
-
-       return self->object;
-}
-
-static PyObject *py_folder_get_items_count(PyMapiObjectObject *self)
-{
-       enum MAPISTATUS status;
-       uint32_t unread, total;
-
-       status = GetFolderItemsCount(self->object, &unread, &total);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_BuildValue("(ii)", unread, total);
-}
-
-static PyObject *py_folder_remove_user_permissions(PyMapiObjectObject *self, PyObject *args)
-{
-       char *username;
-       enum MAPISTATUS status;
-       if (!PyArg_ParseTuple(args, "s", &username))
-               return NULL;
-
-       status = RemoveUserPermission(self->object, username);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyObject *py_folder_create(PyMapiObjectObject *self, PyObject *args)
-{
-       int foldertype;
-       char *name, *comment;
-       uint32_t flags;
-       enum MAPISTATUS status;
-       mapi_object_t child;
-
-       if (!PyArg_ParseTuple(args, "issI", &foldertype, &name, &comment, &flags))
-               return NULL;
-
-       status = CreateFolder(self->object, foldertype, name, comment, flags, &child);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyMapiObject_FromMapiObject(&child);
-}
-
-static PyObject *py_folder_delete(PyMapiObjectObject *self, PyObject *args)
-{
-       mapi_id_t folderid; 
-       int flags;
-       enum MAPISTATUS status;
-       bool partial;
-       if (!PyArg_ParseTuple(args, "ii", &folderid, &flags))
-               return NULL;
-
-       status = DeleteFolder(self->object, folderid, flags, &partial);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyBool_FromLong(partial);
-}
-
-static PyObject *py_folder_empty(PyMapiObjectObject *self)
-{
-       enum MAPISTATUS status = EmptyFolder(self->object);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-       return Py_None;
-}
-
-static PyObject *py_folder_create_message(PyMapiObjectObject *self)
-{
-       mapi_object_t msg;
-       enum MAPISTATUS status = CreateMessage(self->object, &msg);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-       return PyMapiObject_FromMapiObject(&msg);
-}
-
-static PyObject *py_folder_delete_messages(PyMapiObjectObject *self, PyObject *args)
-{
-       PyObject *py_ids;
-       uint32_t cn_messages;
-       mapi_id_t *ids;
-       enum MAPISTATUS status;
-       int i;
-
-       if (!PyArg_ParseTuple(args, "O", &py_ids))
-               return NULL;
-
-       if (!PySequence_Check(py_ids)) {
-               PyErr_SetString(PyExc_TypeError, "ids should be a list of ids");
-               return NULL;
-       }
-
-       cn_messages = PySequence_Size(py_ids);
-       ids = talloc_array(NULL, mapi_id_t, cn_messages);
-       if (ids == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       for (i = 0; i < cn_messages; i++) {
-               PyObject *item;
-               item = PySequence_GetItem(py_ids, i);
-               ids[i] = PyInt_AsLong(item);
-       }
-
-       status = DeleteMessage(self->object, ids, cn_messages);
-       talloc_free(ids);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyObject *py_folder_set_read_flags(PyMapiObjectObject *self, PyObject *args)
-{
-       int flags;
-       PyObject *py_ids;
-       enum MAPISTATUS status;
-       uint16_t cn_ids;
-    uint64_t *ids;
-       int i;
-       if (!PyArg_ParseTuple(args, "iO", &flags, &py_ids))
-               return NULL;
-
-       if (!PySequence_Check(py_ids)) {
-               PyErr_SetString(PyExc_TypeError, "ids should be a list of ids");
-               return NULL;
-       }
-
-       cn_ids = PySequence_Size(py_ids);
-       ids = talloc_array(NULL, uint64_t, cn_ids);
-       if (ids == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       for (i = 0; i < cn_ids; i++) {
-               PyObject *item;
-               item = PySequence_GetItem(py_ids, i);
-               ids[i] = PyInt_AsLong(item);
-       }
-
-       status = SetReadFlags(self->object, flags, cn_ids, ids);
-       talloc_free(ids);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyObject *py_folder_get_message_status(PyMapiObjectObject *self, PyObject *args)
-{
-       mapi_id_t msgid;
-       uint32_t lstatus;
-       enum MAPISTATUS status;
-       if (!PyArg_ParseTuple(args, "i", &msgid))
-               return NULL;
-       
-       status = GetMessageStatus(self->object, msgid, &lstatus);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyInt_FromLong(lstatus);
-}
-
-static PyObject *py_message_get_best_body(PyMapiObjectObject *self)
-{
-       enum MAPISTATUS status;
-       uint8_t format;
-       
-       status = GetBestBody(self->object, &format);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyInt_FromLong(status);
-}
-
-static PyObject *py_get_default_folder(PyMapiObjectObject *self, PyObject *args)
-{
-       enum MAPISTATUS status;
-       uint32_t type;
-       uint64_t folder;
-
-       if (!PyArg_ParseTuple(args, "i", &type))
-               return NULL;
-
-       status = GetDefaultFolder(self->object, &folder, type);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyLong_FromLong(folder);
-}
-
-static PyObject *py_get_default_public_folder(PyMapiObjectObject *self, PyObject *args)
-{
-       enum MAPISTATUS status;
-       uint32_t type;
-       uint64_t folder;
-
-       if (!PyArg_ParseTuple(args, "i", &type))
-               return NULL;
-
-       status = GetDefaultPublicFolder(self->object, &folder, type);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return PyLong_FromLong(folder);
-}
-
-static PyObject *py_folder_add_user_permission(PyMapiObjectObject *self, PyObject *args)
-{
-       char *name;
-       int rights;
-       enum MAPISTATUS status;
-       if (!PyArg_ParseTuple(args, "si", &name, &rights))
-               return NULL;
-
-       status = AddUserPermission(self->object, name, rights);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyObject *py_folder_modify_user_permission(PyMapiObjectObject *self, PyObject *args)
-{
-       char *name;
-       int rights;
-       enum MAPISTATUS status;
-       if (!PyArg_ParseTuple(args, "si", &name, &rights))
-               return NULL;
-
-       status = ModifyUserPermission(self->object, name, rights);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyMethodDef object_methods[] = {
-       { "get_folder_items_count", (PyCFunction)py_folder_get_items_count, METH_NOARGS, 
-               "S.get_folder_items_count() -> (unread, total)" },
-       { "remove_user_permission", (PyCFunction)py_folder_remove_user_permissions, METH_VARARGS,
-               "S.remove_user_permissions(user) -> None" },
-       { "add_user_permission", (PyCFunction)py_folder_add_user_permission, METH_VARARGS,
-               "S.add_user_permission(user, perm) -> None" },
-       { "modify_user_permission", (PyCFunction)py_folder_modify_user_permission, METH_VARARGS,
-               "S.modify_user_permission(user, perm) -> None" },
-       { "create_folder", (PyCFunction)py_folder_create, METH_VARARGS,
-               "S.create_folder(type, name, comment, flags) -> None" },
-       { "empty_folder", (PyCFunction)py_folder_empty, METH_NOARGS, 
-               "S.empty_folder() -> None" },
-       { "delete_folder", (PyCFunction)py_folder_delete, METH_VARARGS,
-               "S.delete_folder(folderid, flags) -> None" },
-       { "create_message", (PyCFunction)py_folder_create_message, METH_NOARGS,
-               "S.create_message() -> message" },
-       { "delete_messages", (PyCFunction)py_folder_delete_messages, METH_VARARGS,
-               "S.delete_messages([ids]) -> None" },
-       { "get_message_status", (PyCFunction)py_folder_get_message_status, METH_VARARGS,
-               "S.get_message_status(id) -> status" },
-       { "set_read_flags", (PyCFunction)py_folder_set_read_flags, METH_VARARGS,
-               "S.set_read_flags(flags, [ids]) -> None" },
-       { "get_best_body", (PyCFunction)py_message_get_best_body, METH_NOARGS,
-               "S.get_best_body() -> format" },
-       { "get_default_folder", (PyCFunction)py_get_default_folder, METH_VARARGS,
-               "S.get_default_folder(type) -> id" },
-       { "get_default_public_folder", (PyCFunction)py_get_default_public_folder, METH_VARARGS,
-               "S.get_default_public_folder(type) -> id" },
-       { NULL },
-};
-
-static PyObject *object_get_session(PyObject *_self, void *closure)
-{
-       PyMapiObjectObject *self = (PyMapiObjectObject *)_self;
-       struct mapi_session *session;
-
-       session = mapi_object_get_session(self->object);
-
-       return PyMapiSession_FromMapiSession(session);
-}
-
-static PyObject *object_get_id(PyObject *_self, void *closure)
-{
-       PyMapiObjectObject *self = (PyMapiObjectObject *)_self;
-       mapi_id_t id;
-
-       id = mapi_object_get_id(self->object);
-
-       return PyLong_FromLong(id);
-}
-
-static PyGetSetDef object_getsetters[] = {
-       { "session", object_get_session, NULL, "The MAPI session" },
-       { "id", object_get_id, NULL, "MAPI ID" },
-       { NULL }
-};
-
-PyTypeObject PyMapiObjectType = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "Object",
-       .tp_basicsize = sizeof(PyMapiObjectObject),
-       .tp_methods = object_methods,
-       .tp_getset = object_getsetters,
-       .tp_doc = "MAPI Object",
-       .tp_new = object_create,
-       .tp_dealloc = object_dealloc,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
diff --git a/branches/plugfest/pymapi/pymapi.c b/branches/plugfest/pymapi/pymapi.c
deleted file mode 100644 (file)
index 3c3b633..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "pymapi/pymapi.h"
-
-void initmapi(void);
-
-static PyObject *py_get_proptag_value(PyObject *mod, PyObject *args)
-{
-       char *propname;
-       if (!PyArg_ParseTuple(args, "s", &propname))
-               return NULL;
-
-       return PyInt_FromLong(get_proptag_value(propname));
-}
-
-static PyObject *py_get_proptag_name(PyObject *mod, PyObject *args)
-{
-       uint32_t proptag;
-       const char *name;
-       if (!PyArg_ParseTuple(args, "i", &proptag))
-               return NULL;
-
-       name = get_proptag_name(proptag);
-       if (name == NULL)
-               return Py_None;
-       return PyString_FromString(name);
-}
-
-static PyObject *py_get_importance(PyObject *mod, PyObject *args)
-{
-       uint32_t importance;
-       const char *name;
-       if (!PyArg_ParseTuple(args, "i", &importance))
-               return NULL;
-
-       name = get_importance(importance);
-       if (name == NULL)
-               return Py_None;
-       return PyString_FromString(name);
-}
-
-static PyObject *py_get_task_status(PyObject *mod, PyObject *args)
-{
-       uint32_t task_status;
-       const char *name;
-       if (!PyArg_ParseTuple(args, "i", &task_status))
-               return NULL;
-
-       name = get_task_status(task_status);
-       if (name == NULL)
-               return Py_None;
-       return PyString_FromString(name);
-}
-
-static PyMethodDef mapi_methods[] = {
-       { "get_proptag_value", (PyCFunction)py_get_proptag_value, METH_VARARGS, NULL },
-       { "get_proptag_name", (PyCFunction)py_get_proptag_name, METH_VARARGS, NULL },
-       { "get_importance", (PyCFunction)py_get_importance, METH_VARARGS, NULL },
-       { "get_task_status", (PyCFunction)py_get_task_status, METH_VARARGS, NULL },
-       { NULL }
-};
-
-void initmapi(void)
-{
-       PyObject *m;
-
-       if (PyType_Ready(&PyMapiSessionType) < 0)
-               return;
-
-       if (PyType_Ready(&PyMapiObjectType) < 0)
-               return;
-
-       if (PyType_Ready(&PyMapiMsgStoreType) < 0)
-               return;
-
-       m = Py_InitModule3("mapi", mapi_methods, "MAPI/RPC Python bindings");
-       if (m == NULL)
-               return;
-
-       Py_INCREF((PyObject *)&PyMapiSessionType);
-       PyModule_AddObject(m, "Session", (PyObject *)&PyMapiSessionType);
-
-       Py_INCREF((PyObject *)&PyMapiObjectType);
-       PyModule_AddObject(m, "Object", (PyObject *)&PyMapiObjectType);
-
-       Py_INCREF((PyObject *)&PyMapiMsgStoreType);
-       PyModule_AddObject(m, "MessageStore", (PyObject *)&PyMapiMsgStoreType);
-}
diff --git a/branches/plugfest/pymapi/pymapi.h b/branches/plugfest/pymapi/pymapi.h
deleted file mode 100644 (file)
index beb70aa..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _PYMAPI_H_
-#define _PYMAPI_H_
-
-#include "libmapi/libmapi.h"
-#include <Python.h>
-
-/* mapi.Session */
-PyAPI_DATA(PyTypeObject) PyMapiSessionType;
-PyObject *PyMapiSession_FromMapiSession(struct mapi_session *session);
-
-/* mapi.Object */
-typedef struct {
-       PyObject_HEAD   
-       mapi_object_t *object;
-} PyMapiObjectObject;
-
-PyAPI_DATA(PyTypeObject) PyMapiObjectType;
-mapi_object_t *PyMapiObject_GetMapiObject(PyObject *);
-#define PyMapiObject_Check(op) PyObject_TypeCheck(op, &PyMapiObjectType)
-
-/* mapi.MessageStore */
-PyAPI_DATA(PyTypeObject) PyMapiMsgStoreType;
-
-/* Set a MAPISTATUS error as a Python exception */
-#define PyErr_FromMAPISTATUS(err) Py_BuildValue("(i,z)", err, NULL)
-#define PyErr_SetMAPISTATUS(err) PyErr_SetObject(PyExc_RuntimeError, PyErr_FromMAPISTATUS(err))
-#define PyErr_MAPISTATUS_IS_ERR_RAISE(err) \
-       if (err != MAPI_E_SUCCESS) { \
-               PyErr_SetMAPISTATUS(err); \
-               return NULL; \
-       }
-
-#endif
diff --git a/branches/plugfest/pymapi/session.c b/branches/plugfest/pymapi/session.c
deleted file mode 100644 (file)
index 297488e..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "pymapi/pymapi.h"
-
-typedef struct {
-       PyObject_HEAD   
-       struct mapi_session *session;
-} PyMapiSessionObject;
-
-static PyObject *py_session_create(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       enum MAPISTATUS retval;
-       char *kwnames[] = { "profname", "password", "provider" };
-       char *profname, *password;
-       uint32_t provider = 0;
-       struct mapi_session *session;
-
-       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ss|i", kwnames, 
-                                                                               &profname, &password, &provider))
-               return NULL;
-
-       retval = MapiLogonProvider(&session, profname, password, provider);
-       if (!retval) {
-               PyErr_SetMAPISTATUS(retval);
-               return NULL;
-       }
-       return PyMapiSession_FromMapiSession(session);
-}
-
-PyObject *PyMapiSession_FromMapiSession(struct mapi_session *session)
-{
-       PyMapiSessionObject *ret;
-       ret = PyObject_New(PyMapiSessionObject, &PyMapiSessionType);
-       ret->session = session;
-       return (PyObject *)ret;
-}
-
-static PyObject *py_session_login(PyObject *args, PyObject *kwargs)
-{
-       /* FIXME */
-       return NULL;
-}
-
-static PyObject *py_open_msg_store(PyObject *self, PyObject *args)
-{
-       PyObject *py_mapi_object;
-       PyMapiSessionObject *self_session = (PyMapiSessionObject *)self;
-       mapi_object_t *obj;
-       enum MAPISTATUS retval;
-
-       if (!PyArg_ParseTuple(args, "O", &py_mapi_object))
-               return NULL;
-
-       obj = PyMapiObject_GetMapiObject(py_mapi_object);
-       if (obj == NULL) {
-               PyErr_SetString(PyExc_TypeError, "Expected MAPI Object");
-               return NULL;
-       }
-
-       retval = OpenMsgStore(self_session->session, obj);
-       if (!retval) {
-               PyErr_SetMAPISTATUS(retval);
-               return NULL;
-       }
-
-       return Py_None;
-}
-
-static PyObject *py_open_user_mailbox(PyObject *self, PyObject *args)
-{
-       PyObject *py_mapi_object;
-       PyMapiSessionObject *self_session = (PyMapiSessionObject *)self;
-       mapi_object_t *obj;
-       enum MAPISTATUS retval;
-       char *username;
-
-       if (!PyArg_ParseTuple(args, "sO", &username, &py_mapi_object))
-               return NULL;
-
-       obj = PyMapiObject_GetMapiObject(py_mapi_object);
-       if (obj == NULL) {
-               PyErr_SetString(PyExc_TypeError, "Expected MAPI Object");
-               return NULL;
-       }
-
-       retval = OpenUserMailbox(self_session->session, username, obj);
-       if (!retval) {
-               PyErr_SetMAPISTATUS(retval);
-               return NULL;
-       }
-
-       return Py_None;
-}
-
-static PyObject *py_open_public_folder(PyObject *self, PyObject *args)
-{
-       PyObject *py_mapi_object;
-       PyMapiSessionObject *self_session = (PyMapiSessionObject *)self;
-       mapi_object_t *obj;
-       enum MAPISTATUS retval;
-
-       if (!PyArg_ParseTuple(args, "O", &py_mapi_object))
-               return NULL;
-
-       obj = PyMapiObject_GetMapiObject(py_mapi_object);
-       if (obj == NULL) {
-               PyErr_SetString(PyExc_TypeError, "Expected MAPI Object");
-               return NULL;
-       }
-
-       retval = OpenPublicFolder(self_session->session, obj);
-       if (!retval) {
-               PyErr_SetMAPISTATUS(retval);
-               return NULL;
-       }
-
-       return Py_None;
-}
-
-static PyObject *py_unsubscribe(PyMapiSessionObject *self, PyObject *args)
-{
-       uint32_t ulConnection;
-       enum MAPISTATUS status;
-       
-       if (!PyArg_ParseTuple(args, "i", &ulConnection))
-               return NULL;
-
-       status = Unsubscribe(self->session, ulConnection);
-       PyErr_MAPISTATUS_IS_ERR_RAISE(status);
-
-       return Py_None;
-}
-
-static PyMethodDef session_methods[] = {
-       { "login", (PyCFunction) py_session_login, METH_VARARGS|METH_KEYWORDS },
-       { "open_msg_store", (PyCFunction) py_open_msg_store, METH_VARARGS,
-               "S.open_msg_store(object)\n\n"
-               "This function opens the main message store. This allows access to "
-               "the normal user folders."
-       },
-       { "open_user_mailbox", (PyCFunction) py_open_user_mailbox, METH_VARARGS,
-               "S.open_user_mailbox(username, object)\n\n"
-               "Open another users mailbox."
-       },
-       { "open_public_folder", (PyCFunction) py_open_public_folder, METH_VARARGS,
-               "S.open_public_folder(object)\n\n"
-               "This function opens the public folder store. This allows access to "
-               "the public folders."
-       },
-       { "unsubscribe", (PyCFunction) py_unsubscribe, METH_VARARGS,
-               "S.Unsubscribe(int) -> None"
-       },
-       { NULL },
-};
-
-static PyGetSetDef session_getsetters[] = {
-       { "default_profile_path", NULL, NULL },
-       { "profile_name", NULL, NULL },
-       { "message_store", NULL, NULL },
-       { NULL }
-};
-
-PyTypeObject PyMapiSessionType = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "Session",
-       .tp_basicsize = sizeof(PyMapiSessionObject),
-       .tp_methods = session_methods,
-       .tp_getset = session_getsetters,
-       .tp_doc = "MAPI Session",
-       .tp_new = py_session_create,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
diff --git a/branches/plugfest/pyopenchange/pymapi.c b/branches/plugfest/pyopenchange/pymapi.c
deleted file mode 100644 (file)
index e25b511..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Python interface to openchange
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <Python.h>
-#include "libmapi/libmapi.h"
-#include "pyopenchange/pymapi.h"
-
-void initmapi(void);
-
-static PyObject *py_SPropValue_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       TALLOC_CTX              *mem_ctx;
-       PySPropValueObject      *SPropValue;
-
-       mem_ctx = talloc_new(NULL);
-       if (mem_ctx == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       SPropValue = PyObject_New(PySPropValueObject, &PySPropValue);
-       SPropValue->mem_ctx = mem_ctx;
-       SPropValue->SPropValue = talloc_array(mem_ctx, struct SPropValue, 2);
-       SPropValue->cValues = 0;
-
-       return (PyObject *) SPropValue;
-}
-
-static void py_SPropValue_dealloc(PyObject *_self)
-{
-       PySPropValueObject      *self = (PySPropValueObject *)_self;
-
-       talloc_free(self->mem_ctx);
-       PyObject_Del(_self);
-}
-
-static PyObject *py_SPropValue_add(PySPropValueObject *self, PyObject *args)
-{
-       uint32_t        proptag;
-       PyObject        *data;
-       int             i;
-       NTTIME          nt;
-
-       if (!PyArg_ParseTuple(args, "lO", &proptag, &data)) {
-               return NULL;
-       }
-
-       /* Ensure this tag has not already been added to the list */
-       for (i = 0; i < self->cValues; i++) {
-               if (self->SPropValue[i].ulPropTag == proptag) {
-                       return NULL;
-               }
-       }
-
-       self->SPropValue = talloc_realloc(self->mem_ctx, self->SPropValue, struct SPropValue, self->cValues + 2);
-
-       switch (proptag & 0xFFFF) {
-       case PT_SHORT:
-               if (!PyInt_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires long");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.i = (uint16_t) PyInt_AsLong(data);
-               break;
-       case PT_LONG:
-               if (!PyInt_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires long");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.l = PyInt_AsLong(data);
-               break;
-       case PT_DOUBLE:
-               if (!PyFloat_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires double");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.dbl = PyFloat_AsDouble(data);
-               break;
-       case PT_BOOLEAN:
-               if (!PyBool_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires long");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.b = PyInt_AsLong(data);
-               break;
-       case PT_I8:
-               if (!PyInt_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires long long int");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.d = PyLong_AsLongLong(data);
-               break;
-       case PT_STRING8:
-               if (!PyString_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires string");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.lpszA = talloc_strdup(self->mem_ctx, PyString_AsString(data));
-               break;
-       case PT_UNICODE:
-               if (!PyString_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires string");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.lpszW = talloc_strdup(self->mem_ctx, PyString_AsString(data));
-               break;
-       case PT_SYSTIME:
-               if (!PyFloat_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires float");
-                       return NULL;
-               }
-               unix_to_nt_time(&nt, PyFloat_AsDouble(data));
-               self->SPropValue[self->cValues].value.ft.dwLowDateTime = (nt << 32) >> 32;
-               self->SPropValue[self->cValues].value.ft.dwHighDateTime = nt >> 32;
-               break;
-       case PT_ERROR:
-               if (!PyInt_Check(data)) {
-                       PyErr_SetString(PyExc_TypeError, "Property Tag requires long");
-                       return NULL;
-               }
-               self->SPropValue[self->cValues].value.err = PyInt_AsLong(data);
-               break;
-       default:
-               printf("Missing support for 0x%.4x type\n", (proptag & 0xFFFF));
-               Py_RETURN_NONE;
-       }
-
-       self->SPropValue[self->cValues].ulPropTag = proptag;
-       self->cValues += 1;
-       Py_RETURN_NONE;
-}
-
-static PyObject *py_SPropValue_dump(PySPropValueObject *self, PyObject *args)
-{
-       int     i;
-       char    *sep;
-
-       if (!PyArg_ParseTuple(args, "s", &sep)) {
-               return NULL;
-       }
-
-       for (i = 0; i < self->cValues; i++) {
-               mapidump_SPropValue(self->SPropValue[i], sep);
-       }
-       
-       Py_RETURN_NONE;
-}
-
-static PyMethodDef mapi_SPropValue_methods[] = {
-       { "add", (PyCFunction)py_SPropValue_add, METH_VARARGS },
-       { "dump", (PyCFunction)py_SPropValue_dump, METH_VARARGS },
-       { NULL },
-};
-
-static PyGetSetDef mapi_SPropValue_getsetters[] = {
-       { NULL }
-};
-
-PyTypeObject PySPropValue = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "SPropValue",
-       .tp_basicsize = sizeof (PySPropValueObject),
-       .tp_methods = mapi_SPropValue_methods,
-       .tp_getset = mapi_SPropValue_getsetters,
-       .tp_doc = "SPropValue MAPI structure",
-       .tp_new = py_SPropValue_new,
-       .tp_dealloc = (destructor)py_SPropValue_dealloc,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
-static PyMethodDef py_mapi_global_methods[] = {
-       { NULL }
-};
-
-void initmapi(void)
-{
-       PyObject        *m;
-
-       if (PyType_Ready(&PySPropValue) < 0) {
-               return;
-       }
-
-       m = Py_InitModule3("mapi", py_mapi_global_methods,
-                          "An interface to OpenChange MAPI");
-       if (m == NULL) {
-               return;
-       }
-
-       /* Add all properties - generated by mparse.pl */
-       pymapi_add_properties(m);
-
-       Py_INCREF(&PySPropValue);
-       
-       PyModule_AddObject(m, "SPropValue", (PyObject *)&PySPropValue);
-} 
diff --git a/branches/plugfest/pyopenchange/pymapi.h b/branches/plugfest/pyopenchange/pymapi.h
deleted file mode 100644 (file)
index 6234c32..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Python interface to openchange
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __PYMAPI_H_
-#define        __PYMAPI_H_
-
-#include <Python.h>
-#include "libmapi/libmapi.h"
-#include <talloc.h>
-
-typedef struct {
-       PyObject_HEAD
-       TALLOC_CTX              *mem_ctx;
-       struct SPropValue       *SPropValue;
-       uint32_t                cValues;
-} PySPropValueObject;
-
-PyAPI_DATA(PyTypeObject)       PySPropValue;
-
-/* definitions from auto-generated pymapi_properties.c */
-int pymapi_add_properties(PyObject *);
-
-#endif /* ! __PYMAPI_H_ */
diff --git a/branches/plugfest/pyopenchange/pymapistore.c b/branches/plugfest/pyopenchange/pymapistore.c
deleted file mode 100644 (file)
index fa0ec49..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Python interface to mapistore
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <Python.h>
-#include "pyopenchange/pymapistore.h"
-#include "pyopenchange/pymapi.h"
-
-static PyTypeObject *SPropValue_Type;
-
-void initmapistore(void);
-
-static PyObject *py_MAPIStore_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistore_context        *mstore_ctx;
-       PyMAPIStoreObject               *msobj;
-       char                            *kwnames[] = { "path", NULL };
-       const char                      *path = NULL;
-
-       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", kwnames, &path)) {
-               return NULL;
-       }
-
-       mem_ctx = talloc_new(NULL);
-       if (mem_ctx == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       mstore_ctx = mapistore_init(mem_ctx, path);
-       if (mstore_ctx == NULL) {
-               return NULL;
-       }
-
-       msobj = PyObject_New(PyMAPIStoreObject, &PyMAPIStore);
-       msobj->mem_ctx = mem_ctx;
-       msobj->mstore_ctx = mstore_ctx;
-
-       return (PyObject *) msobj;
-}
-
-static void py_MAPIStore_dealloc(PyObject *_self)
-{
-       PyMAPIStoreObject *self = (PyMAPIStoreObject *)_self;
-
-       mapistore_release(self->mstore_ctx);
-       talloc_free(self->mem_ctx);
-       PyObject_Del(_self);
-}
-
-static PyObject *py_MAPIStore_add_context(PyMAPIStoreObject *self, PyObject *args)
-{
-       int             ret;
-       uint32_t        context_id = 0;
-       const char      *uri;
-
-       if (!PyArg_ParseTuple(args, "s", &uri)) {
-               return NULL;
-       }
-
-       ret = mapistore_add_context(self->mstore_ctx, uri, &context_id);
-       if (ret != MAPISTORE_SUCCESS) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(context_id);
-}
-
-static PyObject *py_MAPIStore_del_context(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id = 0;
-
-       if (!PyArg_ParseTuple(args, "k", &context_id)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_del_context(self->mstore_ctx, context_id));
-}
-
-static PyObject *py_MAPIStore_add_context_indexing(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id;
-       const char      *username;
-
-       if (!PyArg_ParseTuple(args, "sk", &username, &context_id)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_add_context_indexing(self->mstore_ctx, username, context_id));
-}
-
-static PyObject *py_MAPIStore_search_context_by_uri(PyMAPIStoreObject *self, PyObject *args)
-{
-       int             ret;
-       uint32_t        context_id = 0;
-       const char      *uri;
-
-       if (!PyArg_ParseTuple(args, "s", &uri)) {
-               return NULL;
-       }
-
-       ret = mapistore_search_context_by_uri(self->mstore_ctx, uri, &context_id);
-       if (ret != MAPISTORE_SUCCESS) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(context_id);
-}
-
-static PyObject *py_MAPIStore_add_context_ref_count(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id = 0;
-
-       if (!PyArg_ParseTuple(args, "k", &context_id)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_add_context_ref_count(self->mstore_ctx, context_id));
-}
-
-static PyObject *py_MAPIStore_opendir(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id;
-       uint64_t        parent_fid;
-       uint64_t        fid;
-
-       if (!PyArg_ParseTuple(args, "kKK", &context_id, &parent_fid, &fid)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_opendir(self->mstore_ctx, context_id, parent_fid, fid));
-}
-
-static PyObject *py_MAPIStore_closedir(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id;
-       uint64_t        fid;
-
-       if (!PyArg_ParseTuple(args, "kK", &context_id, &fid)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_closedir(self->mstore_ctx, context_id, fid));
-}
-
-static PyObject *py_MAPIStore_mkdir(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t                context_id;
-       uint64_t                parent_fid;
-       uint64_t                fid;
-       PyObject                *mod_mapi;
-       PyObject                *pySPropValue;
-       PySPropValueObject      *SPropValue;
-       struct SRow             aRow;
-
-       mod_mapi = PyImport_ImportModule("openchange.mapi");
-       if (mod_mapi == NULL) {
-               printf("Can't load module\n");
-               return NULL;
-       }
-       SPropValue_Type = (PyTypeObject *)PyObject_GetAttrString(mod_mapi, "SPropValue");
-       if (SPropValue_Type == NULL) {
-               return NULL;
-       }
-
-       if (!PyArg_ParseTuple(args, "kKKO", &context_id, &parent_fid, &fid, &pySPropValue)) {
-               return NULL;
-       }
-
-       if (!PyObject_TypeCheck(pySPropValue, SPropValue_Type)) {
-               PyErr_SetString(PyExc_TypeError, "Function require SPropValue object");
-               return NULL;
-       }
-
-       SPropValue = (PySPropValueObject *)pySPropValue;
-       aRow.cValues = SPropValue->cValues;
-       aRow.lpProps = SPropValue->SPropValue;
-
-       return PyInt_FromLong(mapistore_mkdir(self->mstore_ctx, context_id, parent_fid, fid, &aRow));
-}
-
-static PyObject *py_MAPIStore_rmdir(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t        context_id;
-       uint64_t        parent_fid;
-       uint64_t        fid;
-       uint8_t         flags;
-
-       if (!PyArg_ParseTuple(args, "kKKH", &context_id, &parent_fid, &fid, &flags)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_rmdir(self->mstore_ctx, context_id, parent_fid, fid, flags));
-}
-
-static PyObject *py_MAPIStore_setprops(PyMAPIStoreObject *self, PyObject *args)
-{
-       uint32_t                context_id;
-       uint64_t                fid;
-       uint8_t                 object_type;
-       PyObject                *mod_mapi;
-       PyObject                *pySPropValue;
-       PySPropValueObject      *SPropValue;
-       struct SRow             aRow;
-
-       mod_mapi = PyImport_ImportModule("openchange.mapi");
-       if (mod_mapi == NULL) {
-               printf("Can't load module\n");
-               return NULL;
-       }
-       SPropValue_Type = (PyTypeObject *)PyObject_GetAttrString(mod_mapi, "SPropValue");
-       if (SPropValue_Type == NULL) {
-               return NULL;
-       }
-
-       if (!PyArg_ParseTuple(args, "kKbO", &context_id, &fid, &object_type, &pySPropValue)) {
-               return NULL;
-       }
-
-       if (!PyObject_TypeCheck(pySPropValue, SPropValue_Type)) {
-               PyErr_SetString(PyExc_TypeError, "Function require SPropValue object");
-               return NULL;
-       }
-
-       SPropValue = (PySPropValueObject *)pySPropValue;
-       aRow.cValues = SPropValue->cValues;
-       aRow.lpProps = SPropValue->SPropValue;
-
-       return PyInt_FromLong(mapistore_setprops(self->mstore_ctx, context_id, fid, object_type, &aRow));
-}
-
-static PyMethodDef mapistore_methods[] = {
-       { "add_context", (PyCFunction)py_MAPIStore_add_context, METH_VARARGS },
-       { "del_context", (PyCFunction)py_MAPIStore_del_context, METH_VARARGS },
-       { "add_context_idexing", (PyCFunction)py_MAPIStore_add_context_indexing, METH_VARARGS },
-       { "search_context_by_uri", (PyCFunction)py_MAPIStore_search_context_by_uri, METH_VARARGS },
-       { "add_context_ref_count", (PyCFunction)py_MAPIStore_add_context_ref_count, METH_VARARGS },
-       { "opendir", (PyCFunction)py_MAPIStore_opendir, METH_VARARGS },
-       { "closedir", (PyCFunction)py_MAPIStore_closedir, METH_VARARGS },
-       { "mkdir", (PyCFunction)py_MAPIStore_mkdir, METH_VARARGS },
-       { "rmdir", (PyCFunction)py_MAPIStore_rmdir, METH_VARARGS },
-       { "setprops", (PyCFunction)py_MAPIStore_setprops, METH_VARARGS },
-       { NULL },
-};
-
-static PyGetSetDef mapistore_getsetters[] = {
-       { NULL }
-};
-
-PyTypeObject PyMAPIStore = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "mapistore",
-       .tp_basicsize = sizeof (PyMAPIStoreObject),
-       .tp_methods = mapistore_methods,
-       .tp_getset = mapistore_getsetters,
-       .tp_doc = "mapistore object",
-       .tp_new = py_MAPIStore_new,
-       .tp_dealloc = (destructor)py_MAPIStore_dealloc,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
-static PyObject *py_mapistore_set_mapping_path(PyObject *mod, PyObject *args)
-{
-       const char      *mapping_path;
-       
-       if (!PyArg_ParseTuple(args, "s", &mapping_path)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(mapistore_set_mapping_path(mapping_path));
-}
-
-static PyObject *py_mapistore_errstr(PyObject *mod, PyObject *args)
-{
-       int             ret;
-
-       if (!PyArg_ParseTuple(args, "k", &ret)) {
-               return NULL;
-       }
-
-       return PyString_FromString(mapistore_errstr(ret));
-}
-
-static PyMethodDef py_mapistore_global_methods[] = {
-       { "set_mapping_path", (PyCFunction)py_mapistore_set_mapping_path, METH_VARARGS },
-       { "errstr", (PyCFunction)py_mapistore_errstr, METH_VARARGS },
-       { NULL },
-};
-
-void initmapistore(void)
-{
-       PyObject        *m;
-
-       if (PyType_Ready(&PyMAPIStore) < 0) {
-               return;
-       }
-
-       m = Py_InitModule3("mapistore", py_mapistore_global_methods,
-                          "An interface to OpenChange MAPIStore");
-       if (m == NULL) {
-               return;
-       }
-
-       PyModule_AddObject(m, "DEL_MESSAGES", PyInt_FromLong(0x1));
-       PyModule_AddObject(m, "DEL_FOLDERS", PyInt_FromLong(0x4));
-       PyModule_AddObject(m, "DELETE_HARD_DELETE", PyInt_FromLong(0x10));
-
-       PyModule_AddObject(m, "MAPISTORE_FOLDER", PyInt_FromLong(MAPISTORE_FOLDER));
-       PyModule_AddObject(m, "MAPISTORE_MESSAGE", PyInt_FromLong(MAPISTORE_MESSAGE));
-
-       Py_INCREF(&PyMAPIStore);
-
-       PyModule_AddObject(m, "mapistore", (PyObject *)&PyMAPIStore);
-}
diff --git a/branches/plugfest/pyopenchange/pymapistore.h b/branches/plugfest/pyopenchange/pymapistore.h
deleted file mode 100644 (file)
index c6bcac2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Python interface to mapistore
-
-   Copyright (C) Julien Kerihuel 2010-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __PYMAPISTORE_H_
-#define        __PYMAPISTORE_H_
-
-#include <Python.h>
-#include "mapiproxy/libmapistore/mapistore.h"
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-
-typedef struct {
-       PyObject_HEAD
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistore_context        *mstore_ctx;
-} PyMAPIStoreObject;
-
-typedef struct {
-       PyObject_HEAD
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistoredb_context      *mdb_ctx;
-} PyMAPIStoreDBObject;
-
-PyAPI_DATA(PyTypeObject)       PyMAPIStore;
-PyAPI_DATA(PyTypeObject)       PyMAPIStoreDB;
-
-#endif /* ! __PYMAPISTORE_H_ */
diff --git a/branches/plugfest/pyopenchange/pymapistoredb.c b/branches/plugfest/pyopenchange/pymapistoredb.c
deleted file mode 100644 (file)
index 9afbd33..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
-   OpenChange MAPI implementation.
-
-   Python interface to mapistore database
-
-   Copyright (C) Julien Kerihuel 2010-2011.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <Python.h>
-#include "pyopenchange/pymapistore.h"
-
-void initmapistoredb(void);
-
-static PyObject *py_MAPIStoreDB_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       TALLOC_CTX                      *mem_ctx;
-       struct mapistoredb_context      *mdb_ctx;
-       PyMAPIStoreDBObject             *mdbobj;
-       char                            *kwnames[] = { "path", NULL };
-       const char                      *path = NULL;
-
-       /* Path is optional */
-       PyArg_ParseTupleAndKeywords(args, kwargs, "|s", kwnames, &path);
-
-       mem_ctx = talloc_new(NULL);
-       if (mem_ctx == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       mdb_ctx = mapistoredb_init(mem_ctx, path);
-       if (mdb_ctx == NULL) {
-               DEBUG(0, ("mapistoredb_init returned NULL\n"));
-               return NULL;
-       }
-
-       mdbobj = PyObject_New(PyMAPIStoreDBObject, &PyMAPIStoreDB);
-       mdbobj->mem_ctx = mem_ctx;
-       mdbobj->mdb_ctx = mdb_ctx;
-
-       return (PyObject *) mdbobj;
-}
-
-static void py_MAPIStoreDB_dealloc(PyObject *_self)
-{
-       PyMAPIStoreDBObject     *self = (PyMAPIStoreDBObject *)_self;
-
-       talloc_free(self->mem_ctx);
-       PyObject_Del(_self);
-}
-
-
-static PyObject *py_MAPIStoreDB_dump_configuration(PyMAPIStoreDBObject *self, PyObject *args)
-{
-       mapistoredb_dump_conf(self->mdb_ctx);
-       return PyInt_FromLong(0);
-}
-
-static PyObject *py_MAPIStoreDB_provision(PyMAPIStoreDBObject *self, PyObject *args)
-{
-       return PyInt_FromLong(mapistoredb_provision(self->mdb_ctx));
-}
-
-
-static PyObject *py_MAPIStoreDB_get_mapistore_uri(PyMAPIStoreDBObject *_self, PyObject *args)
-{
-       PyMAPIStoreDBObject             *self = (PyMAPIStoreDBObject *) _self;
-       enum MAPISTORE_ERROR            retval;
-       enum MAPISTORE_DFLT_FOLDERS     dflt_folder;
-       const char                      *username;
-       const char                      *ns;
-       char                            *uri;
-
-       if (!PyArg_ParseTuple(args, "kss", &dflt_folder, &username, &ns)) {
-               return NULL;
-       }
-
-       retval = mapistoredb_get_mapistore_uri(self->mdb_ctx, dflt_folder, ns, username, &uri);
-       if (retval == MAPISTORE_SUCCESS) {
-               return PyString_FromString(uri);
-       }
-
-       return NULL;
-}
-
-
-static int PyMAPIStoreDB_setParameter(PyObject *_self, PyObject *value, void *data)
-{
-       PyMAPIStoreDBObject     *self = (PyMAPIStoreDBObject *) _self;
-       const char              *attr = (const char *) data;
-       const char              *str;
-
-       if (!self->mdb_ctx) return -1;
-
-       if (!PyArg_Parse(value, "s", &str)) {
-               return -1;
-       }
-
-       if (!strcmp(attr, "netbiosname")) {
-               return mapistoredb_set_netbiosname(self->mdb_ctx, str);
-       } else if (!strcmp(attr, "firstorg")) {
-               return mapistoredb_set_firstorg(self->mdb_ctx, str);
-       } else if (!strcmp(attr, "firstou")) {
-               return mapistoredb_set_firstou(self->mdb_ctx, str);
-       }
-
-       return 0;
-}
-
-static PyObject *PyMAPIStoreDB_getParameter(PyObject *_self, void *data)
-{
-       PyMAPIStoreDBObject     *self = (PyMAPIStoreDBObject *) _self;
-       const char              *attr = (const char *) data;
-
-       if (!strcmp(attr, "netbiosname")) {
-               return PyString_FromString(mapistoredb_get_netbiosname(self->mdb_ctx));
-       } else if (!strcmp(attr, "firstorg")) {
-               return PyString_FromString(mapistoredb_get_firstorg(self->mdb_ctx));
-       } else if (!strcmp(attr, "firstou")) {
-               return PyString_FromString(mapistoredb_get_firstou(self->mdb_ctx));
-       }
-
-       return NULL;
-}
-
-static PyMethodDef mapistoredb_methods[] = {
-       { "dump_configuration", (PyCFunction)py_MAPIStoreDB_dump_configuration, METH_VARARGS },
-       { "provision", (PyCFunction)py_MAPIStoreDB_provision, METH_VARARGS },
-       { "get_mapistore_uri", (PyCFunction)py_MAPIStoreDB_get_mapistore_uri, METH_VARARGS },
-       { NULL },
-};
-
-static PyGetSetDef mapistoredb_getsetters[] = {
-       { "netbiosname", (getter)PyMAPIStoreDB_getParameter,
-         (setter)PyMAPIStoreDB_setParameter, "netbiosname", "netbiosname"},
-       { "firstorg", (getter)PyMAPIStoreDB_getParameter,
-         (setter)PyMAPIStoreDB_setParameter, "firstorg", "firstorg"},
-       { "firstou", (getter)PyMAPIStoreDB_getParameter,
-         (setter)PyMAPIStoreDB_setParameter, "firstou", "firstou"},
-       { NULL },
-};
-
-PyTypeObject PyMAPIStoreDB = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "mapistoredb",
-       .tp_basicsize = sizeof (PyMAPIStoreDBObject),
-       .tp_methods = mapistoredb_methods,
-       .tp_getset = mapistoredb_getsetters,
-       .tp_doc = "mapistore database object",
-       .tp_new = py_MAPIStoreDB_new,
-       .tp_dealloc = (destructor) py_MAPIStoreDB_dealloc,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
-static PyMethodDef py_mapistoredb_global_methods[] = {
-       { NULL },
-};
-
-void initmapistoredb(void)
-{
-       PyObject        *m;
-
-       if (PyType_Ready(&PyMAPIStoreDB) < 0) {
-               return;
-       }
-
-       m = Py_InitModule3("mapistoredb", py_mapistoredb_global_methods,
-                          "An interface to MAPIStore database");
-
-       if (m == NULL) {
-               return;
-       }
-
-       PyModule_AddObject(m, "MDB_ROOT_FOLDER", PyInt_FromLong((int)MDB_ROOT_FOLDER));
-       PyModule_AddObject(m, "MDB_DEFERRED_ACTIONS", PyInt_FromLong((int)MDB_DEFERRED_ACTIONS));
-       PyModule_AddObject(m, "MDB_SPOOLER_QUEUE", PyInt_FromLong((int)MDB_SPOOLER_QUEUE));
-       PyModule_AddObject(m, "MDB_TODO_SEARCH", PyInt_FromLong((int)MDB_TODO_SEARCH));
-       PyModule_AddObject(m, "MDB_IPM_SUBTREE", PyInt_FromLong((int)MDB_IPM_SUBTREE));
-       PyModule_AddObject(m, "MDB_INBOX", PyInt_FromLong((int)MDB_INBOX));
-       PyModule_AddObject(m, "MDB_OUTBOX", PyInt_FromLong((int)MDB_OUTBOX));
-       PyModule_AddObject(m, "MDB_SENT_ITEMS", PyInt_FromLong((int)MDB_SENT_ITEMS));
-       PyModule_AddObject(m, "MDB_DELETED_ITEMS", PyInt_FromLong((int)MDB_DELETED_ITEMS));
-       PyModule_AddObject(m, "MDB_COMMON_VIEWS", PyInt_FromLong((int)MDB_COMMON_VIEWS));
-       PyModule_AddObject(m, "MDB_SCHEDULE", PyInt_FromLong((int)MDB_SCHEDULE));
-       PyModule_AddObject(m, "MDB_SEARCH", PyInt_FromLong((int)MDB_SEARCH));
-       PyModule_AddObject(m, "MDB_VIEWS", PyInt_FromLong((int)MDB_VIEWS));
-       PyModule_AddObject(m, "MDB_SHORTCUTS", PyInt_FromLong((int)MDB_SHORTCUTS));
-       PyModule_AddObject(m, "MDB_REMINDERS", PyInt_FromLong((int)MDB_REMINDERS));
-       PyModule_AddObject(m, "MDB_CALENDAR", PyInt_FromLong((int)MDB_CALENDAR));
-       PyModule_AddObject(m, "MDB_CONTACTS", PyInt_FromLong((int)MDB_CONTACTS));
-       PyModule_AddObject(m, "MDB_JOURNAL", PyInt_FromLong((int)MDB_JOURNAL));
-       PyModule_AddObject(m, "MDB_NOTES", PyInt_FromLong((int)MDB_NOTES));
-       PyModule_AddObject(m, "MDB_TASKS", PyInt_FromLong((int)MDB_TASKS));
-       PyModule_AddObject(m, "MDB_DRAFTS", PyInt_FromLong((int)MDB_DRAFTS));
-       PyModule_AddObject(m, "MDB_TRACKED_MAIL", PyInt_FromLong((int)MDB_TRACKED_MAIL));
-       PyModule_AddObject(m, "MDB_SYNC_ISSUES", PyInt_FromLong((int)MDB_SYNC_ISSUES));
-       PyModule_AddObject(m, "MDB_CONFLICTS", PyInt_FromLong((int)MDB_CONFLICTS));
-       PyModule_AddObject(m, "MDB_LOCAL_FAILURES", PyInt_FromLong((int)MDB_LOCAL_FAILURES));
-       PyModule_AddObject(m, "MDB_SERVER_FAILURES", PyInt_FromLong((int)MDB_SERVER_FAILURES));
-       PyModule_AddObject(m, "MDB_JUNK_EMAIL", PyInt_FromLong((int)MDB_JUNK_EMAIL));
-       PyModule_AddObject(m, "MDB_RSS_FEEDS", PyInt_FromLong((int)MDB_RSS_FEEDS));
-       PyModule_AddObject(m, "MDB_CONVERSATION_ACT", PyInt_FromLong((int)MDB_CONVERSATION_ACT));
-       PyModule_AddObject(m, "MDB_LAST_SPECIALFOLDER", PyInt_FromLong((int)MDB_LAST_SPECIALFOLDER));
-       PyModule_AddObject(m, "MDB_CUSTOM", PyInt_FromLong((int)MDB_CUSTOM));
-       
-
-       PyModule_AddObject(m, "mapistoredb", (PyObject *)&PyMAPIStoreDB);
-}
diff --git a/branches/plugfest/pyopenchange/pyocpf.c b/branches/plugfest/pyopenchange/pyocpf.c
deleted file mode 100644 (file)
index be15c4f..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Python interface to ocpf
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <Python.h>
-#include "pyopenchange/pyocpf.h"
-#include "pyopenchange/pymapi.h"
-#include "libocpf/ocpf.h"
-
-static PyTypeObject *SPropValue_Type;
-
-void initocpf(void);
-
-PyAPI_DATA(PyTypeObject) PyOcpf;
-
-static PyObject *py_new_context(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
-       TALLOC_CTX      *mem_ctx;
-       PyOcpfObject    *ocpf_object;
-       char            *kwnames[] = { "filename", "flags", NULL };
-       int             ret;
-       const char      *filename;
-       uint32_t        context_id;
-       uint8_t         flags;
-
-       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sH", kwnames,
-                                        &filename, &flags)) {
-               return NULL;
-       }
-
-       mem_ctx = talloc_new(NULL);
-       if (mem_ctx == NULL) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-
-       printf("filename = %s, flags = 0x%x\n", filename, flags);
-       ret = ocpf_new_context(filename, &context_id, flags);
-       if (ret == OCPF_ERROR) {
-               return NULL;
-       }
-
-       printf("context_id = %d\n", context_id);
-       ocpf_object = PyObject_New(PyOcpfObject, &PyOcpf);
-       ocpf_object->context_id = context_id;
-       ocpf_object->mem_ctx = mem_ctx;
-
-       return (PyObject *) ocpf_object;
-}
-
-static PyObject *py_ocpf_parse(PyOcpfObject *self)
-{
-       int     ret;
-
-       ret = ocpf_parse(self->context_id);
-       return PyInt_FromLong(ret);
-}
-
-static PyObject *py_ocpf_set_SPropValue_array(PyOcpfObject *self)
-{
-       int     ret;
-
-       ret = ocpf_server_set_SPropValue(self->mem_ctx, self->context_id);
-       return PyInt_FromLong(ret);
-}
-
-static PyObject *py_ocpf_get_SPropValue(PyOcpfObject *self)
-{
-       uint32_t                cValues = 0;
-       PyObject                *mod_mapi;
-       PySPropValueObject      *pySPropValue;
-       struct SPropValue       *SPropValue;
-
-       mod_mapi = PyImport_ImportModule("openchange.mapi");
-       if (mod_mapi == NULL) {
-               printf("Can't load module\n");
-               return NULL;
-       }
-       SPropValue_Type = (PyTypeObject *)PyObject_GetAttrString(mod_mapi, "SPropValue");
-       if (SPropValue_Type == NULL)
-               return NULL;
-
-       SPropValue = ocpf_get_SPropValue(self->context_id, &cValues);
-
-       pySPropValue = (PySPropValueObject *)SPropValue_Type->tp_new(NULL, NULL, NULL);
-       talloc_free(pySPropValue->SPropValue);
-       pySPropValue->SPropValue = SPropValue;
-       talloc_steal(pySPropValue->mem_ctx, pySPropValue->SPropValue);
-       pySPropValue->cValues = cValues;
-
-       return (PyObject *) pySPropValue;
-}
-
-
-static PyObject *py_ocpf_add_SPropValue(PyOcpfObject *self, PyObject *args)
-{
-       PyObject                *mod_mapi;
-       PyObject                *pySPropValue;
-       PySPropValueObject      *SPropValue;
-       int                     ret;
-       int                     i;
-
-       mod_mapi = PyImport_ImportModule("openchange.mapi");
-       if (mod_mapi == NULL) {
-               printf("Can't load module\n");
-               return NULL;
-       }
-
-       SPropValue_Type = (PyTypeObject *)PyObject_GetAttrString(mod_mapi, "SPropValue");
-       if (SPropValue_Type == NULL) {
-               return NULL;
-       }
-
-       if (!PyArg_ParseTuple(args, "O", &pySPropValue)) {
-               return NULL;
-       }
-
-       if (!PyObject_TypeCheck(pySPropValue, SPropValue_Type)) {
-               PyErr_SetString(PyExc_TypeError, "Function requires SPropValue obnject");
-               return NULL;
-       }
-
-       SPropValue = (PySPropValueObject *) pySPropValue;
-
-       for (i = 0; i < SPropValue->cValues; i++) {
-               ret = ocpf_server_add_SPropValue(self->context_id, &SPropValue->SPropValue[i]);
-               if (ret) {
-                       return PyInt_FromLong(ret);
-               }
-       }
-
-       return PyInt_FromLong(ret);
-}
-
-
-static PyObject *py_ocpf_dump(PyOcpfObject *self)
-{
-       ocpf_dump(self->context_id);
-       Py_RETURN_NONE;
-}
-
-static PyObject *py_ocpf_write_init(PyOcpfObject *self, PyObject *args)
-{
-       int             ret;
-       uint64_t        folder_id;
-
-       if (!PyArg_ParseTuple(args, "K", &folder_id)) {
-               return NULL;
-       }
-
-       ret = ocpf_write_init(self->context_id, folder_id);
-       return PyInt_FromLong(ret);
-}
-
-static PyObject *py_ocpf_write(PyOcpfObject *self, PyObject *args)
-{
-       int                             ret;
-       PyObject                        *pySPropValue;
-       PySPropValueObject              *SPropValue;
-       struct mapi_SPropValue_array    mapi_lpProps;
-       PyObject                        *mod_mapi;
-       int                             i;
-
-       mod_mapi = PyImport_ImportModule("openchange.mapi");
-       if (mod_mapi == NULL) {
-               printf("Can't load module\n");
-               return NULL;
-       }
-       SPropValue_Type = (PyTypeObject *)PyObject_GetAttrString(mod_mapi, "SPropValue");
-       if (SPropValue_Type == NULL)
-               return NULL;
-
-
-       if (!PyArg_ParseTuple(args, "O", &pySPropValue)) {
-               return NULL;
-       }
-
-       if (!PyObject_TypeCheck(pySPropValue, SPropValue_Type)) {
-               PyErr_SetString(PyExc_TypeError, "Function require SPropValue object");
-               return NULL;
-       }
-       SPropValue = (PySPropValueObject *) pySPropValue;
-
-       mapi_lpProps.cValues = SPropValue->cValues;
-       mapi_lpProps.lpProps = talloc_array(SPropValue->mem_ctx, struct mapi_SPropValue, SPropValue->cValues);
-       for (i = 0; i < SPropValue->cValues; i++) {
-         cast_mapi_SPropValue((TALLOC_CTX *)mapi_lpProps.lpProps,
-                              &(mapi_lpProps.lpProps[i]), &(SPropValue->SPropValue[i]));
-       }
-
-       ret = ocpf_write_auto(self->context_id, NULL, &mapi_lpProps);
-       talloc_free(mapi_lpProps.lpProps);
-       return PyInt_FromLong(ret);
-}
-
-static PyObject *py_ocpf_write_commit(PyOcpfObject *self)
-{
-       int             ret;
-
-       ret = ocpf_write_commit(self->context_id);
-       return PyInt_FromLong(ret);
-}
-
-static PyObject *py_ocpf_set_type(PyOcpfObject *self, PyObject *args)
-{
-       const char      *type;
-
-       if (!PyArg_ParseTuple(args, "s", &type)) {
-               return NULL;
-       }
-
-       return PyInt_FromLong(ocpf_server_set_type(self->context_id, type));
-}
-
-static PyMethodDef py_ocpf_global_methods[] = {
-       { NULL }
-};
-
-static PyMethodDef ocpf_methods[] = {
-       { "parse", (PyCFunction) py_ocpf_parse, METH_NOARGS },
-       { "dump", (PyCFunction) py_ocpf_dump, METH_NOARGS },
-       { "write_init", (PyCFunction) py_ocpf_write_init, METH_VARARGS },
-       { "write", (PyCFunction) py_ocpf_write, METH_VARARGS },
-       { "write_commit", (PyCFunction) py_ocpf_write_commit, METH_NOARGS },
-       { "set_SPropValue_array", (PyCFunction) py_ocpf_set_SPropValue_array, METH_NOARGS },
-       { "get_SPropValue", (PyCFunction) py_ocpf_get_SPropValue, METH_NOARGS },
-       { "add_SPropValue", (PyCFunction) py_ocpf_add_SPropValue, METH_VARARGS },
-       { "set_type", (PyCFunction) py_ocpf_set_type, METH_VARARGS },
-       { NULL },
-};
-
-static PyGetSetDef ocpf_getsetters[] = {
-       { NULL }
-};
-
-static void py_ocpf_dealloc(PyObject *_self)
-{
-       PyOcpfObject *self = (PyOcpfObject *)_self;
-
-       talloc_free(self->mem_ctx);
-
-       printf("ocpf_del_context\n");
-       ocpf_del_context(self->context_id);
-       PyObject_Del(_self);
-}
-
-PyTypeObject PyOcpf = {
-       PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "OCPF",
-       .tp_basicsize = sizeof(PyOcpfObject),
-       .tp_methods = ocpf_methods,
-       .tp_getset = ocpf_getsetters,
-       .tp_doc = "OCPF context",
-       .tp_new = py_new_context,
-       .tp_dealloc = (destructor)py_ocpf_dealloc,
-       .tp_flags = Py_TPFLAGS_DEFAULT,
-};
-
-void initocpf(void)
-{
-       PyObject        *m;
-
-       if (PyType_Ready(&PyOcpf) < 0) {
-               return;
-       }
-
-       m = Py_InitModule3("ocpf", py_ocpf_global_methods, 
-                          "An interface to OCPF, an OpenChange file format used to represent MAPI messages");
-       if (m == NULL) {
-               return;
-       }
-
-       PyModule_AddObject(m, "OCPF_FLAGS_RDWR", PyInt_FromLong(OCPF_FLAGS_RDWR));
-       PyModule_AddObject(m, "OCPF_FLAGS_READ", PyInt_FromLong(OCPF_FLAGS_READ));
-       PyModule_AddObject(m, "OCPF_FLAGS_WRITE", PyInt_FromLong(OCPF_FLAGS_WRITE));
-       PyModule_AddObject(m, "OCPF_FLAGS_CREATE", PyInt_FromLong(OCPF_FLAGS_CREATE));
-
-       Py_INCREF(&PyOcpf);
-
-       PyModule_AddObject(m, "Ocpf", (PyObject *)&PyOcpf);
-
-       /* Initialize OCPF subsystem */
-       ocpf_init();
-}
diff --git a/branches/plugfest/pyopenchange/pyocpf.h b/branches/plugfest/pyopenchange/pyocpf.h
deleted file mode 100644 (file)
index 667c90e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-   OpenChange OCPF (OpenChange Property File) implementation.
-
-   Python interface to ocpf
-
-   Copyright (C) Julien Kerihuel 2010.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        _PYOCPF_H_
-#define        _PYOCPF_H_
-
-#include <Python.h>
-#include <talloc.h>
-
-typedef struct {
-       PyObject_HEAD
-       uint32_t        context_id;
-       TALLOC_CTX      *mem_ctx;
-} PyOcpfObject;
-
-#endif /* !_PYOCPF_H_ */
diff --git a/branches/plugfest/pyopenchange/tests/mapistore_test.py b/branches/plugfest/pyopenchange/tests/mapistore_test.py
deleted file mode 100755 (executable)
index 8d99756..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-sys.path.append("python")
-
-import os
-import openchange
-import openchange.mapistore as mapistore
-from openchange import mapi
-
-os.mkdir("/tmp/mapistore")
-
-mapistore.set_mapping_path("/tmp/mapistore")
-MAPIStore = mapistore.mapistore()
-ctx_id = MAPIStore.add_context("fsocpf:///tmp/mapistore/0x0000000000010001")
-
-SPropParent = mapi.SPropValue()
-SPropParent.add(mapi.PR_FID, 0x0000000000010001)
-SPropParent.add(mapi.PR_DISPLAY_NAME, "parent")
-SPropParent.add(mapi.PR_COMMENT, "test parent")
-SPropParent.add(mapi.PR_FOLDER_TYPE, 1)
-MAPIStore.setprops(ctx_id, 0x0000000000010001, mapistore.MAPISTORE_FOLDER, SPropParent)
-
-SPropValue = mapi.SPropValue()
-SPropValue.add(mapi.PR_PARENT_FID, 0x0000000000010001)
-SPropValue.add(mapi.PR_DISPLAY_NAME, "test")
-SPropValue.add(mapi.PR_COMMENT, "test folder")
-SPropValue.add(mapi.PR_FOLDER_TYPE, 1)
-
-MAPIStore.mkdir(ctx_id, 0x0000000000010001, 0x0000000000020001, SPropValue)
-MAPIStore.rmdir(ctx_id, 0x0000000000010001, 0x0000000000020001, mapistore.DEL_FOLDERS)
-
-MAPIStore.del_context(ctx_id)
-
diff --git a/branches/plugfest/pyopenchange/tests/mapistoredb_test.py b/branches/plugfest/pyopenchange/tests/mapistoredb_test.py
deleted file mode 100755 (executable)
index 6ca8188..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-import sys
-
-sys.path.append("python")
-
-import os
-import openchange
-import openchange.mapistoredb as mapistoredb
-import openchange.mapistore as mapistore
-from openchange import mapi
-
-os.mkdir("/tmp/mapistoredb");
-
-print "[Step 1]. Initializing mapistore database"
-print "========================================="
-
-MAPIStoreDB = mapistoredb.mapistoredb("/tmp/mapistoredb")
-print ""
-
-print "[Step 2]. Provisioning mapistore database"
-print "========================================="
-ret = MAPIStoreDB.provision()
-if (ret == 0):
-    print "Provisioning: SUCCESS"
-else:
-    print "Provisioning: FAILURE"
-print ""
-
-print "[Step 3]. Modify and dump configuration"
-print "======================================="
-
-MAPIStoreDB.netbiosname = "server"
-MAPIStoreDB.firstorg = "OpenChange Project"
-MAPIStoreDB.firstou = "OpenChange Development Unit"
-
-MAPIStoreDB.dump_configuration()
-print ""
-
-print "[Step 4]. Testing API parts"
-print "==========================="
-
-print "A. Testing NetBIOS name"
-print "-----------------------"
-print "* NetBIOS name: %s" %MAPIStoreDB.netbiosname
-print ""
-
-print "B. Testing First OU"
-print "-------------------"
-print "* FirstOU: %s" %MAPIStoreDB.firstou
-print ""
-
-print "C. Testing First Organisation"
-print "-----------------------------"
-print "* First Organisation: %s" %MAPIStoreDB.firstorg
-print ""
-
-
-print "[Step 5]. Retrieve mapistore URI for fsocpf"
-print "============================================"
-print "*fsocpf:"
-print "========"
-print "\t* Inbox: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_INBOX, "jkerihuel", "fsocpf://")
-print "\t* Calendar: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_CALENDAR, "jkerihuel", "fsocpf://")
-print "\t* Outbox: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_OUTBOX, "jkerihuel", "fsocpf://")
-print "\t* Contacts: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_CONTACTS, "jkerihuel", "fsocpf://")
-
-print ""
-print "mstoredb:"
-print "========="
-print "\t* Mailbox Root: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_ROOT_FOLDER, "jkerihuel", "mstoredb://")
-print "\t* IPM SUbtree: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_IPM_SUBTREE, "jkerihuel", "mstoredb://")
-print "\t* Inbox: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_INBOX, "jkerihuel", "mstoredb://")
-
-MAPIStoreDB.netbiosname = "new_server"
-MAPIStoreDB.firstorg = "FirstOrg"
-MAPIStoreDB.firstou = "FirstOu"
-
-print ""
-print "mstoredb (new DN):"
-print "=================="
-print "\t* Mailbox Root: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_ROOT_FOLDER, "jkerihuel", "mstoredb://")
-print "\t* IPM SUbtree: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_IPM_SUBTREE, "jkerihuel", "mstoredb://")
-print "\t* Inbox: %s" % MAPIStoreDB.get_mapistore_uri(mapistoredb.MDB_INBOX, "jkerihuel", "mstoredb://")
diff --git a/branches/plugfest/pyopenchange/tests/ocpf_test.py b/branches/plugfest/pyopenchange/tests/ocpf_test.py
deleted file mode 100755 (executable)
index 5424d95..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-sys.path.append("python")
-
-import os
-import openchange
-import openchange.ocpf as ocpf
-import openchange.mapi as mapi
-from openchange.ocpf import Ocpf
-
-filename = os.getcwd() + "/../../libocpf/examples/sample_appointment.ocpf";
-ctx = Ocpf(filename, ocpf.OCPF_FLAGS_READ)
-
-ret = ctx.parse()
-ret = ctx.set_SPropValue_array()
-SPropValue = ctx.get_SPropValue()
-ret = ctx.dump()
-SPropValue.dump("1. SPropValue:  ")
-
-
-del SPropValue
-SPropValue = mapi.SPropValue()
-SPropValue.add(mapi.PR_CONVERSATION_TOPIC, "New subject from python")
-SPropValue.add(mapi.PR_NORMALIZED_SUBJECT, "New subject from python")
-ret = ctx.add_SPropValue(SPropValue)
-ret = ctx.set_SPropValue_array()
-
-print "\n"
-print "New SpropValue after replacing subject:"
-print "======================================="
-del SPropValue
-SPropValue = ctx.get_SPropValue()
-SPropValue.dump("2. SPropValue:  ")
-
-print 
-print "Writing ocpf_test.ocpf file:"
-print "============================"
-filename = os.getcwd() + "/ocpf_test.ocpf";
-ctx2 = Ocpf(filename, ocpf.OCPF_FLAGS_CREATE)
-# dummy test to ensure we can set an ocpf parameter properly
-ret = ctx2.write_init(0x12345678)
-ret = ctx2.write(SPropValue)
-ret = ctx2.write_commit()
-ret = ctx2.dump()
-
-del ctx
diff --git a/branches/plugfest/pyopenchange/tests/properties.py b/branches/plugfest/pyopenchange/tests/properties.py
deleted file mode 100755 (executable)
index adc746b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-sys.path.append("python")
-
-from openchange import mapi
-import time
-
-SPropValue = mapi.SPropValue()
-SPropValue.add(mapi.PR_SUBJECT, "This is a test")
-SPropValue.add(mapi.PR_VERSIONING_FLAGS, 2)
-SPropValue.add(mapi.PR_IMPORTANCE, 4096)
-SPropValue.add(mapi.PR_MESSAGE_TO_ME, True)
-SPropValue.add(mapi.PR_MESSAGE_CC_ME, False)
-SPropValue.add(mapi.PR_CURRENT_VERSION, 0x0f10000000000012)
-SPropValue.add(mapi.PR_START_DATE, time.time())
-
-SPropValue.dump("Python: ")
-
diff --git a/branches/plugfest/python/openchange/__init__.py b/branches/plugfest/python/openchange/__init__.py
deleted file mode 100644 (file)
index 9c94268..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange Python bindings
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008
-#   
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-__docformat__ = 'restructuredText'
-
-import os, sys
-
-try:
-    import samba
-except ImportError:
-    # Try to fix up sys.path if Samba is installed in an unusual location
-    SAMBA_PREFIXES = ["/usr/local/samba", "/opt/samba"]
-    for samba_prefix in SAMBA_PREFIXES:
-        if not os.path.isdir(samba_prefix):
-            continue
-        for lib_dir in ["lib", "lib64"]:
-            python_version = "%d.%d" % sys.version_info[:2]
-            path = os.path.join(samba_prefix, lib_dir,
-                "python%s" % python_version, "site-packages")
-            if os.path.isdir(os.path.join(path, "samba")):
-                sys.path.append(path)
-                break
-    import samba
-
-
-def test_suite():
-    import openchange.tests
-    return openchange.tests.test_suite()
-
diff --git a/branches/plugfest/python/openchange/mailbox.py b/branches/plugfest/python/openchange/mailbox.py
deleted file mode 100644 (file)
index c862ad7..0000000
+++ /dev/null
@@ -1,432 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange provisioning
-# Copyright (C) Julien Kerihuel <j.kerihuel@openchange.org> 2009
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-import os
-import samba
-from samba import Ldb
-import ldb
-import uuid
-from openchange.urlutils import *
-
-__docformat__ = 'restructuredText'
-
-
-class NoSuchServer(Exception):
-    """Raised when a server could not be found."""
-
-
-class OpenChangeDB(object):
-    """The OpenChange database.
-    """
-
-    def __init__(self, url):
-        self.url = url
-        self.ldb = Ldb(self.url)
-
-    def reopen(self):
-        self.ldb = Ldb(self.url)
-
-    def setup(self):
-        self.ldb.add_ldif("""
-dn: @OPTIONS
-checkBaseOnSearch: TRUE
-
-dn: @INDEXLIST
-@IDXATTR: cn
-
-dn: @ATTRIBUTES
-cn: CASE_INSENSITIVE
-dn: CASE_INSENSITIVE
-
-""")
-        self.reopen()
-
-    def add_rootDSE(self, ocserverdn, firstorg, firstou):
-        self.ldb.add({"dn": "@ROOTDSE",
-                      "defaultNamingContext": "CN=%s,%s,%s" % (firstou, firstorg, ocserverdn),
-                      "rootDomainNamingContext": ocserverdn,
-                      "vendorName": "OpenChange Team (http://www.openchange.org)"})
-
-    def add_server(self, ocserverdn, netbiosname, firstorg, firstou):
-        self.ldb.add({"dn": ocserverdn,
-                  "objectClass": ["top", "server"],
-                  "cn": netbiosname,
-                  "GlobalCount": "0x1",
-                  "ReplicaID": "0x1"})
-        self.ldb.add({"dn": "CN=%s,%s" % (firstorg, ocserverdn),
-                  "objectClass": ["top", "org"],
-                  "cn": firstorg})
-        self.ldb.add({"dn": "CN=%s,CN=%s,%s" % (firstou, firstorg, ocserverdn),
-                  "objectClass": ["top", "ou"],
-                  "cn": firstou})
-
-    def add_root_public_folder(self, pfdn, fid, SystemIdx, childcount, mapistoreURL):
-        self.ldb.add({"dn": "CN=%s,%s" % (fid, pfdn),
-                      "objectClass": ["publicfolder"],
-                      "cn": fid,
-                      "PidTagFolderId": fid,
-                      "PidTagDisplayName": "Public Folder Root",
-                      "PidTagSubFolders": "TRUE" if (childcount != 0) else "FALSE",
-                      "PidTagFolderChildCount": str(childcount),
-                      "SystemIdx": str(SystemIdx)})
-        return mapistoreURL + "/" + fid
-
-    def add_sub_public_folder(self, pfdn, parentfid, fid, name, SystemIndex, childcount, mapistoreURL):
-        self.ldb.add({"dn": "CN=%s,%s" % (fid, pfdn),
-                      "objectClass": ["publicfolder"],
-                      "cn": fid,
-                      "PidTagParentFolderId": parentfid,
-                      "PidTagFolderId": fid,
-                      "PidTagDisplayName": name,
-                      "PidTagAttrHidden": str(0),
-                      "PidTagContainerClass": "IPF.Note (check this)", 
-                      "PidTagSubFolders": "TRUE" if (childcount != 0) else "FALSE",
-                      "PidTagFolderChildCount": str(childcount),
-                      "FolderType": str(1),
-                      "FolderType": str(1),
-                      "SystemIdx": str(SystemIndex)})
-        return mapistoreURL + "/" + fid
-
-    def add_one_public_folder(self, parent_fid, path, children, SystemIndex, names, mapistoreURL):
-        name = path[-1]
-        GlobalCount = self.get_message_GlobalCount(names.netbiosname)
-        ReplicaID = self.get_message_ReplicaID(names.netbiosname)
-        pfdn = "CN=publicfolders,CN=%s,CN=%s,%s" % (names.firstou, names.firstorg, names.ocserverdn)
-        fid = gen_mailbox_folder_fid(GlobalCount, ReplicaID)
-        childcount = len(children)
-        print "\t* %-40s %s" % (name, fid)
-        if parent_fid == 0:
-            mapistoreURL = self.add_root_public_folder(pfdn, fid, SystemIndex, childcount, mapistoreURL)
-        else:
-            mapistoreURL = self.add_sub_public_folder(pfdn, parent_fid, fid, name, SystemIndex, childcount, mapistoreURL);
-
-        GlobalCount += 1
-        self.set_message_GlobalCount(names.netbiosname, GlobalCount=GlobalCount)
-
-        for name, grandchildren in children.iteritems():
-            self.add_one_public_folder(fid, path + (name,), grandchildren[0], grandchildren[1], names, mapistoreURL)
-        return mapistoreURL
-
-    def add_mapistore_pf_dir(self, mapistoreURL):
-        mapistorepath = openchangedb_mapistore_url_split(mapistoreURL)[1]
-        if not os.path.isdir(mapistorepath):
-            os.makedirs(mapistorepath, mode=0700)
-
-    def add_public_folders(self, names, mapistoreURL):
-        self.add_mapistore_pf_dir(mapistoreURL)
-        pfstoreGUID = str(uuid.uuid4())
-        self.ldb.add({"dn": "CN=publicfolders,CN=%s,CN=%s,%s" % (names.firstou, names.firstorg, names.ocserverdn),
-                "objectClass": ["container"],
-                "cn": "publicfolders",
-                "StoreGUID": pfstoreGUID,
-                "ReplicaID": str(1)})
-        public_folders = ({
-            "IPM_SUBTREE": ({}, 1),
-            "NON_IPM_SUBTREE": ({
-                "EFORMS REGISTRY": ({}, 3),
-                "Events Root": ({}, -1),
-                "OFFLINE ADDRESS BOOK": ({
-                        "/o=%s/cn=addrlists/cn=oabs/cn=Default Offline Address Book" % (names.firstorg): ({}, 8),
-                }, 5),
-                "SCHEDULE+ FREE BUSY": ({
-                        "EX:/o=%s/ou=Exchange Administrative Group (%s)" % (names.firstorg, names.netbiosname): ({}, 7),
-                }, 4),
-            }, 2),
-        }, 0)
-
-        self.add_one_public_folder(0, ("Public Folder Root",), public_folders[0], public_folders[1], names, mapistoreURL)
-        
-    def lookup_server(self, cn, attributes=[]):
-        # Step 1. Search Server object
-        filter = "(&(objectClass=server)(cn=%s))" % cn
-        res = self.ldb.search("", scope=ldb.SCOPE_SUBTREE,
-                           expression=filter, attrs=attributes)
-        if len(res) != 1:
-            raise NoSuchServer(cn)
-        return res[0]
-
-    def lookup_mailbox_user(self, server, username):
-        """Check if a user already exists in openchange database.
-
-        :param server: Server object name
-        :param username: Username object
-        :return: LDB Object of the user
-        """
-        server_dn = self.lookup_server(server, []).dn
-
-        # Step 2. Search User object
-        filter = "(&(objectClass=mailbox)(cn=%s))" % (username)
-        return self.ldb.search(server_dn, scope=ldb.SCOPE_SUBTREE,
-                           expression=filter, attrs=[])
-
-    def user_exists(self, server, username):
-        """Check whether a user exists.
-
-        :param username: Username of the user
-        :param server: Server object name
-        """
-        return len(self.lookup_mailbox_user(server, username)) == 1
-
-    def get_message_attribute(self, server, attribute):
-        """Retrieve attribute value from given message database (server).
-
-        :param server: Server object name
-        """
-        return int(self.lookup_server(server, [attribute])[attribute][0], 16)
-
-    def get_message_ReplicaID(self, server):
-        """Retrieve current mailbox Replica ID for given message database (server).
-
-        :param server: Server object name
-        """
-        return self.get_message_attribute(server, "ReplicaID")
-
-    def get_message_GlobalCount(self, server):
-        """Retrieve current mailbox Global Count for given message database (server).
-
-        :param server: Server object name
-        """
-        return self.get_message_attribute(server, "GlobalCount")
-
-
-    def set_message_GlobalCount(self, server, GlobalCount):
-        """Update current mailbox GlobalCount for given message database (server).
-
-        :param server: Server object name
-        :param index: Mailbox new GlobalCount value
-        """
-        server_dn = self.lookup_server(server, []).dn
-
-        newGlobalCount = """
-dn: %s
-changetype: modify
-replace: GlobalCount
-GlobalCount: 0x%x
-""" % (server_dn, GlobalCount)
-
-        self.ldb.transaction_start()
-        try:
-            self.ldb.modify_ldif(newGlobalCount)
-        finally:
-            self.ldb.transaction_commit()
-
-    def add_mailbox_user(self, basedn, username):
-        """Add a user record in openchange database.
-
-        :param username: Username
-        :return: DN of the created object
-        """
-        
-        mailboxGUID = str(uuid.uuid4())
-        replicaID = str(1)
-        replicaGUID = str(uuid.uuid4())
-        
-        retdn = "CN=%s,%s" % (username, basedn)
-        self.ldb.add({"dn": retdn,
-                  "objectClass": ["mailbox", "container"],
-                  "PidTagDisplayName": "OpenChange Mailbox: %s" % (username),
-                  "PidTagParentFolderId": "0x0000000000000000",
-                  "PidTagSubFolders": "TRUE",
-                  "cn": username,
-                  "MailboxGUID": mailboxGUID,
-                  "ReplicaID": replicaID,
-                  "ReplicaGUID": replicaGUID})
-        return retdn
-
-    def add_storage_dir(self, mapistoreURL, username):
-        """Add mapistore storage space for the user
-
-        :param username: Username object
-        :param mapistore: mapistore object
-        """
-
-        mapistore_dir = os.path.join(mapistoreURL, username)
-        if not os.path.isdir(mapistore_dir):
-            os.makedirs(mapistore_dir, mode=0700)
-    
-    def add_folder_property(self, folderID, attribute, value):
-        """Add a attribute/value to the record folderID refers to
-
-        :param folderID: the folder identifier where to add attribute/value
-        :param attribute: the ldb attribute
-        :param value: the attribute value
-        """
-
-        # Step 1. Find the folder record
-        res = self.ldb.search("", ldb.SCOPE_SUBTREE, "(PidTagFolderId=%s)" % folderID, ["*"])
-        if len(res) != 1:
-            raise Exception("Invalid search (PidTagFolderId=%s)" % folderID)
-
-        # Step 2. Add attribute/value pair
-        m = ldb.Message()
-        m.dn = ldb.Dn(self.ldb, "%s" % res[0].dn)
-        m[attribute] = ldb.MessageElement([value], ldb.CHANGETYPE_ADD, attribute);
-        self.ldb.modify(m)
-
-    def add_mailbox_root_folder(self, ocfirstorgdn, username, 
-                                foldername, parentfolder, 
-                                GlobalCount, ReplicaID,
-                                SystemIdx, mapistoreURL,
-                                mapistoreSuffix):
-        """Add a root folder to the user mailbox
-
-        :param username: Username object
-        :param foldername: Folder name
-        :param GlobalCount: current global counter for message database
-        :param ReplicaID: replica identifier for message database
-        :param SystemIdx: System Index for root folders
-        :param mapistoreURL: storage URL prefix (including type)
-        :param mapistoreSuffix: file type suffix to use with mapistore
-        """
-
-        ocuserdn = "CN=%s,%s" % (username, ocfirstorgdn)
-        FID = gen_mailbox_folder_fid(GlobalCount, ReplicaID)
-
-        # Step 1. If we are handling Mailbox Root
-        if parentfolder == 0:
-            m = ldb.Message()
-            m.dn = ldb.Dn(self.ldb, ocuserdn)
-            m["PidTagFolderId"] = ldb.MessageElement([FID], ldb.CHANGETYPE_ADD, "PidTagFolderId")
-            m["SystemIdx"] = ldb.MessageElement([str(SystemIdx)], ldb.CHANGETYPE_ADD, "SystemIdx")
-            self.ldb.modify(m)
-            return FID
-
-        # Step 2. Lookup parent DN
-        res = self.ldb.search("", ldb.SCOPE_SUBTREE, "(PidTagFolderId=%s)" % parentfolder, ["*"])
-        if len(res) != 1:
-            raise Exception("Invalid search (PidTagFolderId=%s)" % parentfolder)
-
-        # Step 3. Add root folder to correct container
-        if (foldername == "IPM Subtree"):
-             self.ldb.add({"dn": "CN=%s,%s" % (FID, res[0].dn),
-                          "objectClass": ["systemfolder", "container"],
-                          "cn": FID,
-                          "PidTagParentFolderId": parentfolder,
-                          "PidTagFolderId": FID,
-                          "PidTagDisplayName": foldername,
-                          "PidTagAttrHidden": str(0),
-                          "PidTagContainerClass": "IPF.Note",
-                           "PidTagSubFolders": "TRUE",
-                          "FolderType": str(1),
-                          "SystemIdx": str(SystemIdx)})           
-        elif (foldername == "To-Do Search"):
-            self.ldb.add({"dn": "CN=%s,%s" % (FID, res[0].dn),
-                          "objectClass": ["systemfolder", "container"],
-                          "cn": FID,
-                          "PidTagParentFolderId": parentfolder,
-                          "PidTagFolderId": FID,
-                          "PidTagDisplayName": foldername,
-                          "PidTagAttrHidden": str(0),
-                          "PidTagContainerClass": "IPF.Note",
-                          "PidTagSubFolders": "FALSE",
-                          "FolderType": str(1),
-                          "SystemIdx": str(SystemIdx)})
-        else:
-            self.ldb.add({"dn": "CN=%s,%s" % (FID, res[0].dn),
-                          "objectClass": ["systemfolder"],
-                          "cn": FID,
-                          "PidTagParentFolderId": parentfolder,
-                          "PidTagFolderId": FID,
-                          "PidTagDisplayName": foldername,
-                          "PidTagAttrHidden": str(0),
-                          "PidTagContainerClass": "IPF.Note",
-                          "PidTagSubFolders": "TRUE",
-                          "PidTagFolderChildCount": str(0),
-                          "FolderType": str(1),
-                          "mapistore_uri": "%s/%s/%s%s" % (mapistoreURL, username, FID, mapistoreSuffix),
-                          "FolderType": str(1),
-                          "PidTagAccess": str(63),
-                          "PidTagRights":str(2043),
-                          "SystemIdx": str(SystemIdx)})
-
-        return FID
-
-    def add_mailbox_special_folder(self, username, parentfolder, ref_fid, 
-                                   foldername, containerclass, GlobalCount, ReplicaID, 
-                                   mapistoreURL, mapistoreSuffix):
-        """Add a special folder to the user mailbox
-
-        :param username: Username object
-        :param parent_folder: Folder identifier where record should be added
-        :param ref_fid: Folder Identifier referring special folder
-        :param foldername: Folder name
-        :param containerclass: Folder container class
-        :param GlobalCount: current global counter for message database
-        :param ReplicaID: replica identifier for message database
-        :param mapistoreURL: mapistore default content repository URI
-        :param mapistoreSuffix: file type suffix to use with mapistore
-        """
-
-        FID = gen_mailbox_folder_fid(GlobalCount, ReplicaID)
-
-        # Step 1. Lookup parent DN
-        res = self.ldb.search("", ldb.SCOPE_SUBTREE, "(PidTagFolderId=%s)" % parentfolder, ["*"])
-        if len(res) != 1:
-            raise Exception("Invalid search (PidTagFolderId=%s)" % parentfolder)
-
-        # Step 2. Add special folder to user subtree
-        self.ldb.add({"dn": "CN=%s,%s" % (FID, res[0].dn),
-                      "objectClass": ["specialfolder"],
-                      "cn": FID,
-                      "PidTagParentFolderId": parentfolder,
-                      "PidTagFolderId": FID,
-                      "PidTagDisplayName": foldername,
-                      "PidTagContainerClass": containerclass,
-                      "mapistore_uri": "%s/%s/%s%s" % (mapistoreURL, username, FID, mapistoreSuffix),
-                      "PidTagContentCount": str(0),
-                      "PidTagAttrHidden": str(0),
-                      "PidTagAccess": str(63),
-                      "PidTagRights":str(2043),
-                      "PidTagContentUnreadCount": str(0),
-                      "PidTagSubFolders": str(0),
-                      "FolderType": str(1)})
-
-        return FID
-
-    def set_receive_folder(self, username, ocfirstorgdn, fid, messageclass):
-        """Set MessageClass for given folder
-
-        :param username: Username object
-        :param ocfirstorgdn: Base DN
-        :param fid: Folder identifier
-        :param messageclass: Explicit Message Class
-        """
-        
-        # Step 1. Search fid DN
-        res = self.ldb.search("", ldb.SCOPE_SUBTREE, "(PidTagFolderId=%s)" % fid, ["*"])
-        if len(res) != 1:
-            raise Exception("Invalid search (PidTagFolderId=%s)" % fid)
-
-        m = ldb.Message()
-        m.dn = res[0].dn
-        m["PidTagMessageClass"] = ldb.MessageElement([messageclass], ldb.CHANGETYPE_ADD, "PidTagMessageClass")
-        self.ldb.modify(m)
-
-
-def gen_mailbox_folder_fid(GlobalCount, ReplicaID):
-    """Generates a Folder ID from index.
-
-    :param GlobalCount: Message database global counter
-    :param ReplicaID: Message database replica identifier
-    """
-
-    folder = "0x%.12x%.4x" % (GlobalCount, ReplicaID)
-
-    return folder
diff --git a/branches/plugfest/python/openchange/provision.py b/branches/plugfest/python/openchange/provision.py
deleted file mode 100644 (file)
index 989c683..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange provisioning
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008-2009
-# Copyright (C) Julien Kerihuel <j.kerihuel@openchange.org> 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-from base64 import b64encode
-import os
-import samba
-from openchange import mailbox
-from samba import Ldb
-from samba.samdb import SamDB
-from samba.auth import system_session
-from samba.provision import setup_add_ldif, setup_modify_ldif
-from openchange.urlutils import openchangedb_url, openchangedb_mapistore_url, openchangedb_mapistore_dir, openchangedb_suffix_for_mapistore_url
-
-__docformat__ = 'restructuredText'
-
-DEFAULTSITE = "Default-First-Site-Name"
-FIRST_ORGANIZATION = "First Organization"
-FIRST_ORGANIZATION_UNIT = "First Organization Unit"
-
-# This is a hack. Kind-of cute, but still a hack
-def abstract():
-    import inspect
-    caller = inspect.getouterframes(inspect.currentframe())[1][3]
-    raise NotImplementedError(caller + ' must be implemented in subclass')
-
-# Define an abstraction for progress reporting from the provisioning
-class AbstractProgressReporter(object):
-
-    def __init__(self):
-        self.currentStep = 0
-
-    def reportNextStep(self, stepName):
-        self.currentStep = self.currentStep + 1
-        self.doReporting(stepName)
-
-    def doReporting(self, stepName):
-        abstract()
-
-# A concrete example of a progress reporter - just provides text output for
-# each new step.
-class TextProgressReporter(AbstractProgressReporter):
-    def doReporting(self, stepName):
-        print "[+] Step %d: %s" % (self.currentStep, stepName)
-
-class ProvisionNames(object):
-
-    def __init__(self):
-        self.rootdn = None
-        self.domaindn = None
-        self.configdn = None
-        self.schemadn = None
-        self.dnsdomain = None
-        self.netbiosname = None
-        self.domain = None
-        self.hostname = None
-        self.firstorg = None
-        self.firstou = None
-        self.firstorgdn = None
-        # OpenChange dispatcher database specific
-        self.ocfirstorgdn = None
-        self.ocserverdn = None
-
-def guess_names_from_smbconf(lp, firstorg=None, firstou=None):
-    """Guess configuration settings to use from smb.conf.
-    
-    :param lp: Loadparm context.
-    :param firstorg: First Organization
-    :param firstou: First Organization Unit
-    """
-
-    netbiosname = lp.get("netbios name")
-    hostname = netbiosname.lower()
-
-    dnsdomain = lp.get("realm")
-    dnsdomain = dnsdomain.lower()
-
-    serverrole = lp.get("server role")
-    if serverrole == "domain controller":
-        domain = lp.get("workgroup")
-        domaindn = "DC=" + dnsdomain.replace(".", ",DC=")
-    else:
-        domain = netbiosname
-        domaindn = "CN=" + netbiosname
-
-    rootdn = domaindn
-    configdn = "CN=Configuration," + rootdn
-    schemadn = "CN=Schema," + configdn
-    sitename = DEFAULTSITE
-
-    names = ProvisionNames()
-    names.rootdn = rootdn
-    names.domaindn = domaindn
-    names.configdn = configdn
-    names.schemadn = schemadn
-    names.dnsdomain = dnsdomain
-    names.domain = domain
-    names.netbiosname = netbiosname
-    names.hostname = hostname
-    names.sitename = sitename
-
-    if firstorg is None:
-        firstorg = FIRST_ORGANIZATION
-
-    if firstou is None:
-        firstou = FIRST_ORGANIZATION_UNIT
-
-    names.firstorg = firstorg
-    names.firstou = firstou
-    names.firstorgdn = "CN=%s,CN=Microsoft Exchange,CN=Services,%s" % (firstorg, configdn)
-    names.serverdn = "CN=%s,CN=Servers,CN=%s,CN=Sites,%s" % (netbiosname, sitename, configdn)
-
-    # OpenChange dispatcher DB names
-    names.ocserverdn = "CN=%s,%s" % (names.netbiosname, names.domaindn)
-    names.ocfirstorg = firstorg
-    names.ocfirstorgdn = "CN=%s,CN=%s,%s" % (firstou, names.ocfirstorg, names.ocserverdn)
-
-    return names
-
-def provision_schema(setup_path, names, lp, creds, reporter, ldif, msg):
-    """Provision schema using LDIF specified file
-
-    :param setup_path: Path to the setup directory.
-    :param names: provision names object.
-    :param lp: Loadparm context
-    :param creds: Credentials Context
-    :param reporter: A progress reporter instance (subclass of AbstractProgressReporter)
-    :param ldif: path to the LDIF file
-    :param msg: reporter message
-    """
-
-    session_info = system_session()
-
-    db = SamDB(url=lp.get("sam database"), session_info=session_info, 
-               credentials=creds, lp=lp)
-
-    db.transaction_start()
-
-    try:
-        reporter.reportNextStep(msg)
-        setup_add_ldif(db, setup_path(ldif), { 
-                "FIRSTORG": names.firstorg,
-                "FIRSTORGDN": names.firstorgdn,
-                "CONFIGDN": names.configdn,
-                "SCHEMADN": names.schemadn,
-                "DOMAINDN": names.domaindn,
-                "DOMAIN": names.domain,
-                "DNSDOMAIN": names.dnsdomain,
-                "NETBIOSNAME": names.netbiosname,
-                "HOSTNAME": names.hostname
-                })
-    except:
-        db.transaction_cancel()
-        raise
-
-    db.transaction_commit()
-
-def modify_schema(setup_path, names, lp, creds, reporter, ldif, msg):
-    """Modify schema using LDIF specified file
-
-    :param setup_path: Path to the setup directory.
-    :param names: provision names object.
-    :param lp: Loadparm context
-    :param creds: Credentials Context
-    :param reporter: A progress reporter instance (subclass of AbstractProgressReporter)
-    :param ldif: path to the LDIF file
-    :param msg: reporter message
-    """
-
-    session_info = system_session()
-
-    db = SamDB(url=lp.get("sam database"), session_info=session_info, 
-               credentials=creds, lp=lp)
-
-    db.transaction_start()
-
-    try:
-        reporter.reportNextStep(msg)
-        setup_modify_ldif(db, setup_path(ldif), { 
-                "SCHEMADN": names.schemadn,
-                "CONFIGDN": names.configdn
-                })
-    except:
-        db.transaction_cancel()
-        raise
-
-    db.transaction_commit()
-
-def install_schemas(setup_path, names, lp, creds, reporter):
-    """Install the OpenChange-specific schemas in the SAM LDAP database. 
-    
-    :param setup_path: Path to the setup directory.
-    :param names: provision names object.
-    :param lp: Loadparm context
-    :param creds: Credentials Context
-    :param reporter: A progress reporter instance (subclass of AbstractProgressReporter)
-    """
-    session_info = system_session()
-
-    # Step 1. Extending the prefixmap attribute of the schema DN record
-    db = SamDB(url=lp.get("sam database"), session_info=session_info,
-                  credentials=creds, lp=lp)
-
-    prefixmap = open(setup_path("AD/prefixMap.txt"), 'r').read()
-
-    db.transaction_start()
-
-    try:
-        reporter.reportNextStep("Register Exchange OIDs")
-        setup_modify_ldif(db,
-                          setup_path("AD/provision_schema_basedn_modify.ldif"), {
-                "SCHEMADN": names.schemadn,
-                "NETBIOSNAME": names.netbiosname,
-                "DEFAULTSITE": names.sitename,
-                "CONFIGDN": names.configdn,
-                "SERVERDN": names.serverdn,
-                "PREFIXMAP_B64": b64encode(prefixmap)
-                })
-    except:
-        db.transaction_cancel()
-        raise
-
-    db.transaction_commit()
-
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_attributes.ldif", "Add Exchange attributes to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_auxiliary_class.ldif", "Add Exchange auxiliary classes to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_objectCategory.ldif", "Add Exchange objectCategory to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_container.ldif", "Add Exchange containers to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_subcontainer.ldif", "Add Exchange *sub* containers to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_sub_CfgProtocol.ldif", "Add Exchange CfgProtocol subcontainers to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_sub_mailGateway.ldif", "Add Exchange mailGateway subcontainers to Samba schema")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema.ldif", "Add Exchange classes to Samba schema")
-    modify_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_possSuperior.ldif", "Add possSuperior attributes to Exchange classes")
-    modify_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_schema_modify.ldif", "Extend existing Samba classes and attributes")
-    provision_schema(setup_path, names, lp, creds, reporter, "AD/oc_provision_configuration.ldif", "Exchange Samba with Exchange configuration objects")
-    print "[SUCCESS] Done!"
-
-def newmailbox(lp, username, firstorg, firstou, backend):
-    names = guess_names_from_smbconf(lp, firstorg, firstou)
-
-    db = mailbox.OpenChangeDB(openchangedb_url(lp))
-
-    # Step 1. Retrieve current FID index
-    GlobalCount = db.get_message_GlobalCount(names.netbiosname)
-    ReplicaID = db.get_message_ReplicaID(names.netbiosname)
-
-    print "[+] Mailbox for '%s'" % (username)
-    print "==================" + "=" * len(username)
-    print "* GlobalCount (0x%x) and ReplicaID (0x%x)" % (GlobalCount, ReplicaID)
-
-    # Step 2. Check if the user already exists
-    assert not db.user_exists(names.netbiosname, username)
-
-    # Step 3. Create a default mapistore content repository for this user
-    db.add_storage_dir(mapistoreURL=openchangedb_mapistore_dir(lp), username=username)
-    print "* Mapistore content repository created: %s" % os.path.join(openchangedb_mapistore_dir(lp), username)
-
-    # Step 4. Create the user object
-    retdn = db.add_mailbox_user(names.ocfirstorgdn, username=username)
-    print "* User object created: %s" % (retdn)
-
-    # Step 5. Create system mailbox folders for this user
-    print "* Adding System Folders"
-
-    system_folders = ({
-        "Deferred Actions": ({}, 2),
-        "Spooler Queue": ({}, 3),
-        "To-Do Search": ({}, 4),
-        "IPM Subtree": ({
-            "Inbox": ({}, 6),
-            "Outbox": ({}, 7),
-            "Sent Items": ({}, 8),
-            "Deleted Items": ({}, 9),
-        }, 5),
-        "Common Views": ({}, 10),
-        "Schedule": ({}, 11),
-        "Search": ({}, 12),
-        "Views": ({}, 13),
-        "Shortcuts": ({}, 14),
-        "Reminders": ({}, 15),
-    }, 1)
-
-    fids = {}
-    def add_folder(parent_fid, path, children, SystemIdx):
-        name = path[-1]
-
-        GlobalCount = db.get_message_GlobalCount(names.netbiosname)
-        ReplicaID = db.get_message_ReplicaID(names.netbiosname)
-        url = openchangedb_mapistore_url(lp, backend)
-
-        fid = db.add_mailbox_root_folder(names.ocfirstorgdn, 
-            username=username, foldername=name,
-            parentfolder=parent_fid, GlobalCount=GlobalCount, 
-            ReplicaID=ReplicaID, SystemIdx=SystemIdx, 
-            mapistoreURL=url,
-            mapistoreSuffix=openchangedb_suffix_for_mapistore_url(url))
-
-        GlobalCount += 1
-        db.set_message_GlobalCount(names.netbiosname, GlobalCount=GlobalCount)
-
-        fids[path] = fid
-
-        print "\t* %-40s: %s" % (name, fid)
-        for name, grandchildren in children.iteritems():
-            add_folder(fid, path + (name,), grandchildren[0], grandchildren[1])
-
-    add_folder(0, ("Mailbox Root",), system_folders[0], system_folders[1])
-
-    # Step 6. Add special folders
-    print "* Adding Special Folders:"
-    special_folders = [
-        (("Mailbox Root", "IPM Subtree"), "Calendar",   "IPF.Appointment",  "PidTagIpmAppointmentEntryId"),
-        (("Mailbox Root", "IPM Subtree"), "Contacts",   "IPF.Contact",      "PidTagIpmContactEntryId"),
-        (("Mailbox Root", "IPM Subtree"), "Journal",    "IPF.Journal",      "PidTagIpmJournalEntryId"),
-        (("Mailbox Root", "IPM Subtree"), "Notes",      "IPF.StickyNote",   "PidTagIpmNoteEntryId"),
-        (("Mailbox Root", "IPM Subtree"), "Tasks",      "IPF.Task",         "PidTagIpmTaskEntryId"),
-        (("Mailbox Root", "IPM Subtree"), "Drafts",     "IPF.Note",         "PidTagIpmDraftsEntryId")
-        ]
-
-    fid_inbox = fids[("Mailbox Root", "IPM Subtree", "Inbox")]
-    fid_reminders = fids[("Mailbox Root", "Reminders")]
-    fid_mailbox = fids[("Mailbox Root",)]
-    for path, foldername, containerclass, pidtag in special_folders:
-        GlobalCount = db.get_message_GlobalCount(names.netbiosname)
-        ReplicaID = db.get_message_ReplicaID(names.netbiosname)
-        url = openchangedb_mapistore_url(lp, backend)
-        fid = db.add_mailbox_special_folder(username, fids[path], fid_inbox, foldername, 
-                                            containerclass, GlobalCount, ReplicaID, 
-                                            url, openchangedb_suffix_for_mapistore_url(url))
-        db.add_folder_property(fid_inbox, pidtag, fid)
-        db.add_folder_property(fid_mailbox, pidtag, fid)
-        GlobalCount += 1
-        db.set_message_GlobalCount(names.netbiosname, GlobalCount=GlobalCount)
-        print "\t* %-40s: %s (%s)" % (foldername, fid, containerclass)
-
-    # Step 7. Set default receive folders
-    print "* Adding default Receive Folders:"
-    receive_folders = [
-        (("Mailbox Root", "IPM Subtree", "Inbox"), "All"),
-        (("Mailbox Root", "IPM Subtree", "Inbox"), "IPM"),
-        (("Mailbox Root", "IPM Subtree", "Inbox"), "Report.IPM"),
-        (("Mailbox Root", "IPM Subtree", "Inbox"), "IPM.Note"),
-        (("Mailbox Root", "IPM Subtree",), "IPC")
-        ]
-    
-    for path, messageclass in receive_folders:
-        print "\t* %-40s Message Class added to %s" % (messageclass, fids[path])
-        db.set_receive_folder(username, names.ocfirstorgdn, fids[path], 
-                              messageclass)
-
-    # Step 8. Set additional properties on Inbox
-    print "* Adding additional default properties to Inbox"
-    db.add_folder_property(fid_inbox, "PidTagContentCount", "0")
-    db.add_folder_property(fid_inbox, "PidTagContentUnreadCount", "0")
-    db.add_folder_property(fid_inbox, "PidTagSubFolders", "FALSE")
-
-    print "* Adding additional default properties to Reminders"
-    db.add_folder_property(fid_reminders, "PidTagContainerClass", "Outlook.Reminder");
-    db.add_folder_property(fid_inbox, "PidTagRemindersOnlineEntryId", fid_reminders);
-    db.add_folder_property(fid_mailbox, "PidTagRemindersOnlineEntryId", fid_reminders);
-
-    GlobalCount = db.get_message_GlobalCount(names.netbiosname)
-    print "* GlobalCount (0x%x)" % GlobalCount
-
-
-def newuser(lp, creds, username=None):
-    """extend user record with OpenChange settings.
-    
-    :param lp: Loadparm context
-    :param creds: Credentials context
-    :param username: Name of user to extend
-    """
-
-    names = guess_names_from_smbconf(lp, None, None)
-
-    db = Ldb(url=os.path.join(lp.get("private dir"), lp.get("sam database")), 
-             session_info=system_session(), credentials=creds, lp=lp)
-
-    user_dn = "CN=%s,CN=Users,%s" % (username, names.domaindn)
-
-    extended_user = """
-dn: %s
-changetype: modify
-add: displayName
-displayName: %s
-add: auxiliaryClass
-auxiliaryClass: msExchBaseClass
-add: mailNickName
-mailNickname: %s
-add: homeMDB
-homeMDB: CN=Mailbox Store (%s),CN=First Storage Group,CN=InformationStore,CN=%s,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=%s,CN=Microsoft Exchange,CN=Services,CN=Configuration,%s
-add: legacyExchangeDN
-legacyExchangeDN: /o=%s/ou=First Administrative Group/cn=Recipients/cn=%s
-add: proxyAddresses
-proxyAddresses: smtp:postmaster@%s
-proxyAddresses: X400:c=US;a= ;p=First Organizati;o=Exchange;s=%s
-proxyAddresses: SMTP:%s@%s
-replace: msExchUserAccountControl
-msExchUserAccountControl: 0
-""" % (user_dn, username, username, names.netbiosname, names.netbiosname, names.firstorg, names.domaindn, names.firstorg, username, names.dnsdomain, username, username, names.dnsdomain)
-    db.modify_ldif(extended_user)
-
-    print "[+] User %s extended and enabled" % username
-
-
-def accountcontrol(lp, creds, username=None, value=0):
-    """enable/disable an OpenChange user account.
-
-    :param lp: Loadparm context
-    :param creds: Credentials context
-    :param username: Name of user to disable
-    :param value: the control value
-    """
-
-    names = guess_names_from_smbconf(lp, None, None)
-
-    db = Ldb(url=os.path.join(lp.get("private dir"), lp.get("sam database")), 
-             session_info=system_session(), credentials=creds, lp=lp)
-
-    user_dn = "CN=%s,CN=Users,%s" % (username, names.domaindn)
-    extended_user = """
-dn: %s
-changetype: modify
-replace: msExchUserAccountControl
-msExchUserAccountControl: %d
-""" % (user_dn, value)
-    db.modify_ldif(extended_user)
-    if value == 2:
-        print "[+] Account %s disabled" % username
-    else:
-        print "[+] Account %s enabled" % username
-
-
-def provision(setup_path, lp, creds, firstorg=None, firstou=None, reporter=None):
-    """Extend Samba4 with OpenChange data.
-    
-    :param setup_path: Path to the setup directory
-    :param lp: Loadparm context
-    :param creds: Credentials context
-    :param firstorg: First Organization
-    :param firstou: First Organization Unit
-    :param reporter: A progress reporter instance (subclass of AbstractProgressReporter)
-
-    If a progress reporter is not provided, a text output reporter is provided
-    """
-    names = guess_names_from_smbconf(lp, firstorg, firstou)
-
-    print "NOTE: This operation can take several minutes"
-
-    if reporter is None:
-        reporter = TextProgressReporter()
-
-    # Install OpenChange-specific schemas
-    install_schemas(setup_path, names, lp, creds, reporter)
-
-
-def openchangedb_provision(lp, firstorg=None, firstou=None, mapistore=None):
-    """Create the OpenChange database.
-
-    :param lp: Loadparm context
-    :param firstorg: First Organization
-    :param firstou: First Organization Unit
-    :param mapistore: The public folder store type (fsocpf, sqlite, etc)
-    """
-    names = guess_names_from_smbconf(lp, firstorg, firstou)
-    
-    print "Setting up openchange db"
-    openchange_ldb = mailbox.OpenChangeDB(openchangedb_url(lp))
-    openchange_ldb.setup()
-
-    openchange_ldb.add_rootDSE(names.ocserverdn, names.firstorg, names.firstou)
-
-    # Add a server object
-    # It is responsible for holding the GlobalCount identifier (48 bytes)
-    # and the Replica identifier
-    openchange_ldb.add_server(names.ocserverdn, names.netbiosname, 
-        names.firstorg, names.firstou)
-
-    mapistoreURL = os.path.join( openchangedb_mapistore_url(lp, mapistore), "publicfolders")
-    print "[+] Public Folders"
-    print "==================="
-    openchange_ldb.add_public_folders(names, mapistoreURL)
-
-def find_setup_dir():
-    """Find the setup directory used by provision."""
-    dirname = os.path.dirname(__file__)
-    if "/site-packages/" in dirname:
-        prefix = dirname[:dirname.index("/site-packages/")]
-        for suffix in ["share/openchange/setup", "share/setup", "share/samba/setup", "setup"]:
-            ret = os.path.join(prefix, suffix)
-            if os.path.isdir(ret):
-                return ret
-    # In source tree
-    ret = os.path.join(dirname, "../../setup")
-    if os.path.isdir(ret):
-        return ret
-    raise Exception("Unable to find setup directory.")
diff --git a/branches/plugfest/python/openchange/tests/__init__.py b/branches/plugfest/python/openchange/tests/__init__.py
deleted file mode 100644 (file)
index b6e326c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-def test_suite():
-    import unittest
-    loader = unittest.TestLoader()
-    suite = unittest.TestSuite()
-    from openchange.tests import (test_provision, 
-        test_mailbox)
-    suite.addTests(loader.loadTestsFromModule(test_provision))
-    suite.addTests(loader.loadTestsFromModule(test_mailbox))
-    return suite
diff --git a/branches/plugfest/python/openchange/tests/test_mailbox.py b/branches/plugfest/python/openchange/tests/test_mailbox.py
deleted file mode 100644 (file)
index cbdc276..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange provisioning
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-from openchange.mailbox import NoSuchServer, OpenChangeDB, gen_mailbox_folder_fid
-
-import os
-import unittest
-
-class OpenChangeDBTests(unittest.TestCase):
-    """Tests for OpenChangeDB."""
-
-    def setUp(self):
-        if os.path.exists("openchange.ldb"):
-            os.unlink("openchange.ldb")
-        self.db = OpenChangeDB("openchange.ldb") 
-        self.db.setup()
-
-    def test_user_exists_no_server(self):
-        self.assertRaises(NoSuchServer, self.db.user_exists, "someserver", "foo")
-
-    def test_server_lookup_doesnt_exist(self):
-        self.assertRaises(NoSuchServer, self.db.lookup_server, 
-            "nonexistantserver")
-
-    def test_server_lookup(self):
-        self.db.add_server("dc=blaserver", "blaserver", "firstorg", "firstou")
-        self.assertEquals("dc=blaserver", str(self.db.lookup_server("blaserver")['dn']))
-
-    def test_add_mailbox_user(self):
-        self.db.add_server("cn=myserver", "myserver", "firstorg", "firstou")
-        self.db.add_mailbox_user("cn=firstorg,cn=firstou,cn=myserver", "someuser")
-        self.assertTrue(self.db.user_exists("myserver", "someuser"))
-
-    def test_msg_globalcount_initial(self):
-        self.db.add_server("dc=myserver", "myserver", "firstorg", "firstou")
-        self.assertEquals(1, self.db.get_message_GlobalCount("myserver"))
-
-    def test_set_msg_globalcount(self):
-        self.db.add_server("dc=myserver", "myserver", "firstorg", "firstou")
-        self.db.set_message_GlobalCount("myserver", 42)
-        self.assertEquals(42, self.db.get_message_GlobalCount("myserver"))
-
-    def test_msg_replicaid_initial(self):
-        self.db.add_server("dc=myserver", "myserver", "firstorg", "firstou")
-        self.assertEquals(1, self.db.get_message_ReplicaID("myserver"))
-
-
-class MailboxFIDTests(unittest.TestCase):
-    
-    def test_simple(self):
-        self.assertEquals("0x00000000109282806", gen_mailbox_folder_fid(4242, 534534))
-
diff --git a/branches/plugfest/python/openchange/tests/test_provision.py b/branches/plugfest/python/openchange/tests/test_provision.py
deleted file mode 100644 (file)
index 9b6bac4..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange provisioning
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2009
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-from samba import param
-from samba.credentials import Credentials
-from samba.tests import TestCaseInTempDir
-from samba.tests.samdb import SamDBTestCase
-from openchange.provision import (install_schemas, openchangedb_provision,
-    guess_names_from_smbconf, find_setup_dir)
-
-import os
-import shutil
-
-
-class ExtendedSamDBTestCase(SamDBTestCase):
-
-    def test_install_schemas(self):
-        def setup_path(relpath):
-            return os.path.join(find_setup_dir(), relpath)
-
-        names = guess_names_from_smbconf(self.lp)
-        creds = Credentials()
-        creds.set_anonymous()
-        self.lp.set("sam database", os.path.join(self.tempdir, "samdb.ldb"))
-        install_schemas(setup_path, names, self.lp, creds)
-
-
-class OpenChangeDBProvisionTestCase(TestCaseInTempDir):
-
-    def test_provision(self):
-        lp = param.LoadParm()
-        lp.load_default()
-        lp.set("private dir", self.tempdir)
-        openchangedb_provision(lp)
-        shutil.rmtree(os.path.join(self.tempdir, "mapistore"))
-        os.unlink(os.path.join(self.tempdir, "openchange.ldb"))
diff --git a/branches/plugfest/python/openchange/urlutils.py b/branches/plugfest/python/openchange/urlutils.py
deleted file mode 100644 (file)
index bf40316..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/python
-
-# OpenChange provisioning
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008-2009
-# Copyright (C) Julien Kerihuel <j.kerihuel@openchange.org> 2009
-# Copyright (C) Brad Hards <bradh@openchange.org> 2010
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-import os
-
-
-class UnsupportedMapistoreBackend(Exception):
-    
-    def __init__(self, backend):
-        super(UnsupportedMapistoreBackend, self).__init__("unsupported mapistore backend type: %s" % backend)
-
-
-def openchangedb_url(lp):
-    return os.path.join(lp.get("private dir"), "openchange.ldb")
-
-
-def openchangedb_mapistore_dir(lp):
-    return os.path.join(lp.get("private dir"), "mapistore")
-
-
-def openchangedb_mapistore_url(lp, backend):
-    if backend in ("fsocpf", None):
-        return "fsocpf://%s" % openchangedb_mapistore_dir(lp)
-    elif backend == "sqlite":
-        return "sqlite://%s" % openchangedb_mapistore_dir(lp)
-    raise UnsupportedMapistoreBackend(backend)
-
-
-def openchangedb_mapistore_url_split(url):
-    if url.startswith("fsocpf://"):
-        return url.partition("fsocpf://")[1:]
-    if url.startswith("sqlite://"):
-        return url.partition("sqlite://")[1:]
-
-
-def openchangedb_suffix_for_mapistore_url(url):
-    if (url.startswith("fsocpf://")):
-        return ""
-    if (url.startswith("sqlite://")):
-        return ".db"
-    return ""
diff --git a/branches/plugfest/qt/demo/demoapp.cpp b/branches/plugfest/qt/demo/demoapp.cpp
deleted file mode 100644 (file)
index b2b0169..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-#include <Qt/QtGui>
-
-#include "demoapp.h"
-
-#include "../lib/foldermodel.h"
-#include "../lib/messagesmodel.h"
-
-#include <libmapi++/libmapi++.h>
-
-using namespace libmapipp;
-
-DemoApp::DemoApp()
-{
-    m_textEdit = new QTextEdit;
-    setCentralWidget( m_textEdit );
-
-    createActions();
-    createMenus();
-
-    login();
-    
-    addFolderDockWidget();
-    addMessagesDockWidget();
-    openMessage( 0 );
-      
-    resize( 1100, 900 );
-}
-
-void DemoApp::about()
-{
-    QMessageBox::about( this, tr( "OpenChange GUI Test Harness" ),
-                       tr( "<qt>This test harness is for demonstrating and testing "
-                           "some of the OpenChange functionality. It is not "
-                           "intended for use in production.<br/><br/> <b>We mean it.</b></qt>" ) );
-}
-
-void DemoApp::createActions()
-{
-    m_aboutAction = new QAction( tr( "About" ), this );
-    connect( m_aboutAction, SIGNAL( triggered() ), this, SLOT( about() ) );
-    
-    m_quitAction = new QAction( tr( "&Quit" ), this );
-    // Use this if we ever require Qt 4.6
-    // m_quitAction->setShortcuts( QKeySequence::Quit );
-    m_quitAction->setShortcut( QKeySequence( Qt::Key_Q, Qt::CTRL ) );
-    m_quitAction->setStatusTip( tr( "Quit the application" ) );
-    connect( m_quitAction, SIGNAL( triggered() ), this, SLOT( close() ) );
-}
-
-void DemoApp::createMenus()
-{
-    m_fileMenu = menuBar()->addMenu( tr( "&File" ) );
-    m_fileMenu->addAction( m_quitAction );
-    
-    m_helpMenu = menuBar()->addMenu( tr( "&Help" ) );
-    m_helpMenu->addAction( m_aboutAction );
-}
-
-void DemoApp::login()
-{
-    // Initialize MAPI Session
-    m_mapi_session = new libmapipp::session();
-
-    m_mapi_session->login();
-}
-
-void DemoApp::addFolderDockWidget()
-{
-    m_folderDock = new QDockWidget( tr( "Folders" ), this );
-    
-    FolderModel *folder = new FolderModel( m_mapi_session );
-    m_folderModel = folder->buildModel();
-    
-    QTreeView *folderDockView = new QTreeView( m_folderDock );
-    folderDockView->setModel( m_folderModel );
-    folderDockView->expandToDepth( 2 );
-    connect( folderDockView, SIGNAL( clicked(QModelIndex) ), this, SLOT( folderChanged(QModelIndex) ) );
-    m_folderDock->setWidget( folderDockView );
-    
-    addDockWidget(Qt::LeftDockWidgetArea, m_folderDock);
-}
-
-void DemoApp::addMessagesDockWidget()
-{
-    QDockWidget *messagesDock = new QDockWidget( tr( "Messages" ), this );
-    
-    // Get Default Inbox folder ID.
-    mapi_id_t inbox_id = m_mapi_session->get_message_store().get_default_folder(olFolderInbox);
-    // std::cout << "inbox_id: " << inbox_id << std::endl;
-
-    // Open Inbox Folder
-    m_folder = new folder(m_mapi_session->get_message_store(), inbox_id);
-    MessagesModel *messages = new MessagesModel( m_folder );
-    
-    m_messagesDockView = new QTableView( messagesDock );
-    m_messagesModel = messages->buildModel();
-    m_messagesDockView->setModel( m_messagesModel );
-    m_messagesDockView->setShowGrid( false );
-    m_messagesDockView->resizeColumnsToContents();
-    m_messagesDockView->resizeRowsToContents();
-    connect( m_messagesDockView, SIGNAL( clicked(QModelIndex) ), this, SLOT( messageChanged(QModelIndex) ) );
-    messagesDock->setWidget( m_messagesDockView );
-    
-    splitDockWidget( m_folderDock, messagesDock, Qt::Horizontal );
-}
-
-void DemoApp::folderChanged(const QModelIndex &index)
-{
-    QStandardItem *item = m_folderModel->itemFromIndex( index );
-    if (item) {
-       qlonglong folderId = item->data().toLongLong();
-       m_folder = new folder(m_mapi_session->get_message_store(), folderId);
-       MessagesModel *messages = new MessagesModel( m_folder );
-       m_messagesModel = messages->buildModel();
-       m_messagesDockView->setModel( m_messagesModel );
-    }
-}
-
-void DemoApp::messageChanged( const QModelIndex &index )
-{
-    QStandardItem *item = m_messagesModel->itemFromIndex( index );
-    if ( item ) {
-       quint32 messageNumber = item->data().toUInt();
-       openMessage( messageNumber );
-    }
-}
-
-void DemoApp::openMessage( quint32 messageNumber )
-{
-    libmapipp::folder::message_container_type messages = m_folder->fetch_messages();
-    // std::cout << "Folder contains " << messages.size() << " messages" << std::endl;
-
-    // Get the properties we are interested in
-    libmapipp::property_container msg_props = messages[messageNumber]->get_property_container();
-    msg_props << PR_BODY_HTML;
-    msg_props.fetch();
-
-    if ( msg_props[PR_BODY_HTML] ) {
-       QString body = QString( (const char*)msg_props[PR_BODY_HTML] );
-       m_textEdit->setHtml( body );
-    } else {
-       m_textEdit->setHtml( QString() );
-    }
-}
-
-#include "demoapp.moc"
diff --git a/branches/plugfest/qt/demo/demoapp.h b/branches/plugfest/qt/demo/demoapp.h
deleted file mode 100644 (file)
index d561a25..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef DEMOAPP_H
-#define DEMOAPP_H
-
-#include <QtGui/QMainWindow>
-#include <QtGui/QStandardItemModel>
-
-class QAction;
-class QMenu;
-class QTextEdit;
-class QStandardItem;
-class QTableView;
-
-namespace libmapipp
-{
-  class session;
-  class folder;
-};
-
-class DemoApp : public QMainWindow
-{
-    Q_OBJECT
-
-  public:
-    DemoApp();
-
-  private slots:
-    void about();
-    void folderChanged( const QModelIndex &index );
-    void messageChanged( const QModelIndex &index );
-    
-  private:
-    void createActions();
-    void createMenus();
-
-    void login();
-    
-    void addFolderDockWidget();
-    void addMessagesDockWidget();
-    
-    void openMessage( quint32 messageNumber );
-
-    QMenu *m_fileMenu;
-    QMenu *m_helpMenu;
-
-    QAction *m_quitAction;
-    QAction *m_aboutAction;
-    
-    QDockWidget *m_folderDock;
-    QStandardItemModel *m_folderModel;
-    
-    QTableView *m_messagesDockView;
-    QStandardItemModel *m_messagesModel;
-    
-    libmapipp::folder *m_folder;
-    QTextEdit *m_textEdit;
-    
-    libmapipp::session *m_mapi_session;
-};
-
-#endif
-
diff --git a/branches/plugfest/qt/demo/main.cpp b/branches/plugfest/qt/demo/main.cpp
deleted file mode 100644 (file)
index c790562..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "demoapp.h"
-
-#include <QtGui/QApplication>
-
-int main(int argc, char *argv[])
-{
-    QApplication app(argc, argv);
-
-    DemoApp *demo = new DemoApp();
-    demo->show();
-
-    return app.exec();
-}
diff --git a/branches/plugfest/qt/lib/foldermodel.cpp b/branches/plugfest/qt/lib/foldermodel.cpp
deleted file mode 100644 (file)
index bbbb2fb..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <Qt/QtGui>
-#include <exception>
-#include <vector>
-#include <string>
-
-#include <QtCore/QStringList>
-#include <QtCore/QDebug>
-
-#include "foldermodel.h"
-
-#include <libmapi++/libmapi++.h>
-
-using namespace libmapipp;
-
-FolderModel::FolderModel( libmapipp::session *mapi_session ) :
-  m_mapi_session( mapi_session )
-{
-      m_folderModel = new QStandardItemModel();
-      QStringList folderModelHeaders;
-      folderModelHeaders << QString( "Folder Name" ) << QString( "FolderId" ) << QString( "Container Class" );
-      m_folderModel->setHorizontalHeaderLabels( folderModelHeaders );
-}
-
-void FolderModel::add_folder_to_tree(libmapipp::folder& up_folder, QStandardItem *parentItem)
-{
-      property_container up_folder_property_container = up_folder.get_property_container();
-      up_folder_property_container << PR_DISPLAY_NAME << PR_CONTAINER_CLASS;
-      up_folder_property_container.fetch();
-
-      std::string display_name = static_cast<const char*>(up_folder_property_container[PR_DISPLAY_NAME]);
-      std::string container_class;
-      if (up_folder_property_container[PR_CONTAINER_CLASS])
-             container_class = static_cast<const char*>(up_folder_property_container[PR_CONTAINER_CLASS]);
-
-      QList< QStandardItem * > row;
-      QStandardItem *name = new QStandardItem( QString::fromStdString( display_name ) );
-      name->setData( (qlonglong)up_folder.get_id() );
-      QStandardItem *folderId = new QStandardItem( QString::number( up_folder.get_id(), 16 ) );
-      QStandardItem *containerClass = new QStandardItem( QString::fromStdString( container_class ) );
-      row << name << folderId << containerClass;
-
-      parentItem->appendRow( row );
-
-      // Fetch Top Information Folder Hierarchy (child folders)
-      folder::hierarchy_container_type hierarchy = up_folder.fetch_hierarchy();
-      for (unsigned int i = 0; i < hierarchy.size(); ++i) {
-             add_folder_to_tree(*hierarchy[i], name);
-      }
-}
-
-QStandardItemModel* FolderModel::buildModel()
-{
-      try {
-           // Get Default Top Information Store folder ID
-           mapi_id_t top_folder_id = m_mapi_session->get_message_store().get_default_folder(olFolderTopInformationStore);
-
-           // Open Top Information Folder
-           folder top_folder( m_mapi_session->get_message_store(), top_folder_id );
-
-           QStandardItem *parentItem = m_folderModel->invisibleRootItem();
-
-           add_folder_to_tree(top_folder, parentItem);
-      }
-      catch (mapi_exception e) // Catch any mapi exceptions
-      {
-              std::cout << "MAPI Exception @ main: " <<  e.what() << std::endl;
-      }
-      catch (std::runtime_error e) // Catch runtime exceptions
-      {
-              std::cout << "std::runtime_error exception @ main: " << e.what() << std::endl;
-      }
-      return m_folderModel;
-}
-
-
-#include "foldermodel.moc"
diff --git a/branches/plugfest/qt/lib/foldermodel.h b/branches/plugfest/qt/lib/foldermodel.h
deleted file mode 100644 (file)
index 9b2b404..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef FOLDERMODEL_H
-#define FOLDERMODEL_H
-
-class QStandardItem;
-class QStandardItemModel;
-
-namespace libmapipp
-{
-class folder;
-class session;
-}
-
-class FolderModel : public QStandardItemModel
-{
-    Q_OBJECT
-
-  public:
-    FolderModel( libmapipp::session *mapi_session );
-
-    QStandardItemModel* buildModel();
-
-  private:
-    libmapipp::session *m_mapi_session;
-    QStandardItemModel *m_folderModel;
-    
-    void add_folder_to_tree(libmapipp::folder& up_folder, QStandardItem *parentItem);
-};
-
-
-#endif
diff --git a/branches/plugfest/qt/lib/messagesmodel.cpp b/branches/plugfest/qt/lib/messagesmodel.cpp
deleted file mode 100644 (file)
index b9d5bab..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "messagesmodel.h"
-
-#include <libmapi++/libmapi++.h>
-
-using namespace libmapipp;
-
-MessagesModel::MessagesModel( libmapipp::folder *folder ):
-  m_mapi_folder( folder )
-{
-}
-    
-QStandardItemModel* MessagesModel::buildModel()
-{
-    // Fetch messages in Inbox Folder
-    folder::message_container_type messages = m_mapi_folder->fetch_messages();
-
-    QStandardItemModel *messagesModel = new QStandardItemModel();
-    QStringList messagesModelHeaders;
-    messagesModelHeaders << QString( "Topic" ) << QString( "To" ) << QString( "From" );
-    messagesModel->setHorizontalHeaderLabels( messagesModelHeaders );
-
-    for ( unsigned int i = 0; i < messages.size(); ++i ) {
-       property_container message_property_container = messages[i]->get_property_container();
-
-       // Add Property Tags to be fetched and then fetch the properties.
-       message_property_container << PR_DISPLAY_TO << PR_CONVERSATION_TOPIC << PR_SENDER_NAME;
-       message_property_container.fetch_all();
-
-       std::string to;
-       std::string subject;
-       std::string from;
-
-       for (property_container::iterator Iter = message_property_container.begin(); Iter != message_property_container.end(); Iter++)
-       {
-               if (Iter.get_tag() == PR_DISPLAY_TO)
-                       to = (const char*) *Iter;
-               else if (Iter.get_tag() == PR_CONVERSATION_TOPIC)
-                       subject = (const char*) *Iter;
-               else if (Iter.get_tag() == PR_SENDER_NAME)
-                       from = (const char*) *Iter;
-       }
-       QList< QStandardItem * > row;
-       row << new QStandardItem( QString::fromStdString( subject ) );
-       row[0]->setData( (quint32) i );
-       row << new QStandardItem( QString::fromStdString( to ) );
-       row << new QStandardItem( QString::fromStdString( from ) );
-       messagesModel->appendRow( row );
-    }
-    
-    return messagesModel;
-}
-
-
-
-#include "messagesmodel.moc"
diff --git a/branches/plugfest/qt/lib/messagesmodel.h b/branches/plugfest/qt/lib/messagesmodel.h
deleted file mode 100644 (file)
index 092b3cc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MESSAGESMODEL_H
-#define MESSAGESMODEL_H
-
-class QStandardItem;
-#include <QStandardItemModel>
-
-namespace libmapipp
-{
-class folder;
-class session;
-}
-
-
-class MessagesModel : public QStandardItemModel
-{
-    Q_OBJECT
-    
-  public:
-    MessagesModel( libmapipp::folder *folder );
-    
-    QStandardItemModel *buildModel();
-    
-  private:
-    libmapipp::folder *m_mapi_folder;
-};
-
-#endif
diff --git a/branches/plugfest/script/check_exchange b/branches/plugfest/script/check_exchange
deleted file mode 100755 (executable)
index 58cfd44..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/usr/bin/perl
-#
-# Nagois Plug-In to check Exchange Server
-#
-# Bill Edmunds, Academic Services, University of Exeter
-# 25th March, 2008
-#
-
-use strict;
-use lib "nagios/plugins";
-use utils qw($TIMEOUT %ERRORS &print_revision &support);
-use vars qw($PROGNAME);
-use Time::HiRes qw(gettimeofday tv_interval);
-
-# Variables
-$PROGNAME = 'check_exchange';
-my $SUCCESS = 'MAPI_E_SUCCESS';
-my $MYTIME = 10;
-my $version = "1.0";
-my $verbose = 0;
-my $pdb = '/usr/lib/nagios/plugins/check_exchange.ldb';
-my $cmd = 'openchangeclient';
-my $author = "Bill Edmunds, Academic Services, University of Exeter";
-my $email = 'W.Edmunds@exeter.ac.uk';
-my ($host, $stime, $etime, $warning, $critical);
-our($opt_h, $opt_V, $opt_v, $opt_H, $opt_d, $opt_w, $opt_c);
-my $status = 'UNKNOWN';
-
-$ENV{'BASH_ENV'}=''; 
-$ENV{'ENV'}='';
-$ENV{'PATH'}='/usr/local/samba/bin';
-$ENV{'LC_ALL'}='C';
-
-# Options
-use Getopt::Long;
-Getopt::Long::Configure('bundling');
-GetOptions(
-        "V"   => \$opt_V, "version"    => \$opt_V,
-        "h"   => \$opt_h, "help"       => \$opt_h,
-        "v+"  => \$opt_v, "verbose+"   => \$opt_v,
-        "H=s" => \$opt_H, "hostname=s" => \$opt_H,
-        "d=s" => \$opt_d, "database=s" => \$opt_d,
-        "w=f" => \$opt_w, "warning=f"  => \$opt_w,
-        "c=f" => \$opt_c, "critical=f" => \$opt_c,
-);
-
-# -h means help
-if ($opt_h) {
-    print_help();
-    exit $ERRORS{'OK'};
-}
-
-# -V means version
-if ($opt_V) {
-    print_revision($PROGNAME, "\$Revision: $version \$ ");
-    exit $ERRORS{'OK'};
-}
-
-# -v means verbose
-if ($opt_v) {
-    $verbose = 1;
-    print "$PROGNAME: Check access to MS Exchange via Openchange client\n\n";
-}
-
-# -H means host/profile name
-$opt_H || plugin_error("No hostname specified");
-
-if (! utils::is_hostname($opt_H)){
-        plugin_error("$opt_H is not a valid host name");
-} else {
-        $host = $opt_H;
-}
-
-# -d means profile database name
-if (defined($opt_d) && -r $opt_d) {
-    $pdb = $opt_d;
-} else {
-    plugin_error("No profile database available") if ! -r $pdb;
-}
-
-$verbose && print "$PROGNAME: Profile database is $pdb\n\n";
-
-# -c means critical threshold
-if ($opt_c && $opt_c =~ /^\d+\.*\d*$/ && $opt_c < $TIMEOUT) {
-        $critical = $opt_c;
-} else {
-        plugin_error("Specify critical threshold 0.1 - $TIMEOUT");
-}
-
-# -w means warning threshold
-if ($opt_w =~ /^\d+\.*\d*/ && $opt_w < $critical) {
-        $warning = $opt_w;
-} else {
-        plugin_error("Specify warning threshold 0.0 - $critical");
-}
-
-# Timeout
-if (defined($TIMEOUT)) {
-  $verbose && print "$PROGNAME: Alarm set at $TIMEOUT\n\n";
-  alarm($TIMEOUT);
-} else {
-  $verbose && print "$PROGNAME: Alarm set at $MYTIME\n\n";
-  alarm($MYTIME);
-}
-
-$stime = [gettimeofday];
-$verbose && print "$PROGNAME: Running $cmd -f $pdb -p $host -F\n\n";
-open(CMD, "$cmd -f $pdb -p $host -F |") || plugin_error("Can't run openchangeclient");
-while(<CMD>) {
-    if ($verbose > 1)  { print "$PROGNAME: $_"; }
-    $status = 'OK' if /$SUCCESS/io;
-    last if $status eq 'OK';
-}
-$etime = tv_interval($stime);
-
-$status = 'CRITICAL' if ($etime >= $critical || $status eq 'UNKNOWN');
-$status = 'WARNING' if ($etime >= $warning && $status ne 'CRITICAL');
-
-$verbose && print "$PROGNAME: status $status\n\n";
-
-#print "Elapsed time: $etime|time=$etime\n";
-# update to include measurement unit for Centreon graphs
-printf "Elapsed time: %s|time=%ss\n",$etime,$etime;
-
-exit $ERRORS{"$status"};
-
-# print_usage: Print usage information
-sub print_usage {
-    print <<EndOfUsage
-Usage: 
- $PROGNAME -H HOSTNAME [-d DATABASE] -w WTIME -c CTIME [-v]
- $PROGNAME [-h | --help]
- $PROGNAME [-V | --version]
-EndOfUsage
-}
-
-# print_help: Print help information
-sub print_help {
-    print_revision($PROGNAME, "\$Revision: $version \$ ");
-    print <<EndOfHelp;
-
-Author: $author
-$email
-License: GNU General Public License
-
-$PROGNAME: Check access to MS Exchange via Openchange client
-
-EndOfHelp
-    print_usage();
-    print <<EndOfHelp;
-
-Options:
- -h, --help
-    Print detailed help screen.
- -V, --version
-    Print version information.
- -v, --verbose
-    Print verbose information.
- -H HOSTNAME, --hostname=HOSTNAME
-    Use HOSTNAME as the MS Exchange host (Note: this is actually the
-    profile name within the Openchange profile database. The associated
-    host information is stored against the profile information).
- -d DATABASE, --database=DATABASE
-    Use DATABASE as the profile database (Note: the profile name
-    should match the HOSTNAME above).
- -w WTIME, --warning=WTIME
-    Exit with WARNING status if time exceeds WTIME.
- -c CTIME, --critical=CTIME
-    Exit with CRITICAL status if time exceeds CTIME.
-
-Profile database:
-    Location currently set to:
-       $pdb
-
-Created using:
-    mapiprofile -f <DATABASE> -P <HOSTNAME> -u <USERNAME> -p <PASSWORD> -M LOCALHOST
-                -D <DOMAIN> -I <IPADDRESS> -c
-
-Note that HOSTNAME is strictly the profile name, and the host connection is really derived
-from the IPADDRESS.
-
-The author wishes to offer thanks to the OpenChange team at: openchange.org
-EndOfHelp
-}
-
-sub plugin_error {
-    my $msg = $_[0];
-    print STDERR "$PROGNAME: $msg\n";
-    print_usage();
-    exit $ERRORS{'UNKNOWN'};
-}
diff --git a/branches/plugfest/script/installman.sh b/branches/plugfest/script/installman.sh
deleted file mode 100755 (executable)
index 480b1d8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-MANDIR=$1
-shift 1
-MANPAGES=$*
-
-for I in $MANPAGES
-do
-       SECTION=`echo $I | grep -o '.$'`
-       DIR="$MANDIR/man$SECTION"
-       if [ ! -d "$DIR" ]
-       then
-               mkdir -p "$DIR"
-       fi
-
-       BASE=`basename $I`
-       
-       echo "Installing manpage \"$BASE\" in $DIR"
-       cp $I $DIR
-done
-
-cat << EOF
-======================================================================
-The man pages have been installed. You may uninstall them using the command
-the command "make uninstallman" or make "uninstall" to uninstall binaries,
-man pages and shell scripts.
-======================================================================
-EOF
-
-exit 0
diff --git a/branches/plugfest/script/installoc.sh b/branches/plugfest/script/installoc.sh
deleted file mode 100755 (executable)
index 078521a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-# install OpenChange miscellaneous files
-
-SRCDIR="$1"
-JSDIR="$2"
-SETUPDIR="$3"
-
-cd $SRCDIR || exit 1
-
-echo "Installing OpenChange js libs.."
-cp libmapi/setup/scripting/libjs/*.js $JSDIR || exit 1
-echo "Done.."
-
-echo "Installing OpenChange setup templates.."
-cp libmapi/setup/*.ldif $SETUPDIR || exit 1
-echo "All Ok"
-
-exit 0
diff --git a/branches/plugfest/script/installsamba4.sh b/branches/plugfest/script/installsamba4.sh
deleted file mode 100755 (executable)
index 1111405..0000000
+++ /dev/null
@@ -1,409 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# VARS
-#
-. `dirname $0`/samba4_ver.sh
-
-if which gmake 2>/dev/null; then
-       MAKE=gmake
-else
-       MAKE=make
-fi
-
-# If you have a samba checkout (even not up-to-date), you can make this a lot faster using --reference, e.g.
-# SAMBA_GIT_REFERENCE="--reference $HOME/samba-master"
-if test x"$SAMBA_GIT_REPO" = x""; then
-    SAMBA_GIT_REPO=git://git.samba.org/samba.git
-fi
-
-# Set SAMBA_PREFIX to wherever you want to install to. Defaults to /usr/local/samba, as if you did the build manually
-if test x"$SAMBA_PREFIX" = x""; then
-    SAMBA_PREFIX="/usr/local/samba"
-fi
-
-# use ccache for faster rebuild, where available
-if which ccache 2>/dev/null; then
-       export CC="ccache gcc"
-else
-       export CC="gcc"
-fi
-
-export PKG_CONFIG_PATH=$SAMBA_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
-pythondir=`python -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,'/')"`
-export PYTHONPATH=$SAMBA_PREFIX$pythondir:$PYTHONPATH
-
-RUNDIR=`dirname $0`
-HOST_OS=`$RUNDIR/../config.guess`
-
-#
-# Error check
-#
-error_check() {
-    error=$1
-    step=$2
-
-    if [ $error -ne 0 ]; then
-       echo "Error in $2 (error code $1)"
-       exit 1
-    fi
-}
-
-cleanup_lib() {
-    lib="$1"
-    if test -f samba4/$lib/Makefile; then
-       echo "cleaning up $lib directory"
-       pushd samba4/$lib
-       $MAKE distclean
-       popd
-    fi
-}
-
-cleanup_talloc() {
-    cleanup_lib "lib/talloc"
-}
-
-cleanup_tdb() {
-    cleanup_lib "lib/tdb"
-}
-
-cleanup_ldb() {
-    cleanup_lib "source4/lib/ldb"
-}
-
-delete_install() {
-
-    # cleanup existing existing samba4 installation
-    if test -d $SAMBA_PREFIX; then
-       echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-       echo "A previous samba4 installation has been detected in $SAMBA_PREFIX"
-       echo "It is highly recommended to delete it prior compiling Samba4"
-       echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-       echo ""
-       echo -n "Proceed removing all of $SAMBA_PREFIX? [Yn]: "
-       read answer
-       case "$answer" in
-           Y|y|yes)
-               echo "Step0: Removing previous samba4 installation"
-               if test -w $SAMBA_PREFIX; then
-                   rm -rf $SAMBA_PREFIX
-               else
-                   sudo rm -rf $SAMBA_PREFIX
-               fi
-               ;;
-           N|n|no)
-               echo "Step0: Keep previous samba4 installation"
-               ;;
-       esac
-    fi
-
-    cleanup_talloc
-    cleanup_tdb
-    cleanup_ldb
-}
-
-#
-# Checkout Samba4
-#
-checkout() {
-    GITPATH=`whereis -b git`
-
-    if test x"$GITPATH" = x"git:"; then
-       echo "git was not found in your path!"
-       echo "Please install git"
-       exit 1
-    fi
-
-    echo "Step1: Fetching Samba4 latest GIT revision"
-    git clone $SAMBA_GIT_REPO $SAMBA_GIT_REFERENCE samba4
-    error_check $? "Step1"
-
-    echo "Step2: Creating openchange local copy"
-    pushd samba4
-    git checkout -b openchange origin/master
-    error_check $? "Step2"
-
-    if test x"$SAMBA4_GIT_REV" != x""; then
-       echo "Step3: Revert to commit $SAMBA4_GIT_REV"
-       git reset --hard $SAMBA4_GIT_REV
-       error_check $? "Step3"
-    fi
-    popd
-    return $?
-}
-
-#
-# Update Samba4
-#
-update() {
-    GITPATH=`whereis -b git`
-
-    if test x"$GITPATH" = x"git:"; then
-       echo "git was not found in your path!"
-       echo "Please install git"
-       exit 1
-    fi
-
-    echo "Step1: Update Samba4 to latest GIT revision"
-    pushd samba4
-    git pull 
-    error_check $? "Step1"
-
-    if test x"$SAMBA4_GIT_REV" != x""; then
-       echo "Step3: Revert to commit $SAMBA4_GIT_REV"
-       git reset --hard $SAMBA4_GIT_REV
-       error_check $? "Step3"
-    fi
-    popd
-    return $?
-}
-
-#
-# Download Samba4 release
-#
-download() {
-    WGETPATH=`whereis -b wget`
-    TARPATH=`whereis -b tar`
-
-    if test x"$WGETPATH" = x"wget:"; then
-       echo "wget was not found in your path!"
-       echo "Please install wget"
-       exit 1
-    fi
-
-    if test x"$TARPATH" = x"tar:"; then
-       echo "tar was not found in your path!"
-       echo "Please install tar"
-       exit 1
-    fi
-
-    echo "Step0: Checking for previous samba4 directory"
-    if test -d samba4; then
-       echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-       echo "A previous samba4 directory has been detected in current folder."
-       echo "Should we delete the existing samba4 directory?"
-       echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-       echo ""
-       echo -n "Proceed? [Yn]: "
-       read answer
-       case "$answer" in
-           Y|y|yes)
-               echo "Step0: removing previous samba4 directory"
-               rm -rf samba4
-               ;;
-           N|n|no)
-               echo "Step0: Keep existing directory"
-               return
-               ;;
-       esac
-    fi
-
-    echo "Step2: Fetching samba-$SAMBA4_RELEASE tarball"
-    if ! test -e samba-$SAMBA4_RELEASE.tar.gz; then
-       rm -rf samba-$SAMBA4_RELEASE.tar.gz
-       wget http://us1.samba.org/samba/ftp/samba4/samba-$SAMBA4_RELEASE.tar.gz
-       error_check $? "Step1"
-    fi     
-
-    echo "Step3: Extracting $SAMBA4_RELEASE"
-    tar xzvf samba-$SAMBA4_RELEASE.tar.gz
-    error_check $? "Step2"
-    mv samba-$SAMBA4_RELEASE samba4
-
-    return $?
-}
-
-#
-# Apply patches to samba4
-#
-patch() {
-    case "$HOST_OS" in
-       *freebsd*)
-
-           echo "[+] Patching heimdal for FreeBSD"
-           pushd samba4/source4/heimdal/lib/roken
-           sed "s/#if defined(HAVE_OPENPTY) || defined(__linux) || defined(__osf__)/#if defined(HAVE_OPENPTY) || defined(__linux) || defined(__osf__) || defined(__FreeBSD__)/g" rkpty.c > rkpty2.c
-           mv rkpty2.c rkpty.c
-           sed -e "54i\\
-#if defined(__FreeBSD__)\\
-#include <sys/ioctl.h>\\
-#include <termios.h>\\
-#include <libutil.h>\\
-#endif" rkpty.c > rkpty2.c
-           mv rkpty2.c rkpty.c
-           popd
-           ;;
-    esac
-
-    return $?
-}
-
-#
-# Compile and Install samba4 packages:
-# talloc, tdb, tevent, ldb
-#
-packages() {
-    delete_install
-
-    for lib in lib/talloc lib/tdb lib/tevent source4/lib/ldb; do
-       echo "Building and installing $lib library"
-       pushd samba4/$lib
-       error_check $? "$lib setup"
-
-       echo ./configure -C --prefix=$SAMBA_PREFIX --enable-developer --bundled-libraries=NONE
-       ./configure -C --prefix=$SAMBA_PREFIX --enable-developer --bundled-libraries=NONE
-       error_check $? "$lib configure"
-
-       $MAKE -j
-       error_check $? "$lib make"
-
-       if test -w `dirname $SAMBA_PREFIX`; then
-           $MAKE install
-           error_check $? "$lib make install"
-       else
-           sudo $MAKE install
-           error_check $? "$lib sudo make install"
-       fi
-
-
-       $MAKE distclean
-       error_check $? "$lib make distclean"
-
-       popd
-    done
-}
-
-#
-# Compile Samba4
-#
-compile() {
-    echo "Step1: Preparing Samba4 system"
-    pushd samba4
-    error_check $? "samba4 setup"
-
-    ./configure.developer -C --prefix=$SAMBA_PREFIX
-    error_check $? "samba4 configure"
-
-    echo "Step2: Compile Samba4 (Source)"
-    $MAKE -j
-    error_check $? "samba4 make"
-
-    popd
-}
-
-#
-# Post install operations
-#
-post_install() {
-    case "$HOST_OS" in
-       *freebsd*)
-           pushd samba4/pidl
-           error_check $? "post_install setup"
-           if test -w `dirname $SAMBA_PREFIX`; then
-               $MAKE install
-               error_check $? "post make install"
-           else
-               sudo $MAKE install
-               error_check $? "post sudo make install"
-           fi
-           popd
-           echo "[+] Add comparison_fn_t support to ndr.h header file"
-           pushd $SAMBA_PREFIX/include
-           if test -w $SAMBA_PREFIX/include; then
-               sed -e "34i\\
-#if defined(__FreeBSD__)\\
-# ifndef HAVE_COMPARISON_FN_T\\
-typedef int (*comparison_fn_t)(const void *, const void *);\\
-# endif\\
-#endif" ndr.h > /tmp/ndr.h
-               mv /tmp/ndr.h ndr.h
-           else
-               sudo sed -e "34i\\
-#if defined(__FreeBSD__)\\
-# ifndef HAVE_COMPARISON_FN_T\\
-typedef int (*comparison_fn_t)(const void *, const void *);\\
-# endif\\
-#endif" ndr.h > /tmp/ndr.h
-               sudo mv /tmp/ndr.h ndr.h
-           fi
-           popd
-           ;;
-    esac
-}
-
-#
-# Install Samba4
-#
-install() {
-    echo "Step1: Installing Samba"
-    echo "===> we are in $PWD"
-    pushd samba4
-    error_check $? "samba4 setup"
-
-    if test -w `dirname $SAMBA_PREFIX`; then
-       $MAKE install
-       error_check $? "samba4 install"
-    else
-       sudo $MAKE install
-       error_check $? "samba4 install"
-    fi
-
-    popd
-}
-
-
-#
-# main program
-#
-case $1 in
-    checkout)
-       checkout
-       ;;
-    download)
-       download
-       ;;
-    patch)
-       patch
-       ;;
-    packages)
-       packages
-       ;;
-    compile)
-       compile
-       ;;
-    install)
-       install
-       ;;
-    post_install)
-       post_install
-       ;;
-    git-all)
-       checkout
-       patch
-       packages
-       compile
-       install
-       post_install
-       ;;
-    git-update)
-       update
-       packages
-       compile
-       install
-       post_install
-       ;;
-    all)
-       download
-       patch
-       packages
-       compile
-       install
-       post_install
-       ;;
-    *)
-       echo $"Usage: $0 {checkout|patch|packages|compile|install|post_install|git-all}"
-       echo $"Usage: $0 {download|patch|packages|compile|install|post_install|all}"
-       ;;
-esac
-
-exit 0
diff --git a/branches/plugfest/script/mapi_object_init.prop b/branches/plugfest/script/mapi_object_init.prop
deleted file mode 100644 (file)
index 111e872..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-void
-uno_check(void)
-{      /* warning, named args to select() are currently not supported */
-
-       if (select("mapi_object_init", FCALL, NONE))    /* unmarked symbols of type function call */
-       {       if (select("", USE, NONE))              /* unmarked symbols USEd in those stmnts */
-               {       if (match(1, DEF, NONE))        /* are there matching symbols with mark 1? */
-                               error("mapi_object_init follows mapi_object_init");
-                       else
-                               mark(1);                /* mark 1 */
-               }
-       }
-
-       if (select("mapi_object_release", FCALL, NONE))
-       {       if (select("", USE, NONE))
-               {       if (match(1, USE, NONE))
-                               unmark();               /* remove mark */
-                       else
-                               error("mapi_object_release without mapi_object_init");
-               } else
-                       error("no argument to mapi_object_release");
-       }
-
-       if (path_ends())
-       {       if (marked(1, ANY, NONE))
-               {       if (known_zero())
-                               no_error();
-                       else
-                               error("mapi_object_init without mapi_object_release");
-       }       }
-}
diff --git a/branches/plugfest/script/mkproto.pl b/branches/plugfest/script/mkproto.pl
deleted file mode 100755 (executable)
index 9c4d723..0000000
+++ /dev/null
@@ -1,287 +0,0 @@
-#!/usr/bin/perl
-# Simple script for generating prototypes for C functions
-# Written by Jelmer Vernooij
-# based on the original mkproto.sh by Andrew Tridgell
-
-use strict;
-
-# don't use warnings module as it is not portable enough
-# use warnings;
-
-use Getopt::Long;
-
-#####################################################################
-# read a file into a string
-
-my $public_file = undef;
-my $private_file = undef;
-my $public_define = undef;
-my $private_define = undef;
-my $_public = "";
-my $_private = "";
-my $public_data = \$_public;
-my $private_data = \$_private;
-
-sub public($)
-{
-       my ($d) = @_;
-       $$public_data .= $d;
-}
-
-sub private($)
-{
-       my ($d) = @_;
-       $$private_data .= $d;
-}
-
-sub usage()
-{
-       print "Usage: mkproto.pl [options] [c files]\n";
-       print "OPTIONS:\n";
-       print "  --public=FILE          Write prototypes for public functions to FILE\n";
-       print "  --private=FILE         Write prototypes for private functions to FILE\n";
-       print "  --define=DEF           Use DEF to check whether header was already included\n";
-       print "  --public-define=DEF    Same as --define, but just for public header\n";
-       print "  --private-define=DEF   Same as --define, but just for private header\n";
-       print "  --help                 Print this help message\n\n";
-       exit 0;
-}
-
-GetOptions(
-       'public=s' => sub { my ($f,$v) = @_; $public_file = $v; },
-       'private=s' => sub { my ($f,$v) = @_; $private_file = $v; },
-       'define=s' => sub { 
-               my ($f,$v) = @_; 
-               $public_define = $v; 
-               $private_define = "$v\_PRIVATE"; 
-       },
-       'public-define=s' => \$public_define,
-       'private-define=s' => \$private_define,
-       'help' => \&usage
-) or exit(1);
-
-if (not defined($public_define) and defined($public_file)) {
-       $public_define = ".." . uc($public_file) . "__";
-       $public_define =~ tr{./}{__};
-} elsif (not defined($public_define)) {
-       $public_define = '_PROTO_H_';
-}
-
-if (not defined($private_define) and defined($private_file)) {
-       $private_define = "__" . uc($private_file) . "__";
-       $private_define =~ tr{./}{__};
-} elsif (not defined($public_define)) {
-       $public_define = '_PROTO_H_';
-}
-
-if ((defined($private_file) and defined($public_file) and ($private_file eq $public_file)) or 
-       (not defined($private_file) and not defined($public_file))) {
-       $private_data = $public_data;
-}
-
-sub file_load($)
-{
-    my($filename) = shift;
-    local(*INPUTFILE);
-    open(INPUTFILE, $filename) || return undef;
-    my($saved_delim) = $/;
-    undef $/;
-    my($data) = <INPUTFILE>;
-    close(INPUTFILE);
-    $/ = $saved_delim;
-    return $data;
-}
-
-sub print_header($$)
-{
-       my ($file, $header_name) = @_;
-       $file->("#ifndef $header_name\n");
-       $file->("#define $header_name\n\n");
-       $file->("#undef _PRINTF_ATTRIBUTE\n");
-       $file->("#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)\n\n");
-       $file->("#ifndef __BEGIN_DECLS\n");
-       $file->("#ifdef __cplusplus\n");
-       $file->("#define __BEGIN_DECLS          extern \"C\" {\n");
-       $file->("#define __END_DECLS            }\n");
-       $file->("#else\n");
-       $file->("#define __BEGIN_DECLS\n");
-       $file->("#define __END_DECLS\n");
-       $file->("#endif\n");
-       $file->("#endif\n");
-       $file->("\n__BEGIN_DECLS\n\n");
-       $file->("/* This file was automatically generated by mkproto.pl. DO NOT EDIT */\n\n");
-}
-
-sub print_footer($$) 
-{
-       my ($file, $header_name) = @_;
-       $file->("\n__END_DECLS\n\n");
-       $file->("#undef _PRINTF_ATTRIBUTE\n");
-       $file->("#define _PRINTF_ATTRIBUTE(a1, a2)\n");
-       $file->("\n#endif /* $header_name */\n\n");
-}
-
-sub handle_loadparm($$) 
-{
-       my ($file,$line) = @_;
-
-       if ($line =~ /^_PUBLIC_ FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
-               my $scope = $1;
-               my $type = $2;
-               my $name = $3;
-
-               my %tmap = (
-                           "bool" => "bool ",
-                           "CONST_STRING" => "const char *",
-                           "STRING" => "const char *",
-                           "INTEGER" => "int ",
-                           "CHAR" => "char ",
-                           "LIST" => "const char **",
-                           );
-
-               my %smap = (
-                           "GLOBAL" => "void",
-                           "LOCAL" => "int "
-                           );
-
-               $file->("$tmap{$type}$name($smap{$scope});\n");
-       }
-}
-
-sub delete_arguments($)
-{
-       my ($proto) = @_;
-
-       chomp($proto);
-
-       # If function with void argument do not process it
-       return $proto if ($proto =~ /\(void\)/);
-
-       # Remove the argument name
-       $proto =~ s/([\w],[\s])*([\*]*)(\w)*([\,\)])/$1$2$4/g;
-
-       # Remove extra space between type and sep
-       $proto =~ s/([\w]+)([\s]+)([\,\)])/$1$3/g;
-
-       # Remove any spaces between , and the next char
-       $proto =~ s/([\,])(^[\w]+)([\w\)]+)/$1 $3/g;
-       
-       # Remove tabulations
-       $proto =~ s/[\s]{2,}//g;
-
-       # Remove \n
-       $proto =~ s/[\n]+/ /g;
-
-       return $proto;
-}
-
-sub process_file($$$) 
-{
-       my ($public_file, $private_file, $filename) = @_;
-
-       $filename =~ s/\.o$/\.c/g;
-
-       open(FH, "< $filename") || die "Failed to open $filename";
-
-       $private_file->("\n/* The following definitions come from $filename  */\n\n");
-
-       while (my $line = <FH>) {             
-               my $target = \&private;
-               my $is_public = 0;
-
-               # these are ordered for maximum speed
-               next if ($line =~ /^\s/);
-             
-               next unless ($line =~ /\(/);
-
-               next if ($line =~ /^\/|[;]/);
-
-               if ($line =~ /^_PUBLIC_ FN_/) {
-                       handle_loadparm($public_file, $line);
-                       next;
-               }
-
-               if ($line =~ /^_PUBLIC_[\t ]/) {
-                       $target = \&public;
-                       $is_public = 1;
-               }
-
-               next unless ( $is_public || $line =~ /
-                             ^void|^bool|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long|
-                             ^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR|
-                             ^double|^TDB_CONTEXT|^TDB_DATA|^TALLOC_CTX|^NTTIME|^FN_|^init_module|
-                             ^GtkWidget|^GType|^smb_ucs2_t
-                             /xo);
-
-               next if ($line =~ /^int\s*main/);
-
-               if ( $line =~ /\(.*\)\s*$/o ) {
-                       chomp $line;
-                       $line = delete_arguments($line);
-                       $target->("$line;\n");
-                       next;
-               }
-
-               $line = delete_arguments($line);
-               $target->($line);
-
-               while ($line = <FH>) {
-                       if ($line =~ /\)\s*$/o) {
-                               chomp $line;
-                               $line = delete_arguments($line);
-                               $target->("$line;\n");
-                               last;
-                       }
-                       $target->($line);
-               }
-       }
-
-       close(FH);
-}
-
-print_header(\&public, $public_define);
-if ($public_file ne $private_file) {
-       print_header(\&private, $private_define);
-
-       private("/* this file contains prototypes for functions that " .
-                       "are private \n * to this subsystem or library. These functions " .
-                       "should not be \n * used outside this particular subsystem! */\n\n");
-
-       public("/* this file contains prototypes for functions that " . 
-                       "are part of \n * the public API of this subsystem or library. */\n\n");
-
-}
-
-public("#ifndef _PUBLIC_\n#define _PUBLIC_\n#endif\n\n");
-
-process_file(\&public, \&private, $_) foreach (@ARGV);
-print_footer(\&public, $public_define);
-if ($public_file ne $private_file) {
-       print_footer(\&private, $private_define);
-}
-
-if (not defined($public_file)) {
-       print STDOUT $$public_data;
-}
-
-if (not defined($private_file) and defined($public_file)) {
-       print STDOUT $$private_data;
-}
-
-my $old_public_data = file_load($public_file);
-my $old_private_data = file_load($private_file);
-
-if (not defined($old_public_data) or ($old_public_data ne $$public_data))
-{
-       open(PUBLIC, ">$public_file") or die("Can't open `$public_file': $!"); 
-       print PUBLIC "$$public_data";
-       close(PUBLIC);
-} 
-
-if (($public_file ne $private_file) and (
-       not defined($old_private_data) or ($old_private_data ne $$private_data))) {
-
-       open(PRIVATE, ">$private_file") or die("Can't open `$private_file': $!"); 
-       print PRIVATE "$$private_data";
-       close(PRIVATE);
-}
diff --git a/branches/plugfest/script/mkrelease.sh b/branches/plugfest/script/mkrelease.sh
deleted file mode 100755 (executable)
index b13754f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-#
-# ./script/mkrelease.sh VERSION NICKNAME NICKNAME2 FIRST_REVISION
-# ./script/mkrelease.sh 0.7 PHASER Phaser 308
-#
-
-TMPDIR=`mktemp openchange-XXXXX`
-rm $TMPDIR || exit 1
-svn export . $TMPDIR || exit 1
-svn log -r$4:HEAD > $TMPDIR/CHANGELOG || exit 1
-
-( cd $TMPDIR/
- ./autogen.sh || exit 1
- ./configure || exit 1
- make || exit 1
- sed -i "s/^OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=yes/OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=no/g" VERSION || exit 1
- sed -i "s/^OPENCHANGE_VERSION_RELEASE_NICKNAME=.*/OPENCHANGE_VERSION_RELEASE_NICKNAME=$3/g" VERSION || exit 1
- sed -i "s/^OPENCHANGE_VERSION_RELEASE_NUMBER=.*/OPENCHANGE_VERSION_RELEASE_NUMBER=$1/g" VERSION || exit 1
-
- ./autogen.sh || exit 1
- ./configure || exit 1
- make doxygen || exit 1
- make distclean  || exit 1
- rm .bzrignore
-) || exit 1
-
-VERSION=$1-$2
-mv $TMPDIR openchange-$VERSION || exit 1
-tar -cf openchange-$VERSION.tar openchange-$VERSION || exit 1
-echo "Now run: "
-echo "gpg --detach-sign --armor openchange-$VERSION.tar"
-echo "gzip openchange-$VERSION.tar" 
-echo "And then upload "
-echo "openchange-$VERSION.tar.gz openchange-$VERSION.tar.asc" 
diff --git a/branches/plugfest/script/mkversion.sh b/branches/plugfest/script/mkversion.sh
deleted file mode 100755 (executable)
index 1554bff..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-VERSION_FILE=$1
-OUTPUT_FILE=$2
-
-if test -z "$VERSION_FILE";then
-    $VERSION_FILE="VERSION"
-fi
-
-if test -z "$OUTPUT_FILE";then
-    $OUTPUT_FILE="libmapi/version.h"
-fi
-
-OPENCHANGE_VERSION_STRING=$3
-SOURCE_DIR=$4
-
-OPENCHANGE_MAJOR_RELEASE=`echo ${OPENCHANGE_VERSION_STRING} | cut -d. -f1`
-OPENCHANGE_MINOR_RELEASE=`echo ${OPENCHANGE_VERSION_STRING} | cut -d. -f2`
-
-OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^OPENCHANGE_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE`
-OPENCHANGE_VERSION_RELEASE_NICKNAME=`sed -n 's/^OPENCHANGE_VERSION_RELEASE_NICKNAME=//p' $SOURCE_DIR$VERSION_FILE`
-OPENCHANGE_VERSION_RELEASE_NUMBER=`sed -n 's/^OPENCHANGE_VERSION_RELEASE_NUMBER=//p' $SOURCE_DIR$VERSION_FILE`
-
-echo "/* Autogenerated by script/mkversion.h */" >> $OUTPUT_FILE
-echo "#define OPENCHANGE_MAJOR_RELEASE ${OPENCHANGE_MAJOR_RELEASE}" >> $OUTPUT_FILE
-echo "#define OPENCHANGE_MINOR_RELEASE ${OPENCHANGE_MINOR_RELEASE}" >> $OUTPUT_FILE
-
-#
-# SVN revision number
-#
-if test x"${OPENCHANGE_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
-    _SAVE_LANG=${LANG}
-    LANG=""
-    HAVEVER="no"
-
-    if test x"${HAVEVER}" != x"yes";then
-        HAVESVN=no
-        SVN_INFO=`svn info ${SOURCE_DIR} 2>/dev/null`
-        TMP_REVISION=`echo -e "${SVN_INFO}" | grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'`
-        if test -n "$TMP_REVISION"; then
-            HAVESVN=yes
-            HAVEVER=yes
-        fi
-    fi
-
-    if test x"${HAVESVN}" = x"yes";then
-        OPENCHANGE_VERSION_STRING="${OPENCHANGE_VERSION_STRING}-SVN-build-${TMP_REVISION}"
-        echo "#define OPENCHANGE_VERSION_SVN_REVISION ${TMP_REVISION}" >> $OUTPUT_FILE
-    fi
-
-    LANG=${_SAVE_LANG}
-fi
-
-if test -z "${OPENCHANGE_VERSION_RELEASE_NUMBER}";then
-    echo "#define OPENCHANGE_VERSION_OFFICIAL_STRING \"${OPENCHANGE_VERSION_STRING}\"" >> $OUTPUT_FILE
-else
-    OPENCHANGE_VERSION_STRING="${OPENCHANGE_VERSION_RELEASE_NUMBER}"
-    echo "#define OPENCHANGE_VERSION_OFFICIAL_STRING \"${OPENCHANGE_VERSION_RELEASE_NUMBER}\"" >> $OUTPUT_FILE
-fi
-
-##
-## Add a release nickname
-##
-if test -n "${OPENCHANGE_VERSION_RELEASE_NICKNAME}";then
-    echo "#define OPENCHANGE_VERSION_RELEASE_NICKNAME ${OPENCHANGE_VERSION_RELEASE_NICKNAME}" >> $OUTPUT_FILE
-    OPENCHANGE_VERSION_STRING="${OPENCHANGE_VERSION_STRING} (${OPENCHANGE_VERSION_RELEASE_NICKNAME})"
-fi
-
-echo "#define OPENCHANGE_VERSION_STRING \"${OPENCHANGE_VERSION_STRING}\"" >> $OUTPUT_FILE
-
-##
-## Add some System related information (useful for debug and report)
-##
-echo "" >> $OUTPUT_FILE
-echo "/* System related information */" >> $OUTPUT_FILE
-
-OPENCHANGE_SYS_KERNEL_NAME=`uname -s`
-OPENCHANGE_SYS_KERNEL_RELEASE=`uname -r`
-OPENCHANGE_SYS_PROCESSOR=`uname -p`
-
-echo "#define OPENCHANGE_SYS_KERNEL_NAME \"${OPENCHANGE_SYS_KERNEL_NAME}\"" >> $OUTPUT_FILE
-echo "#define OPENCHANGE_SYS_KERNEL_RELEASE \"${OPENCHANGE_SYS_KERNEL_RELEASE}\"" >> $OUTPUT_FILE
-echo "#define OPENCHANGE_SYS_PROCESSOR \"${OPENCHANGE_SYS_PROCESSOR}\"" >> $OUTPUT_FILE
-
-echo "$0: '$OUTPUT_FILE' created for OpenChange libmapi(\"${OPENCHANGE_VERSION_STRING}\")"
-
-exit 0
diff --git a/branches/plugfest/script/samba4_ver.sh b/branches/plugfest/script/samba4_ver.sh
deleted file mode 100644 (file)
index a90b4b6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-SAMBA4_GIT_REV=
-SAMBA4_GIT_VER=4.0.0alpha14
-SAMBA4_RELEASE=4.0.0alpha14
-
diff --git a/branches/plugfest/script/smoketest.sh b/branches/plugfest/script/smoketest.sh
deleted file mode 100755 (executable)
index c76b509..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/bin/sh
-
-ADMIN_USERNAME=Administrator
-ADMIN_PASSWORD=YeahWhatever
-
-TEST1_USERNAME=testuser1
-TEST1_USERPASS=testuser1
-TEST1_PROFILENAME=testuser1
-
-TEST2_USERNAME=
-TEST2_USERPASS=
-TEST2_PROFILENAME=
-
-SERVER1_NAME=
-SERVER2_NAME=
-SERVER1_IP=192.168.244.20
-
-SERVER1_DOMAIN=OPENCHANGETEST
-
-########################################################################
-# Support functions
-#
-# You shouldn't need to modify anything after this
-########################################################################
-
-declare -i TESTCOUNT=0
-declare -i TESTPOINTCOUNT=0
-TEST() {
-    TESTPOINTCOUNT=0
-    TESTCOUNT=$TESTCOUNT+1
-    echo "##############################################################"
-    echo "Test $TESTCOUNT: $1"
-    echo "##############################################################"
-}
-
-TESTPOINT() {
-    TESTPOINTCOUNT=$TESTPOINTCOUNT+1
-    echo "# Testpoint $TESTCOUNT.$TESTPOINTCOUNT: $1"
-    res=eval $1
-    echo $res
-    echo ""
-}
-
-TESTPOINT_VERSION() {
-    TOOL=$1
-    TESTPOINT "$TOOL --version"
-    TESTPOINT "$TOOL -V"
-}
-
-TESTPOINT_USAGE() {
-    TOOL=$1
-    TESTPOINT "$TOOL --help"
-    TESTPOINT "$TOOL -?"
-    TESTPOINT "$TOOL --usage"
-}
-
-########################################################################
-TEST "Verify mapiprofile"
-########################################################################
-
-TESTPOINT_VERSION "./bin/mapiprofile"
-
-TESTPOINT_USAGE "./bin/mapiprofile"
-
-## Create a test profile database
-PROFILEDB=`mktemp -u profiles.XXXXXXXXXXXXXXXXXXXXX`
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --newdb"
-
-## Check we are OK if there is no entries in the database
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --list"
-
-## Check that the languages list stuff works
-TESTPOINT "./bin/mapiprofile --listlangs"
-
-## Test point - Create an admin account profile
-
-## Test point - Set the admin account as the default
-
-## List the accounts
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --list"
-
-## Get the default account
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --getdefault"
-
-## Create a (test) user account using NTLM
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --username=$TEST1_USERNAME --password=$TEST1_USERPASS --profile=$TEST1_PROFILENAME --address=$SERVER1_IP --domain=$SERVER1_DOMAIN --create"
-
-## Test point - Create another (test) user account using Kerberos
-
-## Set the user account as the default
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --profile=$TEST1_PROFILENAME --default"
-
-## Dump a profile's contents
-TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --profile=$TEST1_PROFILENAME --dump"
-
-## Test point - Delete a profile
-
-########################################################################
-TEST "Verify openchangeclient basic functions"
-########################################################################
-
-TESTPOINT_VERSION "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
-
-TESTPOINT_USAGE "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
-
-########################################################################
-TEST "Verify openchangeclient admin functions"
-########################################################################
-
-########################################################################
-TEST "Verify openchangeclient user functions"
-########################################################################
-
-## Verify that we can get a basic mailbox list
-TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --mailbox"
-
-## Verify that we can list the users
-TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --userlist"
-
-## Verify that we can download mail
-TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --fetchmail"
-
-## Test point - verify we can send plain text mail
-
-## Test point - verify we can send HTML mail
-
-## Test point - verify we can add an attachment to a mail
-
-########################################################################
-TEST "Verify openchangeclient OCPF functions"
-########################################################################
-
-########################################################################
-TEST "Run the mapitest suite"
-########################################################################
-
-TESTPOINT_VERSION "./bin/mapitest"
-
-TESTPOINT_USAGE "./bin/mapitest"
-
-TESTPOINT ./bin/mapitest --database=$PROFILEDB --no-server
-
-## Test point - Run just one step from mapitest
-
-
-## Run mapitest as a specified user
-TESTPOINT "./bin/mapitest --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
-
-########################################################################
-TEST "Verify exchange2mbox"
-########################################################################
-
-TESTPOINT_VERSION "./bin/exchange2mbox"
-
-TESTPOINT_USAGE "./bin/exchange2mbox"
-
-########################################################################
-TEST "Verify exchange2ical"
-########################################################################
-
-TESTPOINT_VERSION "./bin/exchange2ical"
-
-TESTPOINT_USAGE "./bin/exchange2ical"
-
-## Verify basic dump of calendar
-TESTPOINT "./bin/exchange2ical --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
-
-########################################################################
-TEST "Verify locale_codepage"
-########################################################################
-
-TESTPOINT_VERSION "./bin/locale_codepage"
-
-TESTPOINT_USAGE "./bin/locale_codepage"
-
-## Check a locale ID
-TESTPOINT "./bin/locale_codepage --locale_id=0x0c09"
-
-## Verify the group listing works
-TESTPOINT "./bin/locale_codepage --list-groups"
-
-## Check a codepage
-TESTPOINT "./bin/locale_codepage --codepage=0x4B0"
-
-########################################################################
-TEST "Verify openchangepfadmin"
-########################################################################
-
-TESTPOINT_VERSION "./bin/openchangepfadmin"
-
-TESTPOINT_USAGE "./bin/openchangepfadmin"
-
-## Get the list of public folders
-TESTPOINT "./bin/openchangepfadmin --database=$PROFILEDB --profile=$TEST1_PROFILENAME --list"
-
-#############
-# Cleanup stuff
-#############
-rm $PROFILEDB
diff --git a/branches/plugfest/script/uninstallman.sh b/branches/plugfest/script/uninstallman.sh
deleted file mode 100755 (executable)
index aca8681..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-# 4 July 96 Dan.Shearer@UniSA.edu.au
-# Updated for Samba4 by Jelmer Vernooij
-
-MANDIR=$1
-shift 1
-MANPAGES=$*
-
-for I in $MANPAGES
-do
-       SECTION=`echo $I | grep -o '.$'`
-       MAN=`echo $I | grep -o '[a-zA-Z_]*\.[0-9]'`
-       FNAME=$MANDIR/man$SECTION/$MAN
-       if test -f $FNAME; then
-         echo Deleting $FNAME
-         rm -f $FNAME 
-         test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges?   
-    fi
-done
-
-cat << EOF
-======================================================================
-The man pages have been uninstalled. You may install them again using 
-the command "make installman" or make "install" to install binaries,
-man pages and shell scripts.
-======================================================================
-EOF
-exit 0
diff --git a/branches/plugfest/script/uno.dfn b/branches/plugfest/script/uno.dfn
deleted file mode 100644 (file)
index c1bede9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UnoType _Bool;
diff --git a/branches/plugfest/setup/AD/oc_provision_configuration.ldif b/branches/plugfest/setup/AD/oc_provision_configuration.ldif
deleted file mode 100644 (file)
index b2c1d66..0000000
+++ /dev/null
@@ -1,2000 +0,0 @@
-################################################################
-# CN=Services,${CONFIGDN} records
-################################################################
-
-
-#
-# Exchange configuration information object
-# This object stores configuration information for the Exchange Server 
-#
-dn: CN=Microsoft Exchange,CN=Services,${CONFIGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchConfigurationContainer
-cn: Microsoft Exchange
-distinguishedName: CN=Microsoft Exchange,CN=Services,${CONFIGDN}
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Microsoft Exchange
-name: Microsoft Exchange
-objectCategory: CN=ms-Exch-Configuration-Container,${SCHEMADN}
-addressBookRoots: CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-globalAddressList: CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-templateRoots: CN=Addressing,${FIRSTORGDN}
-#msExchPolicyRoots: CN=System Policies,${FIRSTORGDN}
-#msExchPolicyRoots: CN=Recipient Policies,${FIRSTORGDN}
-
-
-#
-# First Organization
-#
-dn: ${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchOrganizationContainer
-cn: First Organization
-distinguishedName: ${FIRSTORGDN}
-showInAdvancedViewOnly: TRUE
-adminDisplayName: {335A1087-5131-4D45-BE3E-3C6C7F76F5EC}
-name: ${FIRSTORG}
-legacyExchangeDN: /o=${FIRSTORG}
-objectCategory: CN=ms-Exch-Organization-Container,${SCHEMADN}
-
-
-#
-# Administrative Groups
-#
-dn: CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchAdminGroupContainer
-cn: Administrative Groups
-distinguishedName: CN=Administrative Groups,${FIRSTORGDN}
-displayName: Administrative Groups
-showInAdvancedViewOnly: TRUE
-name: Administrative Groups
-objectCategory: CN=ms-Exch-Admin-Group-Container,${SCHEMADN}
-
-
-#
-# First Administrative Group
-#
-dn: CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: msExchAdminGroup
-cn: First Administrative Group
-distinguishedName: CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-displayName: First Administrative Group
-showInAdvancedViewOnly: TRUE
-siteFolderGUID: 4b2d197b-1cb3-486a-b8c3-42e8c5c08e27
-siteFolderServer: CN=Public Folder Store (${FIRSTORG}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-name: First Administrative Group
-legacyExchangeDN: /o=${FIRSTORG}/ou=First Administrative Group
-objectCategory: CN=ms-Exch-Admin-Group,${SCHEMADN}
-msExchAdminGroupMode: 0
-msExchDefaultAdminGroup: TRUE
-
-#
-# Servers
-#
-dn: CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchServersContainer
-cn: Servers
-distinguishedName: CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN} 
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Servers
-containerInfo: 8
-name: Servers
-objectCategory: CN=ms-Exch-Servers-Container,${SCHEMADN}
-
-
-#
-# The OpenChange Server object
-#
-dn: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: server
-objectClass: msExchExchangeServer
-cn: ${NETBIOSNAME}
-serialNumber: Version 6.5 (Build 6944.4)
-distinguishedName: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ${NETBIOSNAME}
-messageTrackingEnabled: FALSE
-networkAddress: ncacn_vns_spp:${NETBIOSNAME}
-networkAddress: netbios:${NETBIOSNAME}
-networkAddress: ncacn_np:${NETBIOSNAME}
-networkAddress: ncacn_spx:${NETBIOSNAME}
-networkAddress: ncacn_ip_tcp:${HOSTNAME}.${DNSDOMAIN}
-networkAddress: ncalrpc:${NETBIOSNAME}
-name: ${NETBIOSNAME}
-versionNumber: 6944
-serverRole: 0
-legacyExchangeDN: /o=${FIRSTORG}/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=${NETBIOSNAME}
-objectCategory: CN=ms-Exch-Exchange-Server,${SCHEMADN}
-#msExchHomeRoutingGroup: CN=First Routing Group,CN=Routing Groups,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchMessageTrackLogFilter: -262145
-msExchTrkLogCleaningInterval: 7
-#msExchResponsibleMTAServer: CN=Microsoft MTA,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchMailboxManagerActivationStyle: 0
-msExchMailboxManagerAdminMode: 2
-
-#
-# Information Store
-#
-dn: CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchInformationStore
-cn: InformationStore
-distinguishedName: CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-showInAdvancedViewOnly: TRUE
-adminDisplayName: InformationStore
-name: InformationStore
-objectCategory: CN=ms-Exch-Information-Store,${SCHEMADN}
-
-
-#
-# First Storage Group
-#
-dn: CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchStorageGroup
-cn: First Storage Group
-distinguishedName: CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-showInAdvancedViewOnly: TRUE
-adminDisplayName: First Storage Group
-name: First Storage Group
-systemFlags: 1610612736
-objectCategory: CN=ms-Exch-Storage-Group,${SCHEMADN}
-
-#
-# Public Folder Store (${NETBIOSNAME})
-#
-dn: CN=Public Folder Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: msExchMDB
-objectClass: msExchPublicMDB
-cn: Public Folder Store (${NETBIOSNAME})
-distinguishedName: CN=Public Folder Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-displayName: Public Folder Store (${NETBIOSNAME})
-activationStyle: 1
-messageSizeLimit: 10240
-showInAdvancedViewOnly: TRUE
-homeMTA: CN=Microsoft MTA,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-adminDisplayName: Public Folder Store (${NETBIOSNAME})
-proxyAddresses: SMTP:${NETBIOSNAME}-IS@${DNSDOMAIN}
-proxyAddresses: X400:c=US;a= ;p=First Organizati;o=Exchange;s=EXCH2K3-IS;
-deliveryMechanism: 1
-garbageCollPeriod: 604800
-quotaNotificationStyle: 1
-# TODO: determine if this needs to go back in, and overcome the linked attribute issue.
-# See http://tracker.openchange.org/issues/252
-# homeMDBBL: CN=SMTP (${NETBIOSNAME}-{E95EE010-3E8A-425B-806F-15ED60887F6B}),CN=Connections,${FIRSTORGDN}
-mailNickname: ${NETBIOSNAME}-IS
-name: Public Folder Store (${NETBIOSNAME})
-systemFlags: 1610612736
-legacyExchangeDN: /o=${FIRSTORG}/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=${NETBIOSNAME}/cn=Microsoft Public MDB
-objectCategory: CN=ms-Exch-Public-MDB,${SCHEMADN}
-textEncodedORAddress: c=US;a= ;p=First Organizati;o=Exchange;s=${NETBIOSNAME}-IS;
-mail: ${NETBIOSNAME}-IS@${DNSDOMAIN}
-msExchOwningServer: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-#msExchOwningPFTree: CN=Public Folders,CN=Folder Hierarchies,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchMaxCachedViews: 11
-msExchDatabaseCreated: TRUE
-msExchPoliciesIncluded: {627410A4-E1A9-4DD0-9568-FA22DEACB6B8},{26491CFC-9E50-
- 4857-861B-0CB8DF22B5D7}
-
-#
-# Address Lists Containers
-# description: Address book root container
-#
-dn: CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Address Lists Container
-distinguishedName: CN=Address Lists Container,${FIRSTORGDN}
-instanceType: 4
-displayName: Address Lists Container
-showInAdvancedViewOnly: TRUE
-name: Address Lists Container
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-#
-# Offline Address Lists
-#
-dn: CN=Offline Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Offline Address Lists
-distinguishedName: CN=Offline Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: Offline Address Lists
-showInAdvancedViewOnly: TRUE
-name: Offline Address Lists
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-
-#
-# Default Offline Address List
-#
-dn: CN=Default Offline Address List,CN=Offline Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: msExchOAB
-cn: Default Offline Address List
-distinguishedName: CN=Default Offline Address List,CN=Offline Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-showInAdvancedViewOnly: TRUE
-offLineABStyle: 1
-offLineABContainers: CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-offLineABSchedule:: AAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAA
-offLineABServer: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-siteFolderGUID: e72eae5f-ee8e-4908-becb-fb58af7c62aa
-siteFolderServer: CN=Public Folder Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,${FIRSTORGDN}
-doOABVersion: 0
-name: Default Offline Address List
-systemFlags: 1610612736
-legacyExchangeDN: /o=${FIRSTORG}/cn=addrlists/cn=oabs/cn=Default Offline Address List
-objectCategory: CN=ms-Exch-OAB,${SCHEMADN}
-objectGUID: f4d2ff48-0a08-4f96-8cfc-967401492989
-msExchOABDefault: TRUE
-msExchOABFolder: AA==
-
-#
-# Mailbox Store (${NETBIOSNAME})
-#
-dn: CN=Mailbox Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-objectClass: top
-objectClass: msExchMDB
-objectClass: msExchPrivateMDB
-cn: Mailbox Store (${NETBIOSNAME})
-distinguishedName: CN=Mailbox Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-displayName: Mailbox Store (${NETBIOSNAME})
-activationStyle: 1
-deletedItemFlags: 5
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Mailbox Store (${NETBIOSNAME})
-deliveryMechanism: 1
-garbageCollPeriod: 604800
-quotaNotificationStyle: 1
-name: Mailbox Store (${NETBIOSNAME})
-systemFlags: 1610612736
-legacyExchangeDN: /o=${FIRSTORG}/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=${NETBIOSNAME}/cn=Microsoft Private MDB
-objectCategory: CN=ms-Exch-Private-MDB,${SCHEMADN}
-msExchUseOAB: CN=Default Offline Address List,CN=Offline Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-msExchOwningServer: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchHomePublicMDB: CN=Public Folder Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchMailboxRetentionPeriod: 2592000
-msExchMaxCachedViews: 11
-msExchDatabaseCreated: TRUE
-
-#
-# All Global Address Lists
-#
-dn: CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: All Global Address Lists
-distinguishedName: CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: All Global Address Lists
-showInAdvancedViewOnly: TRUE
-name: All Global Address Lists
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-
-#
-# Default global Address List
-#
-dn: CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: Default Global Address List
-distinguishedName: CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: Default Global Address List
-showInAdvancedViewOnly: TRUE
-name: Default Global Address List
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-purportedSearch: (& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) ))
-
-
-#
-# Recipient Update Services
-#
-dn: CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Recipient Update Services
-distinguishedName: CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-displayName: Recipient Update Services
-showInAdvancedViewOnly: TRUE
-name: Recipient Update Services
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-#
-# Recipient Update Service (${DOMAIN})
-#
-dn: CN=Recipient Update Service (${DOMAIN}),CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: msExchAddressListService
-cn: Recipient Update Service (${DOMAIN})
-distinguishedName: CN=Recipient Update Service (${DOMAIN}),CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-activationStyle: 2
-showInAdvancedViewOnly: TRUE
-name: Recipient Update Service (${DOMAIN})
-systemFlags: 1073741824
-objectCategory: CN=ms-Exch-Address-List-Service,${SCHEMADN}
-msExchServer1NetworkAddress: ${HOSTNAME}
-msExchServer1PageSize: 20
-msExchDoFullReplication: FALSE
-msExchReplicateNow: FALSE
-msExchPollInterval: 60
-msExchAddressListServiceLink: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-msExchDomainLink: ${DOMAINDN}
-msExchServer1HighestUSNVector: ${NETBIOSNAME}:53500
-msExchDomainLocalGroupGuid: {D9CA41A1-5041-4FBF-8635-23B4D0BA8A48}
-msExchDomainGlobalGroupGuid: {1E2B98D3-4FAC-4FAE-B16F-A26AB09AAE34}
-msExchDomainLocalGroupSid: S-1-5-21-1226241484-1028146065-4277480997-1110
-msExchDomainGlobalGroupSid: S-1-5-21-1226241484-1028146065-4277480997-1109
-
-#
-# Recipient Update Service (Enterprise Configuration)
-#
-#dn: CN=Recipient Update Service (Enterprise Configuration),CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-#objectClass: top
-#objectClass: msExchAddressListService
-#cn: Recipient Update Service (Enterprise Configuration)
-#distinguishedName: CN=Recipient Update Service (Enterprise Configuration),CN=Recipient Update Services,CN=Address Lists Container,${FIRSTORGDN}
-#activationStyle: 2
-#showInAdvancedViewOnly: TRUE
-#name: Recipient Update Service (Enterprise Configuration)
-#systemFlags: 1073741824
-#objectCategory: CN=ms-Exch-Address-List-Service,CN=Schema,CN=Configuration,DC=openchange2003,DC=local
-#msExchServer1NetworkAddress: ${HOSTNAME}
-#msExchServer1PageSize: 20
-#msExchDoFullReplication: FALSE
-#msExchReplicateNow: FALSE
-#msExchPollInterval: 60
-#msExchAddressListServiceLink: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,${FIRSTORGDN}
-#msExchDomainLink: CN=Configuration,${DOMAINDN}
-
-#
-# All Address Lists
-# description: Address book recipient
-#
-dn: CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: All Address Lists
-distinguishedName: CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: All Address Lists
-showInAdvancedViewOnly: TRUE
-name: All Address Lists
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-
-#
-# All Users
-#
-dn: CN=All Users,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: All Users
-distinguishedName: CN=All Users,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: All Users
-showInAdvancedViewOnly: TRUE
-name: All Users
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-purportedSearch: (& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))
-
-
-#
-# All Groups
-#
-dn: CN=All Groups,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: All Groups
-distinguishedName: CN=All Groups,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: All Groups
-showInAdvancedViewOnly: TRUE
-name: All Groups
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-purportedSearch: (& (mailnickname=*) (| (objectCategory=group) ))
-
-
-#
-# All Contacts
-# description: Address book recipient
-#
-dn: CN=All Contacts,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: All Contacts
-distinguishedName: CN=All Contacts,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: All Contacts
-showInAdvancedViewOnly: TRUE
-name: All Contacts
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-purportedSearch: (& (mailnickname=*) (| (&(objectCategory=person)(objectClass=contact)) ))
-
-
-#
-# Public Folders
-# description: Address book recipient
-#
-dn: CN=Public Folders,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-objectClass: top
-objectClass: addressBookContainer
-cn: Public Folders
-distinguishedName: CN=Public Folders,CN=All Address Lists,CN=Address Lists Container,${FIRSTORGDN}
-displayName: Public Folders
-showInAdvancedViewOnly: TRUE
-name: Public Folders
-systemFlags: 1610612736
-objectCategory: CN=Address-Book-Container,${SCHEMADN}
-purportedSearch: (& (mailnickname=*) (| (objectCategory=publicFolder) ))
-
-
-#
-# Addressing
-# description:  Address container
-#
-dn: CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Addressing
-distinguishedName: CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Addressing
-containerInfo: 16
-name: Addressing
-legacyExchangeDN: /o=${FIRSTORG}/cn=Configuration/cn=Addressing
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-
-
-#
-# Address-Templates
-# description: Specifies information for a Display Template
-#
-dn: CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Address-Templates
-distinguishedName: CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-showInAdvancedViewOnly: TRUE
-adminDisplayName: One-Off Address Templates
-containerInfo: 32
-name: Address-Templates
-legacyExchangeDN: /o=${FIRSTORG}/cn=Configuration/cn=Addressing/cn=Address-Templates
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-msExchTemplateRDNs: 81A
-msExchTemplateRDNs: 403
-msExchTemplateRDNs: 422
-msExchTemplateRDNs: 427
-msExchTemplateRDNs: 426
-msExchTemplateRDNs: 425
-msExchTemplateRDNs: 402
-msExchTemplateRDNs: 424
-msExchTemplateRDNs: 41b
-msExchTemplateRDNs: 418
-msExchTemplateRDNs: 41a
-msExchTemplateRDNs: 42d
-msExchTemplateRDNs: 41e
-msExchTemplateRDNs: 40e
-msExchTemplateRDNs: 41f
-msExchTemplateRDNs: 419
-msExchTemplateRDNs: 414
-msExchTemplateRDNs: 406
-msExchTemplateRDNs: 405
-msExchTemplateRDNs: 41d
-msExchTemplateRDNs: 816
-msExchTemplateRDNs: 415
-msExchTemplateRDNs: 408
-msExchTemplateRDNs: 40b
-msExchTemplateRDNs: 413
-msExchTemplateRDNs: 416
-msExchTemplateRDNs: 40d
-msExchTemplateRDNs: 401
-msExchTemplateRDNs: 410
-msExchTemplateRDNs: C0A
-msExchTemplateRDNs: 404
-msExchTemplateRDNs: 804
-msExchTemplateRDNs: 412
-msExchTemplateRDNs: 40c
-msExchTemplateRDNs: 407
-msExchTemplateRDNs: 411
-msExchTemplateRDNs: 409
-
-
-#
-# Address-Types
-# description: E-Mail Address Generators
-#
-dn: CN=Address-Types,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Address-Types
-distinguishedName: CN=Address-Types,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-showInAdvancedViewOnly: TRUE
-adminDisplayName: E-Mail Address Generators
-containerInfo: 128
-name: Address-Types
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-
-#
-# Display-Templates
-#
-#
-dn: CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-objectClass: msExchContainer
-cn: Display-Templates
-distinguishedName: CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Details Templates
-containerInfo: 64
-name: Display-Templates
-legacyExchangeDN: /o=${FIRSTORG}/cn=Configuration/cn=Addressing/cn=Display-Templates
-objectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-#
-# Arabic Address-Templates
-#
-dn: CN=401,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 401
-distinguishedName: CN=401,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Arabic
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Arabic
-name: 401
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=401
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Bulgarian Address-Templates
-#
-dn: CN=402,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 402
-distinguishedName: CN=402,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Bulgarian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Bulgarian
-name: 402
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=402
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Catalan Address-Templates
-#
-dn: CN=403,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 403
-distinguishedName: CN=403,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Catalan
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Catalan
-name: 403
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=403
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Chinese Traditional Address-Templates
-#
-dn: CN=404,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 404
-distinguishedName: CN=404,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Chinese Traditional
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Chinese Traditional
-name: 404
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=404
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Czech Address-Templates
-#
-dn: CN=405,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 405
-distinguishedName: CN=405,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Czech
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Czech
-name: 405
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=405
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Danish Address-Templates
-#
-dn: CN=406,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 406
-distinguishedName: CN=406,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Danish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Danish
-name: 406
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=406
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# German Address-Templates
-#
-dn: CN=407,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 407
-distinguishedName: CN=407,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: German
-showInAdvancedViewOnly: TRUE
-adminDisplayName: German
-name: 407
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=407
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Greek Address-Templates
-#
-dn: CN=408,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 408
-distinguishedName: CN=408,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Greek
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Greek
-name: 408
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=408
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# English Address-Templates
-#
-dn: CN=409,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 409
-distinguishedName: CN=409,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: English
-showInAdvancedViewOnly: TRUE
-adminDisplayName: English
-name: 409
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=409
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Finish Address-Templates
-#
-dn: CN=40b,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40b
-distinguishedName: CN=40b,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Finnish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Finnish
-name: 40b
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=40b
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# French Address-Templates (cocorico)
-#
-dn: CN=40c,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40c
-distinguishedName: CN=40c,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: French
-showInAdvancedViewOnly: TRUE
-adminDisplayName: French
-name: 40c
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=40c
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Hebrew Address-Templates
-#
-dn: CN=40d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40d
-distinguishedName: CN=40d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Hebrew
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Hebrew
-name: 40d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=40d
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Hungarian Address-Templates
-#
-dn: CN=40e,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40e
-distinguishedName: CN=40e,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Hungarian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Hungarian
-name: 40e
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=40e
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Italian Address-Templates
-#
-dn: CN=410,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 410
-distinguishedName: CN=410,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Italian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Italian
-name: 410
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=410
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Japanese Address-Templates
-#
-dn: CN=411,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 411
-distinguishedName: CN=411,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Japanese
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Japanese
-name: 411
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=411
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Korean Address-Templates
-#
-dn: CN=412,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 412
-distinguishedName: CN=412,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Korean
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Korean
-name: 412
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=412
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Dutch Address-Templates
-#
-dn: CN=413,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 413
-distinguishedName: CN=413,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Dutch
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Dutch
-name: 413
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=413
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Norwegian Address-Templates
-#
-dn: CN=414,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 414
-distinguishedName: CN=414,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Norwegian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Norwegian
-name: 414
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=414
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Polish Address-Templates
-#
-dn: CN=415,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 415
-distinguishedName: CN=415,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Polish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Polish
-name: 415
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=415
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Brazilian Address-Templates (Samba)
-#
-dn: CN=416,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 416
-distinguishedName: CN=416,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Brazilian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Brazilian
-name: 416
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=416
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Romanian Address-Templates
-#
-dn: CN=418,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 418
-distinguishedName: CN=418,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Romanian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Romanian
-name: 418
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=418
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Russian Address-Templates
-#
-dn: CN=419,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 419
-distinguishedName: CN=419,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Russian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Russian
-name: 419
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=419
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Croatian Address-Templates
-#
-dn: CN=41a,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41a
-distinguishedName: CN=41a,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Croatian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Croatian
-name: 41a
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=41a
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Slovak Address-Templates
-#
-dn: CN=41b,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41b
-distinguishedName: CN=41b,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Slovak
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Slovak
-name: 41b
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=41b
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Swedish Address-Templates
-#
-dn: CN=41d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41d
-distinguishedName: CN=41d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Swedish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Swedish
-name: 41d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=41d
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Thai Address-Templates
-#
-dn: CN=41e,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41e
-distinguishedName: CN=41e,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Thai
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Thai
-name: 41e
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=41e
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Turkish Address-Templates
-#
-dn: CN=41f,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41f
-distinguishedName: CN=41f,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Turkish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Turkish
-name: 41f
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=41f
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Ukrainian Address-Templates
-#
-dn: CN=422,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 422
-distinguishedName: CN=422,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Ukrainian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Ukrainian
-name: 422
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=422
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Slovenian Address-Templates
-#
-dn: CN=424,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 424
-distinguishedName: CN=424,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Slovenian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Slovenian
-name: 424
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=424
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Estonian Address-Templates
-#
-dn: CN=425,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 425
-distinguishedName: CN=425,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Estonian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Estonian
-name: 425
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=425
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Latvian Address-Templates
-#
-dn: CN=426,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 426
-distinguishedName: CN=426,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Latvian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Latvian
-name: 426
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=426
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Lithuanian Address-Templates
-#
-dn: CN=427,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 427
-distinguishedName: CN=427,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Lithuanian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Lithuanian
-name: 427
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=427
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Basque Address-Templates
-#
-dn: CN=42d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 42d
-distinguishedName: CN=42d,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Basque
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Basque
-name: 42d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=42d
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Chinese Simplified Address-Templates
-#
-dn: CN=804,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 804
-distinguishedName: CN=804,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Chinese Simplified
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Chinese Simplified
-name: 804
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=804
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Portuguese Address-Templates
-#
-dn: CN=816,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 816
-distinguishedName: CN=816,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Portuguese
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Portuguese
-name: 816
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=816
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Serbian Address-Templates
-#
-dn: CN=81A,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 81A
-distinguishedName: CN=81A,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Serbian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Serbian
-name: 81A
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=81A
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Spanish Address-Templates
-#
-dn: CN=C0A,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: C0A
-distinguishedName: CN=C0A,CN=Address-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Spanish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Spanish
-name: C0A
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Address-Templates/CN=C0A
-objectCategory: CN=Container,${SCHEMADN}
-msExchTemplateRDNs: CCMAIL
-msExchTemplateRDNs: MSA
-msExchTemplateRDNs: SMTP
-msExchTemplateRDNs: MS
-msExchTemplateRDNs: x400
-
-
-#
-# Arabic Display-Templates
-#
-dn: CN=401,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 401
-distinguishedName: CN=401,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Arabic
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Arabic
-name: 401
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=401
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Bulgarian Display-Templates
-#
-dn: CN=402,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 402
-distinguishedName: CN=402,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Bulgarian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Bulgarian
-name: 402
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=402
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Catalan Display-Templates
-#
-dn: CN=403,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 403
-distinguishedName: CN=403,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Catalan
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Catalan
-name: 403
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=403
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Chinese Traditional Display-Templates
-#
-dn: CN=404,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 404
-distinguishedName: CN=404,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Chinese Traditional
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Chinese Traditional
-name: 404
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=404
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Czech Display-Templates
-#
-dn: CN=405,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 405
-distinguishedName: CN=405,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Czech
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Czech
-name: 405
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=405
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Danish Display-Templates
-#
-dn: CN=406,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 406
-distinguishedName: CN=406,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Danish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Danish
-name: 406
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=406
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# German Display-Templtes
-#
-dn: CN=407,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 407
-distinguishedName: CN=407,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: German
-showInAdvancedViewOnly: TRUE
-adminDisplayName: German
-name: 407
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=407
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Greek Display-Templates
-#
-dn: CN=408,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 408
-distinguishedName: CN=408,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Greek
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Greek
-name: 408
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=408
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# English Display-Templates
-#
-dn: CN=409,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 409
-distinguishedName: CN=409,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: English
-showInAdvancedViewOnly: TRUE
-adminDisplayName: English
-name: 409
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=409
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Finish Display-Templates
-#
-dn: CN=40b,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40b
-distinguishedName: CN=40b,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Finnish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Finnish
-name: 40b
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=40b
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# French Display-Templates (cocorico)
-#
-dn: CN=40c,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40c
-distinguishedName: CN=40c,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: French
-showInAdvancedViewOnly: TRUE
-adminDisplayName: French
-name: 40c
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=40c
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Hebrew Display-Templates
-#
-dn: CN=40d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40d
-distinguishedName: CN=40d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Hebrew
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Hebrew
-name: 40d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=40d
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Hungarian Display-Templates
-#
-dn: CN=40e,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 40e
-distinguishedName: CN=40e,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Hungarian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Hungarian
-name: 40e
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=40e
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Italian Display-Templates
-#
-dn: CN=410,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 410
-distinguishedName: CN=410,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Italian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Italian
-name: 410
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=410
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Japanese Display-Templates
-#
-dn: CN=411,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 411
-distinguishedName: CN=411,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Japanese
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Japanese
-name: 411
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=411
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Korean Display-Templates
-#
-dn: CN=412,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 412
-distinguishedName: CN=412,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Korean
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Korean
-name: 412
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=412
-objectCategory: CN=Container,${SCHEMADN}
-
-
-
-#
-# Dutch Display-Templates
-#
-dn: CN=413,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 413
-distinguishedName: CN=413,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Dutch
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Dutch
-name: 413
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=413
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Norwegian Display-Templates
-#
-dn: CN=414,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 414
-distinguishedName: CN=414,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Norwegian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Norwegian
-name: 414
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=414
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Polish Display-Templates
-#
-dn: CN=415,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 415
-distinguishedName: CN=415,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Polish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Polish
-name: 415
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=415
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Brazilian Display-Templates (Samba)
-#
-dn: CN=416,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 416
-distinguishedName: CN=416,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Brazilian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Brazilian
-name: 416
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=416
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Romanian Display-Templates
-#
-dn: CN=418,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 418
-distinguishedName: CN=418,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Romanian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Romanian
-name: 418
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=418
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Russian Display-Templates
-#
-dn: CN=419,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 419
-distinguishedName: CN=419,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Russian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Russian
-name: 419
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=419
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Croatian Display-Templates
-#
-dn: CN=41a,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41a
-distinguishedName: CN=41a,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Croatian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Croatian
-name: 41a
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=41a
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Slovak Display-Templates
-#
-dn: CN=41b,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41b
-distinguishedName: CN=41b,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Slovak
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Slovak
-name: 41b
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=41b
-objectCategory: CN=Container,${SCHEMADN}
-
-
-
-#
-# Swedish Display-Templates
-#
-dn: CN=41d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41d
-distinguishedName: CN=41d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Swedish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Swedish
-name: 41d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=41d
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Thai Display-Templates
-#
-dn: CN=41e,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41e
-distinguishedName: CN=41e,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Thai
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Thai
-name: 41e
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=41e
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Turkish Display-Templates
-#
-dn: CN=41f,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 41f
-distinguishedName: CN=41f,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Turkish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Turkish
-name: 41f
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=41f
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Ukrainian Display-Templates
-#
-dn: CN=422,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 422
-distinguishedName: CN=422,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Ukrainian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Ukrainian
-name: 422
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=422
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Slovenian Display-Templates
-#
-dn: CN=424,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 424
-distinguishedName: CN=424,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Slovenian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Slovenian
-name: 424
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=424
-objectCategory: CN=Container,${SCHEMADN}
-
-
-
-#
-# Estonian Display-Templates
-#
-dn: CN=425,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 425
-distinguishedName: CN=425,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Estonian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Estonian
-name: 425
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=425
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Latvian Display-Templates
-#
-dn: CN=426,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 426
-distinguishedName: CN=426,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Latvian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Latvian
-name: 426
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=426
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Lithuanian Display-Templates
-#
-dn: CN=427,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 427
-distinguishedName: CN=427,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Lithuanian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Lithuanian
-name: 427
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=427
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Basque Display-Templates
-#
-dn: CN=42d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 42d
-distinguishedName: CN=42d,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Basque
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Basque
-name: 42d
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=42d
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Chinese Simplified Display-Templates
-#
-dn: CN=804,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 804
-distinguishedName: CN=804,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Chinese Simplified
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Chinese Simplified
-name: 804
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=804
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Portuguese Display-Templates
-#
-dn: CN=816,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 816
-distinguishedName: CN=816,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Portuguese
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Portuguese
-name: 816
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=816
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Serbian Display-Templates
-#
-dn: CN=81A,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: 81A
-distinguishedName: CN=81A,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Serbian
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Serbian
-name: 81A
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=81A
-objectCategory: CN=Container,${SCHEMADN}
-
-
-#
-# Spanish Display-Templates
-#
-dn: CN=C0A,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-objectClass: top
-objectClass: container
-cn: C0A
-distinguishedName: CN=C0A,CN=Display-Templates,CN=Addressing,${FIRSTORGDN}
-instanceType: 4
-displayName: Spanish
-showInAdvancedViewOnly: TRUE
-adminDisplayName: Spanish
-name: C0A
-legacyExchangeDN: /o=${FIRSTORG}/CN=Configuration/CN=Addressing/CN=Display-Templates/CN=C0A
-objectCategory: CN=Container,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema.ldif b/branches/plugfest/setup/AD/oc_provision_schema.ldif
deleted file mode 100644 (file)
index 722c8ff..0000000
+++ /dev/null
@@ -1,3063 +0,0 @@
-##############################################################################
-# Classes added
-##############################################################################
-
-dn: CN=ms-Exch-Addressing-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Addressing-Policy
-distinguishedName: CN=ms-Exch-Addressing-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50008
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchProxyGenServer
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-mayContain: gatewayProxy
-mayContain: disabledGatewayProxy
-mayContain: msExchAliasGenUniqueness
-mayContain: msExchAliasGenType
-mayContain: msExchAliasGenFormat
-rDNAttID: cn
-uSNChanged: 16956
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Addressing-Policy
-adminDescription: ms-Exch-Addressing-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAddressingPolicy
-name: ms-Exch-Addressing-Policy
-schemaIDGUID: e7211f02-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Addressing-Policy,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Address-List-Service
-# Domain-wide configuration object for the Address List Service.
-#
-dn: CN=ms-Exch-Address-List-Service,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Address-List-Service
-distinguishedName: CN=ms-Exch-Address-List-Service,${SCHEMADN}
-possSuperiors: exchangeAdminService
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.2
-mayContain: msExchMinAdminVersion
-mayContain: msExchDomainLocalGroupSid
-mayContain: msExchDomainLocalGroupGuid
-mayContain: msExchDomainGlobalGroupSid
-mayContain: msExchDomainGlobalGroupGuid
-mayContain: msExchProcessedSids
-mayContain: gatewayProxy
-mayContain: msExchEncryptedPassword
-mayContain: msExchServer2LastUpdateTime
-mayContain: msExchServer2HighestUSNVector
-mayContain: msExchServer2HighestUSN
-mayContain: msExchServer2Flags
-mayContain: msExchServer1HighestUSNVector
-mayContain: msExchServer1AuthenticationPassword
-mayContain: msExchServer1AuthenticationCredentials
-mayContain: msExchMasterServiceBL
-mayContain: exportContainers
-mayContain: msExchServer1SearchFilter
-mayContain: msExchServer1NetworkAddress
-mayContain: msExchServer1PageSize
-mayContain: msExchServer1LastUpdateTime
-mayContain: msExchServer1HighestUSN
-mayContain: msExchServer1Flags
-mayContain: msExchReplicateNow
-mayContain: msExchPollInterval
-mayContain: msExchDomainLink
-mayContain: msExchDoFullReplication
-mayContain: msExchAddressListServiceLink
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Address-List-Service
-adminDescription: ms-Exch-Address-List-Service
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAddressListService
-name: ms-Exch-Address-List-Service
-schemaIDGUID: e6a2c260-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Address-List-Service,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Address-List-Service-Container 
-# Container for Recipient Update Service (RUS) objects
-#
-dn: CN=ms-Exch-Address-List-Service-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Address-List-Service-Container
-distinguishedName: CN=ms-Exch-Address-List-Service-Container,${SCHEMADN}
-possSuperiors: msExchContainer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.13
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Address-List-Service-Container
-adminDescription: ms-Exch-Address-List-Service-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAddressListServiceContainer
-name: ms-Exch-Address-List-Service-Container
-schemaIDGUID: b1fce95a-1d44-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Address-List-Service-Container,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Addr-Type
-# Specifies an EMS Address type, such as SMTP, MHS, or PROFS.
-#
-dn: CN=ms-Exch-Addr-Type,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Addr-Type
-distinguishedName: CN=ms-Exch-Addr-Type,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.57
-mustContain: proxyGeneratorDLL
-mustContain: fileVersion
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: proxyGenerationEnabled
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Addr-Type
-adminDescription: ms-Exch-Addr-Type
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: addrType
-name: ms-Exch-Addr-Type
-schemaIDGUID: a8df74ab-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Addr-Type,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Add-In
-#
-dn: CN=ms-Exch-Add-In,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Add-In
-distinguishedName: CN=ms-Exch-Add-In,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.36
-mustContain: computerName
-mustContain: cn
-mayContain: owner
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Add-In
-adminDescription: ms-Exch-Add-In
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: addIn
-name: ms-Exch-Add-In
-schemaIDGUID: a8df74aa-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Add-In,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Admin-Extension
-# Specifies a remote X.400 message transfer agent (MTA).
-#
-dn: CN=ms-Exch-Admin-Extension,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Admin-Extension
-distinguishedName: CN=ms-Exch-Admin-Extension,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.21
-mustContain: fileVersion
-mustContain: adminExtensionDLL
-mustContain: cn
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Extension
-adminDescription: ms-Exch-Admin-Extension
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: adminExtension
-name: ms-Exch-Admin-Extension
-schemaIDGUID: a8df74ac-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Admin-Extension,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Admin-Group
-# objectCategory for cn=First Administrative Group
-# description: An administrative group.
-#
-
-
-#
-# ms-Exch-Admin-Role
-#
-dn: CN=ms-Exch-Admin-Role,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Admin-Role
-distinguishedName: CN=ms-Exch-Admin-Role,${SCHEMADN}
-possSuperiors: msExchContainer
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50017
-mustContain: msExchRoleRights
-mayContain: msExchRoleLocalizedNames
-mayContain: msExchRoleIncludes
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Role
-adminDescription: ms-Exch-Admin-Role
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAdminRole
-name: ms-Exch-Admin-Role
-schemaIDGUID: e7f2edf2-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Admin-Role,${SCHEMADN}
-
-
-#
-# ms-Exch-Chat-Ban
-# A Chat Service Ban Object
-#
-dn: CN=ms-Exch-Chat-Ban,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-Ban
-distinguishedName: CN=ms-Exch-Chat-Ban,${SCHEMADN}
-#possSuperiors: msExchChatVirtualNetwork
-possSuperiors: msExchChatNetwork
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.8004
-mayContain: msExchChatStartTime
-mayContain: msExchChatDuration
-mayContain: msExchChatBanReason
-mayContain: msExchChatBanMask
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Ban
-adminDescription: ms-Exch-Chat-Ban
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatBan
-name: ms-Exch-Chat-Ban
-schemaIDGUID: e8d0a8a4-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-Ban,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel
-# A Chat Service channel (room) object
-#
-dn: CN=ms-Exch-Chat-Channel,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-Channel
-distinguishedName: CN=ms-Exch-Chat-Channel,${SCHEMADN}
-#possSuperiors: msExchChatVirtualNetwork
-possSuperiors: msExchChatNetwork
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.8003
-mayContain: msExchChatAccess
-mayContain: msExchChatChannelTopic
-mayContain: msExchChatChannelSubject
-mayContain: msExchChatChannelPICS
-mayContain: msExchChatChannelPartMessage
-mayContain: msExchChatChannelOwnerKey
-mayContain: msExchChatChannelName
-mayContain: msExchChatChannelMode
-mayContain: msExchChatChannelLimit
-mayContain: msExchChatChannelLCID
-mayContain: msExchChatChannelLanguage
-mayContain: msExchChatChannelKey
-mayContain: msExchChatChannelJoinMessage
-mayContain: msExchChatChannelHostKey
-mayContain: msExchChatChannelFlags
-mayContain: msExchChatChannelAutoCreate
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel
-adminDescription: ms-Exch-Chat-Channel
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatChannel
-name: ms-Exch-Chat-Channel
-schemaIDGUID: e902ba06-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-Channel,${SCHEMADN}
-
-
-#
-# ms-Exch-Chat-User-Class
-#
-dn: CN=ms-Exch-Chat-User-Class,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-User-Class
-distinguishedName: CN=ms-Exch-Chat-User-Class,${SCHEMADN}
-#possSuperiors: msExchChatVirtualNetwork
-possSuperiors: msExchChatProtocol
-possSuperiors: msExchChatNetwork
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.8006
-mayContain: msExchChatMaxOctetsToMask
-mayContain: msExchChatMaxConnectionsPerIP
-mayContain: msExchChatClassScopeType
-mayContain: msExchChatClassRestrictions
-mayContain: msExchChatStartTime
-mayContain: msExchChatProtectionLevel
-mayContain: msExchChatPingDelay
-mayContain: msExchChatOutputSaturation
-mayContain: msExchChatNickDelay
-mayContain: msExchChatMessageLag
-mayContain: msExchChatMaxMemberships
-mayContain: msExchChatMaxConnections
-mayContain: msExchChatInputFloodLimit
-#mayContain: msExchChatEnableAuthenticated
-mayContain: msExchChatEnableAnonymous
-mayContain: msExchChatDuration
-mayContain: msExchChatClassIP
-mayContain: msExchChatClassIdentMask
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-User-Class
-adminDescription: ms-Exch-Chat-User-Class
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatUserClass
-name: ms-Exch-Chat-User-Class
-schemaIDGUID: e9a0153a-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-User-Class,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Virtual-Network
-# An instance of a Chat community on a physical server.
-#
-dn: CN=ms-Exch-Chat-Virtual-Network,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-Virtual-Network
-distinguishedName: CN=ms-Exch-Chat-Virtual-Network,${SCHEMADN}
-possSuperiors: msExchChatProtocol
-possSuperiors: msExchChatNetwork
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.8002
-mayContain: msExchChatExtensions
-mayContain: msExchServerBindings
-mayContain: msExchChatTitle
-mayContain: msExchChatMaxConnections
-mayContain: msExchChatClientPort
-mayContain: Enabled
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Virtual-Network
-adminDescription: ms-Exch-Chat-Virtual-Network
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatVirtualNetwork
-name: ms-Exch-Chat-Virtual-Network
-schemaIDGUID: ea5ed15a-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-Virtual-Network,${SCHEMADN}
-
-
-# 
-# ms-Exch-Computer-Policy
-#
-dn: CN=ms-Exch-Computer-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Computer-Policy
-distinguishedName: CN=ms-Exch-Computer-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: computer
-governsID: 1.2.840.113556.1.5.7000.62.50007
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Computer-Policy
-adminDescription: ms-Exch-Computer-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchComputerPolicy
-name: ms-Exch-Computer-Policy
-schemaIDGUID: ed2c752c-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Computer-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-Connection-Agreement
-# Used to store synchronization information.
-#
-dn: CN=ms-Exch-Connection-Agreement,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Connection-Agreement
-distinguishedName: CN=ms-Exch-Connection-Agreement,${SCHEMADN}
-possSuperiors: organizationalUnit
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.3
-mayContain: msExchIsConfigCA
-mayContain: msExchInterOrgAddressType
-mayContain: msExchMoveToLSA
-mayContain: msExchServer2HighestUSNVector
-mayContain: msExchServer1HighestUSNVector
-mayContain: msExchExchangeSite
-mayContain: msExchADCObjectType
-mayContain: msExchServer2IsBridgehead
-mayContain: msExchServer1IsBridgehead
-mayContain: versionNumber
-mayContain: msExchSynchronizationDirection
-mayContain: msExchServer2Type
-mayContain: msExchServer2SSLPort
-mayContain: msExchServer2SearchFilter
-mayContain: msExchServer2SchemaMap
-mayContain: msExchServer2Port
-mayContain: msExchServer2PageSize
-mayContain: msExchServer2NTAccountDomain
-mayContain: msExchServer2NetworkAddress
-mayContain: msExchServer2LastUpdateTime
-mayContain: msExchServer2ImportContainer
-mayContain: msExchServer2HighestUSN
-mayContain: msExchServer2Flags
-mayContain: msExchServer2ExportContainers
-mayContain: msExchServer2DeletionOption
-mayContain: msExchServer2AuthenticationType
-mayContain: msExchServer2AuthenticationPassword
-mayContain: msExchServer2AuthenticationCredentials
-mayContain: msExchServer2AlwaysCreateAs
-mayContain: msExchServer1Type
-mayContain: msExchServer1SSLPort
-mayContain: msExchServer1SearchFilter
-mayContain: msExchServer1SchemaMap
-mayContain: msExchServer1Port
-mayContain: msExchServer1PageSize
-mayContain: msExchServer1NTAccountDomain
-mayContain: msExchServer1NetworkAddress
-mayContain: msExchServer1LastUpdateTime
-mayContain: msExchServer1ImportContainer
-mayContain: msExchServer1HighestUSN
-mayContain: msExchServer1Flags
-mayContain: msExchServer1ExportContainers
-mayContain: msExchServer1DeletionOption
-mayContain: msExchServer1AuthenticationType
-mayContain: msExchServer1AuthenticationPassword
-mayContain: msExchServer1AuthenticationCredentials
-mayContain: msExchServer1AlwaysCreateAs
-mayContain: msExchReplicateNow
-mayContain: msExchRemoteServerList
-mayContain: msExchRemotePrivateISList
-mayContain: msExchNtdsImportContainer
-mayContain: msExchNtdsExportContainers
-mayContain: msExchNTAccountOptions
-mayContain: msExchIsBridgeheadSite
-mayContain: msExchHomeSyncService
-mayContain: msExchHomeServerName
-mayContain: msExchDoFullReplication
-mayContain: msExchDereferenceAliases
-mayContain: msExchCorrelationAttribute
-mayContain: msExchCASchemaPolicy
-mayContain: msExchAdditionalDNMap
-mayContain: msExchADCOptions
-mayContain: activationStyle
-mayContain: activationSchedule
-mayContain: displayName
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connection-Agreement
-adminDescription: ms-Exch-Connection-Agreement
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchConnectionAgreement
-name: ms-Exch-Connection-Agreement
-schemaIDGUID: ee64c93a-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Connection-Agreement,${SCHEMADN}
-
-
-#
-# ms-Exch-Domain-Content-Config
-#
-dn: CN=ms-Exch-Domain-Content-Config,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Domain-Content-Config
-distinguishedName: CN=ms-Exch-Domain-Content-Config,${SCHEMADN}
-possSuperiors: msExchContentConfigContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50027
-mayContain: msExchMinAdminVersion
-mayContain: versionNumber
-mayContain: msExchRoutingAcceptMessageType
-mayContain: msExchResolveP2
-mayContain: msExchNonMIMECharacterSet
-mayContain: msExchEncodeSMTPRelay
-mayContain: sendTNEF
-mayContain: msExchRoutingDisplaySenderEnabled
-mayContain: lineWrap
-mayContain: domainName
-mayContain: contentType
-mayContain: characterSet
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Content-Config
-adminDescription: ms-Exch-Domain-Content-Config
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchDomainContentConfig
-name: ms-Exch-Domain-Content-Config
-schemaIDGUID: ab3a1ad1-1df5-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Domain-Content-Config,${SCHEMADN}
-
-
-# 
-# ms-Exch-DX-Requestor
-# The remote directory exchange agent (DXA) requestor.
-#
-dn: CN=ms-Exch-DX-Requestor,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-DX-Requestor
-distinguishedName: CN=ms-Exch-DX-Requestor,${SCHEMADN}
-possSuperiors: container
-subClassOf: remoteDXA
-governsID: 1.2.840.113556.1.3.19
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DX-Requestor
-adminDescription: ms-Exch-DX-Requestor
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: dXRequestor
-name: ms-Exch-DX-Requestor
-schemaIDGUID: a8df74ae-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-DX-Requestor,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-DX-Server-Conn
-# The remote directory exchange agent (DXA) server.
-#
-dn: CN=ms-Exch-DX-Server-Conn,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-DX-Server-Conn
-distinguishedName: CN=ms-Exch-DX-Server-Conn,${SCHEMADN}
-possSuperiors: dXASiteServer
-subClassOf: remoteDXA
-governsID: 1.2.840.113556.1.3.20
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DX-Server-Conn
-adminDescription: ms-Exch-DX-Server-Conn
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: dXServerConn
-name: ms-Exch-DX-Server-Conn
-schemaIDGUID: a8df74af-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-DX-Server-Conn,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dynamic-Distribution-List
-#
-dn: CN=ms-Exch-Dynamic-Distribution-List,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Dynamic-Distribution-List
-distinguishedName: CN=ms-Exch-Dynamic-Distribution-List,${SCHEMADN}
-possSuperiors: organizationalUnit
-possSuperiors: domainDNS
-possSuperiors: builtinDomain
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.12006
-mayContain: msExchPurportedSearchUI
-mayContain: msExchDynamicDLFilter
-mayContain: msExchDynamicDLBaseDN
-mayContain: managedBy
-mayContain: reportToOwner
-mayContain: reportToOriginator
-mayContain: oOFReplyToOriginator
-mayContain: msExchMemberFilter
-mayContain: msExchMemberBaseDN
-mayContain: hideDLMembership
-mayContain: mail
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dynamic-Distribution-List
-adminDescription: ms-Exch-Dynamic-Distribution-List
-auxiliaryClass: msExchCustomAttributes
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: msExchDynamicDistributionList
-name: ms-Exch-Dynamic-Distribution-List
-schemaIDGUID: 018849b0-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;RP;;;AU)
-defaultHidingValue: FALSE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Dynamic-Distribution-List,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-Encryption-Cfg
-# Contains attributes that configure security policies for each
-# Administrative group.
-#
-dn: CN=ms-Exch-Encryption-Cfg,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Encryption-Cfg
-distinguishedName: CN=ms-Exch-Encryption-Cfg,${SCHEMADN}
-possSuperiors: msExchAdvancedSecurityContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.16
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: sMIMEAlgSelectedOther
-mayContain: sMIMEAlgSelectedNA
-mayContain: sMIMEAlgListOther
-mayContain: sMIMEAlgListNA
-mayContain: kMServer
-mayContain: encryptAlgSelectedOther
-mayContain: encryptAlgSelectedNA
-mayContain: encryptAlgListOther
-mayContain: encryptAlgListNA
-mayContain: defaultMessageFormat
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encryption-Cfg
-adminDescription: ms-Exch-Encryption-Cfg
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: encryptionCfg
-name: ms-Exch-Encryption-Cfg
-schemaIDGUID: a8df74b1-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;RP;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Encryption-Cfg,${SCHEMADN}
-
-
-#
-# ms-Exch-Exchange-Server-Policy
-# The Exchange server policy.
-#
-dn: CN=ms-Exch-Exchange-Server-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Exchange-Server-Policy
-distinguishedName: CN=ms-Exch-Exchange-Server-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: msExchExchangeServer
-governsID: 1.2.840.113556.1.5.7000.62.50025
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Exchange-Server-Policy
-adminDescription: ms-Exch-Exchange-Server-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchExchangeServerPolicy
-name: ms-Exch-Exchange-Server-Policy
-schemaIDGUID: e497942f-1d42-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Exchange-Server-Policy,${SCHEMADN}
-
-
-# 
-# ms-Exch-IM-Firewall  
-# The Instant Messaging representation of firewalls.
-#
-dn: CN=ms-Exch-IM-Firewall,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-IM-Firewall
-distinguishedName: CN=ms-Exch-IM-Firewall,${SCHEMADN}
-possSuperiors: msExchIMGlobalSettingsContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.7015
-mustContain: msExchIMFirewallType
-mayContain: portNumber
-mayContain: msExchIMProxy
-mayContain: msExchIMIPRange
-mayContain: flags
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Firewall
-adminDescription: ms-Exch-IM-Firewall
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchIMFirewall
-name: ms-Exch-IM-Firewall
-schemaIDGUID: 9f116ebe-284e-11d3-aa68-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-IM-Firewall,${SCHEMADN}
-
-
-#
-# ms-Exch-Information-Store        
-# The Information Store configuration.
-#
-dn: CN=ms-Exch-Information-Store,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Information-Store
-distinguishedName: CN=ms-Exch-Information-Store,${SCHEMADN}
-possSuperiors: msExchExchangeServer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.11001
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: msExchMaxRestoreStorageGroups
-mayContain: msExchRecovery
-mayContain: msExchESEParamZeroDatabaseDuringBackup
-mayContain: msExchESEParamPageTempDBMin
-mayContain: msExchESEParamPageFragment
-mayContain: msExchESEParamLogFileSize
-mayContain: msExchESEParamLogCheckpointPeriod
-mayContain: msExchESEParamLogBuffers
-mayContain: msExchESEParamGlobalMinVerPages
-mayContain: msExchESEParamEventSource
-mayContain: msExchESEParamEnableSortedRetrieveColumns
-mayContain: msExchESEParamEnableOnlineDefrag
-mayContain: msExchESEParamEnableIndexChecking
-mayContain: msExchESEParamDbExtensionSize
-mayContain: msExchESEParamCommitDefault
-mayContain: msExchESEParamCircularLog
-mayContain: msExchESEParamCacheSizeMin
-mayContain: msExchESEParamBaseName
-mayContain: msExchESEParamAssertAction
-mayContain: msExchESEParamStopFlushThreshold
-mayContain: msExchESEParamStartFlushThreshold
-mayContain: msExchQueuingMDB
-mayContain: msExchOwningOrg
-mayContain: msExchMinimumThreads
-mayContain: msExchMaxThreads
-mayContain: msExchMaxStoresPerGroup
-mayContain: msExchMaxStorageGroups
-mayContain: msExchMaxPoolThreads
-mayContain: msExchIFSPublicName
-mayContain: msExchIFSPublicEnabled
-mayContain: msExchIFSPrivateName
-mayContain: msExchIFSPrivateEnabled
-mayContain: msExchESEParamCacheSizeMax
-mayContain: msExchESEParamCacheSize
-mayContain: msExchDatabaseSessionIncrement
-mayContain: msExchDatabaseSessionAddend
-mayContain: msExchBackgroundThreads
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Information-Store
-adminDescription: ms-Exch-Information-Store
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchInformationStore
-name: ms-Exch-Information-Store
-schemaIDGUID: 031b371a-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Information-Store,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Ip-Conf-Container    
-# The Exchange Video Conferencing container.
-#
-dn: CN=ms-Exch-Ip-Conf-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Ip-Conf-Container
-distinguishedName: CN=ms-Exch-Ip-Conf-Container,${SCHEMADN}
-possSuperiors: msExchConferenceSite
-subClassOf: msExchCTP
-governsID: 1.2.840.113556.1.5.7000.62.9006
-mayContain: msExchMaxParticipants
-mayContain: msExchMaxExtensionTime
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Ip-Conf-Container
-adminDescription: ms-Exch-Ip-Conf-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchIpConfContainer
-name: ms-Exch-Ip-Conf-Container
-schemaIDGUID: 99f5866d-12e8-11d3-aa58-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Ip-Conf-Container,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Key-Management-Server        
-# Holds configuration attributes for each Key Management Service.
-#
-dn: CN=ms-Exch-Key-Management-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Key-Management-Server
-distinguishedName: CN=ms-Exch-Key-Management-Server,${SCHEMADN}
-possSuperiors: msExchAdvancedSecurityContainer
-subClassOf: certificationAuthority
-governsID: 1.2.840.113556.1.5.7000.62.13002
-mayContain: sendEMailMessage
-mayContain: securityPolicy
-mayContain: kMServer
-mayContain: kCCStatus
-mayContain: expirationTime
-mayContain: enableCompatibility
-mayContain: dXAPrevTypes
-mayContain: dXAAdminForward
-mayContain: domainDefAltRecip
-mayContain: crossCertificateCRL
-mayContain: compromisedKeyList
-mayContain: certificateRevocationListV3
-mayContain: certificateRevocationListV1
-mayContain: certificateChainV3
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Key-Management-Server
-adminDescription: ms-Exch-Key-Management-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchKeyManagementServer
-name: ms-Exch-Key-Management-Server
-schemaIDGUID: 8ce334ec-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;RP;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Key-Management-Server,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-DXA    
-# Represents the directory exchange agent (DXA) process.
-#
-dn: CN=ms-Exch-Local-DXA,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Local-DXA
-distinguishedName: CN=ms-Exch-Local-DXA,${SCHEMADN}
-possSuperiors: msExchExchangeServer
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.1
-mustContain: deliveryMechanism
-mayContain: msExchServer1NetworkAddress
-mayContain: msExchServer1AlwaysCreateAs
-mayContain: delivEITs
-mayContain: dXATemplateTimeStamp
-mayContain: dXAOutTemplateMap
-mayContain: dXAInTemplateMap
-mayContain: dXAAdminUpdate
-mayContain: diagnosticRegKey
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-DXA
-adminDescription: ms-Exch-Local-DXA
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: localDXA
-name: ms-Exch-Local-DXA
-schemaIDGUID: a8df74b5-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Local-DXA,${SCHEMADN}
-
-
-#
-# ms-Exch-MCU    
-# The Exchange Conferencing Multipoint Control Unit (MCU) Configuration
-# Interface . CN=MachineName.
-#
-dn: CN=ms-Exch-MCU,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MCU
-distinguishedName: CN=ms-Exch-MCU,${SCHEMADN}
-#possSuperiors: msExchMCUContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.9004
-mayContain: msExchMCUHostsSites
-mayContain: msExchVisibilityMask
-mayContain: msExchScopeMask
-mayContain: msExchProxyName
-mayContain: msExchLocalName
-mayContain: msExchInternetName
-mayContain: enabledConnection
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MCU
-adminDescription: ms-Exch-MCU
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchMCU
-name: ms-Exch-MCU
-schemaIDGUID: 038680ec-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MCU,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MCU-Container             
-# The Exchange Data Conference Service class. CN=Exchange Data
-# Conferencing Service.
-#
-dn: CN=ms-Exch-MCU-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MCU-Container
-distinguishedName: CN=ms-Exch-MCU-Container,${SCHEMADN}
-possSuperiors: msExchConferenceSite
-subClassOf: msExchCTP
-governsID: 1.2.840.113556.1.5.7000.62.9003
-mayContain: rangeUpper
-mayContain: rangeLower
-mayContain: msExchMaxConnections
-mayContain: msExchListPublic
-mayContain: msExchCertificate
-mayContain: msExchAuditFlags
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MCU-Container
-adminDescription: ms-Exch-MCU-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchMCUContainer
-name: ms-Exch-MCU-Container
-schemaIDGUID: 03aa4432-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MCU-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-MHS-Link-Monitoring-Config     
-# The EMS saved Linked Monitoring configuration.
-#
-dn: CN=ms-Exch-MHS-Link-Monitoring-Config,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MHS-Link-Monitoring-Config
-distinguishedName: CN=ms-Exch-MHS-Link-Monitoring-Config,${SCHEMADN}
-possSuperiors: container
-subClassOf: mHSMonitoringConfig
-governsID: 1.2.840.113556.1.3.12
-mayContain: monitoringWarningUnits
-mayContain: monitoringWarningDelay
-mayContain: monitoringRecipientsNDR
-mayContain: monitoringRecipients
-mayContain: monitoringAlertUnits
-mayContain: monitoringAlertDelay
-mayContain: monitorServers
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MHS-Link-Monitoring-Config
-adminDescription: ms-Exch-MHS-Link-Monitoring-Config
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mHSLinkMonitoringConfig
-name: ms-Exch-MHS-Link-Monitoring-Config
-schemaIDGUID: a8df74b9-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MHS-Link-Monitoring-Config,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MHS-Server-Monitoring-Config 
-# The EMS saved Server Monitoring configuration.
-#
-dn: CN=ms-Exch-MHS-Server-Monitoring-Config,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MHS-Server-Monitoring-Config
-distinguishedName: CN=ms-Exch-MHS-Server-Monitoring-Config,${SCHEMADN}
-possSuperiors: container
-subClassOf: mHSMonitoringConfig
-governsID: 1.2.840.113556.1.3.7
-mayContain: serviceRestartMessage
-mayContain: serviceRestartDelay
-mayContain: serviceActionSecond
-mayContain: serviceActionOther
-mayContain: serviceActionFirst
-mayContain: monitorServices
-mayContain: monitorClock
-mayContain: clockWarningRepair
-mayContain: clockWarningOffset
-mayContain: clockAlertRepair
-mayContain: clockAlertOffset
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MHS-Server-Monitoring-Config
-adminDescription: ms-Exch-MHS-Server-Monitoring-Config
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mHSServerMonitoringConfig
-name: ms-Exch-MHS-Server-Monitoring-Config
-schemaIDGUID: a8df74bd-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MHS-Server-Monitoring-Config,${SCHEMADN}
-
-
-#
-# ms-Exch-MTA-Cfg  
-#
-dn: CN=ms-Exch-MTA-Cfg,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MTA-Cfg
-distinguishedName: CN=ms-Exch-MTA-Cfg,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.3
-mustContain: cn
-mayContain: xMITTimeoutUrgent
-mayContain: xMITTimeoutNormal
-mayContain: xMITTimeoutNonUrgent
-mayContain: transportExpeditedData
-mayContain: transferTimeoutUrgent
-mayContain: transferTimeoutNormal
-mayContain: transferTimeoutNonUrgent
-mayContain: transferRetryInterval
-mayContain: tempAssocThreshold
-mayContain: sessionDisconnectTimer
-mayContain: rTSWindowSize
-mayContain: rTSRecoveryTimeout
-mayContain: rTSCheckpointSize
-mayContain: openRetryInterval
-mayContain: numOfTransferRetries
-mayContain: numOfOpenRetries
-mayContain: messageTrackingEnabled
-mayContain: domainDefAltRecip
-mayContain: associationLifetime
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MTA-Cfg
-adminDescription: ms-Exch-MTA-Cfg
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mTACfg
-name: ms-Exch-MTA-Cfg
-schemaIDGUID: a8df74a8-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MTA-Cfg,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Multi-Media-User
-# Contains attributes for voice mailbox configuration. The attributes
-# can be updated by the mailbox owner.
-#
-dn: CN=ms-Exch-Multi-Media-User,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Multi-Media-User
-distinguishedName: CN=ms-Exch-Multi-Media-User,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.17002
-mayContain: msExchVoiceMailboxID
-mayContain: msExchTUIVolume
-mayContain: msExchTUISpeed
-mayContain: msExchTUIPassword
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Multi-Media-User
-adminDescription: ms-Exch-Multi-Media-User
-objectClassCategory: 3
-lDAPDisplayName: msExchMultiMediaUser
-name: ms-Exch-Multi-Media-User
-schemaIDGUID: 1529cf7a-2fdb-11d3-aa6d-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Multi-Media-User,${SCHEMADN}
-
-
-#
-# ms-Exch-OAB    
-# The offline address book (OAB) configuration object.
-#
-dn: CN=ms-Exch-OAB,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-OAB
-distinguishedName: CN=ms-Exch-OAB,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.9
-mustContain: offLineABStyle
-mustContain: offLineABServer
-mustContain: offLineABSchedule
-mustContain: offLineABContainers
-mustContain: msExchOABFolder
-mustContain: doOABVersion
-mayContain: siteFolderServer
-mayContain: siteFolderGUID
-mayContain: msExchUseOABBL
-mayContain: msExchOABDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OAB
-adminDescription: ms-Exch-OAB
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchOAB
-name: ms-Exch-OAB
-schemaIDGUID: 3686cdd4-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-OAB,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Carrier      
-# Contains wireless carrier information.
-#
-dn: CN=ms-Exch-Oma-Carrier,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Carrier
-distinguishedName: CN=ms-Exch-Oma-Carrier,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.37
-mayContain: msExchMinAdminVersion
-mayContain: msExchOmaTranslator
-mayContain: msExchOmaExtendedProperties
-mayContain: msExchOmaDeliveryProviderDN
-mayContain: msExchOmaConfiguration
-mayContain: msExchOmaCarrierUrl
-mayContain: msExchOmaCarrierType
-mayContain: msExchOmaCarrierAddress
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Carrier
-adminDescription: ms-Exch-Oma-Carrier
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaCarrier
-name: ms-Exch-Oma-Carrier
-schemaIDGUID: 8712d34c-27e5-41b2-976e-482ad8c954e7
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LCLORPRC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Carrier,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Configuration-Container  
-# The parent container for all OMA configuration data.
-#
-dn: CN=ms-Exch-Oma-Configuration-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Configuration-Container
-distinguishedName: CN=ms-Exch-Oma-Configuration-Container,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.32
-mayContain: msExchMinAdminVersion
-mayContain: msExchOmaExtendedProperties
-mayContain: msExchOmaAdminWirelessEnable
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Configuration-Container
-adminDescription: ms-Exch-Oma-Configuration-Container
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaConfigurationContainer
-name: ms-Exch-Oma-Configuration-Container
-schemaIDGUID: db0f9abb-0770-4f09-ba64-7993d91517b7
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LCLORPRC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Configuration-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Oma-Container  
-# The parent container for OMA device types.
-#
-dn: CN=ms-Exch-Oma-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Container
-distinguishedName: CN=ms-Exch-Oma-Container,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.38
-mayContain: msExchMinAdminVersion
-mayContain: msExchOmaExtendedProperties
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Container
-adminDescription: ms-Exch-Oma-Container
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaContainer
-name: ms-Exch-Oma-Container
-schemaIDGUID: 863dab20-fb40-43a4-a5e1-825b2071050f
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Container,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Data-Source          
-# Contains information about business logic that can validate a push
-# notification.
-#
-dn: CN=ms-Exch-Oma-Data-Source,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Data-Source
-distinguishedName: CN=ms-Exch-Oma-Data-Source,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.35
-mayContain: msExchOmaValidater
-mayContain: msExchOmaExtendedProperties
-mayContain: msExchOmaDeviceCapabilityDN
-mayContain: msExchOmaDeliveryProviderDN
-mayContain: msExchOmaConfiguration
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Data-Source
-adminDescription: ms-Exch-Oma-Data-Source
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaDataSource
-name: ms-Exch-Oma-Data-Source
-schemaIDGUID: dda38a4d-972a-44a2-9244-0acb4b1d34d1
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LCLORPRC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Data-Source,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Delivery-Provider 
-# Contains delivery protocol information.
-#
-dn: CN=ms-Exch-Oma-Delivery-Provider,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Delivery-Provider
-distinguishedName: CN=ms-Exch-Oma-Delivery-Provider,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.36
-mayContain: msExchOmaExtendedProperties
-mayContain: msExchOmaDeviceCapabilityDN
-mayContain: msExchOmaDeliverer
-mayContain: msExchOmaConfiguration
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Delivery-Provider
-adminDescription: ms-Exch-Oma-Delivery-Provider
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaDeliveryProvider
-name: ms-Exch-Oma-Delivery-Provider
-schemaIDGUID: cdbf130d-c7e2-4572-94b0-fc9be7eef953
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Delivery-Provider,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Device-Capability        
-# Device support for an application (such as SMS Text).
-#
-dn: CN=ms-Exch-Oma-Device-Capability,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Device-Capability
-distinguishedName: CN=ms-Exch-Oma-Device-Capability,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.34
-mayContain: msExchOmaFormatter
-mayContain: msExchOmaExtendedProperties
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Device-Capability
-adminDescription: ms-Exch-Oma-Device-Capability
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaDeviceCapability
-name: ms-Exch-Oma-Device-Capability
-schemaIDGUID: df7af4df-f318-4e2c-ac43-be5b4894711c
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LCLORPRC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Device-Capability,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Device-Type        
-# Contains the make and model of a wireless device with
-# characteristics.
-#
-dn: CN=ms-Exch-Oma-Device-Type,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Device-Type
-distinguishedName: CN=ms-Exch-Oma-Device-Type,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.6.20.2.33
-mayContain: msExchOmaExtendedProperties
-mayContain: msExchOmaDeviceCapabilityDN
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Device-Type
-adminDescription: ms-Exch-Oma-Device-Type
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaDeviceType
-name: ms-Exch-Oma-Device-Type
-schemaIDGUID: ca7a8fb3-21d0-4ea7-af3f-d15c6df7c094
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LCLORPRC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Device-Type,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-User         
-# Extends the Active Directory User.
-#
-dn: CN=ms-Exch-Oma-User,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-User
-distinguishedName: CN=ms-Exch-Oma-User,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.6.20.2.31
-mayContain: msExchOmaAdminWirelessEnable
-mayContain: msExchOmaAdminExtendedSettings
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-User
-adminDescription: ms-Exch-Oma-User
-objectClassCategory: 3
-lDAPDisplayName: msExchOmaUser
-name: ms-Exch-Oma-User
-schemaIDGUID: 36a0a976-dd8d-4aad-81fd-a1b5d4016ca8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-User,${SCHEMADN}
-
-
-#
-# ms-Exch-PF-Tree      
-#
-dn: CN=ms-Exch-PF-Tree,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-PF-Tree
-distinguishedName: CN=ms-Exch-PF-Tree,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.11003
-mayContain: msExchMinAdminVersion
-mayContain: msExchPfCreation
-mayContain: msExchAllowEnhancedSecurity
-mayContain: msExchOwningPFTreeBL
-mayContain: msExchPFDefaultAdminACL
-mayContain: msExchPFTreeType
-mayContain: msExchPFDSContainer
-mayContain: displayName
-mayContain: description
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PF-Tree
-adminDescription: ms-Exch-PF-Tree
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPFTree
-name: ms-Exch-PF-Tree
-schemaIDGUID: 364d9564-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-PF-Tree,${SCHEMADN}
-
-
-#
-# ms-Exch-Private-MDB-Policy   
-#
-dn: CN=ms-Exch-Private-MDB-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Private-MDB-Policy
-distinguishedName: CN=ms-Exch-Private-MDB-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: msExchPrivateMDB
-governsID: 1.2.840.113556.1.5.7000.62.50003
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Private-MDB-Policy
-adminDescription: ms-Exch-Private-MDB-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPrivateMDBPolicy
-name: ms-Exch-Private-MDB-Policy
-schemaIDGUID: 35db2484-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Private-MDB-Policy,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Private-MDB-Proxy
-#
-dn: CN=ms-Exch-Private-MDB-Proxy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Private-MDB-Proxy
-distinguishedName: CN=ms-Exch-Private-MDB-Proxy,${SCHEMADN}
-possSuperiors: msExchContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.11007
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Private-MDB-Proxy
-adminDescription: ms-Exch-Private-MDB-Proxy
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: msExchPrivateMDBProxy
-name: ms-Exch-Private-MDB-Proxy
-schemaIDGUID: b8d47e54-4b78-11d3-aa75-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Private-MDB-Proxy,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-HTTP-Filter        
-# The Exchange HTTP service filters.
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Filter,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Filter
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Filter,${SCHEMADN}
-possSuperiors: msExchProtocolCfgHTTPFilters
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.15003
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Filter
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Filter
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgHTTPFilter
-name: ms-Exch-Protocol-Cfg-HTTP-Filter
-schemaIDGUID: 8c7588c0-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Filter,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-HTTP-Site       
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Site,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-subClassOf: protocolCfgHTTP
-governsID: 1.2.840.113556.1.3.81
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Site
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgHTTPSite
-name: ms-Exch-Protocol-Cfg-HTTP-Site
-schemaIDGUID: a8df74c3-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Site,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory  
-# The Exchange HTTP virtual directory configuration.
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory,${SCHEMADN}
-possSuperiors: protocolCfgHTTPServer
-subClassOf: protocolCfgHTTPServer
-governsID: 1.2.840.113556.1.5.7000.62.15001
-mayContain: msExchBackEndVDirURL
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgHTTPVirtualDirectory
-name: ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory
-schemaIDGUID: 8c3c5050-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Virtual-Directory,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-IMAP-Policy        
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP-Policy
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: protocolCfgIMAP
-governsID: 1.2.840.113556.1.5.7000.62.50004
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP-Policy
-adminDescription: ms-Exch-Protocol-Cfg-IMAP-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIMAPPolicy
-name: ms-Exch-Protocol-Cfg-IMAP-Policy
-schemaIDGUID: 35f7c0bc-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-IMAP-Sessions   
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP-Sessions,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP-Sessions
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP-Sessions,${SCHEMADN}
-possSuperiors: protocolCfgIMAPServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.3002
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP-Sessions
-adminDescription: ms-Exch-Protocol-Cfg-IMAP-Sessions
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIMAPSessions
-name: ms-Exch-Protocol-Cfg-IMAP-Sessions
-schemaIDGUID: 99f58672-12e8-11d3-aa58-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP-Sessions,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-IMAP-Site  
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP-Site,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-subClassOf: protocolCfgIMAP
-governsID: 1.2.840.113556.1.3.86
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP-Site
-adminDescription: ms-Exch-Protocol-Cfg-IMAP-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgIMAPSite
-name: ms-Exch-Protocol-Cfg-IMAP-Site
-schemaIDGUID: a8df74c6-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP-Site,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-IM-Virtual-Server       
-# Contains the attributes that represent an Instant Messaging virtual
-# server.
-#
-dn: CN=ms-Exch-Protocol-Cfg-IM-Virtual-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IM-Virtual-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IM-Virtual-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgIMContainer
-subClassOf: msExchProtocolCfgIM
-governsID: 1.2.840.113556.1.5.7000.62.7013
-mustContain: msExchIMServerIISId
-mayContain: msExchIMHostName
-mayContain: flags
-mayContain: msExchIMServerName
-mayContain: msExchIMServerHostsUsers
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IM-Virtual-Server
-adminDescription: ms-Exch-Protocol-Cfg-IM-Virtual-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIMVirtualServer
-name: ms-Exch-Protocol-Cfg-IM-Virtual-Server
-schemaIDGUID: 9f116eb4-284e-11d3-aa68-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IM-Virtual-Server,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-LDAP-Server        
-#
-dn: CN=ms-Exch-Protocol-Cfg-LDAP-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-LDAP-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-LDAP-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgProtocolContainer
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfgLDAP
-governsID: 1.2.840.113556.1.3.77
-mayContain: referralList
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-LDAP-Server
-adminDescription: ms-Exch-Protocol-Cfg-LDAP-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgLDAPServer
-name: ms-Exch-Protocol-Cfg-LDAP-Server
-schemaIDGUID: a8df74c8-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-LDAP-Server,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-LDAP-Site  
-#
-dn: CN=ms-Exch-Protocol-Cfg-LDAP-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-LDAP-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-LDAP-Site,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-subClassOf: protocolCfgLDAP
-governsID: 1.2.840.113556.1.3.76
-mayContain: referralList
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-LDAP-Site
-adminDescription: ms-Exch-Protocol-Cfg-LDAP-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgLDAPSite
-name: ms-Exch-Protocol-Cfg-LDAP-Site
-schemaIDGUID: a8df74c9-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-LDAP-Site,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-NNTP-Server        
-#
-dn: CN=ms-Exch-Protocol-Cfg-NNTP-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-NNTP-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-NNTP-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgNNTPContainer
-subClassOf: protocolCfgNNTP
-governsID: 1.2.840.113556.1.3.74
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-NNTP-Server
-adminDescription: ms-Exch-Protocol-Cfg-NNTP-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgNNTPServer
-name: ms-Exch-Protocol-Cfg-NNTP-Server
-schemaIDGUID: a8df74cb-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-NNTP-Server,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-NNTP-Site  
-#
-dn: CN=ms-Exch-Protocol-Cfg-NNTP-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-NNTP-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-NNTP-Site,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-subClassOf: protocolCfgNNTP
-governsID: 1.2.840.113556.1.3.73
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-NNTP-Site
-adminDescription: ms-Exch-Protocol-Cfg-NNTP-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgNNTPSite
-name: ms-Exch-Protocol-Cfg-NNTP-Site
-schemaIDGUID: a8df74cc-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-NNTP-Site,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-POP 
-#
-dn: CN=ms-Exch-Protocol-Cfg-POP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-POP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-POP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.3.69
-mayContain: msExchLogonACL
-mayContain: msExchServerBindings
-mayContain: msExchSecureBindings
-mayContain: oWAServer
-mayContain: formData
-mayContain: folderPathname
-mayContain: helpData32
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-POP
-adminDescription: ms-Exch-Protocol-Cfg-POP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgPOP
-name: ms-Exch-Protocol-Cfg-POP
-schemaIDGUID: a8df74cd-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-POP,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Domain        
-# Contains domain level settings under an SMTP virtual server.
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Domain,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Domain
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Domain,${SCHEMADN}
-possSuperiors: protocolCfgSMTPDomainContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5006
-mayContain: msExchEncryptedPassword
-mayContain: msExchSecurityPassword
-mayContain: msExchSmtpSmartHost
-mayContain: msExchSmtpOutboundSecurityUserName
-mayContain: msExchSmtpOutboundSecurityPassword
-mayContain: msExchSmtpOutboundSecurityFlag
-mayContain: msExchSmtpDropDirectory
-mayContain: msExchSmtpDomainString
-mayContain: msExchSmtpAuthorizedTRNAccounts
-mayContain: sendTNEF
-mayContain: msExchRoutingDisplaySenderEnabled
-mayContain: msExchRoutingAcceptMessageType
-mayContain: msExchDefaultDomain
-mayContain: contentType
-mayContain: characterSet
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Domain
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Domain
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPDomain
-name: ms-Exch-Protocol-Cfg-SMTP-Domain
-schemaIDGUID: 33d82894-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Domain,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-IP-Address    
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-IP-Address
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address,${SCHEMADN}
-possSuperiors: msExchProtocolCfgSMTPIPAddressContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5009
-mayContain: msExchTurfList
-mayContain: msExchIPAddress
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-IP-Address
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-IP-Address
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgSMTPIPAddress
-name: ms-Exch-Protocol-Cfg-SMTP-IP-Address
-schemaIDGUID: 8b7b31d6-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Policy        
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Policy
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: protocolCfgSMTP
-governsID: 1.2.840.113556.1.5.7000.62.50006
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Policy
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgSMTPPolicy
-name: ms-Exch-Protocol-Cfg-SMTP-Policy
-schemaIDGUID: 359f89ba-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Policy,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Routing-Sources    
-# Contains information about the unused sources for routing outbound
-# mail.
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Routing-Sources,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Routing-Sources
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Routing-Sources,${SCHEMADN}
-possSuperiors: protocolCfgSMTPServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5005
-mayContain: msExchMinAdminVersion
-mayContain: msExchSmtpRoutingTableType
-mayContain: msExchSmtpLdapSchemaType
-mayContain: msExchSmtpLdapPassword
-mayContain: msExchSmtpLdapNamingContext
-mayContain: msExchSmtpLdapBindType
-mayContain: msExchSmtpLdapAccount
-mayContain: msExchSmtpEnableLdapRouting
-mayContain: msExchSmtpDsPort
-mayContain: msExchSmtpDsHost
-mayContain: msExchSmtpDsFlags
-mayContain: msExchSmtpDsDomain
-mayContain: msExchSmtpDsDefaultMailRoot
-mayContain: msExchSmtpDsDataDirectory
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Routing-Sources
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Routing-Sources
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPRoutingSources
-name: ms-Exch-Protocol-Cfg-SMTP-Routing-Sources
-schemaIDGUID: 3397c916-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Routing-Sources,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Sessions  
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Sessions,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Sessions
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Sessions,${SCHEMADN}
-possSuperiors: protocolCfgSMTPServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5007
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Sessions
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Sessions
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPSessions
-name: ms-Exch-Protocol-Cfg-SMTP-Sessions
-schemaIDGUID: 8ef628c6-b093-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Sessions,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Site  
-# Contains settings for legacy site SMTP settings.
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Site,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-subClassOf: protocolCfgSMTP
-governsID: 1.2.840.113556.1.5.7000.62.5003
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Site
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPSite
-name: ms-Exch-Protocol-Cfg-SMTP-Site
-schemaIDGUID: 32f0e47a-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Site,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Pseudo-PF         
-# Used internally by the store.
-#
-dn: CN=ms-Exch-Pseudo-PF,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Pseudo-PF
-distinguishedName: CN=ms-Exch-Pseudo-PF,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50030
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Pseudo-PF
-adminDescription: ms-Exch-Pseudo-PF
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPseudoPF
-name: ms-Exch-Pseudo-PF
-schemaIDGUID: cec4472b-22ae-11d3-aa62-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Pseudo-PF,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Pseudo-PF-Admin      
-# Used internally by the store.
-#
-dn: CN=ms-Exch-Pseudo-PF-Admin,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Pseudo-PF-Admin
-distinguishedName: CN=ms-Exch-Pseudo-PF-Admin,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50029
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Pseudo-PF-Admin
-adminDescription: ms-Exch-Pseudo-PF-Admin
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPseudoPFAdmin
-name: ms-Exch-Pseudo-PF-Admin
-schemaIDGUID: 9ae2fa1b-22b0-11d3-aa62-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Pseudo-PF-Admin,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Public-Folder        
-# A representation of a public folder.
-#
-dn: CN=ms-Exch-Public-Folder,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Public-Folder
-distinguishedName: CN=ms-Exch-Public-Folder,${SCHEMADN}
-possSuperiors: msExchSystemObjectsContainer
-possSuperiors: organizationalUnit
-possSuperiors: domainDNS
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.15
-mayContain: pFContacts
-mayContain: msExchPFTreeType
-mayContain: title
-mayContain: co
-mayContain: st
-mayContain: physicalDeliveryOfficeName
-mayContain: l
-mayContain: department
-mayContain: company
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-Folder
-adminDescription: ms-Exch-Public-Folder
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: msExchCustomAttributes
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: publicFolder
-name: ms-Exch-Public-Folder
-schemaIDGUID: f0f8ffac-1191-11d0-a060-00aa006c33ed
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(OA;;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Public-Folder,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Public-Folder-Tree-Container 
-# A container used to hold public folders. Used for extended rights and
-# roles.
-#
-dn: CN=ms-Exch-Public-Folder-Tree-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Public-Folder-Tree-Container
-distinguishedName: CN=ms-Exch-Public-Folder-Tree-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50015
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-Folder-Tree-Container
-adminDescription: ms-Exch-Public-Folder-Tree-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPublicFolderTreeContainer
-name: ms-Exch-Public-Folder-Tree-Container
-schemaIDGUID: 3582ed82-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Public-Folder-Tree-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Public-MDB-Policy    
-#
-dn: CN=ms-Exch-Public-MDB-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Public-MDB-Policy
-distinguishedName: CN=ms-Exch-Public-MDB-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: msExchPublicMDB
-governsID: 1.2.840.113556.1.5.7000.62.50002
-mayContain: msExchPolicyLastAppliedTime
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyLockDown
-mayContain: msExchPolicyListBL
-mayContain: msExchPolicyDefault
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-MDB-Policy
-adminDescription: ms-Exch-Public-MDB-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPublicMDBPolicy
-name: ms-Exch-Public-MDB-Policy
-schemaIDGUID: 354c176c-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Public-MDB-Policy,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RAS-Stack       
-# The Remote Access Service (RAS) Transport Stack for the MTA.
-#
-dn: CN=ms-Exch-RAS-Stack,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-RAS-Stack
-distinguishedName: CN=ms-Exch-RAS-Stack,${SCHEMADN}
-possSuperiors: mTA
-possSuperiors: container
-possSuperiors: computer
-subClassOf: transportStack
-governsID: 1.2.840.113556.1.3.26
-mayContain: rASCallbackNumber
-mayContain: encrypt
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-Stack
-adminDescription: ms-Exch-RAS-Stack
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: rASStack
-name: ms-Exch-RAS-Stack
-schemaIDGUID: a8df74d3-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-RAS-Stack,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-RAS-X400-Link        
-# Specifies a remote X.400 MTA using a RAS Transport.
-#
-dn: CN=ms-Exch-RAS-X400-Link,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-RAS-X400-Link
-distinguishedName: CN=ms-Exch-RAS-X400-Link,${SCHEMADN}
-possSuperiors: container
-subClassOf: x400Link
-governsID: 1.2.840.113556.1.3.34
-mayContain: rASRemoteSRVRName
-mayContain: rASPhonebookEntryName
-mayContain: rASPhoneNumber
-mayContain: rASCallbackNumber
-mayContain: authorizedUser
-mayContain: authorizedPassword
-mayContain: authorizedDomain
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-X400-Link
-adminDescription: ms-Exch-RAS-X400-Link
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: rASX400Link
-name: ms-Exch-RAS-X400-Link
-schemaIDGUID: a8df74d4-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-RAS-X400-Link,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Recipient-Policy
-#
-dn: CN=ms-Exch-Recipient-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Recipient-Policy
-distinguishedName: CN=ms-Exch-Recipient-Policy,${SCHEMADN}
-possSuperiors: msExchRecipientPolicyContainer
-subClassOf: msExchGenericPolicy
-governsID: 1.2.840.113556.1.5.7000.62.50024
-mayContain: msExchMinAdminVersion
-mayContain: msExchAddressListOU
-mayContain: msExchNonAuthoritativeDomains
-mayContain: msExchAppliesToSmtpVS
-mayContain: msExchProxyGenOptions
-mayContain: msExchPolicyOrder
-mayContain: gatewayProxy
-mayContain: disabledGatewayProxy
-mayContain: msExchAssociatedAG
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recipient-Policy
-adminDescription: ms-Exch-Recipient-Policy
-auxiliaryClass: msExchMailboxManagerPolicy
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: msExchCustomAttributes
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: msExchRecipientPolicy
-name: ms-Exch-Recipient-Policy
-schemaIDGUID: e32977d8-1d31-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Recipient-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-Replication-Connector   
-#
-dn: CN=ms-Exch-Replication-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Replication-Connector
-distinguishedName: CN=ms-Exch-Replication-Connector,${SCHEMADN}
-possSuperiors: msExchReplicationConnectorContainer
-subClassOf: msExchConnector
-governsID: 1.2.840.113556.1.5.7000.62.11
-mayContain: trustLevel
-mayContain: replicationStagger
-mayContain: replicationMailMsgSize
-mayContain: remoteSite
-mayContain: remoteBridgeHeadAddress
-mayContain: remoteBridgeHead
-mayContain: outboundSites
-mayContain: localBridgeHeadAddress
-mayContain: localBridgeHead
-mayContain: kCCStatus
-mayContain: inboundSites
-mayContain: activationStyle
-mayContain: activationSchedule
-mayContain: addressType
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Connector
-adminDescription: ms-Exch-Replication-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchReplicationConnector
-name: ms-Exch-Replication-Connector
-schemaIDGUID: 99f58682-12e8-11d3-aa58-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Replication-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-RFC1006-Stack    
-# The RFC 1006 (TCP/IP) Transport Stack for the MTA.
-#
-dn: CN=ms-Exch-RFC1006-Stack,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-RFC1006-Stack
-distinguishedName: CN=ms-Exch-RFC1006-Stack,${SCHEMADN}
-possSuperiors: mTA
-subClassOf: transportStack
-governsID: 1.2.840.113556.1.3.24
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RFC1006-Stack
-adminDescription: ms-Exch-RFC1006-Stack
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: rFC1006Stack
-name: ms-Exch-RFC1006-Stack
-schemaIDGUID: a8df74d7-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-RFC1006-Stack,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RFC1006-X400-Link    
-# Specifies a remote X.400 MTA using an RFC 1006 (TCP/IP) Transport.
-#
-dn: CN=ms-Exch-RFC1006-X400-Link,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-RFC1006-X400-Link
-distinguishedName: CN=ms-Exch-RFC1006-X400-Link,${SCHEMADN}
-subClassOf: x400Link
-governsID: 1.2.840.113556.1.3.32
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RFC1006-X400-Link
-adminDescription: ms-Exch-RFC1006-X400-Link
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: rFC1006X400Link
-name: ms-Exch-RFC1006-X400-Link
-schemaIDGUID: a8df74d8-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-RFC1006-X400-Link,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-Routing-Group  
-# Container used to hold routing group information.
-#
-dn: CN=ms-Exch-Routing-Group,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Routing-Group
-distinguishedName: CN=ms-Exch-Routing-Group,${SCHEMADN}
-possSuperiors: msExchRoutingGroupContainer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.12002
-mayContain: msExchMinAdminVersion
-mayContain: msExchRoutingGroupMembersBL
-mayContain: msExchInconsistentState
-mayContain: msExchRoutingMasterDN
-mayContain: msExchRoutingGroupMembersDN
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Group
-adminDescription: ms-Exch-Routing-Group
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchRoutingGroup
-name: ms-Exch-Routing-Group
-schemaIDGUID: 35154156-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Routing-Group,${SCHEMADN}
-
-#
-# ms-Exch-Routing-Group-Connector
-#
-dn: CN=ms-Exch-Routing-Group-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Routing-Group-Connector
-distinguishedName: CN=ms-Exch-Routing-Group-Connector,${SCHEMADN}
-possSuperiors: msExchConnectors
-subClassOf: msExchConnector
-governsID: 1.2.840.113556.1.5.7000.62.12007
-mayContain: msExchEncryptedPassword
-mayContain: targetMTAs
-mayContain: homeMTA
-mayContain: domainName
-mayContain: authorizedUser
-mayContain: authorizedPassword
-mayContain: authorizedDomain
-mayContain: cost
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Group-Connector
-adminDescription: ms-Exch-Routing-Group-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchRoutingGroupConnector
-name: ms-Exch-Routing-Group-Connector
-schemaIDGUID: 899e5b86-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Routing-Group-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-Routing-SMTP-Connector
-#
-dn: CN=ms-Exch-Routing-SMTP-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Routing-SMTP-Connector
-distinguishedName: CN=ms-Exch-Routing-SMTP-Connector,${SCHEMADN}
-possSuperiors: msExchConnectors
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.12008
-mayContain: msExchSmtpTRNSmartHost
-mayContain: msExchSecurityPassword
-mayContain: msExchRoutingETRNDomains
-mayContain: msExchSmtpSmartHost
-mayContain: msExchSmtpOutboundSecurityUserName
-mayContain: msExchSmtpOutboundSecurityPassword
-mayContain: msExchSmtpOutboundSecurityFlag
-mayContain: msExchSmtpAuthorizedTRNAccounts
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-SMTP-Connector
-adminDescription: ms-Exch-Routing-SMTP-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchRoutingSMTPConnector
-name: ms-Exch-Routing-SMTP-Connector
-schemaIDGUID: 89baf7be-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Routing-SMTP-Connector,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Schedule-Plus-Connector
-#
-dn: CN=ms-Exch-Schedule-Plus-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Schedule-Plus-Connector
-distinguishedName: CN=ms-Exch-Schedule-Plus-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: exchangeAdminService
-governsID: 1.2.840.113556.1.5.7000.62.1008
-mayContain: computerName
-mayContain: transferRetryInterval
-mayContain: msExchSchedPlusSchedist
-mayContain: msExchSchedPlusFullUpdate
-mayContain: msExchSchedPlusAGOnly
-mayContain: msExchAdminMailbox
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Schedule-Plus-Connector
-adminDescription: ms-Exch-Schedule-Plus-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSchedulePlusConnector
-name: ms-Exch-Schedule-Plus-Connector
-schemaIDGUID: b1fce946-1d44-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Schedule-Plus-Connector,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Schema-Map-Policy          
-# The policy object for connection agreements.
-#
-dn: CN=ms-Exch-Schema-Map-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Schema-Map-Policy
-distinguishedName: CN=ms-Exch-Schema-Map-Policy,${SCHEMADN}
-possSuperiors: organizationalUnit
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.1
-mayContain: msExchADCObjectType
-mayContain: versionNumber
-mayContain: msExchServer2SchemaMap
-mayContain: msExchServer2ObjectMatch
-mayContain: msExchServer2Flags
-mayContain: msExchServer1SchemaMap
-mayContain: msExchServer1ObjectMatch
-mayContain: msExchServer1Flags
-mayContain: msExchSchemaPolicyConsumers
-mayContain: msExchAccessControlMap
-mayContain: displayName
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Schema-Map-Policy
-adminDescription: ms-Exch-Schema-Map-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSchemaMapPolicy
-name: ms-Exch-Schema-Map-Policy
-schemaIDGUID: 348af8f2-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Schema-Map-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-Site-Addressing        
-# Represents the messaging domain.
-#
-dn: CN=ms-Exch-Site-Addressing,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Site-Addressing
-distinguishedName: CN=ms-Exch-Site-Addressing,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.0
-mustContain: cn
-mayContain: spaceLastComputed
-mayContain: siteProxySpace
-mayContain: routingList
-mayContain: ridServer
-mayContain: gWARTLastModified
-mayContain: gatewayRoutingTree
-mayContain: gatewayProxy
-mayContain: filterLocalAddresses
-mayContain: disabledGatewayProxy
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Addressing
-adminDescription: ms-Exch-Site-Addressing
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: siteAddressing
-name: ms-Exch-Site-Addressing
-schemaIDGUID: a8df74d9-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Site-Addressing,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Site-Connector       
-# A symbolic link to another domain's message transfer agents (MTAs).
-#
-dn: CN=ms-Exch-Site-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Site-Connector
-distinguishedName: CN=ms-Exch-Site-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: msExchConnector
-governsID: 1.2.840.113556.1.3.50
-mustContain: cn
-mayContain: targetMTAs
-mayContain: msExchTargetBridgeheadServersDN
-mayContain: msExchSourceBridgeheadServersDN
-mayContain: msExchSourceBHAddress
-mayContain: routingList
-mayContain: homeMTA
-mayContain: domainName
-mayContain: msExchDestinationRGDN
-mayContain: msExchDestBHAddress
-mayContain: msExchConnectorType
-mayContain: bridgeheadServers
-mayContain: authorizedUser
-mayContain: authorizedPassword
-mayContain: authorizedDomain
-mayContain: cost
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Connector
-adminDescription: ms-Exch-Site-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: siteConnector
-name: ms-Exch-Site-Connector
-schemaIDGUID: a8df74da-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Site-Connector,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Site-Replication-Service         
-#
-dn: CN=ms-Exch-Site-Replication-Service,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Site-Replication-Service
-distinguishedName: CN=ms-Exch-Site-Replication-Service,${SCHEMADN}
-possSuperiors: msExchExchangeServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.10
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Replication-Service
-adminDescription: ms-Exch-Site-Replication-Service
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: msExchSiteReplicationService
-name: ms-Exch-Site-Replication-Service
-schemaIDGUID: 99f5867b-12e8-11d3-aa58-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Site-Replication-Service,${SCHEMADN}
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-Rule
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-Rule,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-Rule
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-Rule,${SCHEMADN}
-possSuperiors: msExchSmtpConnectionTurfList
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.12011
-mayContain: msExchSmtpConnectionTurfListResponse
-mayContain: msExchSmtpConnectionTurfListOptions
-mayContain: msExchSmtpConnectionTurfListMask
-mayContain: msExchSmtpConnectionTurfListDNS
-mayContain: msExchSmtpConnectionTurfListDisplay
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-Rule
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-Rule
-objectClassCategory: 1
-lDAPDisplayName: msExchSmtpConnectionTurfListRule
-name: ms-Exch-Smtp-Connection-Turf-List-Rule
-schemaIDGUID: 6abadfad-e2f6-4ddb-9820-0da9c47da32c
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Smtp-Connection-Turf-List-Rule,${SCHEMADN}
-
-
-
-#
-# ms-Exch-SNADS-Connector             
-# The SNA Distribution System (SNADS) Connector.
-#
-dn: CN=ms-Exch-SNADS-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-SNADS-Connector
-distinguishedName: CN=ms-Exch-SNADS-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1003
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SNADS-Connector
-adminDescription: ms-Exch-SNADS-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSNADSConnector
-name: ms-Exch-SNADS-Connector
-schemaIDGUID: 91b17254-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-SNADS-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-System-Policy                  
-# The internal system policy.
-#
-dn: CN=ms-Exch-System-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-System-Policy
-distinguishedName: CN=ms-Exch-System-Policy,${SCHEMADN}
-possSuperiors: msExchSystemPolicyContainer
-subClassOf: msExchGenericPolicy
-governsID: 1.2.840.113556.1.5.7000.62.16
-mayContain: msExchMinAdminVersion
-mayContain: heuristics
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-System-Policy
-adminDescription: ms-Exch-System-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSystemPolicy
-name: ms-Exch-System-Policy
-schemaIDGUID: ba085a33-8807-4c6c-9522-2cf5a2a5e9c2
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-System-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-TP4-Stack    
-# The TP4 Transport Stack for the MTA.
-#
-dn: CN=ms-Exch-TP4-Stack,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-TP4-Stack
-distinguishedName: CN=ms-Exch-TP4-Stack,${SCHEMADN}
-possSuperiors: mTA
-possSuperiors: container
-possSuperiors: computer
-subClassOf: transportStack
-governsID: 1.2.840.113556.1.3.25
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-TP4-Stack
-adminDescription: ms-Exch-TP4-Stack
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: tP4Stack
-name: ms-Exch-TP4-Stack
-schemaIDGUID: a8df74db-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-TP4-Stack,${SCHEMADN}
-
-
-#
-# ms-Exch-TP4-X400-Link 
-# Specifies a remote X.400 MTA using a TP4 Transport.
-#
-dn: CN=ms-Exch-TP4-X400-Link,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-TP4-X400-Link
-distinguishedName: CN=ms-Exch-TP4-X400-Link,${SCHEMADN}
-possSuperiors: container
-subClassOf: x400Link
-governsID: 1.2.840.113556.1.3.33
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-TP4-X400-Link
-adminDescription: ms-Exch-TP4-X400-Link
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: tP4X400Link
-name: ms-Exch-TP4-X400-Link
-schemaIDGUID: a8df74dc-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-TP4-X400-Link,${SCHEMADN}
-
-
-#
-# ms-Exch-Uce    
-# Reserved.
-#
-dn: CN=ms-Exch-Uce,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Uce
-distinguishedName: CN=ms-Exch-Uce,${SCHEMADN}
-possSuperiors: msExchMessageDeliveryConfig
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50037
-mayContain: msExchUceStoreActionThreshold
-mayContain: msExchUceEnabled
-mayContain: msExchUceBlockThreshold
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Uce
-adminDescription: ms-Exch-Uce
-objectClassCategory: 1
-lDAPDisplayName: msExchUce
-name: ms-Exch-Uce
-schemaIDGUID: c5ccdce1-b399-405f-8ab7-bc6434d2e422
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Uce,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-Stack    
-# The X.25 Transport Stack for the MTA.
-#
-dn: CN=ms-Exch-X25-Stack,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-X25-Stack
-distinguishedName: CN=ms-Exch-X25-Stack,${SCHEMADN}
-possSuperiors: mTA
-possSuperiors: container
-possSuperiors: computer
-subClassOf: transportStack
-governsID: 1.2.840.113556.1.3.27
-mustContain: x25LeasedLinePort
-mayContain: x25LeasedOrSwitched
-mayContain: x25FacilitiesDataIncoming
-mayContain: x25CallUserDataIncoming
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Stack
-adminDescription: ms-Exch-X25-Stack
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: x25Stack
-name: ms-Exch-X25-Stack
-schemaIDGUID: a8df74de-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-X25-Stack,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-X400-Link  
-# Specifies a remote X.400 MTA using an X.25 Transport.
-#
-dn: CN=ms-Exch-X25-X400-Link,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-X25-X400-Link
-distinguishedName: CN=ms-Exch-X25-X400-Link,${SCHEMADN}
-possSuperiors: container
-subClassOf: x400Link
-governsID: 1.2.840.113556.1.3.35
-mayContain: x25RemoteMTAPhone
-mayContain: x25FacilitiesDataOutgoing
-mayContain: x25FacilitiesDataIncoming
-mayContain: x25CallUserDataOutgoing
-mayContain: x25CallUserDataIncoming
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-X400-Link
-adminDescription: ms-Exch-X25-X400-Link
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: x25X400Link
-name: ms-Exch-X25-X400-Link
-schemaIDGUID: a8df74df-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-X25-X400-Link,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_attributes.ldif b/branches/plugfest/setup/AD/oc_provision_schema_attributes.ldif
deleted file mode 100644 (file)
index d513089..0000000
+++ /dev/null
@@ -1,23807 +0,0 @@
-##############################################################################
-# AttributeSchema added
-##############################################################################
-
-
-
-
-# 
-# msExch-Proxy-Gen-Options
-#
-dn: CN=msExch-Proxy-Gen-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: msExch-Proxy-Gen-Options
-distinguishedName: CN=msExch-Proxy-Gen-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50044
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: msExch-Proxy-Gen-Options
-adminDescription: msExch-Proxy-Gen-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchProxyGenOptions
-name: msExch-Proxy-Gen-Options
-schemaIDGUID: 974c9a02-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Access-Control-Map   
-# Contains the mapping for the access controls.
-#
-dn: CN=ms-Exch-Access-Control-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Access-Control-Map
-distinguishedName: CN=ms-Exch-Access-Control-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.64
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Access-Control-Map
-adminDescription: ms-Exch-Access-Control-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAccessControlMap
-name: ms-Exch-Access-Control-Map
-schemaIDGUID: 8ff54464-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Access-Flags     
-# The authentication method to use.
-#
-dn: CN=ms-Exch-Access-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Access-Flags
-distinguishedName: CN=ms-Exch-Access-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Access-Flags
-adminDescription: ms-Exch-Access-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAccessFlags
-name: ms-Exch-Access-Flags
-schemaIDGUID: 901b6a04-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Access-SSL-Flags     
-# The type of encrypted channel that this resource supports.
-#
-dn: CN=ms-Exch-Access-SSL-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Access-SSL-Flags
-distinguishedName: CN=ms-Exch-Access-SSL-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Access-SSL-Flags
-adminDescription: ms-Exch-Access-SSL-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAccessSSLFlags
-name: ms-Exch-Access-SSL-Flags
-schemaIDGUID: 903f2d4a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Activation-Schedule  
-# This is the schedule if "scheduled times" is selected.
-#
-dn: CN=ms-Exch-Activation-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Activation-Schedule
-distinguishedName: CN=ms-Exch-Activation-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.213
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-mAPIID: 32837
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Activation-Schedule
-adminDescription: ms-Exch-Activation-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: activationSchedule
-name: ms-Exch-Activation-Schedule
-schemaIDGUID: bf967916-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Activation-Style
-#
-dn: CN=ms-Exch-Activation-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Activation-Style
-distinguishedName: CN=ms-Exch-Activation-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.73
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32838
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Activation-Style
-adminDescription: ms-Exch-Activation-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: activationStyle
-name: ms-Exch-Activation-Style
-schemaIDGUID: bf967917-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ADC-Global-Names 
-#
-dn: CN=ms-Exch-ADC-Global-Names,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ADC-Global-Names
-distinguishedName: CN=ms-Exch-ADC-Global-Names,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.63
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ADC-Global-Names
-adminDescription: ms-Exch-ADC-Global-Names
-oMSyntax: 64
-searchFlags: 1
-lDAPDisplayName: msExchADCGlobalNames
-name: ms-Exch-ADC-Global-Names
-schemaIDGUID: 9062f090-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ADC-Object-Type     
-# A bit used to distinguish the type of connection agreement.
-#
-dn: CN=ms-Exch-ADC-Object-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ADC-Object-Type
-distinguishedName: CN=ms-Exch-ADC-Object-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.84
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ADC-Object-Type
-adminDescription: ms-Exch-ADC-Object-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchADCObjectType
-name: ms-Exch-ADC-Object-Type
-schemaIDGUID: 4859fb55-1924-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ADC-Options 
-# The options bitstring.
-#
-dn: CN=ms-Exch-ADC-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ADC-Options
-distinguishedName: CN=ms-Exch-ADC-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.41
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ADC-Options
-adminDescription: ms-Exch-ADC-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchADCOptions
-name: ms-Exch-ADC-Options
-schemaIDGUID: 90891630-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-Additional-DN-Map    
-# Additional source-target pairs for straight distinguished name (DN)
-# mapping.
-#
-dn: CN=ms-Exch-Additional-DN-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Additional-DN-Map
-distinguishedName: CN=ms-Exch-Additional-DN-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.42
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Additional-DN-Map
-adminDescription: ms-Exch-Additional-DN-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAdditionalDNMap
-name: ms-Exch-Additional-DN-Map
-schemaIDGUID: 90a814c2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Address-List-OU
-#
-dn: CN=ms-Exch-Address-List-OU,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Address-List-OU
-distinguishedName: CN=ms-Exch-Address-List-OU,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.112
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Address-List-OU
-adminDescription: ms-Exch-Address-List-OU
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAddressListOU
-name: ms-Exch-Address-List-OU
-schemaIDGUID: f4b93a0d-f30c-44ff-aa47-e74806dbced2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Address-List-Service-BL   
-# The link from the Exchange server to the address list service
-# running on it.
-#
-dn: CN=ms-Exch-Address-List-Service-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Address-List-Service-BL
-distinguishedName: CN=ms-Exch-Address-List-Service-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.74
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1017
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Address-List-Service-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Address-List-Service-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAddressListServiceBL
-name: ms-Exch-Address-List-Service-BL
-schemaIDGUID: 8a407b6e-b09e-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Address-List-Service-Link     
-# A link from the address list service to the Exchange server it
-# should be running on.
-#
-dn: CN=ms-Exch-Address-List-Service-Link,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Address-List-Service-Link
-distinguishedName: CN=ms-Exch-Address-List-Service-Link,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.75
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1016
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Address-List-Service-Link
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Address-List-Service-Link
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAddressListServiceLink
-name: ms-Exch-Address-List-Service-Link
-schemaIDGUID: 9b6e9584-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Add-Groups-To-Token
-#
-dn: CN=ms-Exch-Add-Groups-To-Token,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Add-Groups-To-Token
-distinguishedName: CN=ms-Exch-Add-Groups-To-Token,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.95
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Add-Groups-To-Token
-adminDescription: ms-Exch-Add-Groups-To-Token
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchAddGroupsToToken
-name: ms-Exch-Add-Groups-To-Token
-schemaIDGUID: 9c4d7592-ef4a-4c69-8f30-6f18ca1ec370
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ADMD     
-# Used by the message transfer agent (MTA) to determine if Internal
-# Trace Information should be stripped.
-dn: CN=ms-Exch-ADMD,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ADMD
-distinguishedName: CN=ms-Exch-ADMD,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.232
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 32841
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ADMD
-adminDescription: ms-Exch-ADMD
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: aDMD
-name: ms-Exch-ADMD
-schemaIDGUID: a8df7390-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Admins     
-# A link to all Exchange administrators within the organization along
-# with the appropriate permissions.
-#
-dn: CN=ms-Exch-Admins,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admins
-distinguishedName: CN=ms-Exch-Admins,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50064
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admins
-adminDescription: ms-Exch-Admins
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAdmins
-name: ms-Exch-Admins
-schemaIDGUID: b644c27a-a419-40b6-a62e-180930df5610
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Admin-ACL          
-# The access control list (ACL).
-#
-dn: CN=ms-Exch-Admin-ACL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admin-ACL
-distinguishedName: CN=ms-Exch-Admin-ACL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2011
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-ACL
-adminDescription: ms-Exch-Admin-ACL
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAdminACL
-name: ms-Exch-Admin-ACL
-schemaIDGUID: 90c975ae-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Admin-Extension-DLL
-#
-dn: CN=ms-Exch-Admin-Extension-DLL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admin-Extension-DLL
-distinguishedName: CN=ms-Exch-Admin-Extension-DLL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.95
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 255
-mAPIID: 32844
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Extension-DLL
-adminDescription: ms-Exch-Admin-Extension-DLL
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: adminExtensionDLL
-name: ms-Exch-Admin-Extension-DLL
-schemaIDGUID: a8df7391-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Admin-Groups-Enabled 
-# Used by the user interface (UI) to determine whether to display
-# Administrator Groups.
-#
-dn: CN=ms-Exch-Admin-Groups-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admin-Groups-Enabled
-distinguishedName: CN=ms-Exch-Admin-Groups-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50026
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Groups-Enabled
-adminDescription: ms-Exch-Admin-Groups-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchAdminGroupsEnabled
-name: ms-Exch-Admin-Groups-Enabled
-schemaIDGUID: e32977ae-1d31-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Admin-Group-Mode 
-# The type of servers that are in the Administrator Group.
-#
-dn: CN=ms-Exch-Admin-Group-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admin-Group-Mode
-distinguishedName: CN=ms-Exch-Admin-Group-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50014
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Group-Mode
-adminDescription: ms-Exch-Admin-Group-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAdminGroupMode
-name: ms-Exch-Admin-Group-Mode
-schemaIDGUID: 90ead69a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Admin-Mailbox        
-# A link to the administrator mailbox of the cc:Mail Connector.
-#
-dn: CN=ms-Exch-Admin-Mailbox,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Admin-Mailbox
-distinguishedName: CN=ms-Exch-Admin-Mailbox,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1034
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Mailbox
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Admin-Mailbox
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAdminMailbox
-name: ms-Exch-Admin-Mailbox
-schemaIDGUID: 94e9a76c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Aging-Keep-Time   
-# The time value used to determine when to remove indexes, views, and
-# categorizations. The default is 8 days.
-#
-dn: CN=ms-Exch-Aging-Keep-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Aging-Keep-Time
-distinguishedName: CN=ms-Exch-Aging-Keep-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11059
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Aging-Keep-Time
-adminDescription: ms-Exch-Aging-Keep-Time
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAgingKeepTime
-name: ms-Exch-Aging-Keep-Time
-schemaIDGUID: 5872299f-123a-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Alias-Gen-Format    
-# The time/date that this policy was applied.
-#
-dn: CN=ms-Exch-Alias-Gen-Format,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alias-Gen-Format
-distinguishedName: CN=ms-Exch-Alias-Gen-Format,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50010
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alias-Gen-Format
-adminDescription: ms-Exch-Alias-Gen-Format
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchAliasGenFormat
-name: ms-Exch-Alias-Gen-Format
-schemaIDGUID: 912b3618-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Alias-Gen-Type   
-# The time/date that this policy was applied.
-#
-dn: CN=ms-Exch-Alias-Gen-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alias-Gen-Type
-distinguishedName: CN=ms-Exch-Alias-Gen-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50011
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alias-Gen-Type
-adminDescription: ms-Exch-Alias-Gen-Type
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchAliasGenType
-name: ms-Exch-Alias-Gen-Type
-schemaIDGUID: 914ef95e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Alias-Gen-Uniqueness 
-# The time/date that this policy was applied.
-#
-dn: CN=ms-Exch-Alias-Gen-Uniqueness,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alias-Gen-Uniqueness
-distinguishedName: CN=ms-Exch-Alias-Gen-Uniqueness,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50012
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alias-Gen-Uniqueness
-adminDescription: ms-Exch-Alias-Gen-Uniqueness
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchAliasGenUniqueness
-name: ms-Exch-Alias-Gen-Uniqueness
-schemaIDGUID: 91705a4a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Allow-Additional-Resources   
-# Allows conference resource extension requests.
-#
-dn: CN=ms-Exch-Allow-Additional-Resources,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Allow-Additional-Resources
-distinguishedName: CN=ms-Exch-Allow-Additional-Resources,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9006
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Allow-Additional-Resources
-adminDescription: ms-Exch-Allow-Additional-Resources
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchAllowAdditionalResources
-name: ms-Exch-Allow-Additional-Resources
-schemaIDGUID: 91941d90-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Allow-Enhanced-Security
-#
-dn: CN=ms-Exch-Allow-Enhanced-Security,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Allow-Enhanced-Security
-distinguishedName: CN=ms-Exch-Allow-Enhanced-Security,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11087
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Allow-Enhanced-Security
-adminDescription: ms-Exch-Allow-Enhanced-Security
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchAllowEnhancedSecurity
-name: ms-Exch-Allow-Enhanced-Security
-schemaIDGUID: 63b79cf2-1f4b-4766-ba5b-814b6077640f
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Allow-Time-Extensions                
-# Allows conference time extension requests.
-#
-dn: CN=ms-Exch-Allow-Time-Extensions,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Allow-Time-Extensions
-distinguishedName: CN=ms-Exch-Allow-Time-Extensions,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9005
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Allow-Time-Extensions
-adminDescription: ms-Exch-Allow-Time-Extensions
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchAllowTimeExtensions
-name: ms-Exch-Allow-Time-Extensions
-schemaIDGUID: 91b7e0d6-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Alternate-Server     
-# Contains the host name of an alternate server that accepts mail for
-# the default domain.
-dn: CN=ms-Exch-Alternate-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alternate-Server
-distinguishedName: CN=ms-Exch-Alternate-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12532
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alternate-Server
-adminDescription: ms-Exch-Alternate-Server
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: msExchAlternateServer
-name: ms-Exch-Alternate-Server
-schemaIDGUID: 974c99f9-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-# 
-# ms-Exch-Alt-Recipient               
-# Delivers to this recipient if a specified recipient cannot be
-# delivered to.
-#
-dn: CN=ms-Exch-Alt-Recipient,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alt-Recipient
-distinguishedName: CN=ms-Exch-Alt-Recipient,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.126
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32846
-linkID: 12
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alt-Recipient
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Alt-Recipient
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: altRecipient
-name: ms-Exch-Alt-Recipient
-schemaIDGUID: bf96791e-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Alt-Recipient-BL       
-# A backlink to ms-Exch-Alt-Recipient.
-#
-dn: CN=ms-Exch-Alt-Recipient-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Alt-Recipient-BL
-distinguishedName: CN=ms-Exch-Alt-Recipient-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.294
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32847
-linkID: 13
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Alt-Recipient-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Alt-Recipient-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: altRecipientBL
-name: ms-Exch-Alt-Recipient-BL
-schemaIDGUID: bf96791f-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-AL-Object-Version
-#
-dn: CN=ms-Exch-AL-Object-Version,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-AL-Object-Version
-distinguishedName: CN=ms-Exch-AL-Object-Version,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.59
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-AL-Object-Version
-adminDescription: ms-Exch-AL-Object-Version
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchALObjectVersion
-name: ms-Exch-AL-Object-Version
-schemaIDGUID: 910c3786-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Anonymous-Access  
-# Determines whether or not anonymous access is allowed via this
-# protocol.
-#
-dn: CN=ms-Exch-Anonymous-Access,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Anonymous-Access
-distinguishedName: CN=ms-Exch-Anonymous-Access,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.482
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33159
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Anonymous-Access
-adminDescription: ms-Exch-Anonymous-Access
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: anonymousAccess
-name: ms-Exch-Anonymous-Access
-schemaIDGUID: a8df7392-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Anonymous-Account
-#
-dn: CN=ms-Exch-Anonymous-Account,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Anonymous-Account
-distinguishedName: CN=ms-Exch-Anonymous-Account,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.561
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 35878
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Anonymous-Account
-adminDescription: ms-Exch-Anonymous-Account
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: anonymousAccount
-name: ms-Exch-Anonymous-Account
-schemaIDGUID: a8df7393-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Applies-To-Smtp-VS
-#
-dn: CN=ms-Exch-Applies-To-Smtp-VS,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Applies-To-Smtp-VS
-distinguishedName: CN=ms-Exch-Applies-To-Smtp-VS,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5058
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1034
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Applies-To-Smtp-VS
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Applies-To-Smtp-VS
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAppliesToSmtpVS
-name: ms-Exch-Applies-To-Smtp-VS
-schemaIDGUID: 2925413e-fa41-4d01-945d-a15b5d6bb965
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Applies-To-Smtp-VS-BL        
-#
-dn: CN=ms-Exch-Applies-To-Smtp-VS-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Applies-To-Smtp-VS-BL
-distinguishedName: CN=ms-Exch-Applies-To-Smtp-VS-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5059
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1035
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Applies-To-Smtp-VS-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Applies-To-Smtp-VS-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAppliesToSmtpVSBL
-name: ms-Exch-Applies-To-Smtp-VS-BL
-schemaIDGUID: f7d091b1-1ced-446a-b521-563a01eaf22c
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Assistant-Name
-#
-#dn: CN=ms-Exch-Assistant-Name,${SCHEMADN}
-#objectClass: top
-#objectClass: attributeSchema
-#cn: ms-Exch-Assistant-Name
-#distinguishedName: CN=ms-Exch-Assistant-Name,${SCHEMADN}
-#attributeID: 1.2.840.113556.1.2.444
-#attributeSyntax: 2.5.5.12
-#isSingleValued: TRUE
-#rangeLower: 1
-#rangeUpper: 256
-#mAPIID: 14896
-#adminDisplayName: ms-Exch-Assistant-Name
-#adminDescription: ms-Exch-Assistant-Name
-#oMSyntax: 64
-#searchFlags: 0
-#lDAPDisplayName: msExchAssistantName
-#name: ms-Exch-Assistant-Name
-#schemaIDGUID: a8df7394-c5ea-11d1-bbcb-0080c76670c0
-#attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-#objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Associated-AG
-#
-dn: CN=ms-Exch-Associated-AG,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Associated-AG
-distinguishedName: CN=ms-Exch-Associated-AG,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50031
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Associated-AG
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Associated-AG
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchAssociatedAG
-name: ms-Exch-Associated-AG
-schemaIDGUID: e5971321-1d3e-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Association-Lifetime   
-# The length of time a connection can be idle before it is closed.
-#
-dn: CN=ms-Exch-Association-Lifetime,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Association-Lifetime
-distinguishedName: CN=ms-Exch-Association-Lifetime,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.149
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 32850
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Association-Lifetime
-adminDescription: ms-Exch-Association-Lifetime
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: associationLifetime
-name: ms-Exch-Association-Lifetime
-schemaIDGUID: a8df7396-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Assoc-Remote-DXA
-#
-dn: CN=ms-Exch-Assoc-Remote-DXA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Assoc-Remote-DXA
-distinguishedName: CN=ms-Exch-Assoc-Remote-DXA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.299
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32849
-linkID: 123
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Assoc-Remote-DXA
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Assoc-Remote-DXA
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: assocRemoteDXA
-name: ms-Exch-Assoc-Remote-DXA
-schemaIDGUID: 16775789-47f3-11d1-a9c3-0000f80367c1
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Attribute-Certificate
-#
-dn: CN=ms-Exch-Attribute-Certificate,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Attribute-Certificate
-distinguishedName: CN=ms-Exch-Attribute-Certificate,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.587
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 32767
-mAPIID: 35909
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Attribute-Certificate
-adminDescription: ms-Exch-Attribute-Certificate
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: attributeCertificate
-name: ms-Exch-Attribute-Certificate
-schemaIDGUID: 1677578b-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Audit-Flags 
-# A bitmap indicating the events to log.
-#
-dn: CN=ms-Exch-Audit-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Audit-Flags
-distinguishedName: CN=ms-Exch-Audit-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9004
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Audit-Flags
-adminDescription: ms-Exch-Audit-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAuditFlags
-name: ms-Exch-Audit-Flags
-schemaIDGUID: 91d47d0e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Authentication-Flags 
-# Indicates which type of authentication this resource accepts.
-#
-dn: CN=ms-Exch-Authentication-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Authentication-Flags
-distinguishedName: CN=ms-Exch-Authentication-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2003
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Authentication-Flags
-adminDescription: ms-Exch-Authentication-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAuthenticationFlags
-name: ms-Exch-Authentication-Flags
-schemaIDGUID: 91f5ddfa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-AuthMailDisposition
-#
-dn: CN=ms-Exch-AuthMailDisposition,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-AuthMailDisposition
-distinguishedName: CN=ms-Exch-AuthMailDisposition,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.5061
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-AuthMailDisposition
-adminDescription: ms-Exch-AuthMailDisposition
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAuthMailDisposition
-name: ms-Exch-AuthMailDisposition
-schemaIDGUID: 57cfb6f7-1e2c-4d3e-96df-40208624baff
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Authorization-Persistence
-#
-dn: CN=ms-Exch-Authorization-Persistence,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Authorization-Persistence
-distinguishedName: CN=ms-Exch-Authorization-Persistence,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15011
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Authorization-Persistence
-adminDescription: ms-Exch-Authorization-Persistence
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchAuthorizationPersistence
-name: ms-Exch-Authorization-Persistence
-schemaIDGUID: d6ae616b-16c5-44ce-b272-8b923aebe335
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Authorized-Domain
-# The domain name of the authentication account to be used when
-# connecting to the other side of the connector.
-#
-dn: CN=ms-Exch-Authorized-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Authorized-Domain
-distinguishedName: CN=ms-Exch-Authorized-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.202
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 15
-mAPIID: 32852
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Authorized-Domain
-adminDescription: ms-Exch-Authorized-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: authorizedDomain
-name: ms-Exch-Authorized-Domain
-schemaIDGUID: a8df739a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Authorized-Password 
-# The password of the authentication account to be used when connecting
-# to the other side of the connector.
-#
-dn: CN=ms-Exch-Authorized-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Authorized-Password
-distinguishedName: CN=ms-Exch-Authorized-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.193
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 512
-mAPIID: 32853
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Authorized-Password
-adminDescription: ms-Exch-Authorized-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: authorizedPassword
-name: ms-Exch-Authorized-Password
-schemaIDGUID: a8df739b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Authorized-User  
-# The user name of the authentication account to be used when connecting
-# to the other side of the connector.
-#
-dn: CN=ms-Exch-Authorized-User,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Authorized-User
-distinguishedName: CN=ms-Exch-Authorized-User,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.276
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 512
-mAPIID: 32854
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Authorized-User
-adminDescription: ms-Exch-Authorized-User
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: authorizedUser
-name: ms-Exch-Authorized-User
-schemaIDGUID: a8df739d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Auth-Orig        
-# The users who are allowed to send mail to this recipient.
-#
-dn: CN=ms-Exch-Auth-Orig,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Auth-Orig
-distinguishedName: CN=ms-Exch-Auth-Orig,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.129
-attributeSyntax: 2.5.5.7
-isSingleValued: FALSE
-linkID: 110
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Auth-Orig
-oMObjectClass:: VgYBAgULHQ==
-adminDescription: ms-Exch-Auth-Orig
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: authOrig
-name: ms-Exch-Auth-Orig
-schemaIDGUID: a8df7397-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Auth-Orig-BL   
-# A backlink to ms-Exch-Auth-Orig.
-#
-dn: CN=ms-Exch-Auth-Orig-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Auth-Orig-BL
-distinguishedName: CN=ms-Exch-Auth-Orig-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.290
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32851
-linkID: 111
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Auth-Orig-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Auth-Orig-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: authOrigBL
-name: ms-Exch-Auth-Orig-BL
-schemaIDGUID: a8df7398-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-AutoReply
-#
-dn: CN=ms-Exch-AutoReply,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-AutoReply
-distinguishedName: CN=ms-Exch-AutoReply,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.286
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32779
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-AutoReply
-adminDescription: ms-Exch-AutoReply
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: autoReply
-name: ms-Exch-AutoReply
-schemaIDGUID: bf967929-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-AutoReply-Message 
-# Contains Internet Locator Service (ILS) settings in the form
-# SERVER/ACCOUNT.
-#
-dn: CN=ms-Exch-AutoReply-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-AutoReply-Message
-distinguishedName: CN=ms-Exch-AutoReply-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.287
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32778
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-AutoReply-Message
-adminDescription: ms-Exch-AutoReply-Message
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: autoReplyMessage
-name: ms-Exch-AutoReply-Message
-schemaIDGUID: bf96792a-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Available-Authorization-Packages
-#
-dn: CN=ms-Exch-Available-Authorization-Packages,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Available-Authorization-Packages
-distinguishedName: CN=ms-Exch-Available-Authorization-Packages,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.476
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 512
-mAPIID: 33153
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Available-Authorization-Packages
-adminDescription: ms-Exch-Available-Authorization-Packages
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: availableAuthorizationPackages
-name: ms-Exch-Available-Authorization-Packages
-schemaIDGUID: a8df739e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Available-Distributions
-#
-dn: CN=ms-Exch-Available-Distributions,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Available-Distributions
-distinguishedName: CN=ms-Exch-Available-Distributions,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.486
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 10240
-mAPIID: 33163
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Available-Distributions
-adminDescription: ms-Exch-Available-Distributions
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: availableDistributions
-name: ms-Exch-Available-Distributions
-schemaIDGUID: a8df739f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Available-Servers                
-# The installed conferencing servers.
-#
-dn: CN=ms-Exch-Available-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Available-Servers
-distinguishedName: CN=ms-Exch-Available-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9020
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Available-Servers
-adminDescription: ms-Exch-Available-Servers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchAvailableServers
-name: ms-Exch-Available-Servers
-schemaIDGUID: 923b022c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-BackEnd-VDir-URL
-#
-dn: CN=ms-Exch-BackEnd-VDir-URL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-BackEnd-VDir-URL
-distinguishedName: CN=ms-Exch-BackEnd-VDir-URL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15012
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-BackEnd-VDir-URL
-adminDescription: ms-Exch-BackEnd-VDir-URL
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchBackEndVDirURL
-name: ms-Exch-BackEnd-VDir-URL
-schemaIDGUID: b4b283b6-0c3f-4a59-9e50-be9026228231
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Background-Threads
-# The maximum number of background threads per server.
-#
-dn: CN=ms-Exch-Background-Threads,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Background-Threads
-distinguishedName: CN=ms-Exch-Background-Threads,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11038
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Background-Threads
-adminDescription: ms-Exch-Background-Threads
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchBackgroundThreads
-name: ms-Exch-Background-Threads
-schemaIDGUID: 93d051f0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Bar-Message-Class
-#
-dn: CN=ms-Exch-Bar-Message-Class,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Bar-Message-Class
-distinguishedName: CN=ms-Exch-Bar-Message-Class,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1064
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Bar-Message-Class
-adminDescription: ms-Exch-Bar-Message-Class
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchBarMessageClass
-name: ms-Exch-Bar-Message-Class
-schemaIDGUID: cf43e549-2ae1-410f-b896-02e40b934373
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Basic-Authentication-Domain    
-# The default domain name for incoming basic authentication.
-#
-dn: CN=ms-Exch-Basic-Authentication-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Basic-Authentication-Domain
-distinguishedName: CN=ms-Exch-Basic-Authentication-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2010
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Basic-Authentication-Domain
-adminDescription: ms-Exch-Basic-Authentication-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchBasicAuthenticationDomain
-name: ms-Exch-Basic-Authentication-Domain
-schemaIDGUID: 94262698-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Bridgeheaded-Local-Connectors-DN-BL  
-# A list of connectors (in the VSI's routing group) that this VSI is
-# the bridgehead for.
-#
-dn: CN=ms-Exch-Bridgeheaded-Local-Connectors-DN-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Bridgeheaded-Local-Connectors-DN-BL
-distinguishedName: CN=ms-Exch-Bridgeheaded-Local-Connectors-DN-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12515
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1003
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Bridgeheaded-Local-Connectors-DN-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Bridgeheaded-Local-Connectors-DN-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchBridgeheadedLocalConnectorsDNBL
-name: ms-Exch-Bridgeheaded-Local-Connectors-DN-BL
-schemaIDGUID: 944c4c38-b093-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-# 
-# ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL
-# A list of connectors (in a remote routing group) that this VSI is
-# the bridgehead for.
-#
-dn: CN=ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL
-distinguishedName: CN=ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12516
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1005
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchBridgeheadedRemoteConnectorsDNBL
-name: ms-Exch-Bridgeheaded-Remote-Connectors-DN-BL
-schemaIDGUID: 946dad24-b093-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Bridgehead-Servers     
-#
-dn: CN=ms-Exch-Bridgehead-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Bridgehead-Servers
-distinguishedName: CN=ms-Exch-Bridgehead-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.463
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33140
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Bridgehead-Servers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Bridgehead-Servers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: bridgeheadServers
-name: ms-Exch-Bridgehead-Servers
-schemaIDGUID: a8df73a0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Business-Roles
-#
-dn: CN=ms-Exch-Business-Roles,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Business-Roles
-distinguishedName: CN=ms-Exch-Business-Roles,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.105
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 4096
-mAPIID: 32803
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Business-Roles
-adminDescription: ms-Exch-Business-Roles
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: businessRoles
-name: ms-Exch-Business-Roles
-schemaIDGUID: f0f8ff87-1191-11d0-a060-00aa006c33ed
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CalCon-Client-Wait
-#
-dn: CN=ms-Exch-CalCon-Client-Wait,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CalCon-Client-Wait
-distinguishedName: CN=ms-Exch-CalCon-Client-Wait,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1043
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CalCon-Client-Wait
-adminDescription: ms-Exch-CalCon-Client-Wait
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCalConClientWait
-name: ms-Exch-CalCon-Client-Wait
-schemaIDGUID: 75447978-3752-4256-a89f-b4dfebae9a32
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CalCon-Providers       
-#
-dn: CN=ms-Exch-CalCon-Providers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CalCon-Providers
-distinguishedName: CN=ms-Exch-CalCon-Providers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1042
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CalCon-Providers
-adminDescription: ms-Exch-CalCon-Providers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCalConProviders
-name: ms-Exch-CalCon-Providers
-schemaIDGUID: 73b41a3e-68b0-45a1-9e30-697b6d19aee6
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CalCon-Query-Window    
-# 
-dn: CN=ms-Exch-CalCon-Query-Window,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CalCon-Query-Window
-distinguishedName: CN=ms-Exch-CalCon-Query-Window,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1040
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CalCon-Query-Window
-adminDescription: ms-Exch-CalCon-Query-Window
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCalConQueryWindow
-name: ms-Exch-CalCon-Query-Window
-schemaIDGUID: 5ebb881a-19d4-4526-b6f7-cc46d9aa1869
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CalCon-Refresh-Interval 
-# 
-dn: CN=ms-Exch-CalCon-Refresh-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CalCon-Refresh-Interval
-distinguishedName: CN=ms-Exch-CalCon-Refresh-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1041
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CalCon-Refresh-Interval
-adminDescription: ms-Exch-CalCon-Refresh-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCalConRefreshInterval
-name: ms-Exch-CalCon-Refresh-Interval
-schemaIDGUID: 22bf39b6-7528-412c-b277-aa268db43960
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CalCon-Target-SiteDN   
-# 
-dn: CN=ms-Exch-CalCon-Target-SiteDN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CalCon-Target-SiteDN
-distinguishedName: CN=ms-Exch-CalCon-Target-SiteDN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1044
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CalCon-Target-SiteDN
-adminDescription: ms-Exch-CalCon-Target-SiteDN
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCalConTargetSiteDN
-name: ms-Exch-CalCon-Target-SiteDN
-schemaIDGUID: 33b45526-8e8b-4679-97c3-4eeff39c7fbd
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Can-Preserve-DNs       
-# 
-dn: CN=ms-Exch-Can-Preserve-DNs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Can-Preserve-DNs
-distinguishedName: CN=ms-Exch-Can-Preserve-DNs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.455
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32864
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Can-Preserve-DNs
-adminDescription: ms-Exch-Can-Preserve-DNs
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: canPreserveDNs
-name: ms-Exch-Can-Preserve-DNs
-schemaIDGUID: a8df73a9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Catalog                
-# The globally unique identifier (GUID) of the catalog for this message
-# database (MDB).
-#
-dn: CN=ms-Exch-Catalog,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Catalog
-distinguishedName: CN=ms-Exch-Catalog,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11052
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Catalog
-adminDescription: ms-Exch-Catalog
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchCatalog
-name: ms-Exch-Catalog
-schemaIDGUID: 94abaa48-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-CA-Schema-Policy    
-# A link to a schema policy that this certification authority (CA)
-# uses.
-#
-dn: CN=ms-Exch-CA-Schema-Policy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CA-Schema-Policy
-distinguishedName: CN=ms-Exch-CA-Schema-Policy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.56
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1006
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CA-Schema-Policy
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-CA-Schema-Policy
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchCASchemaPolicy
-name: ms-Exch-CA-Schema-Policy
-schemaIDGUID: 948f0e10-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ccMail-ADE-Prop   
-# Allows the Automatic Directory Exchange (ADE) to propagate
-# synchronized entries to downstream cc:Mail post offices.
-#
-dn: CN=ms-Exch-ccMail-ADE-Prop,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-ADE-Prop
-distinguishedName: CN=ms-Exch-ccMail-ADE-Prop,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1036
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-ADE-Prop
-adminDescription: ms-Exch-ccMail-ADE-Prop
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchccMailADEProp
-name: ms-Exch-ccMail-ADE-Prop
-schemaIDGUID: 94caa8da-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ccMail-Connect-As-Password  
-#
-dn: CN=ms-Exch-ccMail-Connect-As-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-Connect-As-Password
-distinguishedName: CN=ms-Exch-ccMail-Connect-As-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1207
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-Connect-As-Password
-adminDescription: ms-Exch-ccMail-Connect-As-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchccMailConnectAsPassword
-name: ms-Exch-ccMail-Connect-As-Password
-schemaIDGUID: b8d47e43-4b78-11d3-aa75-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ccMail-Connect-As-Userid 
-#
-dn: CN=ms-Exch-ccMail-Connect-As-Userid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-Connect-As-Userid
-distinguishedName: CN=ms-Exch-ccMail-Connect-As-Userid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1206
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-Connect-As-Userid
-adminDescription: ms-Exch-ccMail-Connect-As-Userid
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchccMailConnectAsUserid
-name: ms-Exch-ccMail-Connect-As-Userid
-schemaIDGUID: b8d47e3c-4b78-11d3-aa75-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ccMail-Password     
-# The Administrator password to the cc:Mail post office.
-#
-dn: CN=ms-Exch-ccMail-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-Password
-distinguishedName: CN=ms-Exch-ccMail-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1039
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-Password
-adminDescription: ms-Exch-ccMail-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchccMailPassword
-name: ms-Exch-ccMail-Password
-schemaIDGUID: 4634194c-4a93-11d3-aa73-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ccMail-PO-Name  
-# The name of the cc:Mail post office where the connector exports and
-# imports mail.
-#
-dn: CN=ms-Exch-ccMail-PO-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-PO-Name
-distinguishedName: CN=ms-Exch-ccMail-PO-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1031
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-PO-Name
-adminDescription: ms-Exch-ccMail-PO-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchccMailPOName
-name: ms-Exch-ccMail-PO-Name
-schemaIDGUID: 95633f5a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ccMail-PO-Path    
-# The file path to the cc:Mail post office.
-#
-dn: CN=ms-Exch-ccMail-PO-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ccMail-PO-Path
-distinguishedName: CN=ms-Exch-ccMail-PO-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1033
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-PO-Path
-adminDescription: ms-Exch-ccMail-PO-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchccMailPOPath
-name: ms-Exch-ccMail-PO-Path
-schemaIDGUID: 98ed3cf2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Certificate    
-# Reserved.
-#
-dn: CN=ms-Exch-Certificate,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Certificate
-distinguishedName: CN=ms-Exch-Certificate,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9012
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Certificate
-adminDescription: ms-Exch-Certificate
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCertificate
-name: ms-Exch-Certificate
-schemaIDGUID: 98ce3e60-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Certificate-Chain-V3 
-#
-dn: CN=ms-Exch-Certificate-Chain-V3,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Certificate-Chain-V3
-distinguishedName: CN=ms-Exch-Certificate-Chain-V3,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.562
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 35879
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Certificate-Chain-V3
-adminDescription: ms-Exch-Certificate-Chain-V3
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: certificateChainV3
-name: ms-Exch-Certificate-Chain-V3
-schemaIDGUID: a8df73aa-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Certificate-Revocation-List-V1 
-# 
-dn: CN=ms-Exch-Certificate-Revocation-List-V1,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Certificate-Revocation-List-V1
-distinguishedName: CN=ms-Exch-Certificate-Revocation-List-V1,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.564
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 35881
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Certificate-Revocation-List-V1
-adminDescription: ms-Exch-Certificate-Revocation-List-V1
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: certificateRevocationListV1
-name: ms-Exch-Certificate-Revocation-List-V1
-schemaIDGUID: a8df73ab-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Certificate-Revocation-List-V3 
-#
-dn: CN=ms-Exch-Certificate-Revocation-List-V3,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Certificate-Revocation-List-V3
-distinguishedName: CN=ms-Exch-Certificate-Revocation-List-V3,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.563
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 35880
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Certificate-Revocation-List-V3
-adminDescription: ms-Exch-Certificate-Revocation-List-V3
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: certificateRevocationListV3
-name: ms-Exch-Certificate-Revocation-List-V3
-schemaIDGUID: a8df73ac-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Character-Set               
-# The Multipurpose Internet Mail Extensions (MIME) tag of the
-# character set used by the client.
-#
-dn: CN=ms-Exch-Character-Set,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Character-Set
-distinguishedName: CN=ms-Exch-Character-Set,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.480
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 33157
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Character-Set
-adminDescription: ms-Exch-Character-Set
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: characterSet
-name: ms-Exch-Character-Set
-schemaIDGUID: a8df73ad-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Character-Set-List
-#
-dn: CN=ms-Exch-Character-Set-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Character-Set-List
-distinguishedName: CN=ms-Exch-Character-Set-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.477
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33154
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Character-Set-List
-adminDescription: ms-Exch-Character-Set-List
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: characterSetList
-name: ms-Exch-Character-Set-List
-schemaIDGUID: a8df73ae-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Access
-# An ACL string representing security on this object.
-#
-dn: CN=ms-Exch-Chat-Access,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Access
-distinguishedName: CN=ms-Exch-Chat-Access,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8044
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Access
-adminDescription: ms-Exch-Chat-Access
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatAccess
-name: ms-Exch-Chat-Access
-schemaIDGUID: 8cac5ed6-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Admin-Message   
-# The message that will be displayed to Chat administrators.
-#
-dn: CN=ms-Exch-Chat-Admin-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Admin-Message
-distinguishedName: CN=ms-Exch-Chat-Admin-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8003
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Admin-Message
-adminDescription: ms-Exch-Chat-Admin-Message
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatAdminMessage
-name: ms-Exch-Chat-Admin-Message
-schemaIDGUID: 98af3fce-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Ban-Mask           
-# The mask determines the scope of the ban.
-#
-dn: CN=ms-Exch-Chat-Ban-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Ban-Mask
-distinguishedName: CN=ms-Exch-Chat-Ban-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8040
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Ban-Mask
-adminDescription: ms-Exch-Chat-Ban-Mask
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatBanMask
-name: ms-Exch-Chat-Ban-Mask
-schemaIDGUID: 9890413c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Ban-Reason    
-# The reason for the ban is sent to the banned user when a connection
-# is attempted.
-#
-dn: CN=ms-Exch-Chat-Ban-Reason,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Ban-Reason
-distinguishedName: CN=ms-Exch-Chat-Ban-Reason,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8043
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Ban-Reason
-adminDescription: ms-Exch-Chat-Ban-Reason
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatBanReason
-name: ms-Exch-Chat-Ban-Reason
-schemaIDGUID: 959c77ca-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Broadcast-Address     
-#
-dn: CN=ms-Exch-Chat-Broadcast-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Broadcast-Address
-distinguishedName: CN=ms-Exch-Chat-Broadcast-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8009
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Broadcast-Address
-adminDescription: ms-Exch-Chat-Broadcast-Address
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatBroadcastAddress
-name: ms-Exch-Chat-Broadcast-Address
-schemaIDGUID: 95b91402-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Channel-Auto-Create   
-# Determines if the registered channel will be started automatically
-# when the service loads.
-#
-dn: CN=ms-Exch-Chat-Channel-Auto-Create,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Auto-Create
-distinguishedName: CN=ms-Exch-Chat-Channel-Auto-Create,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8020
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Auto-Create
-adminDescription: ms-Exch-Chat-Channel-Auto-Create
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelAutoCreate
-name: ms-Exch-Chat-Channel-Auto-Create
-schemaIDGUID: 95d81294-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Flags 
-# Flags that determine the IRC/IRCX modes of the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Flags
-distinguishedName: CN=ms-Exch-Chat-Channel-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8026
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Flags
-adminDescription: ms-Exch-Chat-Channel-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelFlags
-name: ms-Exch-Chat-Channel-Flags
-schemaIDGUID: 95f4aecc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Host-Key        
-# The keyword used by a host to access a restricted channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Host-Key,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Host-Key
-distinguishedName: CN=ms-Exch-Chat-Channel-Host-Key,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8023
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Host-Key
-adminDescription: ms-Exch-Chat-Channel-Host-Key
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelHostKey
-name: ms-Exch-Chat-Channel-Host-Key
-schemaIDGUID: 96114b04-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Join-Message      
-# The message sent to users when they join the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Join-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Join-Message
-distinguishedName: CN=ms-Exch-Chat-Channel-Join-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8030
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Join-Message
-adminDescription: ms-Exch-Chat-Channel-Join-Message
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelJoinMessage
-name: ms-Exch-Chat-Channel-Join-Message
-schemaIDGUID: 962de73c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Key  
-# The keyword used by a user to access a restricted channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Key,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Key
-distinguishedName: CN=ms-Exch-Chat-Channel-Key,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8021
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Key
-adminDescription: ms-Exch-Chat-Channel-Key
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelKey
-name: ms-Exch-Chat-Channel-Key
-schemaIDGUID: 964a8374-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Language                  
-# The language used in a channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Language,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Language
-distinguishedName: CN=ms-Exch-Chat-Channel-Language,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8028
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Language
-adminDescription: ms-Exch-Chat-Channel-Language
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelLanguage
-name: ms-Exch-Chat-Channel-Language
-schemaIDGUID: 96671fac-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-LCID    
-#
-dn: CN=ms-Exch-Chat-Channel-LCID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-LCID
-distinguishedName: CN=ms-Exch-Chat-Channel-LCID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8029
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-LCID
-adminDescription: ms-Exch-Chat-Channel-LCID
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelLCID
-name: ms-Exch-Chat-Channel-LCID
-schemaIDGUID: 9683bbe4-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Channel-Limit   
-# The number of users allowed to join this channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Limit
-distinguishedName: CN=ms-Exch-Chat-Channel-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8010
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Limit
-adminDescription: ms-Exch-Chat-Channel-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelLimit
-name: ms-Exch-Chat-Channel-Limit
-schemaIDGUID: 96a0581c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Mode 
-# The modes of a channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Mode
-distinguishedName: CN=ms-Exch-Chat-Channel-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Mode
-adminDescription: ms-Exch-Chat-Channel-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelMode
-name: ms-Exch-Chat-Channel-Mode
-schemaIDGUID: 96ba91fa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Name    
-# The IRC/IRCX style name of the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Name
-distinguishedName: CN=ms-Exch-Chat-Channel-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8019
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Name
-adminDescription: ms-Exch-Chat-Channel-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelName
-name: ms-Exch-Chat-Channel-Name
-schemaIDGUID: 96d72e32-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Channel-Owner-Key       
-# The keyword used by an owner to access a restricted channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Owner-Key,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Owner-Key
-distinguishedName: CN=ms-Exch-Chat-Channel-Owner-Key,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8022
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Owner-Key
-adminDescription: ms-Exch-Chat-Channel-Owner-Key
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelOwnerKey
-name: ms-Exch-Chat-Channel-Owner-Key
-schemaIDGUID: 96f3ca6a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Part-Message        
-# The message sent to a user when they leave the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Part-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Part-Message
-distinguishedName: CN=ms-Exch-Chat-Channel-Part-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8031
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Part-Message
-adminDescription: ms-Exch-Chat-Channel-Part-Message
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelPartMessage
-name: ms-Exch-Chat-Channel-Part-Message
-schemaIDGUID: 9712c8fc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-PICS  
-# The Platform for Internet Content Selection (PICS) rating for the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-PICS,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-PICS
-distinguishedName: CN=ms-Exch-Chat-Channel-PICS,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8027
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-PICS
-adminDescription: ms-Exch-Chat-Channel-PICS
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelPICS
-name: ms-Exch-Chat-Channel-PICS
-schemaIDGUID: 972d02da-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Subject     
-# The subject of the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Subject,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Subject
-distinguishedName: CN=ms-Exch-Chat-Channel-Subject,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8025
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Subject
-adminDescription: ms-Exch-Chat-Channel-Subject
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelSubject
-name: ms-Exch-Chat-Channel-Subject
-schemaIDGUID: 97499f12-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Channel-Topic   
-# The topic of the channel.
-#
-dn: CN=ms-Exch-Chat-Channel-Topic,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Channel-Topic
-distinguishedName: CN=ms-Exch-Chat-Channel-Topic,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8024
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Channel-Topic
-adminDescription: ms-Exch-Chat-Channel-Topic
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatChannelTopic
-name: ms-Exch-Chat-Channel-Topic
-schemaIDGUID: 97663b4a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Class-Ident-Mask
-# Determines the scope of the Chat
-# class. ms-Exch-Chat-Class-Scope-Type Attribute determines if this
-# property is used, or if the Internet Protocol (IP)
-# ms-Exch-Chat-Class-IP Attribute property is used to scope the class.
-#
-dn: CN=ms-Exch-Chat-Class-Ident-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Class-Ident-Mask
-distinguishedName: CN=ms-Exch-Chat-Class-Ident-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8032
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Class-Ident-Mask
-adminDescription: ms-Exch-Chat-Class-Ident-Mask
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatClassIdentMask
-name: ms-Exch-Chat-Class-Ident-Mask
-schemaIDGUID: 9782d782-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Class-IP         
-# Determines the scope of the Chat class specified by an IP
-# address. ms-Exch-Chat-Class-Scope-Type Attribute determines if this
-# property is used, or if the IP ms-Exch-Chat-Class-Ident-Mask
-# Attribute property is used to scope the class.
-#
-dn: CN=ms-Exch-Chat-Class-IP,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Class-IP
-distinguishedName: CN=ms-Exch-Chat-Class-IP,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8033
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Class-IP
-adminDescription: ms-Exch-Chat-Class-IP
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatClassIP
-name: ms-Exch-Chat-Class-IP
-schemaIDGUID: 97a1d614-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Class-Restrictions       
-# The Chat user class restrictions.
-#
-dn: CN=ms-Exch-Chat-Class-Restrictions,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Class-Restrictions
-distinguishedName: CN=ms-Exch-Chat-Class-Restrictions,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8046
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Class-Restrictions
-adminDescription: ms-Exch-Chat-Class-Restrictions
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatClassRestrictions
-name: ms-Exch-Chat-Class-Restrictions
-schemaIDGUID: 8090a000-1234-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Class-Scope-Type        
-# The Chat user class identification scope type.
-#
-dn: CN=ms-Exch-Chat-Class-Scope-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Class-Scope-Type
-distinguishedName: CN=ms-Exch-Chat-Class-Scope-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8047
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Class-Scope-Type
-adminDescription: ms-Exch-Chat-Class-Scope-Type
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchChatClassScopeType
-name: ms-Exch-Chat-Class-Scope-Type
-schemaIDGUID: 8090a006-1234-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Client-Port 
-#
-dn: CN=ms-Exch-Chat-Client-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Client-Port
-distinguishedName: CN=ms-Exch-Chat-Client-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8007
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Client-Port
-adminDescription: ms-Exch-Chat-Client-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatClientPort
-name: ms-Exch-Chat-Client-Port
-schemaIDGUID: 97be724c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-DNS-Reverse-Mode            
-# Determines whether Domain Name System (DNS) reverse lookups are
-# performed on incoming client connections.
-#
-dn: CN=ms-Exch-Chat-DNS-Reverse-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-DNS-Reverse-Mode
-distinguishedName: CN=ms-Exch-Chat-DNS-Reverse-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8013
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-DNS-Reverse-Mode
-adminDescription: ms-Exch-Chat-DNS-Reverse-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatDNSReverseMode
-name: ms-Exch-Chat-DNS-Reverse-Mode
-schemaIDGUID: 97db0e84-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Duration
-# The amount of time this item is active starting from the value of
-# ms-Exch-Chat-Start-Time Attribute.
-#
-dn: CN=ms-Exch-Chat-Duration,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Duration
-distinguishedName: CN=ms-Exch-Chat-Duration,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8042
-attributeSyntax: 2.5.5.16
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Duration
-adminDescription: ms-Exch-Chat-Duration
-oMSyntax: 65
-searchFlags: 0
-lDAPDisplayName: msExchChatDuration
-name: ms-Exch-Chat-Duration
-schemaIDGUID: 97fa0d16-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Enable-Anonymous                
-# Determines whether anonymous client connections are allowed to this
-# Chat co to this Chat community.
-#
-dn: CN=ms-Exch-Chat-Enable-Anonymous,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Enable-Anonymous
-distinguishedName: CN=ms-Exch-Chat-Enable-Anonymous,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8011
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Enable-Anonymous
-adminDescription: ms-Exch-Chat-Enable-Anonymous
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchChatEnableAnonymous
-name: ms-Exch-Chat-Enable-Anonymous
-schemaIDGUID: 98190ba8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Extensions   
-# A multivalued list of the Chat service extensions for this Chat
-# community on this server.
-#
-dn: CN=ms-Exch-Chat-Extensions,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Extensions
-distinguishedName: CN=ms-Exch-Chat-Extensions,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8048
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Extensions
-adminDescription: ms-Exch-Chat-Extensions
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatExtensions
-name: ms-Exch-Chat-Extensions
-schemaIDGUID: 3b9d8de5-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Input-Flood-Limit         
-# Determines the maximum acceptable message rate allowed by the Chat
-# server from clients.
-#
-dn: CN=ms-Exch-Chat-Input-Flood-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Input-Flood-Limit
-distinguishedName: CN=ms-Exch-Chat-Input-Flood-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8038
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Input-Flood-Limit
-adminDescription: ms-Exch-Chat-Input-Flood-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatInputFloodLimit
-name: ms-Exch-Chat-Input-Flood-Limit
-schemaIDGUID: 987142aa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Max-Anonymous     
-# The maximum anonymous client connections that are allowed.
-#
-dn: CN=ms-Exch-Chat-Max-Anonymous,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Max-Anonymous
-distinguishedName: CN=ms-Exch-Chat-Max-Anonymous,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8015
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Max-Anonymous
-adminDescription: ms-Exch-Chat-Max-Anonymous
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMaxAnonymous
-name: ms-Exch-Chat-Max-Anonymous
-schemaIDGUID: 9969373a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Max-Connections  
-# The maximum number of client connections allowed.
-#
-dn: CN=ms-Exch-Chat-Max-Connections,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Max-Connections
-distinguishedName: CN=ms-Exch-Chat-Max-Connections,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8014
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Max-Connections
-adminDescription: ms-Exch-Chat-Max-Connections
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMaxConnections
-name: ms-Exch-Chat-Max-Connections
-schemaIDGUID: 9985d372-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Max-Connections-Per-IP  
-# 
-dn: CN=ms-Exch-Chat-Max-Connections-Per-IP,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Max-Connections-Per-IP
-distinguishedName: CN=ms-Exch-Chat-Max-Connections-Per-IP,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8049
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Max-Connections-Per-IP
-adminDescription: ms-Exch-Chat-Max-Connections-Per-IP
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMaxConnectionsPerIP
-name: ms-Exch-Chat-Max-Connections-Per-IP
-schemaIDGUID: 2ac57e6b-f737-4e41-8386-7295ddbe05e6
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Max-Memberships         
-# The maximum number of channels that a Chat client may join at one
-# time.
-#
-dn: CN=ms-Exch-Chat-Max-Memberships,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Max-Memberships
-distinguishedName: CN=ms-Exch-Chat-Max-Memberships,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Max-Memberships
-adminDescription: ms-Exch-Chat-Max-Memberships
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMaxMemberships
-name: ms-Exch-Chat-Max-Memberships
-schemaIDGUID: 99a4d204-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Max-Octets-To-Mask  
-#
-dn: CN=ms-Exch-Chat-Max-Octets-To-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Max-Octets-To-Mask
-distinguishedName: CN=ms-Exch-Chat-Max-Octets-To-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8050
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Max-Octets-To-Mask
-adminDescription: ms-Exch-Chat-Max-Octets-To-Mask
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMaxOctetsToMask
-name: ms-Exch-Chat-Max-Octets-To-Mask
-schemaIDGUID: 3de37b23-2789-4df7-b51f-f920ce544458
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Message-Lag        
-# The amount of lag imparted to all messages to prevent flooding.
-#
-dn: CN=ms-Exch-Chat-Message-Lag,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Message-Lag
-distinguishedName: CN=ms-Exch-Chat-Message-Lag,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8034
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Message-Lag
-adminDescription: ms-Exch-Chat-Message-Lag
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatMessageLag
-name: ms-Exch-Chat-Message-Lag
-schemaIDGUID: 99e2cf28-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-MOTD   
-# The message sent to users when they connect to a Chat community.
-#
-dn: CN=ms-Exch-Chat-MOTD,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-MOTD
-distinguishedName: CN=ms-Exch-Chat-MOTD,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8004
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-MOTD
-adminDescription: ms-Exch-Chat-MOTD
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatMOTD
-name: ms-Exch-Chat-MOTD
-schemaIDGUID: 99ff6b60-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Network-Mode 
-# The Chat network settings for channel creation and defaults.
-#
-dn: CN=ms-Exch-Chat-Network-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Network-Mode
-distinguishedName: CN=ms-Exch-Chat-Network-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8045
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Network-Mode
-adminDescription: ms-Exch-Chat-Network-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatNetworkMode
-name: ms-Exch-Chat-Network-Mode
-schemaIDGUID: 917cfe98-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Network-Name   
-#
-dn: CN=ms-Exch-Chat-Network-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Network-Name
-distinguishedName: CN=ms-Exch-Chat-Network-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8001
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Network-Name
-adminDescription: ms-Exch-Chat-Network-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatNetworkName
-name: ms-Exch-Chat-Network-Name
-schemaIDGUID: 9a1e69f2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Nick-Delay     
-# The amount of delay imparted on a user between changing
-# nicknames. Used for flood control.
-#
-dn: CN=ms-Exch-Chat-Nick-Delay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Nick-Delay
-distinguishedName: CN=ms-Exch-Chat-Nick-Delay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8036
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Nick-Delay
-adminDescription: ms-Exch-Chat-Nick-Delay
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatNickDelay
-name: ms-Exch-Chat-Nick-Delay
-schemaIDGUID: 9a3d6884-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Output-Saturation       
-# The maximum level of buffering allowed before a client connection is
-# terminated.
-#
-dn: CN=ms-Exch-Chat-Output-Saturation,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Output-Saturation
-distinguishedName: CN=ms-Exch-Chat-Output-Saturation,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8039
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Output-Saturation
-adminDescription: ms-Exch-Chat-Output-Saturation
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatOutputSaturation
-name: ms-Exch-Chat-Output-Saturation
-schemaIDGUID: 9a5c6716-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Ping-Delay      
-# The frequency of keep-alive pings from the Chat server.
-#
-dn: CN=ms-Exch-Chat-Ping-Delay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Ping-Delay
-distinguishedName: CN=ms-Exch-Chat-Ping-Delay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8037
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Ping-Delay
-adminDescription: ms-Exch-Chat-Ping-Delay
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatPingDelay
-name: ms-Exch-Chat-Ping-Delay
-schemaIDGUID: 9a7b65a8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Protection-Level           
-# The general attack protection level used by the Chat server.
-#
-dn: CN=ms-Exch-Chat-Protection-Level,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Protection-Level
-distinguishedName: CN=ms-Exch-Chat-Protection-Level,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8035
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Protection-Level
-adminDescription: ms-Exch-Chat-Protection-Level
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatProtectionLevel
-name: ms-Exch-Chat-Protection-Level
-schemaIDGUID: 9a9a643a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Server-Port  
-#
-dn: CN=ms-Exch-Chat-Server-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Server-Port
-distinguishedName: CN=ms-Exch-Chat-Server-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8008
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Server-Port
-adminDescription: ms-Exch-Chat-Server-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchChatServerPort
-name: ms-Exch-Chat-Server-Port
-schemaIDGUID: 9ab70072-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Chat-Start-Time   
-# The time at which this item becomes active. The duration for which
-# it is active is determined by the value of ms-Exch-Chat-Duration
-# Attribute.
-#
-dn: CN=ms-Exch-Chat-Start-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Start-Time
-distinguishedName: CN=ms-Exch-Chat-Start-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8041
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Start-Time
-adminDescription: ms-Exch-Chat-Start-Time
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: msExchChatStartTime
-name: ms-Exch-Chat-Start-Time
-schemaIDGUID: 9ad39caa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Chat-Title       
-# A description of the Chat community displayed to users when they
-# connect.
-#
-dn: CN=ms-Exch-Chat-Title,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Chat-Title
-distinguishedName: CN=ms-Exch-Chat-Title,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8002
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Title
-adminDescription: ms-Exch-Chat-Title
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchChatTitle
-name: ms-Exch-Chat-Title
-schemaIDGUID: 9af29b3c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Child-Sync-Agreements              
-# A backlink to the connection agreements from the service.
-#
-dn: CN=ms-Exch-Child-Sync-Agreements,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Child-Sync-Agreements
-distinguishedName: CN=ms-Exch-Child-Sync-Agreements,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.37
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 147
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Child-Sync-Agreements
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Child-Sync-Agreements
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchChildSyncAgreements
-name: ms-Exch-Child-Sync-Agreements
-schemaIDGUID: 9b309860-b093-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CI-Available         
-#
-dn: CN=ms-Exch-CI-Available,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Available
-distinguishedName: CN=ms-Exch-CI-Available,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11066
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Available
-adminDescription: ms-Exch-CI-Available
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchCIAvailable
-name: ms-Exch-CI-Available
-schemaIDGUID: 035da50e-1a9e-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CI-Location          
-# Stores the location of the index.
-#
-dn: CN=ms-Exch-CI-Location,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Location
-distinguishedName: CN=ms-Exch-CI-Location,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11068
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Location
-adminDescription: ms-Exch-CI-Location
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCILocation
-name: ms-Exch-CI-Location
-schemaIDGUID: cec44725-22ae-11d3-aa62-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CI-Rebuild-Schedule  
-#
-dn: CN=ms-Exch-CI-Rebuild-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Rebuild-Schedule
-distinguishedName: CN=ms-Exch-CI-Rebuild-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11063
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Rebuild-Schedule
-adminDescription: ms-Exch-CI-Rebuild-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchCIRebuildSchedule
-name: ms-Exch-CI-Rebuild-Schedule
-schemaIDGUID: 035da4fd-1a9e-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-CI-Rebuild-Style     
-#
-dn: CN=ms-Exch-CI-Rebuild-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Rebuild-Style
-distinguishedName: CN=ms-Exch-CI-Rebuild-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11065
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Rebuild-Style
-adminDescription: ms-Exch-CI-Rebuild-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCIRebuildStyle
-name: ms-Exch-CI-Rebuild-Style
-schemaIDGUID: 035da507-1a9e-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-CI-Update-Schedule   
-#
-dn: CN=ms-Exch-CI-Update-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Update-Schedule
-distinguishedName: CN=ms-Exch-CI-Update-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11062
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Update-Schedule
-adminDescription: ms-Exch-CI-Update-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchCIUpdateSchedule
-name: ms-Exch-CI-Update-Schedule
-schemaIDGUID: 035da4f8-1a9e-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-CI-Update-Style      
-#
-dn: CN=ms-Exch-CI-Update-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CI-Update-Style
-distinguishedName: CN=ms-Exch-CI-Update-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11064
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CI-Update-Style
-adminDescription: ms-Exch-CI-Update-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCIUpdateStyle
-name: ms-Exch-CI-Update-Style
-schemaIDGUID: 035da502-1a9e-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Client-Access-Enabled        
-#
-dn: CN=ms-Exch-Client-Access-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Client-Access-Enabled
-distinguishedName: CN=ms-Exch-Client-Access-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.559
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35876
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Client-Access-Enabled
-adminDescription: ms-Exch-Client-Access-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: clientAccessEnabled
-name: ms-Exch-Client-Access-Enabled
-schemaIDGUID: a8df73af-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Clock-Alert-Offset   
-#
-dn: CN=ms-Exch-Clock-Alert-Offset,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Clock-Alert-Offset
-distinguishedName: CN=ms-Exch-Clock-Alert-Offset,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.165
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32865
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Clock-Alert-Offset
-adminDescription: ms-Exch-Clock-Alert-Offset
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: clockAlertOffset
-name: ms-Exch-Clock-Alert-Offset
-schemaIDGUID: a8df73b0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Clock-Alert-Repair   
-#
-dn: CN=ms-Exch-Clock-Alert-Repair,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Clock-Alert-Repair
-distinguishedName: CN=ms-Exch-Clock-Alert-Repair,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.164
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32866
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Clock-Alert-Repair
-adminDescription: ms-Exch-Clock-Alert-Repair
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: clockAlertRepair
-name: ms-Exch-Clock-Alert-Repair
-schemaIDGUID: a8df73b1-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Clock-Warning-Offset 
-#
-dn: CN=ms-Exch-Clock-Warning-Offset,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Clock-Warning-Offset
-distinguishedName: CN=ms-Exch-Clock-Warning-Offset,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.177
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32867
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Clock-Warning-Offset
-adminDescription: ms-Exch-Clock-Warning-Offset
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: clockWarningOffset
-name: ms-Exch-Clock-Warning-Offset
-schemaIDGUID: a8df73b2-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Clock-Warning-Repair 
-#
-dn: CN=ms-Exch-Clock-Warning-Repair,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Clock-Warning-Repair
-distinguishedName: CN=ms-Exch-Clock-Warning-Repair,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.166
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32868
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Clock-Warning-Repair
-adminDescription: ms-Exch-Clock-Warning-Repair
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: clockWarningRepair
-name: ms-Exch-Clock-Warning-Repair
-schemaIDGUID: a8df73b3-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Compromised-Key-List 
-#
-dn: CN=ms-Exch-Compromised-Key-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Compromised-Key-List
-distinguishedName: CN=ms-Exch-Compromised-Key-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.542
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 33220
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Compromised-Key-List
-adminDescription: ms-Exch-Compromised-Key-List
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: compromisedKeyList
-name: ms-Exch-Compromised-Key-List
-schemaIDGUID: 167757a9-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Computer-Link                
-# A link from the computer to the Exchange server.
-#
-dn: CN=ms-Exch-Computer-Link,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Computer-Link
-distinguishedName: CN=ms-Exch-Computer-Link,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.72
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1018
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Computer-Link
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Computer-Link
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchComputerLink
-name: ms-Exch-Computer-Link
-schemaIDGUID: 8a5852f2-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Computer-Name        
-#
-dn: CN=ms-Exch-Computer-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Computer-Name
-distinguishedName: CN=ms-Exch-Computer-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.20
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 32869
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Computer-Name
-adminDescription: ms-Exch-Computer-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: computerName
-name: ms-Exch-Computer-Name
-schemaIDGUID: a8df73b4-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Conference-Mailbox    
-# The forward link to the Exchange Conferencing Service conference
-# calendar mailbox.
-#
-dn: CN=ms-Exch-Conference-Mailbox,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Conference-Mailbox
-distinguishedName: CN=ms-Exch-Conference-Mailbox,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9029
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1036
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Mailbox
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Conference-Mailbox
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchConferenceMailbox
-name: ms-Exch-Conference-Mailbox
-schemaIDGUID: 628f0513-88f6-4cef-9de4-b367eb7e8383
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Conference-Mailbox-BL              
-# The backlink to the Exchange Conferencing Service conference
-# calendar mailbox.
-#
-dn: CN=ms-Exch-Conference-Mailbox-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Conference-Mailbox-BL
-distinguishedName: CN=ms-Exch-Conference-Mailbox-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9030
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1037
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Mailbox-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Conference-Mailbox-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchConferenceMailboxBL
-name: ms-Exch-Conference-Mailbox-BL
-schemaIDGUID: 9423ec2c-383b-44b2-8913-ab79ac609bd4
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Conference-Zone        
-# The Exchange Conferencing Service site forward link.
-#
-dn: CN=ms-Exch-Conference-Zone,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Conference-Zone
-distinguishedName: CN=ms-Exch-Conference-Zone,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9015
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1020
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Zone
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Conference-Zone
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchConferenceZone
-name: ms-Exch-Conference-Zone
-schemaIDGUID: 8cfd6eca-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Conference-Zone-BL   
-# The Exchange Conferencing Service site backlink.
-#
-dn: CN=ms-Exch-Conference-Zone-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Conference-Zone-BL
-distinguishedName: CN=ms-Exch-Conference-Zone-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9024
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1021
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Zone-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Conference-Zone-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchConferenceZoneBL
-name: ms-Exch-Conference-Zone-BL
-schemaIDGUID: 8d1a0b02-b09e-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Connected-Domains    
-# The sites or AGs that are connected using this connector.
-#
-dn: CN=ms-Exch-Connected-Domains,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Connected-Domains
-distinguishedName: CN=ms-Exch-Connected-Domains,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.211
-attributeSyntax: 2.5.5.4
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1243
-mAPIID: 32870
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connected-Domains
-adminDescription: ms-Exch-Connected-Domains
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: connectedDomains
-name: ms-Exch-Connected-Domains
-schemaIDGUID: a8df73b5-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Connection-List-Filter  
-#
-dn: CN=ms-Exch-Connection-List-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Connection-List-Filter
-distinguishedName: CN=ms-Exch-Connection-List-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.475
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 10240
-mAPIID: 33152
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connection-List-Filter
-adminDescription: ms-Exch-Connection-List-Filter
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: connectionListFilter
-name: ms-Exch-Connection-List-Filter
-schemaIDGUID: a8df73b6-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Connection-List-Filter-Type 
-#
-dn: CN=ms-Exch-Connection-List-Filter-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Connection-List-Filter-Type
-distinguishedName: CN=ms-Exch-Connection-List-Filter-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.526
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33204
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connection-List-Filter-Type
-adminDescription: ms-Exch-Connection-List-Filter-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: connectionListFilterType
-name: ms-Exch-Connection-List-Filter-Type
-schemaIDGUID: a8df73b7-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Connector-Type    
-# The type of Exchange connector.
-#
-dn: CN=ms-Exch-Connector-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Connector-Type
-distinguishedName: CN=ms-Exch-Connector-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12508
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 255
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connector-Type
-adminDescription: ms-Exch-Connector-Type
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchConnectorType
-name: ms-Exch-Connector-Type
-schemaIDGUID: 9b8d9416-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Container-Info       
-#
-dn: CN=ms-Exch-Container-Info,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Container-Info
-distinguishedName: CN=ms-Exch-Container-Info,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.296
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32871
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Container-Info
-adminDescription: ms-Exch-Container-Info
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: containerInfo
-name: ms-Exch-Container-Info
-schemaIDGUID: bf967942-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Content-Type         
-# Contains information about MIME versus Unix-to-Unix encode
-# (UUENCODE) and Rich Text Format (RTF) for a domain content
-# configuration.  
-#
-dn: CN=ms-Exch-Content-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Content-Type
-distinguishedName: CN=ms-Exch-Content-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.481
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 4
-mAPIID: 33158
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Content-Type
-adminDescription: ms-Exch-Content-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: contentType
-name: ms-Exch-Content-Type
-schemaIDGUID: a8df73b9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Controlling-Zone
-# The forward link to the Exchange Conferencing Service resource
-# mailbox.
-#
-dn: CN=ms-Exch-Controlling-Zone,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Controlling-Zone
-distinguishedName: CN=ms-Exch-Controlling-Zone,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9026
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Controlling-Zone
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Controlling-Zone
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: msExchControllingZone
-name: ms-Exch-Controlling-Zone
-schemaIDGUID: 91462882-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Control-Msg-Folder-ID              
-#
-dn: CN=ms-Exch-Control-Msg-Folder-ID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Control-Msg-Folder-ID
-distinguishedName: CN=ms-Exch-Control-Msg-Folder-ID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.483
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33160
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Control-Msg-Folder-ID
-adminDescription: ms-Exch-Control-Msg-Folder-ID
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: controlMsgFolderID
-name: ms-Exch-Control-Msg-Folder-ID
-schemaIDGUID: a8df73ba-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Control-Msg-Rules          
-#
-dn: CN=ms-Exch-Control-Msg-Rules,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Control-Msg-Rules
-distinguishedName: CN=ms-Exch-Control-Msg-Rules,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.485
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32767
-mAPIID: 33162
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Control-Msg-Rules
-adminDescription: ms-Exch-Control-Msg-Rules
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: controlMsgRules
-name: ms-Exch-Control-Msg-Rules
-schemaIDGUID: a8df73bb-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Convert-To-Fixed-Font              
-# If True, the store configures IMAIL to convert Internet messages to
-# fixed font for RTF clients. The default is False.
-#
-dn: CN=ms-Exch-Convert-To-Fixed-Font,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Convert-To-Fixed-Font
-distinguishedName: CN=ms-Exch-Convert-To-Fixed-Font,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11021
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Convert-To-Fixed-Font
-adminDescription: ms-Exch-Convert-To-Fixed-Font
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchConvertToFixedFont
-name: ms-Exch-Convert-To-Fixed-Font
-schemaIDGUID: 9bac92a8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Correlation-Attribute               
-# The LDAP display name of the attribute used to correlate
-# entries. This is not used for replication between Exchange and
-# Microsoft® Windows®.
-#
-dn: CN=ms-Exch-Correlation-Attribute,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Correlation-Attribute
-distinguishedName: CN=ms-Exch-Correlation-Attribute,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.43
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Correlation-Attribute
-adminDescription: ms-Exch-Correlation-Attribute
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCorrelationAttribute
-name: ms-Exch-Correlation-Attribute
-schemaIDGUID: 9c098e5e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Cross-Certificate-CRL            
-#
-dn: CN=ms-Exch-Cross-Certificate-CRL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Cross-Certificate-CRL
-distinguishedName: CN=ms-Exch-Cross-Certificate-CRL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.565
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-mAPIID: 35888
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Cross-Certificate-CRL
-adminDescription: ms-Exch-Cross-Certificate-CRL
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: crossCertificateCRL
-name: ms-Exch-Cross-Certificate-CRL
-schemaIDGUID: a8df73bc-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Class-GUID           
-# The component implementation GUID for the conference technology
-# provider (CTP).
-#
-dn: CN=ms-Exch-CTP-Class-GUID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Class-GUID
-distinguishedName: CN=ms-Exch-CTP-Class-GUID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9008
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Class-GUID
-adminDescription: ms-Exch-CTP-Class-GUID
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCTPClassGUID
-name: ms-Exch-CTP-Class-GUID
-schemaIDGUID: 9c288cf0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Frame-Hint  
-# The frame hint size.
-#
-dn: CN=ms-Exch-CTP-Frame-Hint,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Frame-Hint
-distinguishedName: CN=ms-Exch-CTP-Frame-Hint,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9010
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Frame-Hint
-adminDescription: ms-Exch-CTP-Frame-Hint
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchCTPFrameHint
-name: ms-Exch-CTP-Frame-Hint
-schemaIDGUID: 9c478b82-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Property-Schema  
-# The CTP property schema. This attribute is obsolete.
-#
-dn: CN=ms-Exch-CTP-Property-Schema,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Property-Schema
-distinguishedName: CN=ms-Exch-CTP-Property-Schema,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9022
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Property-Schema
-adminDescription: ms-Exch-CTP-Property-Schema
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCTPPropertySchema
-name: ms-Exch-CTP-Property-Schema
-schemaIDGUID: 9c6427ba-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Provider-GUID    
-# The CTP GUID.
-#
-dn: CN=ms-Exch-CTP-Provider-GUID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Provider-GUID
-distinguishedName: CN=ms-Exch-CTP-Provider-GUID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9007
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Provider-GUID
-adminDescription: ms-Exch-CTP-Provider-GUID
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCTPProviderGUID
-name: ms-Exch-CTP-Provider-GUID
-schemaIDGUID: 9c8588a6-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Provider-Name    
-# The CTP internal name.
-#
-dn: CN=ms-Exch-CTP-Provider-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Provider-Name
-distinguishedName: CN=ms-Exch-CTP-Provider-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9021
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Provider-Name
-adminDescription: ms-Exch-CTP-Provider-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCTPProviderName
-name: ms-Exch-CTP-Provider-Name
-schemaIDGUID: 9ca48738-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Require-CMS-Authentication       
-# Indicates whether authentication is required to join the selected
-# conference.
-#
-dn: CN=ms-Exch-CTP-Require-CMS-Authentication,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Require-CMS-Authentication
-distinguishedName: CN=ms-Exch-CTP-Require-CMS-Authentication,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9023
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Require-CMS-Authentication
-adminDescription: ms-Exch-CTP-Require-CMS-Authentication
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchCTPRequireCMSAuthentication
-name: ms-Exch-CTP-Require-CMS-Authentication
-schemaIDGUID: 8aa962e6-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-CTP-Snapin-GUID   
-# The Microsoft Management Console (MMC) snap-in implementation GUID
-# for the CTP.  
-#
-dn: CN=ms-Exch-CTP-Snapin-GUID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-CTP-Snapin-GUID
-distinguishedName: CN=ms-Exch-CTP-Snapin-GUID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9009
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP-Snapin-GUID
-adminDescription: ms-Exch-CTP-Snapin-GUID
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCTPSnapinGUID
-name: ms-Exch-CTP-Snapin-GUID
-schemaIDGUID: 9cc385ca-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Custom-Proxy-Addresses
-#
-dn: CN=ms-Exch-Custom-Proxy-Addresses,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Custom-Proxy-Addresses
-distinguishedName: CN=ms-Exch-Custom-Proxy-Addresses,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50049
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Custom-Proxy-Addresses
-adminDescription: ms-Exch-Custom-Proxy-Addresses
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchCustomProxyAddresses
-name: ms-Exch-Custom-Proxy-Addresses
-schemaIDGUID: e24d7a90-439d-11d3-aa72-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Database-Being-Restored  
-# Prevents any mount to the database. This is set during a restore.
-#
-dn: CN=ms-Exch-Database-Being-Restored,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Database-Being-Restored
-distinguishedName: CN=ms-Exch-Database-Being-Restored,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11085
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Database-Being-Restored
-adminDescription: ms-Exch-Database-Being-Restored
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDatabaseBeingRestored
-name: ms-Exch-Database-Being-Restored
-schemaIDGUID: 372fadff-d0b6-4552-8057-f3a0d2c706a7
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Database-Created  
-# Indicates to the store whether or not the database is to be created.
-#
-dn: CN=ms-Exch-Database-Created,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Database-Created
-distinguishedName: CN=ms-Exch-Database-Created,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11084
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Database-Created
-adminDescription: ms-Exch-Database-Created
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDatabaseCreated
-name: ms-Exch-Database-Created
-schemaIDGUID: 14f27149-ba76-4aee-bac8-fced38fdff9d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Database-Session-Addend 
-# The accumulator for sessions.
-#
-dn: CN=ms-Exch-Database-Session-Addend,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Database-Session-Addend
-distinguishedName: CN=ms-Exch-Database-Session-Addend,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11039
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Database-Session-Addend
-adminDescription: ms-Exch-Database-Session-Addend
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDatabaseSessionAddend
-name: ms-Exch-Database-Session-Addend
-schemaIDGUID: 9ce2845c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Database-Session-Increment   
-# Number of Microsoft Jet sessions to allocate when more Jet sessions
-# are needed.  
-#
-dn: CN=ms-Exch-Database-Session-Increment,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Database-Session-Increment
-distinguishedName: CN=ms-Exch-Database-Session-Increment,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11040
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Database-Session-Increment
-adminDescription: ms-Exch-Database-Session-Increment
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDatabaseSessionIncrement
-name: ms-Exch-Database-Session-Increment
-schemaIDGUID: 9d0647a2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Data-Path
-#
-dn: CN=ms-Exch-Data-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Data-Path
-distinguishedName: CN=ms-Exch-Data-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50052
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Data-Path
-adminDescription: ms-Exch-Data-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDataPath
-name: ms-Exch-Data-Path
-schemaIDGUID: 61c47260-454e-11d3-aa72-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Default-Admin-Group  
-# A flag indicating whether this administrator group is the default.
-#
-dn: CN=ms-Exch-Default-Admin-Group,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Default-Admin-Group
-distinguishedName: CN=ms-Exch-Default-Admin-Group,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50015
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Default-Admin-Group
-adminDescription: ms-Exch-Default-Admin-Group
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDefaultAdminGroup
-name: ms-Exch-Default-Admin-Group
-schemaIDGUID: 847584c2-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Default-Domain            
-# The domain used for basic authentication.
-#
-dn: CN=ms-Exch-Default-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Default-Domain
-distinguishedName: CN=ms-Exch-Default-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2012
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Default-Domain
-adminDescription: ms-Exch-Default-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDefaultDomain
-name: ms-Exch-Default-Domain
-schemaIDGUID: 9d22e3da-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Default-Load-File    
-#
-dn: CN=ms-Exch-Default-Load-File,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Default-Load-File
-distinguishedName: CN=ms-Exch-Default-Load-File,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15010
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Default-Load-File
-adminDescription: ms-Exch-Default-Load-File
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDefaultLoadFile
-name: ms-Exch-Default-Load-File
-schemaIDGUID: 6267667c-cf34-407d-ba11-7cc8cc68ca1b
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Default-Logon-Domain 
-# Specifies the default domain for logon.
-dn: CN=ms-Exch-Default-Logon-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Default-Logon-Domain
-distinguishedName: CN=ms-Exch-Default-Logon-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15001
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Default-Logon-Domain
-adminDescription: ms-Exch-Default-Logon-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDefaultLogonDomain
-name: ms-Exch-Default-Logon-Domain
-schemaIDGUID: 8bb46a46-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Default-Message-Format       
-#
-dn: CN=ms-Exch-Default-Message-Format,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Default-Message-Format
-distinguishedName: CN=ms-Exch-Default-Message-Format,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.572
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35895
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Default-Message-Format
-adminDescription: ms-Exch-Default-Message-Format
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: defaultMessageFormat
-name: ms-Exch-Default-Message-Format
-schemaIDGUID: a8df73bd-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Delegate-User                        
-#
-dn: CN=ms-Exch-Delegate-User,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Delegate-User
-distinguishedName: CN=ms-Exch-Delegate-User,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.591
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35913
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Delegate-User
-adminDescription: ms-Exch-Delegate-User
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: delegateUser
-name: ms-Exch-Delegate-User
-schemaIDGUID: a8df73be-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Deleted-Item-Flags           
-# Controls deleted item retention settings.
-#
-dn: CN=ms-Exch-Deleted-Item-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Deleted-Item-Flags
-distinguishedName: CN=ms-Exch-Deleted-Item-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.106
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32898
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Deleted-Item-Flags
-adminDescription: ms-Exch-Deleted-Item-Flags
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: deletedItemFlags
-name: ms-Exch-Deleted-Item-Flags
-schemaIDGUID: 167757c7-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Delivery-Mechanism   
-#
-dn: CN=ms-Exch-Delivery-Mechanism,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Delivery-Mechanism
-distinguishedName: CN=ms-Exch-Delivery-Mechanism,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.241
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32878
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Delivery-Mechanism
-adminDescription: ms-Exch-Delivery-Mechanism
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: deliveryMechanism
-name: ms-Exch-Delivery-Mechanism
-schemaIDGUID: bf96794e-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Delivery-Order       
-# Determines the order of processing messages in the connector's
-# queue. Options are: FIFO, Priority (default), and Size.
-#
-dn: CN=ms-Exch-Delivery-Order,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Delivery-Order
-distinguishedName: CN=ms-Exch-Delivery-Order,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1003
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Delivery-Order
-adminDescription: ms-Exch-Delivery-Order
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDeliveryOrder
-name: ms-Exch-Delivery-Order
-schemaIDGUID: 9d41e26c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Deliver-And-Redirect     
-# Used with ms-Exch-Alt-Recipient. If True, delivers to the mailbox and
-# also redirects.
-#
-dn: CN=ms-Exch-Deliver-And-Redirect,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Deliver-And-Redirect
-distinguishedName: CN=ms-Exch-Deliver-And-Redirect,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.190
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32877
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Deliver-And-Redirect
-adminDescription: ms-Exch-Deliver-And-Redirect
-oMSyntax: 1
-searchFlags: 16
-lDAPDisplayName: deliverAndRedirect
-name: ms-Exch-Deliver-And-Redirect
-schemaIDGUID: bf96794d-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Deliv-Cont-Length       
-# For recipients, the maximum message size, in kilobytes (KB), that
-# they can receive. For a connector, the maximum message size, in KB,
-# that can be sent over the connector.
-#
-dn: CN=ms-Exch-Deliv-Cont-Length,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Deliv-Cont-Length
-distinguishedName: CN=ms-Exch-Deliv-Cont-Length,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.138
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32874
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Deliv-Cont-Length
-adminDescription: ms-Exch-Deliv-Cont-Length
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: delivContLength
-name: ms-Exch-Deliv-Cont-Length
-schemaIDGUID: bf96794a-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Deliv-EITs       
-#
-dn: CN=ms-Exch-Deliv-EITs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Deliv-EITs
-distinguishedName: CN=ms-Exch-Deliv-EITs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.139
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 4096
-mAPIID: 32875
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Deliv-EITs
-adminDescription: ms-Exch-Deliv-EITs
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: delivEITs
-name: ms-Exch-Deliv-EITs
-schemaIDGUID: bf96794b-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Deliv-Ext-Cont-Types 
-#
-dn: CN=ms-Exch-Deliv-Ext-Cont-Types,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Deliv-Ext-Cont-Types
-distinguishedName: CN=ms-Exch-Deliv-Ext-Cont-Types,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.140
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 4096
-mAPIID: 32876
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Deliv-Ext-Cont-Types
-adminDescription: ms-Exch-Deliv-Ext-Cont-Types
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: delivExtContTypes
-name: ms-Exch-Deliv-Ext-Cont-Types
-schemaIDGUID: bf96794c-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dereference-Aliases  
-# Determines if x.500 aliases should be dereferenced. This is
-# applicable when replicating with x.500/LDAP directories that support
-# aliases.
-#
-dn: CN=ms-Exch-Dereference-Aliases,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dereference-Aliases
-distinguishedName: CN=ms-Exch-Dereference-Aliases,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dereference-Aliases
-adminDescription: ms-Exch-Dereference-Aliases
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDereferenceAliases
-name: ms-Exch-Dereference-Aliases
-schemaIDGUID: 9d60e0fe-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Destination-RG-DN   
-# The routing group (RG) on the other side of an Exchange Connector.
-#
-dn: CN=ms-Exch-Destination-RG-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Destination-RG-DN
-distinguishedName: CN=ms-Exch-Destination-RG-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12507
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Destination-RG-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Destination-RG-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchDestinationRGDN
-name: ms-Exch-Destination-RG-DN
-schemaIDGUID: 9d9ede22-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dest-BH-Address   
-# This attribute is obsolete.
-#
-dn: CN=ms-Exch-Dest-BH-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dest-BH-Address
-distinguishedName: CN=ms-Exch-Dest-BH-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12510
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 255
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dest-BH-Address
-adminDescription: ms-Exch-Dest-BH-Address
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchDestBHAddress
-name: ms-Exch-Dest-BH-Address
-schemaIDGUID: 9d8241ea-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Diagnostic-Reg-Key   
-# The location of the diagnostic registry key.
-#
-dn: CN=ms-Exch-Diagnostic-Reg-Key,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Diagnostic-Reg-Key
-distinguishedName: CN=ms-Exch-Diagnostic-Reg-Key,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.189
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 32881
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Diagnostic-Reg-Key
-adminDescription: ms-Exch-Diagnostic-Reg-Key
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: diagnosticRegKey
-name: ms-Exch-Diagnostic-Reg-Key
-schemaIDGUID: bf967952-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dirsync-Filters      
-# A list of relational expressions that determine which directory
-# entries are propagated from Lotus Notes to Exchange during directory
-# synchronization.
-#
-dn: CN=ms-Exch-Dirsync-Filters,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dirsync-Filters
-distinguishedName: CN=ms-Exch-Dirsync-Filters,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1005
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dirsync-Filters
-adminDescription: ms-Exch-Dirsync-Filters
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDirsyncFilters
-name: ms-Exch-Dirsync-Filters
-schemaIDGUID: 9dbddcb4-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dirsync-Schedule 
-#
-dn: CN=ms-Exch-Dirsync-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dirsync-Schedule
-distinguishedName: CN=ms-Exch-Dirsync-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1008
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dirsync-Schedule
-adminDescription: ms-Exch-Dirsync-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchDirsyncSchedule
-name: ms-Exch-Dirsync-Schedule
-schemaIDGUID: 8e11ff92-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Dirsync-Style              
-#
-dn: CN=ms-Exch-Dirsync-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dirsync-Style
-distinguishedName: CN=ms-Exch-Dirsync-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1009
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dirsync-Style
-adminDescription: ms-Exch-Dirsync-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDirsyncStyle
-name: ms-Exch-Dirsync-Style
-schemaIDGUID: 8e2e9bca-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Dir-Browse-Flags    
-# Contains the directory browsing flags.
-#
-dn: CN=ms-Exch-Dir-Browse-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dir-Browse-Flags
-distinguishedName: CN=ms-Exch-Dir-Browse-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15005
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dir-Browse-Flags
-adminDescription: ms-Exch-Dir-Browse-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDirBrowseFlags
-name: ms-Exch-Dir-Browse-Flags
-schemaIDGUID: 8c221672-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Disabled-Gateway-Proxy       
-#
-dn: CN=ms-Exch-Disabled-Gateway-Proxy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Disabled-Gateway-Proxy
-distinguishedName: CN=ms-Exch-Disabled-Gateway-Proxy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.541
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 0
-rangeUpper: 1024
-mAPIID: 33219
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Disabled-Gateway-Proxy
-adminDescription: ms-Exch-Disabled-Gateway-Proxy
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: disabledGatewayProxy
-name: ms-Exch-Disabled-Gateway-Proxy
-schemaIDGUID: a8df73c0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Disable-UDG-Conversion       
-# If set, this disables the conversion of universal distribution
-# groups to universal security groups.
-#
-dn: CN=ms-Exch-Disable-UDG-Conversion,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Disable-UDG-Conversion
-distinguishedName: CN=ms-Exch-Disable-UDG-Conversion,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11088
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Disable-UDG-Conversion
-adminDescription: ms-Exch-Disable-UDG-Conversion
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDisableUDGConversion
-name: ms-Exch-Disable-UDG-Conversion
-schemaIDGUID: 372d6cde-38c7-47b6-a3da-be4648124ec0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Discussion-Folder  
-#
-dn: CN=ms-Exch-Discussion-Folder,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Discussion-Folder
-distinguishedName: CN=ms-Exch-Discussion-Folder,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.14002
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Discussion-Folder
-adminDescription: ms-Exch-Discussion-Folder
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDiscussionFolder
-name: ms-Exch-Discussion-Folder
-schemaIDGUID: 3df30250-38a7-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DL-Member-Rule      
-# This attribute is not used by Exchange.
-#
-dn: CN=ms-Exch-DL-Member-Rule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Member-Rule
-distinguishedName: CN=ms-Exch-DL-Member-Rule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.330
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 4096
-mAPIID: 32884
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Member-Rule
-adminDescription: ms-Exch-DL-Member-Rule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: dLMemberRule
-name: ms-Exch-DL-Member-Rule
-schemaIDGUID: a8df73c6-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DL-Mem-Default       
-#
-dn: CN=ms-Exch-DL-Mem-Default,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Mem-Default
-distinguishedName: CN=ms-Exch-DL-Mem-Default,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12527
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Mem-Default
-adminDescription: ms-Exch-DL-Mem-Default
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dLMemDefault
-name: ms-Exch-DL-Mem-Default
-schemaIDGUID: 89d5319c-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DL-Mem-Reject-Perms  
-# A distribution list (DL) whose members may not send to this
-# recipient or send messages over this connector.
-#
-dn: CN=ms-Exch-DL-Mem-Reject-Perms,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Mem-Reject-Perms
-distinguishedName: CN=ms-Exch-DL-Mem-Reject-Perms,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.47
-attributeSyntax: 2.5.5.7
-isSingleValued: FALSE
-linkID: 116
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Mem-Reject-Perms
-oMObjectClass:: VgYBAgULHQ==
-adminDescription: ms-Exch-DL-Mem-Reject-Perms
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: dLMemRejectPerms
-name: ms-Exch-DL-Mem-Reject-Perms
-schemaIDGUID: a8df73c2-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DL-Mem-Reject-Perms-BL   
-# Backlink to ms-Exch-DL-Mem-Reject-Perms.
-#
-dn: CN=ms-Exch-DL-Mem-Reject-Perms-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Mem-Reject-Perms-BL
-distinguishedName: CN=ms-Exch-DL-Mem-Reject-Perms-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.293
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32882
-linkID: 117
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Mem-Reject-Perms-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DL-Mem-Reject-Perms-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dLMemRejectPermsBL
-name: ms-Exch-DL-Mem-Reject-Perms-BL
-schemaIDGUID: a8df73c3-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DL-Mem-Submit-Perms  
-# A DL whose members may send to this recipient or send messages over
-# this connector.
-#
-dn: CN=ms-Exch-DL-Mem-Submit-Perms,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Mem-Submit-Perms
-distinguishedName: CN=ms-Exch-DL-Mem-Submit-Perms,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.144
-attributeSyntax: 2.5.5.7
-isSingleValued: FALSE
-linkID: 112
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Mem-Submit-Perms
-oMObjectClass:: VgYBAgULHQ==
-adminDescription: ms-Exch-DL-Mem-Submit-Perms
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: dLMemSubmitPerms
-name: ms-Exch-DL-Mem-Submit-Perms
-schemaIDGUID: a8df73c4-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DL-Mem-Submit-Perms-BL      
-# Backlink to ms-Exch-DL-Mem-Submit-Perms.
-#
-dn: CN=ms-Exch-DL-Mem-Submit-Perms-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DL-Mem-Submit-Perms-BL
-distinguishedName: CN=ms-Exch-DL-Mem-Submit-Perms-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.291
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32883
-linkID: 113
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DL-Mem-Submit-Perms-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DL-Mem-Submit-Perms-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dLMemSubmitPermsBL
-name: ms-Exch-DL-Mem-Submit-Perms-BL
-schemaIDGUID: a8df73c5-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Def-Alt-Recip 
-#
-dn: CN=ms-Exch-Domain-Def-Alt-Recip,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Def-Alt-Recip
-distinguishedName: CN=ms-Exch-Domain-Def-Alt-Recip,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.145
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32885
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Def-Alt-Recip
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Domain-Def-Alt-Recip
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: domainDefAltRecip
-name: ms-Exch-Domain-Def-Alt-Recip
-schemaIDGUID: 167757bb-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Global-Group-Guid  
-# Contains the stringized GUID of the domain local group within the
-# Recipient Update Service (RUS) domain.
-#
-dn: CN=ms-Exch-Domain-Global-Group-Guid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Global-Group-Guid
-distinguishedName: CN=ms-Exch-Domain-Global-Group-Guid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50089
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Global-Group-Guid
-adminDescription: ms-Exch-Domain-Global-Group-Guid
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDomainGlobalGroupGuid
-name: ms-Exch-Domain-Global-Group-Guid
-schemaIDGUID: 0d5aaba3-b593-4256-88dc-a0db2d2ffeec
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Global-Group-Sid  
-# Contains the stringized security identifier (SID) of the domain
-# global group within the RUS domain.
-#
-dn: CN=ms-Exch-Domain-Global-Group-Sid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Global-Group-Sid
-distinguishedName: CN=ms-Exch-Domain-Global-Group-Sid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50091
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Global-Group-Sid
-adminDescription: ms-Exch-Domain-Global-Group-Sid
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDomainGlobalGroupSid
-name: ms-Exch-Domain-Global-Group-Sid
-schemaIDGUID: d059b789-3e9e-4b8f-befe-db62bb580885
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Link   
-# A link to the root of the domain.
-#
-dn: CN=ms-Exch-Domain-Link,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Link
-distinguishedName: CN=ms-Exch-Domain-Link,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.76
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Link
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Domain-Link
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchDomainLink
-name: ms-Exch-Domain-Link
-schemaIDGUID: 8ac39cc4-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Local-Group-Guid      
-# Contains the stringized GUID of the domain local group within the RUS domain.
-#
-dn: CN=ms-Exch-Domain-Local-Group-Guid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Local-Group-Guid
-distinguishedName: CN=ms-Exch-Domain-Local-Group-Guid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50088
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Local-Group-Guid
-adminDescription: ms-Exch-Domain-Local-Group-Guid
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDomainLocalGroupGuid
-name: ms-Exch-Domain-Local-Group-Guid
-schemaIDGUID: 3bf8ffc0-6492-4af4-b2bf-4f9fdb423425
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Domain-Local-Group-Sid   
-# Contains the stringized SID of the domain local group within the RUS
-# domain.
-dn: CN=ms-Exch-Domain-Local-Group-Sid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Local-Group-Sid
-distinguishedName: CN=ms-Exch-Domain-Local-Group-Sid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50090
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Local-Group-Sid
-adminDescription: ms-Exch-Domain-Local-Group-Sid
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDomainLocalGroupSid
-name: ms-Exch-Domain-Local-Group-Sid
-schemaIDGUID: d27eb1e5-a06c-4151-b789-59eabba8edca
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Domain-Name  
-# Stores the domain name that a Domain Content Configuration object
-# applies to.
-#
-dn: CN=ms-Exch-Domain-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Domain-Name
-distinguishedName: CN=ms-Exch-Domain-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.147
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 362
-mAPIID: 32886
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Domain-Name
-adminDescription: ms-Exch-Domain-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: domainName
-name: ms-Exch-Domain-Name
-schemaIDGUID: a8df73c8-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DownGrade-Multipart-Signed 
-# If True, the store configures IMAIL to convert a multipart/signed
-# message to a normal message and discard the signature. The default
-# is False.
-#
-dn: CN=ms-Exch-DownGrade-Multipart-Signed,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DownGrade-Multipart-Signed
-distinguishedName: CN=ms-Exch-DownGrade-Multipart-Signed,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11020
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DownGrade-Multipart-Signed
-adminDescription: ms-Exch-DownGrade-Multipart-Signed
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDownGradeMultipartSigned
-name: ms-Exch-DownGrade-Multipart-Signed
-schemaIDGUID: 9e39d6fc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Do-Full-Replication  
-# A flag used to signal the service to do a full synchronization of
-# the directories.
-#
-dn: CN=ms-Exch-Do-Full-Replication,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Do-Full-Replication
-distinguishedName: CN=ms-Exch-Do-Full-Replication,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.38
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Do-Full-Replication
-adminDescription: ms-Exch-Do-Full-Replication
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchDoFullReplication
-name: ms-Exch-Do-Full-Replication
-schemaIDGUID: 9e1ad86a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Do-OAB-Version  
-#
-dn: CN=ms-Exch-Do-OAB-Version,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Do-OAB-Version
-distinguishedName: CN=ms-Exch-Do-OAB-Version,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.575
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 35898
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Do-OAB-Version
-adminDescription: ms-Exch-Do-OAB-Version
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: doOABVersion
-name: ms-Exch-Do-OAB-Version
-schemaIDGUID: a8df73c7-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DS2MB-Options          
-#
-dn: CN=ms-Exch-DS2MB-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DS2MB-Options
-distinguishedName: CN=ms-Exch-DS2MB-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.14001
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DS2MB-Options
-adminDescription: ms-Exch-DS2MB-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchDS2MBOptions
-name: ms-Exch-DS2MB-Options
-schemaIDGUID: 974c99da-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Admin-Copy      
-#
-dn: CN=ms-Exch-DXA-Admin-Copy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Admin-Copy
-distinguishedName: CN=ms-Exch-DXA-Admin-Copy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.378
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32888
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Admin-Copy
-adminDescription: ms-Exch-DXA-Admin-Copy
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAAdminCopy
-name: ms-Exch-DXA-Admin-Copy
-schemaIDGUID: a8df73c9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Admin-Forward   
-#
-dn: CN=ms-Exch-DXA-Admin-Forward,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Admin-Forward
-distinguishedName: CN=ms-Exch-DXA-Admin-Forward,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.379
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32889
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Admin-Forward
-adminDescription: ms-Exch-DXA-Admin-Forward
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAAdminForward
-name: ms-Exch-DXA-Admin-Forward
-schemaIDGUID: 167757be-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Admin-Update 
-#
-dn: CN=ms-Exch-DXA-Admin-Update,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Admin-Update
-distinguishedName: CN=ms-Exch-DXA-Admin-Update,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.381
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32890
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Admin-Update
-adminDescription: ms-Exch-DXA-Admin-Update
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAAdminUpdate
-name: ms-Exch-DXA-Admin-Update
-schemaIDGUID: a8df73ca-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Append-ReqCN 
-#
-dn: CN=ms-Exch-DXA-Append-ReqCN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Append-ReqCN
-distinguishedName: CN=ms-Exch-DXA-Append-ReqCN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.174
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32891
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Append-ReqCN
-adminDescription: ms-Exch-DXA-Append-ReqCN
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAAppendReqCN
-name: ms-Exch-DXA-Append-ReqCN
-schemaIDGUID: a8df73cb-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Conf-Container-List 
-#
-dn: CN=ms-Exch-DXA-Conf-Container-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Conf-Container-List
-distinguishedName: CN=ms-Exch-DXA-Conf-Container-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.180
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32892
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Conf-Container-List
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DXA-Conf-Container-List
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dXAConfContainerList
-name: ms-Exch-DXA-Conf-Container-List
-schemaIDGUID: a8df73cc-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Conf-Req-Time      
-#
-dn: CN=ms-Exch-DXA-Conf-Req-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Conf-Req-Time
-distinguishedName: CN=ms-Exch-DXA-Conf-Req-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.122
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32893
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Conf-Req-Time
-adminDescription: ms-Exch-DXA-Conf-Req-Time
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: dXAConfReqTime
-name: ms-Exch-DXA-Conf-Req-Time
-schemaIDGUID: a8df73cd-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Conf-Seq           
-#
-dn: CN=ms-Exch-DXA-Conf-Seq,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Conf-Seq
-distinguishedName: CN=ms-Exch-DXA-Conf-Seq,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.184
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32894
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Conf-Seq
-adminDescription: ms-Exch-DXA-Conf-Seq
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: dXAConfSeq
-name: ms-Exch-DXA-Conf-Seq
-schemaIDGUID: a8df73ce-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Conf-Seq-USN       
-#
-dn: CN=ms-Exch-DXA-Conf-Seq-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Conf-Seq-USN
-distinguishedName: CN=ms-Exch-DXA-Conf-Seq-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.45
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32895
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Conf-Seq-USN
-adminDescription: ms-Exch-DXA-Conf-Seq-USN
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAConfSeqUSN
-name: ms-Exch-DXA-Conf-Seq-USN
-schemaIDGUID: a8df73cf-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Exchange-Options   
-#
-dn: CN=ms-Exch-DXA-Exchange-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Exchange-Options
-distinguishedName: CN=ms-Exch-DXA-Exchange-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.359
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32896
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Exchange-Options
-adminDescription: ms-Exch-DXA-Exchange-Options
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: dXAExchangeOptions
-name: ms-Exch-DXA-Exchange-Options
-schemaIDGUID: a8df73d0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Export-Now         
-#
-dn: CN=ms-Exch-DXA-Export-Now,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Export-Now
-distinguishedName: CN=ms-Exch-DXA-Export-Now,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.377
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32897
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Export-Now
-adminDescription: ms-Exch-DXA-Export-Now
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAExportNow
-name: ms-Exch-DXA-Export-Now
-schemaIDGUID: a8df73d1-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Import-Now         
-#
-dn: CN=ms-Exch-DXA-Import-Now,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Import-Now
-distinguishedName: CN=ms-Exch-DXA-Import-Now,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.376
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32902
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Import-Now
-adminDescription: ms-Exch-DXA-Import-Now
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAImportNow
-name: ms-Exch-DXA-Import-Now
-schemaIDGUID: a8df73d5-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Imp-Seq            
-#
-dn: CN=ms-Exch-DXA-Imp-Seq,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Imp-Seq
-distinguishedName: CN=ms-Exch-DXA-Imp-Seq,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.116
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32899
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Imp-Seq
-adminDescription: ms-Exch-DXA-Imp-Seq
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: dXAImpSeq
-name: ms-Exch-DXA-Imp-Seq
-schemaIDGUID: a8df73d2-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Imp-Seq-Time       
-#
-dn: CN=ms-Exch-DXA-Imp-Seq-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Imp-Seq-Time
-distinguishedName: CN=ms-Exch-DXA-Imp-Seq-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.117
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32900
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Imp-Seq-Time
-adminDescription: ms-Exch-DXA-Imp-Seq-Time
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: dXAImpSeqTime
-name: ms-Exch-DXA-Imp-Seq-Time
-schemaIDGUID: a8df73d3-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Imp-Seq-USN        
-#
-dn: CN=ms-Exch-DXA-Imp-Seq-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Imp-Seq-USN
-distinguishedName: CN=ms-Exch-DXA-Imp-Seq-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.86
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32901
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Imp-Seq-USN
-adminDescription: ms-Exch-DXA-Imp-Seq-USN
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAImpSeqUSN
-name: ms-Exch-DXA-Imp-Seq-USN
-schemaIDGUID: a8df73d4-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-In-Template-Map    
-#
-dn: CN=ms-Exch-DXA-In-Template-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-In-Template-Map
-distinguishedName: CN=ms-Exch-DXA-In-Template-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.363
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 32903
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-In-Template-Map
-adminDescription: ms-Exch-DXA-In-Template-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dXAInTemplateMap
-name: ms-Exch-DXA-In-Template-Map
-schemaIDGUID: a8df73d6-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Local-Admin        
-#
-dn: CN=ms-Exch-DXA-Local-Admin,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Local-Admin
-distinguishedName: CN=ms-Exch-DXA-Local-Admin,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.113
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32904
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Local-Admin
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DXA-Local-Admin
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dXALocalAdmin
-name: ms-Exch-DXA-Local-Admin
-schemaIDGUID: a8df73d7-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Native-Address-Type 
-#
-dn: CN=ms-Exch-DXA-Native-Address-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Native-Address-Type
-distinguishedName: CN=ms-Exch-DXA-Native-Address-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.331
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32906
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Native-Address-Type
-adminDescription: ms-Exch-DXA-Native-Address-Type
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: dXANativeAddressType
-name: ms-Exch-DXA-Native-Address-Type
-schemaIDGUID: a8df73d9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Out-Template-Map   
-#
-dn: CN=ms-Exch-DXA-Out-Template-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Out-Template-Map
-distinguishedName: CN=ms-Exch-DXA-Out-Template-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.364
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 32907
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Out-Template-Map
-adminDescription: ms-Exch-DXA-Out-Template-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dXAOutTemplateMap
-name: ms-Exch-DXA-Out-Template-Map
-schemaIDGUID: a8df73da-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Password           
-#
-dn: CN=ms-Exch-DXA-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Password
-distinguishedName: CN=ms-Exch-DXA-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.305
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 12
-mAPIID: 32908
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Password
-adminDescription: ms-Exch-DXA-Password
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dXAPassword
-name: ms-Exch-DXA-Password
-schemaIDGUID: a8df73db-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Prev-Exchange-Options   
-#
-dn: CN=ms-Exch-DXA-Prev-Exchange-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Exchange-Options
-distinguishedName: CN=ms-Exch-DXA-Prev-Exchange-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.216
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32909
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Exchange-Options
-adminDescription: ms-Exch-DXA-Prev-Exchange-Options
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: dXAPrevExchangeOptions
-name: ms-Exch-DXA-Prev-Exchange-Options
-schemaIDGUID: a8df73dc-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Prev-Export-Native-Only 
-#
-dn: CN=ms-Exch-DXA-Prev-Export-Native-Only,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Export-Native-Only
-distinguishedName: CN=ms-Exch-DXA-Prev-Export-Native-Only,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.203
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32910
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Export-Native-Only
-adminDescription: ms-Exch-DXA-Prev-Export-Native-Only
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: dXAPrevExportNativeOnly
-name: ms-Exch-DXA-Prev-Export-Native-Only
-schemaIDGUID: a8df73dd-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Prev-In-Exchange-Sensitivity     
-#
-dn: CN=ms-Exch-DXA-Prev-In-Exchange-Sensitivity,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-In-Exchange-Sensitivity
-distinguishedName: CN=ms-Exch-DXA-Prev-In-Exchange-Sensitivity,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.90
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32911
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-In-Exchange-Sensitivity
-adminDescription: ms-Exch-DXA-Prev-In-Exchange-Sensitivity
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAPrevInExchangeSensitivity
-name: ms-Exch-DXA-Prev-In-Exchange-Sensitivity
-schemaIDGUID: a8df73de-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Prev-Remote-Entries             
-#
-dn: CN=ms-Exch-DXA-Prev-Remote-Entries,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Remote-Entries
-distinguishedName: CN=ms-Exch-DXA-Prev-Remote-Entries,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.265
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32912
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Remote-Entries
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DXA-Prev-Remote-Entries
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dXAPrevRemoteEntries
-name: ms-Exch-DXA-Prev-Remote-Entries
-schemaIDGUID: a8df73df-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Prev-Replication-Sensitivity     
-#
-dn: CN=ms-Exch-DXA-Prev-Replication-Sensitivity,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Replication-Sensitivity
-distinguishedName: CN=ms-Exch-DXA-Prev-Replication-Sensitivity,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.215
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32913
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Replication-Sensitivity
-adminDescription: ms-Exch-DXA-Prev-Replication-Sensitivity
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAPrevReplicationSensitivity
-name: ms-Exch-DXA-Prev-Replication-Sensitivity
-schemaIDGUID: a8df73e0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Prev-Template-Options           
-#
-dn: CN=ms-Exch-DXA-Prev-Template-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Template-Options
-distinguishedName: CN=ms-Exch-DXA-Prev-Template-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.395
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32914
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Template-Options
-adminDescription: ms-Exch-DXA-Prev-Template-Options
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: dXAPrevTemplateOptions
-name: ms-Exch-DXA-Prev-Template-Options
-schemaIDGUID: a8df73e1-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Prev-Types  
-#
-dn: CN=ms-Exch-DXA-Prev-Types,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Prev-Types
-distinguishedName: CN=ms-Exch-DXA-Prev-Types,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.217
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32915
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Prev-Types
-adminDescription: ms-Exch-DXA-Prev-Types
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAPrevTypes
-name: ms-Exch-DXA-Prev-Types
-schemaIDGUID: 167757d8-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Recipient-CP 
-#
-dn: CN=ms-Exch-DXA-Recipient-CP,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Recipient-CP
-distinguishedName: CN=ms-Exch-DXA-Recipient-CP,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.384
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 24
-mAPIID: 32916
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Recipient-CP
-adminDescription: ms-Exch-DXA-Recipient-CP
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dXARecipientCP
-name: ms-Exch-DXA-Recipient-CP
-schemaIDGUID: a8df73e2-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Remote-Client   
-#
-dn: CN=ms-Exch-DXA-Remote-Client,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Remote-Client
-distinguishedName: CN=ms-Exch-DXA-Remote-Client,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.112
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32917
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Remote-Client
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DXA-Remote-Client
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dXARemoteClient
-name: ms-Exch-DXA-Remote-Client
-schemaIDGUID: a8df73e3-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-ReqName        
-#
-dn: CN=ms-Exch-DXA-ReqName,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-ReqName
-distinguishedName: CN=ms-Exch-DXA-ReqName,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.446
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 32921
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-ReqName
-adminDescription: ms-Exch-DXA-ReqName
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dXAReqName
-name: ms-Exch-DXA-ReqName
-schemaIDGUID: a8df73e7-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Req-Seq        
-#
-dn: CN=ms-Exch-DXA-Req-Seq,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Req-Seq
-distinguishedName: CN=ms-Exch-DXA-Req-Seq,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.101
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32918
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Req-Seq
-adminDescription: ms-Exch-DXA-Req-Seq
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: dXAReqSeq
-name: ms-Exch-DXA-Req-Seq
-schemaIDGUID: a8df73e4-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Req-Seq-Time 
-#
-dn: CN=ms-Exch-DXA-Req-Seq-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Req-Seq-Time
-distinguishedName: CN=ms-Exch-DXA-Req-Seq-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.114
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32919
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Req-Seq-Time
-adminDescription: ms-Exch-DXA-Req-Seq-Time
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: dXAReqSeqTime
-name: ms-Exch-DXA-Req-Seq-Time
-schemaIDGUID: a8df73e5-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Req-Seq-USN     
-#
-dn: CN=ms-Exch-DXA-Req-Seq-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Req-Seq-USN
-distinguishedName: CN=ms-Exch-DXA-Req-Seq-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.182
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32920
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Req-Seq-USN
-adminDescription: ms-Exch-DXA-Req-Seq-USN
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXAReqSeqUSN
-name: ms-Exch-DXA-Req-Seq-USN
-schemaIDGUID: a8df73e6-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Svr-Seq        
-#
-dn: CN=ms-Exch-DXA-Svr-Seq,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Svr-Seq
-distinguishedName: CN=ms-Exch-DXA-Svr-Seq,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.360
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32922
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Svr-Seq
-adminDescription: ms-Exch-DXA-Svr-Seq
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: dXASvrSeq
-name: ms-Exch-DXA-Svr-Seq
-schemaIDGUID: a8df73e8-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-Svr-Seq-Time 
-#
-dn: CN=ms-Exch-DXA-Svr-Seq-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Svr-Seq-Time
-distinguishedName: CN=ms-Exch-DXA-Svr-Seq-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.361
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32923
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Svr-Seq-Time
-adminDescription: ms-Exch-DXA-Svr-Seq-Time
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: dXASvrSeqTime
-name: ms-Exch-DXA-Svr-Seq-Time
-schemaIDGUID: a8df73e9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Svr-Seq-USN     
-#
-dn: CN=ms-Exch-DXA-Svr-Seq-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Svr-Seq-USN
-distinguishedName: CN=ms-Exch-DXA-Svr-Seq-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.124
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32924
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Svr-Seq-USN
-adminDescription: ms-Exch-DXA-Svr-Seq-USN
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXASvrSeqUSN
-name: ms-Exch-DXA-Svr-Seq-USN
-schemaIDGUID: a8df73ea-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Template-Options   
-#
-dn: CN=ms-Exch-DXA-Template-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Template-Options
-distinguishedName: CN=ms-Exch-DXA-Template-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.358
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32926
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Template-Options
-adminDescription: ms-Exch-DXA-Template-Options
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: dXATemplateOptions
-name: ms-Exch-DXA-Template-Options
-schemaIDGUID: a8df73eb-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Template-TimeStamp  
-#
-dn: CN=ms-Exch-DXA-Template-TimeStamp,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Template-TimeStamp
-distinguishedName: CN=ms-Exch-DXA-Template-TimeStamp,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.365
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32927
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Template-TimeStamp
-adminDescription: ms-Exch-DXA-Template-TimeStamp
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: dXATemplateTimeStamp
-name: ms-Exch-DXA-Template-TimeStamp
-schemaIDGUID: a8df73ec-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-DXA-Types 
-#
-dn: CN=ms-Exch-DXA-Types,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-Types
-distinguishedName: CN=ms-Exch-DXA-Types,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.119
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32928
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Types
-adminDescription: ms-Exch-DXA-Types
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: dXATypes
-name: ms-Exch-DXA-Types
-schemaIDGUID: a8df73ed-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-DXA-UnConf-Container-List         
-#
-dn: CN=ms-Exch-DXA-UnConf-Container-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-DXA-UnConf-Container-List
-distinguishedName: CN=ms-Exch-DXA-UnConf-Container-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.181
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32929
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-UnConf-Container-List
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-DXA-UnConf-Container-List
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: dXAUnConfContainerList
-name: ms-Exch-DXA-UnConf-Container-List
-schemaIDGUID: a8df73ee-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Dynamic-DL-BaseDN                 
-#
-dn: CN=ms-Exch-Dynamic-DL-BaseDN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dynamic-DL-BaseDN
-distinguishedName: CN=ms-Exch-Dynamic-DL-BaseDN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12543
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dynamic-DL-BaseDN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Dynamic-DL-BaseDN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchDynamicDLBaseDN
-name: ms-Exch-Dynamic-DL-BaseDN
-schemaIDGUID: 763d0ef9-bd92-41f9-ab34-7e329db76ee3
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Dynamic-DL-Filter                 
-#
-dn: CN=ms-Exch-Dynamic-DL-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Dynamic-DL-Filter
-distinguishedName: CN=ms-Exch-Dynamic-DL-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12544
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Dynamic-DL-Filter
-adminDescription: ms-Exch-Dynamic-DL-Filter
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchDynamicDLFilter
-name: ms-Exch-Dynamic-DL-Filter
-schemaIDGUID: e1b6d32c-6bac-48da-a313-2b58ae1c45ce
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-EDB-File                          
-# The database file location for this store.
-#
-dn: CN=ms-Exch-EDB-File,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-EDB-File
-distinguishedName: CN=ms-Exch-EDB-File,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11001
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-EDB-File
-adminDescription: ms-Exch-EDB-File
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchEDBFile
-name: ms-Exch-EDB-File
-schemaIDGUID: 9e58d58e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-EDB-Offline  
-# If TRUE, the MDB is offline. The default is FALSE.
-#
-dn: CN=ms-Exch-EDB-Offline,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-EDB-Offline
-distinguishedName: CN=ms-Exch-EDB-Offline,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11007
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-EDB-Offline
-adminDescription: ms-Exch-EDB-Offline
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchEDBOffline
-name: ms-Exch-EDB-Offline
-schemaIDGUID: 9e7a367a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Enabled-Authorization-Packages       
-# A list of authorization packages enabled for this protocol.
-#
-dn: CN=ms-Exch-Enabled-Authorization-Packages,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Enabled-Authorization-Packages
-distinguishedName: CN=ms-Exch-Enabled-Authorization-Packages,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.479
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33156
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Enabled-Authorization-Packages
-adminDescription: ms-Exch-Enabled-Authorization-Packages
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: enabledAuthorizationPackages
-name: ms-Exch-Enabled-Authorization-Packages
-schemaIDGUID: a8df73f3-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Enabled-Protocols     
-#
-dn: CN=ms-Exch-Enabled-Protocols,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Enabled-Protocols
-distinguishedName: CN=ms-Exch-Enabled-Protocols,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.474
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33151
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Enabled-Protocols
-adminDescription: ms-Exch-Enabled-Protocols
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: enabledProtocols
-name: ms-Exch-Enabled-Protocols
-schemaIDGUID: f0f8ff8c-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Enabled-Protocol-Cfg  
-# Determines whether this protocol is enabled or not.
-dn: CN=ms-Exch-Enabled-Protocol-Cfg,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Enabled-Protocol-Cfg
-distinguishedName: CN=ms-Exch-Enabled-Protocol-Cfg,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.515
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33192
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Enabled-Protocol-Cfg
-adminDescription: ms-Exch-Enabled-Protocol-Cfg
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: enabledProtocolCfg
-name: ms-Exch-Enabled-Protocol-Cfg
-schemaIDGUID: a8df73f4-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Enable-Compatibility     
-#
-dn: CN=ms-Exch-Enable-Compatibility,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Enable-Compatibility
-distinguishedName: CN=ms-Exch-Enable-Compatibility,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.567
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35890
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Enable-Compatibility
-adminDescription: ms-Exch-Enable-Compatibility
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: enableCompatibility
-name: ms-Exch-Enable-Compatibility
-schemaIDGUID: a8df73f1-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Enable-Internal-Evaluator 
-#
-dn: CN=ms-Exch-Enable-Internal-Evaluator,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Enable-Internal-Evaluator
-distinguishedName: CN=ms-Exch-Enable-Internal-Evaluator,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.99
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Enable-Internal-Evaluator
-adminDescription: ms-Exch-Enable-Internal-Evaluator
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchEnableInternalEvaluator
-name: ms-Exch-Enable-Internal-Evaluator
-schemaIDGUID: 9a56980f-283c-4f86-8395-23011350600c
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encapsulation-Method     
-# This is present only on X.400 connectors.
-#
-dn: CN=ms-Exch-Encapsulation-Method,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encapsulation-Method
-distinguishedName: CN=ms-Exch-Encapsulation-Method,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.448
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32930
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encapsulation-Method
-adminDescription: ms-Exch-Encapsulation-Method
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: encapsulationMethod
-name: ms-Exch-Encapsulation-Method
-schemaIDGUID: a8df73f5-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encode-SMTP-Relay    
-# Determines whether or not messages submitted to this domain will be
-# encoded using the content configuration settings.
-#
-dn: CN=ms-Exch-Encode-SMTP-Relay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encode-SMTP-Relay
-distinguishedName: CN=ms-Exch-Encode-SMTP-Relay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5053
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encode-SMTP-Relay
-adminDescription: ms-Exch-Encode-SMTP-Relay
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchEncodeSMTPRelay
-name: ms-Exch-Encode-SMTP-Relay
-schemaIDGUID: 3a633f17-5194-11d3-aa77-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypt 
-#
-dn: CN=ms-Exch-Encrypt,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypt
-distinguishedName: CN=ms-Exch-Encrypt,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.236
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32931
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypt
-adminDescription: ms-Exch-Encrypt
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: encrypt
-name: ms-Exch-Encrypt
-schemaIDGUID: a8df73f6-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypted-Anonymous-Password 
-#
-dn: CN=ms-Exch-Encrypted-Anonymous-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypted-Anonymous-Password
-distinguishedName: CN=ms-Exch-Encrypted-Anonymous-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15009
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypted-Anonymous-Password
-adminDescription: ms-Exch-Encrypted-Anonymous-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchEncryptedAnonymousPassword
-name: ms-Exch-Encrypted-Anonymous-Password
-schemaIDGUID: 5dc055fc-5c3f-4a6f-a34a-4dbcb68e2ad0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypted-Password 
-#
-dn: CN=ms-Exch-Encrypted-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypted-Password
-distinguishedName: CN=ms-Exch-Encrypted-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50062
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypted-Password
-adminDescription: ms-Exch-Encrypted-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchEncryptedPassword
-name: ms-Exch-Encrypted-Password
-schemaIDGUID: 08c63250-0df6-405d-8907-0312dd1aa145
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypted-Password-2  
-#
-dn: CN=ms-Exch-Encrypted-Password-2,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypted-Password-2
-distinguishedName: CN=ms-Exch-Encrypted-Password-2,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50065
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypted-Password-2
-adminDescription: ms-Exch-Encrypted-Password-2
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchEncryptedPassword2
-name: ms-Exch-Encrypted-Password-2
-schemaIDGUID: dcbc61e9-9279-44d1-b494-25562659db75
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypt-Alg-List-NA   
-#
-dn: CN=ms-Exch-Encrypt-Alg-List-NA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypt-Alg-List-NA
-distinguishedName: CN=ms-Exch-Encrypt-Alg-List-NA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.130
-attributeSyntax: 2.5.5.5
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32832
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypt-Alg-List-NA
-adminDescription: ms-Exch-Encrypt-Alg-List-NA
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: encryptAlgListNA
-name: ms-Exch-Encrypt-Alg-List-NA
-schemaIDGUID: a8df73f7-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Encrypt-Alg-List-Other 
-#
-dn: CN=ms-Exch-Encrypt-Alg-List-Other,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypt-Alg-List-Other
-distinguishedName: CN=ms-Exch-Encrypt-Alg-List-Other,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.399
-attributeSyntax: 2.5.5.5
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32833
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypt-Alg-List-Other
-adminDescription: ms-Exch-Encrypt-Alg-List-Other
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: encryptAlgListOther
-name: ms-Exch-Encrypt-Alg-List-Other
-schemaIDGUID: a8df73f8-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Encrypt-Alg-Selected-NA 
-#
-dn: CN=ms-Exch-Encrypt-Alg-Selected-NA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypt-Alg-Selected-NA
-distinguishedName: CN=ms-Exch-Encrypt-Alg-Selected-NA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.401
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32835
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypt-Alg-Selected-NA
-adminDescription: ms-Exch-Encrypt-Alg-Selected-NA
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: encryptAlgSelectedNA
-name: ms-Exch-Encrypt-Alg-Selected-NA
-schemaIDGUID: a8df73f9-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Encrypt-Alg-Selected-Other 
-#
-dn: CN=ms-Exch-Encrypt-Alg-Selected-Other,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Encrypt-Alg-Selected-Other
-distinguishedName: CN=ms-Exch-Encrypt-Alg-Selected-Other,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.397
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32829
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Encrypt-Alg-Selected-Other
-adminDescription: ms-Exch-Encrypt-Alg-Selected-Other
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: encryptAlgSelectedOther
-name: ms-Exch-Encrypt-Alg-Selected-Other
-schemaIDGUID: a8df73fa-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Assert-Action    
-# The action on assert.
-dn: CN=ms-Exch-ESE-Param-Assert-Action,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Assert-Action
-distinguishedName: CN=ms-Exch-ESE-Param-Assert-Action,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11074
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Assert-Action
-adminDescription: ms-Exch-ESE-Param-Assert-Action
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamAssertAction
-name: ms-Exch-ESE-Param-Assert-Action
-schemaIDGUID: 2d09783d-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Base-Name  
-# The base name for all Database Management System (DBMS) object names.
-#
-dn: CN=ms-Exch-ESE-Param-Base-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Base-Name
-distinguishedName: CN=ms-Exch-ESE-Param-Base-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11076
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Base-Name
-adminDescription: ms-Exch-ESE-Param-Base-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchESEParamBaseName
-name: ms-Exch-ESE-Param-Base-Name
-schemaIDGUID: 2d097845-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Cached-Closed-Tables 
-#
-dn: CN=ms-Exch-ESE-Param-Cached-Closed-Tables,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Cached-Closed-Tables
-distinguishedName: CN=ms-Exch-ESE-Param-Cached-Closed-Tables,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11096
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Cached-Closed-Tables
-adminDescription: ms-Exch-ESE-Param-Cached-Closed-Tables
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCachedClosedTables
-name: ms-Exch-ESE-Param-Cached-Closed-Tables
-schemaIDGUID: d19c67f8-a0eb-432a-bedd-af10cd7da25c
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Cache-Size 
-#
-dn: CN=ms-Exch-ESE-Param-Cache-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Cache-Size
-distinguishedName: CN=ms-Exch-ESE-Param-Cache-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11002
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Cache-Size
-adminDescription: ms-Exch-ESE-Param-Cache-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCacheSize
-name: ms-Exch-ESE-Param-Cache-Size
-schemaIDGUID: 9eb8339e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Cache-Size-Max 
-#
-dn: CN=ms-Exch-ESE-Param-Cache-Size-Max,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Cache-Size-Max
-distinguishedName: CN=ms-Exch-ESE-Param-Cache-Size-Max,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11003
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Cache-Size-Max
-adminDescription: ms-Exch-ESE-Param-Cache-Size-Max
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCacheSizeMax
-name: ms-Exch-ESE-Param-Cache-Size-Max
-schemaIDGUID: 9ed73230-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Cache-Size-Min 
-# The minimum cache size in pages.
-#
-dn: CN=ms-Exch-ESE-Param-Cache-Size-Min,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Cache-Size-Min
-distinguishedName: CN=ms-Exch-ESE-Param-Cache-Size-Min,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11075
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Cache-Size-Min
-adminDescription: ms-Exch-ESE-Param-Cache-Size-Min
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCacheSizeMin
-name: ms-Exch-ESE-Param-Cache-Size-Min
-schemaIDGUID: 2d097841-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Checkpoint-Depth-Max       
-# The maximum checkpoint depth in bytes.
-#
-dn: CN=ms-Exch-ESE-Param-Checkpoint-Depth-Max,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Checkpoint-Depth-Max
-distinguishedName: CN=ms-Exch-ESE-Param-Checkpoint-Depth-Max,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11081
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Checkpoint-Depth-Max
-adminDescription: ms-Exch-ESE-Param-Checkpoint-Depth-Max
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCheckpointDepthMax
-name: ms-Exch-ESE-Param-Checkpoint-Depth-Max
-schemaIDGUID: 2d09785a-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Circular-Log       
-# A Boolean flag for circular logging.
-#
-dn: CN=ms-Exch-ESE-Param-Circular-Log,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Circular-Log
-distinguishedName: CN=ms-Exch-ESE-Param-Circular-Log,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11005
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Circular-Log
-adminDescription: ms-Exch-ESE-Param-Circular-Log
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCircularLog
-name: ms-Exch-ESE-Param-Circular-Log
-schemaIDGUID: 9ef8931c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Commit-Default     
-# The default grbit for JetCommitTransaction.
-#
-dn: CN=ms-Exch-ESE-Param-Commit-Default,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Commit-Default
-distinguishedName: CN=ms-Exch-ESE-Param-Commit-Default,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11077
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Commit-Default
-adminDescription: ms-Exch-ESE-Param-Commit-Default
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamCommitDefault
-name: ms-Exch-ESE-Param-Commit-Default
-schemaIDGUID: 2d097849-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Db-Extension-Size  
-# The database extension size in pages.
-#
-dn: CN=ms-Exch-ESE-Param-Db-Extension-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Db-Extension-Size
-distinguishedName: CN=ms-Exch-ESE-Param-Db-Extension-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11078
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Db-Extension-Size
-adminDescription: ms-Exch-ESE-Param-Db-Extension-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamDbExtensionSize
-name: ms-Exch-ESE-Param-Db-Extension-Size
-schemaIDGUID: 2d09784d-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Enable-Index-Checking      
-# Enables checking the operating system version for indexes. The
-# default is False.
-#
-dn: CN=ms-Exch-ESE-Param-Enable-Index-Checking,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Enable-Index-Checking
-distinguishedName: CN=ms-Exch-ESE-Param-Enable-Index-Checking,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11073
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Enable-Index-Checking
-adminDescription: ms-Exch-ESE-Param-Enable-Index-Checking
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchESEParamEnableIndexChecking
-name: ms-Exch-ESE-Param-Enable-Index-Checking
-schemaIDGUID: 2d097838-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Enable-Online-Defrag  
-# Enables online defragmentation. The default is True.
-#
-dn: CN=ms-Exch-ESE-Param-Enable-Online-Defrag,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Enable-Online-Defrag
-distinguishedName: CN=ms-Exch-ESE-Param-Enable-Online-Defrag,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11072
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Enable-Online-Defrag
-adminDescription: ms-Exch-ESE-Param-Enable-Online-Defrag
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchESEParamEnableOnlineDefrag
-name: ms-Exch-ESE-Param-Enable-Online-Defrag
-schemaIDGUID: 2d097833-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns     
-# Internally sorts (in a dynamically allocated parallel array)
-# JET_RETRIEVECOLUMN structures passed to JetRetrieveColumns(). The
-# default is False.
-#
-dn: CN=ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns
-distinguishedName: CN=ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns,CN=Sche
-attributeID: 1.2.840.113556.1.4.7000.102.11069
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns
-adminDescription: ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchESEParamEnableSortedRetrieveColumns
-name: ms-Exch-ESE-Param-Enable-Sorted-Retrieve-Columns
-schemaIDGUID: 2d097828-2b54-11d3-aa6b-00c04f8eedd8
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Event-Source     
-# A language-independent process descriptor string.
-#
-dn: CN=ms-Exch-ESE-Param-Event-Source,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Event-Source
-distinguishedName: CN=ms-Exch-ESE-Param-Event-Source,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11008
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Event-Source
-adminDescription: ms-Exch-ESE-Param-Event-Source
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchESEParamEventSource
-name: ms-Exch-ESE-Param-Event-Source
-schemaIDGUID: 9f19f408-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Global-Min-Ver-Pages       
-# The global minimum version page size in 16-kilobyte (KB) units.
-#
-dn: CN=ms-Exch-ESE-Param-Global-Min-Ver-Pages,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Global-Min-Ver-Pages
-distinguishedName: CN=ms-Exch-ESE-Param-Global-Min-Ver-Pages,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11082
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Global-Min-Ver-Pages
-adminDescription: ms-Exch-ESE-Param-Global-Min-Ver-Pages
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamGlobalMinVerPages
-name: ms-Exch-ESE-Param-Global-Min-Ver-Pages
-schemaIDGUID: 02e831da-2f29-11d3-aa6c-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Log-Buffers        
-# Log buffers in 512 bytes.
-#
-dn: CN=ms-Exch-ESE-Param-Log-Buffers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Log-Buffers
-distinguishedName: CN=ms-Exch-ESE-Param-Log-Buffers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11009
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Log-Buffers
-adminDescription: ms-Exch-ESE-Param-Log-Buffers
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamLogBuffers
-name: ms-Exch-ESE-Param-Log-Buffers
-schemaIDGUID: 9f38f29a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Log-Checkpoint-Period      
-#
-dn: CN=ms-Exch-ESE-Param-Log-Checkpoint-Period,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Log-Checkpoint-Period
-distinguishedName: CN=ms-Exch-ESE-Param-Log-Checkpoint-Period,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11010
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Log-Checkpoint-Period
-adminDescription: ms-Exch-ESE-Param-Log-Checkpoint-Period
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamLogCheckpointPeriod
-name: ms-Exch-ESE-Param-Log-Checkpoint-Period
-schemaIDGUID: 9f5a5386-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Log-File-Path
-# The path to the log file directory.
-#
-dn: CN=ms-Exch-ESE-Param-Log-File-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Log-File-Path
-distinguishedName: CN=ms-Exch-ESE-Param-Log-File-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11011
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Log-File-Path
-adminDescription: ms-Exch-ESE-Param-Log-File-Path
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchESEParamLogFilePath
-name: ms-Exch-ESE-Param-Log-File-Path
-schemaIDGUID: 9f795218-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Log-File-Size      
-# The log file size in KB.
-dn: CN=ms-Exch-ESE-Param-Log-File-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Log-File-Size
-distinguishedName: CN=ms-Exch-ESE-Param-Log-File-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11012
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Log-File-Size
-adminDescription: ms-Exch-ESE-Param-Log-File-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamLogFileSize
-name: ms-Exch-ESE-Param-Log-File-Size
-schemaIDGUID: 9f9ab304-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Log-Waiting-User-Max       
-# The maximum sessions waiting on log flush.
-#
-dn: CN=ms-Exch-ESE-Param-Log-Waiting-User-Max,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Log-Waiting-User-Max
-distinguishedName: CN=ms-Exch-ESE-Param-Log-Waiting-User-Max,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11013
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Log-Waiting-User-Max
-adminDescription: ms-Exch-ESE-Param-Log-Waiting-User-Max
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamLogWaitingUserMax
-name: ms-Exch-ESE-Param-Log-Waiting-User-Max
-schemaIDGUID: 9fbe764a-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Max-Cursors        
-# The maximum number of open cursors.
-#
-dn: CN=ms-Exch-ESE-Param-Max-Cursors,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Max-Cursors
-distinguishedName: CN=ms-Exch-ESE-Param-Max-Cursors,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11071
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Max-Cursors
-adminDescription: ms-Exch-ESE-Param-Max-Cursors
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamMaxCursors
-name: ms-Exch-ESE-Param-Max-Cursors
-schemaIDGUID: 2d097830-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Max-Open-Tables    
-# The maximum number of open directories.
-#
-dn: CN=ms-Exch-ESE-Param-Max-Open-Tables,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Max-Open-Tables
-distinguishedName: CN=ms-Exch-ESE-Param-Max-Open-Tables,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11014
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Max-Open-Tables
-adminDescription: ms-Exch-ESE-Param-Max-Open-Tables
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamMaxOpenTables
-name: ms-Exch-ESE-Param-Max-Open-Tables
-schemaIDGUID: 9fdfd736-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Max-Sessions       
-# The maximum number of sessions.
-#
-dn: CN=ms-Exch-ESE-Param-Max-Sessions,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Max-Sessions
-distinguishedName: CN=ms-Exch-ESE-Param-Max-Sessions,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11015
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Max-Sessions
-adminDescription: ms-Exch-ESE-Param-Max-Sessions
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamMaxSessions
-name: ms-Exch-ESE-Param-Max-Sessions
-schemaIDGUID: 9ffed5c8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Max-Temporary-Tables       
-# The maximum concurrent open temporary table/index creation.
-#
-dn: CN=ms-Exch-ESE-Param-Max-Temporary-Tables,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Max-Temporary-Tables
-distinguishedName: CN=ms-Exch-ESE-Param-Max-Temporary-Tables,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11070
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Max-Temporary-Tables
-adminDescription: ms-Exch-ESE-Param-Max-Temporary-Tables
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamMaxTemporaryTables
-name: ms-Exch-ESE-Param-Max-Temporary-Tables
-schemaIDGUID: 2d09782c-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Max-Ver-Pages        
-# The maximum version store size in 16-KB units.
-#
-dn: CN=ms-Exch-ESE-Param-Max-Ver-Pages,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Max-Ver-Pages
-distinguishedName: CN=ms-Exch-ESE-Param-Max-Ver-Pages,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11017
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Max-Ver-Pages
-adminDescription: ms-Exch-ESE-Param-Max-Ver-Pages
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamMaxVerPages
-name: ms-Exch-ESE-Param-Max-Ver-Pages
-schemaIDGUID: a02036b4-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Page-Fragment      
-# The maximum disk extent considered fragment, in pages.
-#
-dn: CN=ms-Exch-ESE-Param-Page-Fragment,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Page-Fragment
-distinguishedName: CN=ms-Exch-ESE-Param-Page-Fragment,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11080
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Page-Fragment
-adminDescription: ms-Exch-ESE-Param-Page-Fragment
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamPageFragment
-name: ms-Exch-ESE-Param-Page-Fragment
-schemaIDGUID: 2d097855-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Page-Temp-DB-Min 
-# The minimum size of a temporary database, in pages.
-#
-dn: CN=ms-Exch-ESE-Param-Page-Temp-DB-Min,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Page-Temp-DB-Min
-distinguishedName: CN=ms-Exch-ESE-Param-Page-Temp-DB-Min,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11079
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Page-Temp-DB-Min
-adminDescription: ms-Exch-ESE-Param-Page-Temp-DB-Min
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamPageTempDBMin
-name: ms-Exch-ESE-Param-Page-Temp-DB-Min
-schemaIDGUID: 2d097851-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Preferred-Max-Open-Tables  
-# The preferred maximum number of open directories.
-dn: CN=ms-Exch-ESE-Param-Preferred-Max-Open-Tables,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Preferred-Max-Open-Tables
-distinguishedName: CN=ms-Exch-ESE-Param-Preferred-Max-Open-Tables,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11018
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Preferred-Max-Open-Tables
-adminDescription: ms-Exch-ESE-Param-Preferred-Max-Open-Tables
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamPreferredMaxOpenTables
-name: ms-Exch-ESE-Param-Preferred-Max-Open-Tables
-schemaIDGUID: a04197a0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Preferred-Ver-Pages        
-# The preferred version store size in 16-KB units.
-#
-dn: CN=ms-Exch-ESE-Param-Preferred-Ver-Pages,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Preferred-Ver-Pages
-distinguishedName: CN=ms-Exch-ESE-Param-Preferred-Ver-Pages,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11019
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Preferred-Ver-Pages
-adminDescription: ms-Exch-ESE-Param-Preferred-Ver-Pages
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamPreferredVerPages
-name: ms-Exch-ESE-Param-Preferred-Ver-Pages
-schemaIDGUID: a062f88c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Start-Flush-Threshold      
-#
-dn: CN=ms-Exch-ESE-Param-Start-Flush-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Start-Flush-Threshold
-distinguishedName: CN=ms-Exch-ESE-Param-Start-Flush-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11056
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Start-Flush-Threshold
-adminDescription: ms-Exch-ESE-Param-Start-Flush-Threshold
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamStartFlushThreshold
-name: ms-Exch-ESE-Param-Start-Flush-Threshold
-schemaIDGUID: 92abc93e-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Stop-Flush-Threshold       
-#
-dn: CN=ms-Exch-ESE-Param-Stop-Flush-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Stop-Flush-Threshold
-distinguishedName: CN=ms-Exch-ESE-Param-Stop-Flush-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11057
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Stop-Flush-Threshold
-adminDescription: ms-Exch-ESE-Param-Stop-Flush-Threshold
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamStopFlushThreshold
-name: ms-Exch-ESE-Param-Stop-Flush-Threshold
-schemaIDGUID: 92c6031c-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-System-Path                        
-# The path to check point file.
-dn: CN=ms-Exch-ESE-Param-System-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-System-Path
-distinguishedName: CN=ms-Exch-ESE-Param-System-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11022
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-System-Path
-adminDescription: ms-Exch-ESE-Param-System-Path
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchESEParamSystemPath
-name: ms-Exch-ESE-Param-System-Path
-schemaIDGUID: a086bbd2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Temp-Path  
-# The path to the temporary database.
-#
-dn: CN=ms-Exch-ESE-Param-Temp-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Temp-Path
-distinguishedName: CN=ms-Exch-ESE-Param-Temp-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11023
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Temp-Path
-adminDescription: ms-Exch-ESE-Param-Temp-Path
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchESEParamTempPath
-name: ms-Exch-ESE-Param-Temp-Path
-schemaIDGUID: a0a5ba64-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-ESE-Param-Wait-Log-Flush     
-# The wait time in milliseconds.
-#
-dn: CN=ms-Exch-ESE-Param-Wait-Log-Flush,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Wait-Log-Flush
-distinguishedName: CN=ms-Exch-ESE-Param-Wait-Log-Flush,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Wait-Log-Flush
-adminDescription: ms-Exch-ESE-Param-Wait-Log-Flush
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamWaitLogFlush
-name: ms-Exch-ESE-Param-Wait-Log-Flush
-schemaIDGUID: a0c71b50-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-ESE-Param-Zero-Database-During-Backup        
-# Overwrites deleted records/long values during backup.
-#
-dn: CN=ms-Exch-ESE-Param-Zero-Database-During-Backup,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-ESE-Param-Zero-Database-During-Backup
-distinguishedName: CN=ms-Exch-ESE-Param-Zero-Database-During-Backup,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11026
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ESE-Param-Zero-Database-During-Backup
-adminDescription: ms-Exch-ESE-Param-Zero-Database-During-Backup
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchESEParamZeroDatabaseDuringBackup
-name: ms-Exch-ESE-Param-Zero-Database-During-Backup
-schemaIDGUID: a0e619e2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Exchange-Server-Link 
-# A link to an Exchange server that this object corresponds to.
-#
-dn: CN=ms-Exch-Exchange-Server-Link,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Exchange-Server-Link
-distinguishedName: CN=ms-Exch-Exchange-Server-Link,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.71
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1019
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Exchange-Server-Link
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Exchange-Server-Link
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchExchangeServerLink
-name: ms-Exch-Exchange-Server-Link
-schemaIDGUID: a1051874-b093-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Exchange-Site          
-# Contains the DN to the site that this connection agreement is for.
-#
-dn: CN=ms-Exch-Exchange-Site,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Exchange-Site
-distinguishedName: CN=ms-Exch-Exchange-Site,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.85
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Exchange-Site
-adminDescription: ms-Exch-Exchange-Site
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchExchangeSite
-name: ms-Exch-Exchange-Site
-schemaIDGUID: 24d808f5-2439-11d3-aa66-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Expand-DLs-Locally  
-#
-dn: CN=ms-Exch-Expand-DLs-Locally,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Expand-DLs-Locally
-distinguishedName: CN=ms-Exch-Expand-DLs-Locally,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.201
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32932
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Expand-DLs-Locally
-adminDescription: ms-Exch-Expand-DLs-Locally
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: expandDLsLocally
-name: ms-Exch-Expand-DLs-Locally
-schemaIDGUID: a8df73fb-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Expansion-Server-Name          
-#
-dn: CN=ms-Exch-Expansion-Server-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Expansion-Server-Name
-distinguishedName: CN=ms-Exch-Expansion-Server-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.49
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Expansion-Server-Name
-adminDescription: ms-Exch-Expansion-Server-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchExpansionServerName
-name: ms-Exch-Expansion-Server-Name
-schemaIDGUID: a1241706-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Expiration-Time        
-#
-dn: CN=ms-Exch-Expiration-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Expiration-Time
-distinguishedName: CN=ms-Exch-Expiration-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.394
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32808
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Expiration-Time
-adminDescription: ms-Exch-Expiration-Time
-oMSyntax: 23
-searchFlags: 1
-lDAPDisplayName: expirationTime
-name: ms-Exch-Expiration-Time
-schemaIDGUID: bf967965-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Export-Containers      
-#
-dn: CN=ms-Exch-Export-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Export-Containers
-distinguishedName: CN=ms-Exch-Export-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.111
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32933
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Export-Containers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Export-Containers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: exportContainers
-name: ms-Exch-Export-Containers
-schemaIDGUID: a8df73fc-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Export-Containers-BL   
-#
-dn: CN=ms-Exch-Export-Containers-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Export-Containers-BL
-distinguishedName: CN=ms-Exch-Export-Containers-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1027
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1029
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Export-Containers-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Export-Containers-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchExportContainersBL
-name: ms-Exch-Export-Containers-BL
-schemaIDGUID: 2436ac3e-1d4e-11d3-aa5e-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Export-Containers-Linked 
-#
-dn: CN=ms-Exch-Export-Containers-Linked,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Export-Containers-Linked
-distinguishedName: CN=ms-Exch-Export-Containers-Linked,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1026
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1028
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Export-Containers-Linked
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Export-Containers-Linked
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchExportContainersLinked
-name: ms-Exch-Export-Containers-Linked
-schemaIDGUID: 3b7ea364-1d4d-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Export-Custom-Recipients 
-#
-dn: CN=ms-Exch-Export-Custom-Recipients,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Export-Custom-Recipients
-distinguishedName: CN=ms-Exch-Export-Custom-Recipients,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.307
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32934
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Export-Custom-Recipients
-adminDescription: ms-Exch-Export-Custom-Recipients
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: exportCustomRecipients
-name: ms-Exch-Export-Custom-Recipients
-schemaIDGUID: a8df73fd-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Export-DLs    
-# A flag indicating whether distribution list (DL) names are
-# propagated to foreign systems via directory synchronization.
-#
-dn: CN=ms-Exch-Export-DLs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Export-DLs
-distinguishedName: CN=ms-Exch-Export-DLs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1004
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Export-DLs
-adminDescription: ms-Exch-Export-DLs
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchExportDLs
-name: ms-Exch-Export-DLs
-schemaIDGUID: a14577f2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Extension-Attribute-1            
-#
-dn: CN=ms-Exch-Extension-Attribute-1,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-1
-distinguishedName: CN=ms-Exch-Extension-Attribute-1,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.423
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32813
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-1
-adminDescription: ms-Exch-Extension-Attribute-1
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute1
-name: ms-Exch-Extension-Attribute-1
-schemaIDGUID: bf967967-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-10 
-#
-dn: CN=ms-Exch-Extension-Attribute-10,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-10
-distinguishedName: CN=ms-Exch-Extension-Attribute-10,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.432
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32822
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-10
-adminDescription: ms-Exch-Extension-Attribute-10
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute10
-name: ms-Exch-Extension-Attribute-10
-schemaIDGUID: bf967968-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-11 
-#
-dn: CN=ms-Exch-Extension-Attribute-11,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-11
-distinguishedName: CN=ms-Exch-Extension-Attribute-11,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.599
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 2048
-mAPIID: 35927
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-11
-adminDescription: ms-Exch-Extension-Attribute-11
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute11
-name: ms-Exch-Extension-Attribute-11
-schemaIDGUID: 167757f6-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-12 
-#
-dn: CN=ms-Exch-Extension-Attribute-12,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-12
-distinguishedName: CN=ms-Exch-Extension-Attribute-12,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.600
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 2048
-mAPIID: 35928
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-12
-adminDescription: ms-Exch-Extension-Attribute-12
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute12
-name: ms-Exch-Extension-Attribute-12
-schemaIDGUID: 167757f7-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-13 
-#
-dn: CN=ms-Exch-Extension-Attribute-13,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-13
-distinguishedName: CN=ms-Exch-Extension-Attribute-13,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.601
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 2048
-mAPIID: 35929
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-13
-adminDescription: ms-Exch-Extension-Attribute-13
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute13
-name: ms-Exch-Extension-Attribute-13
-schemaIDGUID: 167757f8-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-14 Attribut
-#
-
-
-
-
-#
-# ms-Exch-Extension-Attribute-15       
-#
-dn: CN=ms-Exch-Extension-Attribute-15,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-15
-distinguishedName: CN=ms-Exch-Extension-Attribute-15,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.603
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 2048
-mAPIID: 35937
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-15
-adminDescription: ms-Exch-Extension-Attribute-15
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute15
-name: ms-Exch-Extension-Attribute-15
-schemaIDGUID: 167757fa-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-2                
-#
-dn: CN=ms-Exch-Extension-Attribute-2,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-2
-distinguishedName: CN=ms-Exch-Extension-Attribute-2,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.424
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32814
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-2
-adminDescription: ms-Exch-Extension-Attribute-2
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute2
-name: ms-Exch-Extension-Attribute-2
-schemaIDGUID: bf967969-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-3                
-#
-dn: CN=ms-Exch-Extension-Attribute-3,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-3
-distinguishedName: CN=ms-Exch-Extension-Attribute-3,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.425
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32815
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-3
-adminDescription: ms-Exch-Extension-Attribute-3
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute3
-name: ms-Exch-Extension-Attribute-3
-schemaIDGUID: bf96796a-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-4                
-#
-dn: CN=ms-Exch-Extension-Attribute-4,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-4
-distinguishedName: CN=ms-Exch-Extension-Attribute-4,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.426
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32816
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-4
-adminDescription: ms-Exch-Extension-Attribute-4
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute4
-name: ms-Exch-Extension-Attribute-4
-schemaIDGUID: bf96796b-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Extension-Attribute-5                
-#
-dn: CN=ms-Exch-Extension-Attribute-5,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-5
-distinguishedName: CN=ms-Exch-Extension-Attribute-5,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.427
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32817
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-5
-adminDescription: ms-Exch-Extension-Attribute-5
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute5
-name: ms-Exch-Extension-Attribute-5
-schemaIDGUID: bf96796c-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-6                
-#
-dn: CN=ms-Exch-Extension-Attribute-6,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-6
-distinguishedName: CN=ms-Exch-Extension-Attribute-6,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.428
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32818
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-6
-adminDescription: ms-Exch-Extension-Attribute-6
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute6
-name: ms-Exch-Extension-Attribute-6
-schemaIDGUID: bf96796d-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-7                
-#
-dn: CN=ms-Exch-Extension-Attribute-7,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-7
-distinguishedName: CN=ms-Exch-Extension-Attribute-7,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.429
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32819
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-7
-adminDescription: ms-Exch-Extension-Attribute-7
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute7
-name: ms-Exch-Extension-Attribute-7
-schemaIDGUID: bf96796e-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-8                
-#
-dn: CN=ms-Exch-Extension-Attribute-8,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-8
-distinguishedName: CN=ms-Exch-Extension-Attribute-8,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.430
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32820
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-8
-adminDescription: ms-Exch-Extension-Attribute-8
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute8
-name: ms-Exch-Extension-Attribute-8
-schemaIDGUID: bf96796f-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Extension-Attribute-9                
-#
-dn: CN=ms-Exch-Extension-Attribute-9,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Attribute-9
-distinguishedName: CN=ms-Exch-Extension-Attribute-9,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.431
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32821
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Attribute-9
-adminDescription: ms-Exch-Extension-Attribute-9
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: extensionAttribute9
-name: ms-Exch-Extension-Attribute-9
-schemaIDGUID: bf967970-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Extension-Data               
-#
-dn: CN=ms-Exch-Extension-Data,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Extension-Data
-distinguishedName: CN=ms-Exch-Extension-Data,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.228
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 32768
-mAPIID: 32936
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Extension-Data
-adminDescription: ms-Exch-Extension-Data
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: extensionData
-name: ms-Exch-Extension-Data
-schemaIDGUID: bf967971-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-FB-URL                       
-#
-dn: CN=ms-Exch-FB-URL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-FB-URL
-distinguishedName: CN=ms-Exch-FB-URL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.10001
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-mAPIID: 35966
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-FB-URL
-adminDescription: ms-Exch-FB-URL
-oMSyntax: 64
-searchFlags: 1
-lDAPDisplayName: msExchFBURL
-name: ms-Exch-FB-URL
-schemaIDGUID: a166d8de-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-File-Version                 
-#
-dn: CN=ms-Exch-File-Version,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-File-Version
-distinguishedName: CN=ms-Exch-File-Version,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.178
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 8
-mAPIID: 32940
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-File-Version
-adminDescription: ms-Exch-File-Version
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: fileVersion
-name: ms-Exch-File-Version
-schemaIDGUID: 167757fb-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Filter-Local-Addresses       
-#
-dn: CN=ms-Exch-Filter-Local-Addresses,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Filter-Local-Addresses
-distinguishedName: CN=ms-Exch-Filter-Local-Addresses,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.44
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32941
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Filter-Local-Addresses
-adminDescription: ms-Exch-Filter-Local-Addresses
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: filterLocalAddresses
-name: ms-Exch-Filter-Local-Addresses
-schemaIDGUID: a8df73fe-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-First-Instance               
-#
-dn: CN=ms-Exch-First-Instance,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-First-Instance
-distinguishedName: CN=ms-Exch-First-Instance,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11053
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-First-Instance
-adminDescription: ms-Exch-First-Instance
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchFirstInstance
-name: ms-Exch-First-Instance
-schemaIDGUID: 8a8f2908-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Folder-Affinity-Custom   
-#
-dn: CN=ms-Exch-Folder-Affinity-Custom,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Folder-Affinity-Custom
-distinguishedName: CN=ms-Exch-Folder-Affinity-Custom,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11090
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Folder-Affinity-Custom
-adminDescription: ms-Exch-Folder-Affinity-Custom
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchFolderAffinityCustom
-name: ms-Exch-Folder-Affinity-Custom
-schemaIDGUID: 5070257a-85b7-4ed4-b2e2-51f726684c58
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Folder-Affinity-List    
-#
-dn: CN=ms-Exch-Folder-Affinity-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Folder-Affinity-List
-distinguishedName: CN=ms-Exch-Folder-Affinity-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11089
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Folder-Affinity-List
-adminDescription: ms-Exch-Folder-Affinity-List
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchFolderAffinityList
-name: ms-Exch-Folder-Affinity-List
-schemaIDGUID: 3592bc80-1117-4962-aa50-38c6e69bbb91
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Folder-Pathname         
-#
-dn: CN=ms-Exch-Folder-Pathname,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Folder-Pathname
-distinguishedName: CN=ms-Exch-Folder-Pathname,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.337
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32772
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Folder-Pathname
-adminDescription: ms-Exch-Folder-Pathname
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: folderPathname
-name: ms-Exch-Folder-Pathname
-schemaIDGUID: f0f8ff8d-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Form-Data               
-#
-dn: CN=ms-Exch-Form-Data,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Form-Data
-distinguishedName: CN=ms-Exch-Form-Data,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.607
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 35941
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Form-Data
-adminDescription: ms-Exch-Form-Data
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: formData
-name: ms-Exch-Form-Data
-schemaIDGUID: a8df7400-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Forwarding-Address      
-# Contains an SMTP address that should be used as the mail forwarding
-# address of the object.
-#
-dn: CN=ms-Exch-Forwarding-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Forwarding-Address
-distinguishedName: CN=ms-Exch-Forwarding-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.606
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 35940
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Forwarding-Address
-adminDescription: ms-Exch-Forwarding-Address
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: forwardingAddress
-name: ms-Exch-Forwarding-Address
-schemaIDGUID: 167757ff-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Gateway-Local-Cred 
-#
-dn: CN=ms-Exch-Gateway-Local-Cred,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Gateway-Local-Cred
-distinguishedName: CN=ms-Exch-Gateway-Local-Cred,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.37
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 32944
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Gateway-Local-Cred
-adminDescription: ms-Exch-Gateway-Local-Cred
-oMSyntax: 22
-searchFlags: 0
-lDAPDisplayName: gatewayLocalCred
-name: ms-Exch-Gateway-Local-Cred
-schemaIDGUID: a8df7401-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Gateway-Local-Desig   
-#
-dn: CN=ms-Exch-Gateway-Local-Desig,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Gateway-Local-Desig
-distinguishedName: CN=ms-Exch-Gateway-Local-Desig,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.29
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 32945
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Gateway-Local-Desig
-adminDescription: ms-Exch-Gateway-Local-Desig
-oMSyntax: 22
-searchFlags: 0
-lDAPDisplayName: gatewayLocalDesig
-name: ms-Exch-Gateway-Local-Desig
-schemaIDGUID: a8df7402-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Gateway-Proxy                 
-#
-dn: CN=ms-Exch-Gateway-Proxy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Gateway-Proxy
-distinguishedName: CN=ms-Exch-Gateway-Proxy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.302
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1123
-mAPIID: 32946
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Gateway-Proxy
-adminDescription: ms-Exch-Gateway-Proxy
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: gatewayProxy
-name: ms-Exch-Gateway-Proxy
-schemaIDGUID: 16775802-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Gateway-Routing-Tree  
-# Contains the Gateway Address Resolution Table (GWART) for the site.
-#
-dn: CN=ms-Exch-Gateway-Routing-Tree,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Gateway-Routing-Tree
-distinguishedName: CN=ms-Exch-Gateway-Routing-Tree,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.167
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 32947
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Gateway-Routing-Tree
-adminDescription: ms-Exch-Gateway-Routing-Tree
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: gatewayRoutingTree
-name: ms-Exch-Gateway-Routing-Tree
-schemaIDGUID: a8df7403-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Grace-Period-After   
-# Defines a period, in seconds, for which the conference allows
-# attendees to continue after the scheduled termination.
-#
-dn: CN=ms-Exch-Grace-Period-After,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Grace-Period-After
-distinguishedName: CN=ms-Exch-Grace-Period-After,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9003
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Grace-Period-After
-adminDescription: ms-Exch-Grace-Period-After
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchGracePeriodAfter
-name: ms-Exch-Grace-Period-After
-schemaIDGUID: a1d6e764-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Grace-Period-Prior   
-# Defines a period, in seconds, for which clients are accepted into a
-# conference prior to the scheduled start time.
-#
-dn: CN=ms-Exch-Grace-Period-Prior,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Grace-Period-Prior
-distinguishedName: CN=ms-Exch-Grace-Period-Prior,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9002
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Grace-Period-Prior
-adminDescription: ms-Exch-Grace-Period-Prior
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchGracePeriodPrior
-name: ms-Exch-Grace-Period-Prior
-schemaIDGUID: a1f84850-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-GWART-Last-Modified  
-# Contains the time the Gateway Address Resolution Table (GWART) was
-# last modified.
-#
-dn: CN=ms-Exch-GWART-Last-Modified,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWART-Last-Modified
-distinguishedName: CN=ms-Exch-GWART-Last-Modified,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.260
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 32948
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWART-Last-Modified
-adminDescription: ms-Exch-GWART-Last-Modified
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: gWARTLastModified
-name: ms-Exch-GWART-Last-Modified
-schemaIDGUID: 8fa43470-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-GWise-API-Gateway   
-#
-dn: CN=ms-Exch-GWise-API-Gateway,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-API-Gateway
-distinguishedName: CN=ms-Exch-GWise-API-Gateway,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1045
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-API-Gateway
-adminDescription: ms-Exch-GWise-API-Gateway
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchGWiseAPIGateway
-name: ms-Exch-GWise-API-Gateway
-schemaIDGUID: c7e96933-bd80-44a2-a535-ec744ea5f54f
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-GWise-API-Gateway-Path  
-#
-dn: CN=ms-Exch-GWise-API-Gateway-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-API-Gateway-Path
-distinguishedName: CN=ms-Exch-GWise-API-Gateway-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1201
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-API-Gateway-Path
-adminDescription: ms-Exch-GWise-API-Gateway-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchGWiseAPIGatewayPath
-name: ms-Exch-GWise-API-Gateway-Path
-schemaIDGUID: 3b9d8dea-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-GWise-Filter-Type      
-#
-dn: CN=ms-Exch-GWise-Filter-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-Filter-Type
-distinguishedName: CN=ms-Exch-GWise-Filter-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1205
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-Filter-Type
-adminDescription: ms-Exch-GWise-Filter-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchGWiseFilterType
-name: ms-Exch-GWise-Filter-Type
-schemaIDGUID: 3b9d8dee-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-GWise-Foreign-Domain   
-#
-dn: CN=ms-Exch-GWise-Foreign-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-Foreign-Domain
-distinguishedName: CN=ms-Exch-GWise-Foreign-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1204
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-Foreign-Domain
-adminDescription: ms-Exch-GWise-Foreign-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchGWiseForeignDomain
-name: ms-Exch-GWise-Foreign-Domain
-schemaIDGUID: 3b9d8df3-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-GWise-Password         
-#
-dn: CN=ms-Exch-GWise-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-Password
-distinguishedName: CN=ms-Exch-GWise-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1203
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-Password
-adminDescription: ms-Exch-GWise-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchGWisePassword
-name: ms-Exch-GWise-Password
-schemaIDGUID: 3b9d8df9-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-GWise-User-Id                  
-#
-dn: CN=ms-Exch-GWise-User-Id,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-GWise-User-Id
-distinguishedName: CN=ms-Exch-GWise-User-Id,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1202
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GWise-User-Id
-adminDescription: ms-Exch-GWise-User-Id
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchGWiseUserId
-name: ms-Exch-GWise-User-Id
-schemaIDGUID: 3b9d8e00-2d93-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Heuristics             
-# Contains special connector attributes, such as "allow system
-# messages".
-#
-dn: CN=ms-Exch-Heuristics,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Heuristics
-distinguishedName: CN=ms-Exch-Heuristics,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.452
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32951
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Heuristics
-adminDescription: ms-Exch-Heuristics
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: heuristics
-name: ms-Exch-Heuristics
-schemaIDGUID: bf967983-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Hide-DL-Membership   
-#
-dn: CN=ms-Exch-Hide-DL-Membership,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Hide-DL-Membership
-distinguishedName: CN=ms-Exch-Hide-DL-Membership,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.297
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32952
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Hide-DL-Membership
-adminDescription: ms-Exch-Hide-DL-Membership
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: hideDLMembership
-name: ms-Exch-Hide-DL-Membership
-schemaIDGUID: a8df7405-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Hide-From-Address-Lists  
-# Determines if the recipient appears in address lists.
-#
-dn: CN=ms-Exch-Hide-From-Address-Lists,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Hide-From-Address-Lists
-distinguishedName: CN=ms-Exch-Hide-From-Address-Lists,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.73
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Hide-From-Address-Lists
-adminDescription: ms-Exch-Hide-From-Address-Lists
-oMSyntax: 1
-searchFlags: 16
-lDAPDisplayName: msExchHideFromAddressLists
-name: ms-Exch-Hide-From-Address-Lists
-schemaIDGUID: a21c0b96-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Home-MDB  
-# The distinguished name of the MDB for this mailbox.
-#
-dn: CN=ms-Exch-Home-MDB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-MDB
-distinguishedName: CN=ms-Exch-Home-MDB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.244
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32774
-linkID: 32
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-MDB
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-MDB
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: homeMDB
-name: ms-Exch-Home-MDB
-schemaIDGUID: bf967987-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Home-MDB-BL 
-#
-dn: CN=ms-Exch-Home-MDB-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-MDB-BL
-distinguishedName: CN=ms-Exch-Home-MDB-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.393
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32788
-linkID: 33
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-MDB-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-MDB-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: homeMDBBL
-name: ms-Exch-Home-MDB-BL
-schemaIDGUID: bf967988-0de6-11d0-a285-00aa003049e2
-systemFlags: 1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Home-MTA    
-# Points to the MTA that services this object.
-#
-dn: CN=ms-Exch-Home-MTA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-MTA
-distinguishedName: CN=ms-Exch-Home-MTA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.171
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32775
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-MTA
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-MTA
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: homeMTA
-name: ms-Exch-Home-MTA
-schemaIDGUID: bf967989-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Home-Public-MDB    
-# The DN of the object for the home public MDB.
-#
-dn: CN=ms-Exch-Home-Public-MDB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-Public-MDB
-distinguishedName: CN=ms-Exch-Home-Public-MDB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11044
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-Public-MDB
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-Public-MDB
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchHomePublicMDB
-name: ms-Exch-Home-Public-MDB
-schemaIDGUID: a23fcedc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Home-Routing-Group    
-#
-dn: CN=ms-Exch-Home-Routing-Group,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-Routing-Group
-distinguishedName: CN=ms-Exch-Home-Routing-Group,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12539
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1050
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-Routing-Group
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-Routing-Group
-oMSyntax: 127
-searchFlags: 1
-lDAPDisplayName: msExchHomeRoutingGroup
-name: ms-Exch-Home-Routing-Group
-schemaIDGUID: f649deed-1c26-4ed4-b639-f333a4850bc2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Home-Routing-Group-DN-BL      
-# A backlink to the routing group that this object is a member of.
-#
-dn: CN=ms-Exch-Home-Routing-Group-DN-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-Routing-Group-DN-BL
-distinguishedName: CN=ms-Exch-Home-Routing-Group-DN-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12513
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1001
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-Routing-Group-DN-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-Routing-Group-DN-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchHomeRoutingGroupDNBL
-name: ms-Exch-Home-Routing-Group-DN-BL
-schemaIDGUID: a2612fc8-b093-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Home-Server-Name   
-#
-dn: CN=ms-Exch-Home-Server-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-Server-Name
-distinguishedName: CN=ms-Exch-Home-Server-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.47
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-Server-Name
-adminDescription: ms-Exch-Home-Server-Name
-oMSyntax: 64
-searchFlags: 25
-lDAPDisplayName: msExchHomeServerName
-name: ms-Exch-Home-Server-Name
-schemaIDGUID: a284f30e-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Home-Sync-Service  
-# Link to the Active Directory Connector (ADC) for this connection
-# agreement.
-#
-dn: CN=ms-Exch-Home-Sync-Service,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Home-Sync-Service
-distinguishedName: CN=ms-Exch-Home-Sync-Service,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.36
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 146
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Home-Sync-Service
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Home-Sync-Service
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchHomeSyncService
-name: ms-Exch-Home-Sync-Service
-schemaIDGUID: a2a3f1a0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-House-Identifier     
-#
-#dn: CN=ms-Exch-House-Identifier,${SCHEMADN}
-#objectClass: top
-#objectClass: attributeSchema
-#cn: ms-Exch-House-Identifier
-#distinguishedName: CN=ms-Exch-House-Identifier,${SCHEMADN}
-#attributeID: 1.2.840.113556.1.2.596
-#attributeSyntax: 2.5.5.12
-#isSingleValued: TRUE
-#rangeLower: 1
-#rangeUpper: 128
-#mAPIID: 35924
-#adminDisplayName: ms-Exch-House-Identifier
-#adminDescription: ms-Exch-House-Identifier
-#oMSyntax: 64
-#searchFlags: 0
-#lDAPDisplayName: msExchHouseIdentifier
-#name: ms-Exch-House-Identifier
-#schemaIDGUID: a8df7407-c5ea-11d1-bbcb-0080c76670c0
-#objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-HTTP-Pub-AB-Attributes   
-#
-dn: CN=ms-Exch-HTTP-Pub-AB-Attributes,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-HTTP-Pub-AB-Attributes
-distinguishedName: CN=ms-Exch-HTTP-Pub-AB-Attributes,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.516
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33193
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-HTTP-Pub-AB-Attributes
-adminDescription: ms-Exch-HTTP-Pub-AB-Attributes
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: hTTPPubABAttributes
-name: ms-Exch-HTTP-Pub-AB-Attributes
-schemaIDGUID: a8df7408-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-HTTP-Pub-GAL 
-#
-dn: CN=ms-Exch-HTTP-Pub-GAL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-HTTP-Pub-GAL
-distinguishedName: CN=ms-Exch-HTTP-Pub-GAL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.502
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33179
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-HTTP-Pub-GAL
-adminDescription: ms-Exch-HTTP-Pub-GAL
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: hTTPPubGAL
-name: ms-Exch-HTTP-Pub-GAL
-schemaIDGUID: a8df7409-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-HTTP-Pub-GAL-Limit   
-#
-dn: CN=ms-Exch-HTTP-Pub-GAL-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-HTTP-Pub-GAL-Limit
-distinguishedName: CN=ms-Exch-HTTP-Pub-GAL-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.503
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33180
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-HTTP-Pub-GAL-Limit
-adminDescription: ms-Exch-HTTP-Pub-GAL-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: hTTPPubGALLimit
-name: ms-Exch-HTTP-Pub-GAL-Limit
-schemaIDGUID: a8df740a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-HTTP-Pub-PF          
-#
-dn: CN=ms-Exch-HTTP-Pub-PF,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-HTTP-Pub-PF
-distinguishedName: CN=ms-Exch-HTTP-Pub-PF,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.505
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33182
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-HTTP-Pub-PF
-adminDescription: ms-Exch-HTTP-Pub-PF
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: hTTPPubPF
-name: ms-Exch-HTTP-Pub-PF
-schemaIDGUID: a8df740b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-HTTP-Servers         
-#
-dn: CN=ms-Exch-HTTP-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-HTTP-Servers
-distinguishedName: CN=ms-Exch-HTTP-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.517
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 33195
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-HTTP-Servers
-adminDescription: ms-Exch-HTTP-Servers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: hTTPServers
-name: ms-Exch-HTTP-Servers
-schemaIDGUID: a8df740c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IFS-Private-Enabled  
-# Determines whether private mailboxes are shared.
-dn: CN=ms-Exch-IFS-Private-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IFS-Private-Enabled
-distinguishedName: CN=ms-Exch-IFS-Private-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11029
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IFS-Private-Enabled
-adminDescription: ms-Exch-IFS-Private-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchIFSPrivateEnabled
-name: ms-Exch-IFS-Private-Enabled
-schemaIDGUID: a2e915d2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IFS-Private-Name   
-# The name of the private share.
-#
-dn: CN=ms-Exch-IFS-Private-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IFS-Private-Name
-distinguishedName: CN=ms-Exch-IFS-Private-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11033
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IFS-Private-Name
-adminDescription: ms-Exch-IFS-Private-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchIFSPrivateName
-name: ms-Exch-IFS-Private-Name
-schemaIDGUID: a30a76be-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IFS-Public-Enabled   
-# Determines whether public folders are shared.
-#
-dn: CN=ms-Exch-IFS-Public-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IFS-Public-Enabled
-distinguishedName: CN=ms-Exch-IFS-Public-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11050
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IFS-Public-Enabled
-adminDescription: ms-Exch-IFS-Public-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchIFSPublicEnabled
-name: ms-Exch-IFS-Public-Enabled
-schemaIDGUID: a32bd7aa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IFS-Public-Name 
-# The name of the public share.
-#
-dn: CN=ms-Exch-IFS-Public-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IFS-Public-Name
-distinguishedName: CN=ms-Exch-IFS-Public-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11051
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IFS-Public-Name
-adminDescription: ms-Exch-IFS-Public-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchIFSPublicName
-name: ms-Exch-IFS-Public-Name
-schemaIDGUID: a34d3896-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IMAP-OWA-URL-Prefix-Override 
-#
-dn: CN=ms-Exch-IMAP-OWA-URL-Prefix-Override,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IMAP-OWA-URL-Prefix-Override
-distinguishedName: CN=ms-Exch-IMAP-OWA-URL-Prefix-Override,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50213
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IMAP-OWA-URL-Prefix-Override
-adminDescription: ms-Exch-IMAP-OWA-URL-Prefix-Override
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchIMAPOWAURLPrefixOverride
-name: ms-Exch-IMAP-OWA-URL-Prefix-Override
-schemaIDGUID: 5e26dd2a-9b0a-4219-8183-20ad44f5cbdf
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Imported-From             
-# Contains the DN to the connecter from which this object is imported.
-#
-dn: CN=ms-Exch-Imported-From,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Imported-From
-distinguishedName: CN=ms-Exch-Imported-From,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.263
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32834
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Imported-From
-adminDescription: ms-Exch-Imported-From
-oMSyntax: 64
-searchFlags: 9
-lDAPDisplayName: importedFrom
-name: ms-Exch-Imported-From
-schemaIDGUID: bf96798a-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Import-Container 
-#
-dn: CN=ms-Exch-Import-Container,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Import-Container
-distinguishedName: CN=ms-Exch-Import-Container,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.110
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32954
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Import-Container
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Import-Container
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: importContainer
-name: ms-Exch-Import-Container
-schemaIDGUID: a8df740d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Import-Container-Linked
-#
-dn: CN=ms-Exch-Import-Container-Linked,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Import-Container-Linked
-distinguishedName: CN=ms-Exch-Import-Container-Linked,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1028
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1032
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Import-Container-Linked
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Import-Container-Linked
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchImportContainerLinked
-name: ms-Exch-Import-Container-Linked
-schemaIDGUID: 9ff15c4c-1ec9-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-ACL       
-# A multivalued list of access control entries (ACEs) for Instant
-# Messaging.
-#
-dn: CN=ms-Exch-IM-ACL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-ACL
-distinguishedName: CN=ms-Exch-IM-ACL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7031
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-ACL
-adminDescription: ms-Exch-IM-ACL
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchIMACL
-name: ms-Exch-IM-ACL
-schemaIDGUID: 06551010-2845-11d3-aa68-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IM-Address 
-# A representation (resembling e-mail) of the public URL for a user
-# that is enabled for Instant Messaging.
-#
-dn: CN=ms-Exch-IM-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Address
-distinguishedName: CN=ms-Exch-IM-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7038
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Address
-adminDescription: ms-Exch-IM-Address
-oMSyntax: 19
-searchFlags: 1
-lDAPDisplayName: msExchIMAddress
-name: ms-Exch-IM-Address
-schemaIDGUID: cbbd3752-b8d8-47dc-92ee-ab488c1af969
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-DB-Log-Path     
-# States the directory path root for all database transaction log
-# files.
-#
-dn: CN=ms-Exch-IM-DB-Log-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-DB-Log-Path
-distinguishedName: CN=ms-Exch-IM-DB-Log-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7016
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 1024
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-DB-Log-Path
-adminDescription: ms-Exch-IM-DB-Log-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchIMDBLogPath
-name: ms-Exch-IM-DB-Log-Path
-schemaIDGUID: a4394164-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IM-DB-Path   
-# States the directory path root for all database files for a
-# particular server.
-#
-dn: CN=ms-Exch-IM-DB-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-DB-Path
-distinguishedName: CN=ms-Exch-IM-DB-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7015
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 1024
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-DB-Path
-adminDescription: ms-Exch-IM-DB-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchIMDBPath
-name: ms-Exch-IM-DB-Path
-schemaIDGUID: a45aa250-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Firewall-Type 
-# Describes the type of firewall entry for this firewall object.
-#
-dn: CN=ms-Exch-IM-Firewall-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Firewall-Type
-distinguishedName: CN=ms-Exch-IM-Firewall-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7028
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Firewall-Type
-adminDescription: ms-Exch-IM-Firewall-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchIMFirewallType
-name: ms-Exch-IM-Firewall-Type
-schemaIDGUID: 06550ffc-2845-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IM-Host-Name 
-# The host name for the Instant Messaging virtual server.
-#
-dn: CN=ms-Exch-IM-Host-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Host-Name
-distinguishedName: CN=ms-Exch-IM-Host-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7034
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Host-Name
-adminDescription: ms-Exch-IM-Host-Name
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchIMHostName
-name: ms-Exch-IM-Host-Name
-schemaIDGUID: 807b6084-439b-11d3-aa72-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-IP-Range 
-# A multivalued attribute that lists IP ranges that are valid for the
-# Instant Messaging firewall.
-dn: CN=ms-Exch-IM-IP-Range,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-IP-Range
-distinguishedName: CN=ms-Exch-IM-IP-Range,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7030
-attributeSyntax: 2.5.5.16
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-IP-Range
-adminDescription: ms-Exch-IM-IP-Range
-oMSyntax: 65
-searchFlags: 0
-lDAPDisplayName: msExchIMIPRange
-name: ms-Exch-IM-IP-Range
-schemaIDGUID: 0655100b-2845-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IM-Meta-Physical-URL      
-# The public URL for a user that is enabled for Instant Messaging.
-#
-dn: CN=ms-Exch-IM-Meta-Physical-URL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Meta-Physical-URL
-distinguishedName: CN=ms-Exch-IM-Meta-Physical-URL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7035
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Meta-Physical-URL
-adminDescription: ms-Exch-IM-Meta-Physical-URL
-oMSyntax: 19
-searchFlags: 1
-lDAPDisplayName: msExchIMMetaPhysicalURL
-name: ms-Exch-IM-Meta-Physical-URL
-schemaIDGUID: 8e7a93a3-5a7c-11d3-aa78-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-IM-Physical-URL      
-# The private URL for a user that is enabled for Instant Messaging.
-#
-dn: CN=ms-Exch-IM-Physical-URL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Physical-URL
-distinguishedName: CN=ms-Exch-IM-Physical-URL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7036
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Physical-URL
-adminDescription: ms-Exch-IM-Physical-URL
-oMSyntax: 19
-searchFlags: 1
-lDAPDisplayName: msExchIMPhysicalURL
-name: ms-Exch-IM-Physical-URL
-schemaIDGUID: 8e7a93a8-5a7c-11d3-aa78-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Proxy 
-# The proxy name for the Instant Messaging firewall.
-#
-dn: CN=ms-Exch-IM-Proxy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Proxy
-distinguishedName: CN=ms-Exch-IM-Proxy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7029
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Proxy
-adminDescription: ms-Exch-IM-Proxy
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchIMProxy
-name: ms-Exch-IM-Proxy
-schemaIDGUID: 06551002-2845-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Server-Hosts-Users         
-# States whether an Instant Messaging virtual server can host users.
-#
-dn: CN=ms-Exch-IM-Server-Hosts-Users,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Server-Hosts-Users
-distinguishedName: CN=ms-Exch-IM-Server-Hosts-Users,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7025
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Server-Hosts-Users
-adminDescription: ms-Exch-IM-Server-Hosts-Users
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchIMServerHostsUsers
-name: ms-Exch-IM-Server-Hosts-Users
-schemaIDGUID: 8d6b1af6-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Server-IIS-Id  
-# The Microsoft Internet Information Services (IIS) Web Server
-# Instance in the metabase.
-#
-dn: CN=ms-Exch-IM-Server-IIS-Id,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Server-IIS-Id
-distinguishedName: CN=ms-Exch-IM-Server-IIS-Id,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7023
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 1
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Server-IIS-Id
-adminDescription: ms-Exch-IM-Server-IIS-Id
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchIMServerIISId
-name: ms-Exch-IM-Server-IIS-Id
-schemaIDGUID: 8d3444e0-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Server-Name   
-#
-dn: CN=ms-Exch-IM-Server-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Server-Name
-distinguishedName: CN=ms-Exch-IM-Server-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7024
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Server-Name
-adminDescription: ms-Exch-IM-Server-Name
-oMSyntax: 64
-searchFlags: 1
-lDAPDisplayName: msExchIMServerName
-name: ms-Exch-IM-Server-Name
-schemaIDGUID: 8d4e7ebe-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IM-Virtual-Server   
-# The DN of the Instant Messaging home server.
-#
-dn: CN=ms-Exch-IM-Virtual-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IM-Virtual-Server
-distinguishedName: CN=ms-Exch-IM-Virtual-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7037
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Virtual-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-IM-Virtual-Server
-oMSyntax: 127
-searchFlags: 1
-lDAPDisplayName: msExchIMVirtualServer
-name: ms-Exch-IM-Virtual-Server
-schemaIDGUID: 41e8fd82-8f37-4e56-a44a-33a3e6b7526c
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Inbound-Sites        
-#
-dn: CN=ms-Exch-Inbound-Sites,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Inbound-Sites
-distinguishedName: CN=ms-Exch-Inbound-Sites,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.71
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32956
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Inbound-Sites
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Inbound-Sites
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: inboundSites
-name: ms-Exch-Inbound-Sites
-schemaIDGUID: a8df7414-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Incoming-Connection-Timeout        
-# The maximum length of time for incoming connections.
-#
-dn: CN=ms-Exch-Incoming-Connection-Timeout,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Incoming-Connection-Timeout
-distinguishedName: CN=ms-Exch-Incoming-Connection-Timeout,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2015
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Incoming-Connection-Timeout
-adminDescription: ms-Exch-Incoming-Connection-Timeout
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchIncomingConnectionTimeout
-name: ms-Exch-Incoming-Connection-Timeout
-schemaIDGUID: a64cedca-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Incoming-Msg-Size-Limit      
-#
-dn: CN=ms-Exch-Incoming-Msg-Size-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Incoming-Msg-Size-Limit
-distinguishedName: CN=ms-Exch-Incoming-Msg-Size-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.491
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33168
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Incoming-Msg-Size-Limit
-adminDescription: ms-Exch-Incoming-Msg-Size-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: incomingMsgSizeLimit
-name: ms-Exch-Incoming-Msg-Size-Limit
-schemaIDGUID: 1677581a-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Inconsistent-State           
-#
-dn: CN=ms-Exch-Inconsistent-State,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Inconsistent-State
-distinguishedName: CN=ms-Exch-Inconsistent-State,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.96
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Inconsistent-State
-adminDescription: ms-Exch-Inconsistent-State
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchInconsistentState
-name: ms-Exch-Inconsistent-State
-schemaIDGUID: 1d80475f-e7b4-4005-af4d-82bcbf407c3c
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-INSAdmin 
-#
-dn: CN=ms-Exch-INSAdmin,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-INSAdmin
-distinguishedName: CN=ms-Exch-INSAdmin,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.543
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33221
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-INSAdmin
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-INSAdmin
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: iNSAdmin
-name: ms-Exch-INSAdmin
-schemaIDGUID: a8df7416-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Installed-Components          
-# Contains a list of installed components on a given server.
-#
-dn: CN=ms-Exch-Installed-Components,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Installed-Components
-distinguishedName: CN=ms-Exch-Installed-Components,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50024
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Installed-Components
-adminDescription: ms-Exch-Installed-Components
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchInstalledComponents
-name: ms-Exch-Installed-Components
-schemaIDGUID: 99f5865d-12e8-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Install-Path         
-#
-dn: CN=ms-Exch-Install-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Install-Path
-distinguishedName: CN=ms-Exch-Install-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50019
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Install-Path
-adminDescription: ms-Exch-Install-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchInstallPath
-name: ms-Exch-Install-Path
-schemaIDGUID: 8a23df36-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Internet-Encoding    
-#
-dn: CN=ms-Exch-Internet-Encoding,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Internet-Encoding
-distinguishedName: CN=ms-Exch-Internet-Encoding,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.551
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 14961
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Internet-Encoding
-adminDescription: ms-Exch-Internet-Encoding
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: internetEncoding
-name: ms-Exch-Internet-Encoding
-schemaIDGUID: 1677581d-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Internet-Name               
-# The data conference Internet name.
-#
-dn: CN=ms-Exch-Internet-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Internet-Name
-distinguishedName: CN=ms-Exch-Internet-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9019
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Internet-Name
-adminDescription: ms-Exch-Internet-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchInternetName
-name: ms-Exch-Internet-Name
-schemaIDGUID: a670b110-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Inter-Org-Address-Type       
-# 
-#
-dn: CN=ms-Exch-Inter-Org-Address-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Inter-Org-Address-Type
-distinguishedName: CN=ms-Exch-Inter-Org-Address-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.94
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Inter-Org-Address-Type
-adminDescription: ms-Exch-Inter-Org-Address-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchInterOrgAddressType
-name: ms-Exch-Inter-Org-Address-Type
-schemaIDGUID: 3836c80b-8cee-4413-9e65-e937c1aed10f
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-IP-Address   
-#
-dn: CN=ms-Exch-IP-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IP-Address
-distinguishedName: CN=ms-Exch-IP-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5050
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IP-Address
-adminDescription: ms-Exch-IP-Address
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchIPAddress
-name: ms-Exch-IP-Address
-schemaIDGUID: 8b46be1a-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-IP-Security  
-# Restricts IP connections to this resource.
-#
-dn: CN=ms-Exch-IP-Security,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-IP-Security
-distinguishedName: CN=ms-Exch-IP-Security,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2013
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IP-Security
-adminDescription: ms-Exch-IP-Security
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchIPSecurity
-name: ms-Exch-IP-Security
-schemaIDGUID: a68fafa2-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Is-Bridgehead-Site   
-# A flag to determine whether non-mailbox associated objects are
-# replicated over this particular connection agreement.
-#
-dn: CN=ms-Exch-Is-Bridgehead-Site,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Is-Bridgehead-Site
-distinguishedName: CN=ms-Exch-Is-Bridgehead-Site,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.35
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Is-Bridgehead-Site
-adminDescription: ms-Exch-Is-Bridgehead-Site
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchIsBridgeheadSite
-name: ms-Exch-Is-Bridgehead-Site
-schemaIDGUID: a6b1108e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Is-Config-CA         
-# Determines if this is a configuration Connection Agreement.
-#
-dn: CN=ms-Exch-Is-Config-CA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Is-Config-CA
-distinguishedName: CN=ms-Exch-Is-Config-CA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.79
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Is-Config-CA
-adminDescription: ms-Exch-Is-Config-CA
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchIsConfigCA
-name: ms-Exch-Is-Config-CA
-schemaIDGUID: 910f526c-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-KCC-Status         
-#
-dn: CN=ms-Exch-KCC-Status,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-KCC-Status
-distinguishedName: CN=ms-Exch-KCC-Status,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.237
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-mAPIID: 32962
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-KCC-Status
-adminDescription: ms-Exch-KCC-Status
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: kCCStatus
-name: ms-Exch-KCC-Status
-schemaIDGUID: 5fd424ae-1262-11d0-a060-00aa006c33ed
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-KM-Server          
-#
-dn: CN=ms-Exch-KM-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-KM-Server
-distinguishedName: CN=ms-Exch-KM-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.440
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 32781
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-KM-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-KM-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: kMServer
-name: ms-Exch-KM-Server
-schemaIDGUID: 1677581e-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-LabeledURI         
-#
-#dn: CN=ms-Exch-LabeledURI,${SCHEMADN}
-#objectClass: top
-#objectClass: attributeSchema
-#cn: ms-Exch-LabeledURI
-#distinguishedName: CN=ms-Exch-LabeledURI,${SCHEMADN}
-#attributeID: 1.2.840.113556.1.2.593
-#attributeSyntax: 2.5.5.12
-#isSingleValued: FALSE
-#rangeLower: 1
-#rangeUpper: 1024
-#mAPIID: 35921
-#adminDisplayName: ms-Exch-LabeledURI
-#adminDescription: ms-Exch-LabeledURI
-#oMSyntax: 64
-#searchFlags: 0
-#lDAPDisplayName: msExchLabeledURI
-#name: ms-Exch-LabeledURI
-#schemaIDGUID: 16775820-47f3-11d1-a9c3-0000f80367c1
-#attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-#objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Language           
-#
-dn: CN=ms-Exch-Language,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Language
-distinguishedName: CN=ms-Exch-Language,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.467
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33144
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Language
-adminDescription: ms-Exch-Language
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: languageCode
-name: ms-Exch-Language
-schemaIDGUID: bf967994-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Language-ISO639     
-# The ISO-639 language code identifying a user's language.
-#
-dn: CN=ms-Exch-Language-ISO639,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Language-ISO639
-distinguishedName: CN=ms-Exch-Language-ISO639,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.616
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 35948
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Language-ISO639
-adminDescription: ms-Exch-Language-ISO639
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: language
-name: ms-Exch-Language-ISO639
-schemaIDGUID: 16775821-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-LDAP-Search-Cfg     
-#
-dn: CN=ms-Exch-LDAP-Search-Cfg,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-LDAP-Search-Cfg
-distinguishedName: CN=ms-Exch-LDAP-Search-Cfg,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.552
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 35869
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-LDAP-Search-Cfg
-adminDescription: ms-Exch-LDAP-Search-Cfg
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: lDAPSearchCfg
-name: ms-Exch-LDAP-Search-Cfg
-schemaIDGUID: a8df7417-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Legacy-Account      
-#
-dn: CN=ms-Exch-Legacy-Account,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Legacy-Account
-distinguishedName: CN=ms-Exch-Legacy-Account,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50040
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Legacy-Account
-adminDescription: ms-Exch-Legacy-Account
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchLegacyAccount
-name: ms-Exch-Legacy-Account
-schemaIDGUID: 974c99e1-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Legacy-Domain              
-#
-dn: CN=ms-Exch-Legacy-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Legacy-Domain
-distinguishedName: CN=ms-Exch-Legacy-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50041
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Legacy-Domain
-adminDescription: ms-Exch-Legacy-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchLegacyDomain
-name: ms-Exch-Legacy-Domain
-schemaIDGUID: 974c99ea-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Legacy-PW    
-#
-dn: CN=ms-Exch-Legacy-PW,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Legacy-PW
-distinguishedName: CN=ms-Exch-Legacy-PW,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50042
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Legacy-PW
-adminDescription: ms-Exch-Legacy-PW
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchLegacyPW
-name: ms-Exch-Legacy-PW
-schemaIDGUID: 974c99f2-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Line-Wrap    
-#
-dn: CN=ms-Exch-Line-Wrap,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Line-Wrap
-distinguishedName: CN=ms-Exch-Line-Wrap,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.449
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32964
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Line-Wrap
-adminDescription: ms-Exch-Line-Wrap
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: lineWrap
-name: ms-Exch-Line-Wrap
-schemaIDGUID: a8df7418-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-List-Public  
-# Lists public data conferences.
-#
-dn: CN=ms-Exch-List-Public,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-List-Public
-distinguishedName: CN=ms-Exch-List-Public,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9011
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-List-Public
-adminDescription: ms-Exch-List-Public
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchListPublic
-name: ms-Exch-List-Public
-schemaIDGUID: a6f634c0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-List-Public-Folders  
-#
-dn: CN=ms-Exch-List-Public-Folders,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-List-Public-Folders
-distinguishedName: CN=ms-Exch-List-Public-Folders,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.592
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35920
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-List-Public-Folders
-adminDescription: ms-Exch-List-Public-Folders
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: listPublicFolders
-name: ms-Exch-List-Public-Folders
-schemaIDGUID: a8df7419-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Locales   
-# The set of locales that determine client sort order.
-#
-dn: CN=ms-Exch-Locales,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Locales
-distinguishedName: CN=ms-Exch-Locales,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50017
-attributeSyntax: 2.5.5.9
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Locales
-adminDescription: ms-Exch-Locales
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchLocales
-name: ms-Exch-Locales
-schemaIDGUID: a738f698-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-Bridge-Head     
-#
-dn: CN=ms-Exch-Local-Bridge-Head,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Local-Bridge-Head
-distinguishedName: CN=ms-Exch-Local-Bridge-Head,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.311
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 32966
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-Bridge-Head
-adminDescription: ms-Exch-Local-Bridge-Head
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: localBridgeHead
-name: ms-Exch-Local-Bridge-Head
-schemaIDGUID: a8df741a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-Bridge-Head-Address  
-#
-dn: CN=ms-Exch-Local-Bridge-Head-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Local-Bridge-Head-Address
-distinguishedName: CN=ms-Exch-Local-Bridge-Head-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.225
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 1118
-mAPIID: 32967
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-Bridge-Head-Address
-adminDescription: ms-Exch-Local-Bridge-Head-Address
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: localBridgeHeadAddress
-name: ms-Exch-Local-Bridge-Head-Address
-schemaIDGUID: a8df741b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-Domains          
-#
-dn: CN=ms-Exch-Local-Domains,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Local-Domains
-distinguishedName: CN=ms-Exch-Local-Domains,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50032
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-Domains
-adminDescription: ms-Exch-Local-Domains
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchLocalDomains
-name: ms-Exch-Local-Domains
-schemaIDGUID: ab3a1ac7-1df5-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-Initial-Turn  
-#
-dn: CN=ms-Exch-Local-Initial-Turn,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Local-Initial-Turn
-distinguishedName: CN=ms-Exch-Local-Initial-Turn,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.39
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32968
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-Initial-Turn
-adminDescription: ms-Exch-Local-Initial-Turn
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: localInitialTurn
-name: ms-Exch-Local-Initial-Turn
-schemaIDGUID: a8df741c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Local-Name         
-# The data conference local name.
-#
-dn: CN=ms-Exch-Local-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Local-Name
-distinguishedName: CN=ms-Exch-Local-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9017
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Local-Name
-adminDescription: ms-Exch-Local-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchLocalName
-name: ms-Exch-Local-Name
-schemaIDGUID: a7153352-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Logon-ACL    
-#
-dn: CN=ms-Exch-Logon-ACL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Logon-ACL
-distinguishedName: CN=ms-Exch-Logon-ACL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5057
-attributeSyntax: 2.5.5.15
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Logon-ACL
-adminDescription: ms-Exch-Logon-ACL
-oMSyntax: 66
-searchFlags: 0
-lDAPDisplayName: msExchLogonACL
-name: ms-Exch-Logon-ACL
-schemaIDGUID: 7acf216d-1f42-48ec-b1bb-6ca281fe5b00
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Logon-Method 
-# Specifies the logon method for clear text logons.
-#
-dn: CN=ms-Exch-Logon-Method,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Logon-Method
-distinguishedName: CN=ms-Exch-Logon-Method,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15002
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Logon-Method
-adminDescription: ms-Exch-Logon-Method
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchLogonMethod
-name: ms-Exch-Logon-Method
-schemaIDGUID: 8bcc41ca-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Log-Filename 
-#
-dn: CN=ms-Exch-Log-Filename,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Log-Filename
-distinguishedName: CN=ms-Exch-Log-Filename,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.192
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 32970
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Log-Filename
-adminDescription: ms-Exch-Log-Filename
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: logFilename
-name: ms-Exch-Log-Filename
-schemaIDGUID: a8df741d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Log-Rollover-Interval        
-#
-dn: CN=ms-Exch-Log-Rollover-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Log-Rollover-Interval
-distinguishedName: CN=ms-Exch-Log-Rollover-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.348
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32971
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Log-Rollover-Interval
-adminDescription: ms-Exch-Log-Rollover-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: logRolloverInterval
-name: ms-Exch-Log-Rollover-Interval
-schemaIDGUID: bf9679a7-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Log-Type    
-# The log formats that this resource writes to.
-dn: CN=ms-Exch-Log-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Log-Type
-distinguishedName: CN=ms-Exch-Log-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2005
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Log-Type
-adminDescription: ms-Exch-Log-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchLogType
-name: ms-Exch-Log-Type
-schemaIDGUID: a75a5784-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Mailbox-Folder-Set     
-#
-dn: CN=ms-Exch-Mailbox-Folder-Set,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Folder-Set
-distinguishedName: CN=ms-Exch-Mailbox-Folder-Set,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11091
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Folder-Set
-adminDescription: ms-Exch-Mailbox-Folder-Set
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxFolderSet
-name: ms-Exch-Mailbox-Folder-Set
-schemaIDGUID: d72941ba-ffd0-4d8e-bb85-97713440c8a3
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Guid           
-# The GUID of the user's mailbox.
-#
-dn: CN=ms-Exch-Mailbox-Guid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Guid
-distinguishedName: CN=ms-Exch-Mailbox-Guid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11058
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 16
-rangeUpper: 16
-mAPIID: 35955
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Guid
-adminDescription: ms-Exch-Mailbox-Guid
-oMSyntax: 4
-searchFlags: 9
-lDAPDisplayName: msExchMailboxGuid
-name: ms-Exch-Mailbox-Guid
-schemaIDGUID: 9333af48-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Activation-Schedule  
-# When the mailbox clean process should be started.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Activation-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Activation-Schedule
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Activation-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50067
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Activation-Schedule
-adminDescription: ms-Exch-Mailbox-Manager-Activation-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerActivationSchedule
-name: ms-Exch-Mailbox-Manager-Activation-Schedule
-schemaIDGUID: 829122d7-25b1-4be6-a2e3-d8453c950938
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Activation-Style     
-#
-dn: CN=ms-Exch-Mailbox-Manager-Activation-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Activation-Style
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Activation-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50068
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Activation-Style
-adminDescription: ms-Exch-Mailbox-Manager-Activation-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerActivationStyle
-name: ms-Exch-Mailbox-Manager-Activation-Style
-schemaIDGUID: 9ea95949-7d74-49cd-af09-3db0870e535e
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Admin-Mode    
-# The summary mode for this policy (MCASM_NONE, MCASM_SUMMARY_ONLY,
-# MCASM_DETAILED_REPORT).
-#
-dn: CN=ms-Exch-Mailbox-Manager-Admin-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Admin-Mode
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Admin-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50077
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Admin-Mode
-adminDescription: ms-Exch-Mailbox-Manager-Admin-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerAdminMode
-name: ms-Exch-Mailbox-Manager-Admin-Mode
-schemaIDGUID: 9a6b371e-a3e7-4266-9b7b-2ce454336f90
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Age-Limit   
-# The age at which messages larger than the specified size limit are
-# deleted.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Age-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Age-Limit
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Age-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50081
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Age-Limit
-adminDescription: ms-Exch-Mailbox-Manager-Age-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerAgeLimit
-name: ms-Exch-Mailbox-Manager-Age-Limit
-schemaIDGUID: cd63db2c-8aa9-4a14-941b-1b59fdcaafbd
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Custom-Message    
-# Indicates that a custom message is being used.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Custom-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Custom-Message
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Custom-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50070
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Custom-Message
-adminDescription: ms-Exch-Mailbox-Manager-Custom-Message
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerCustomMessage
-name: ms-Exch-Mailbox-Manager-Custom-Message
-schemaIDGUID: 8681f0bc-24d6-4d58-bc16-62f73cd5bedb
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Folder-Settings      
-# Settings for each folder or store (Enabled, Folder-Name, Age-Limit,
-# Size-Limit). A limit of -1 should be interpreted as "Any".
-#
-dn: CN=ms-Exch-Mailbox-Manager-Folder-Settings,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Folder-Settings
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Folder-Settings,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50078
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Folder-Settings
-adminDescription: ms-Exch-Mailbox-Manager-Folder-Settings
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerFolderSettings
-name: ms-Exch-Mailbox-Manager-Folder-Settings
-schemaIDGUID: a57cf645-4b12-4ee4-a6eb-fce022068ffd
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Keep-Message-Classes  
-# The message classes that should not be deleted.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Keep-Message-Classes,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Keep-Message-Classes
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Keep-Message-Classes,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50074
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Keep-Message-Classes
-adminDescription: ms-Exch-Mailbox-Manager-Keep-Message-Classes
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerKeepMessageClasses
-name: ms-Exch-Mailbox-Manager-Keep-Message-Classes
-schemaIDGUID: 0044d40c-6a24-4b57-abce-f555cc724c8e
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Mode 
-# Cleanup mode for this policy (MCACM_AUDIT,
-# MCACM_CLEANMCADM_DELETED_ITEMS, MCADM_SYSTEM_CLEANUP,
-# MCADM_JUST_DELETE).
-#
-dn: CN=ms-Exch-Mailbox-Manager-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Mode
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50075
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Mode
-adminDescription: ms-Exch-Mailbox-Manager-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerMode
-name: ms-Exch-Mailbox-Manager-Mode
-schemaIDGUID: 9bd7499b-282b-4eb6-a40e-7d044d896741
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Report-Recipient                        
-# The recipient of summary reports.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Report-Recipient,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Report-Recipient
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Report-Recipient,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50076
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Report-Recipient
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Mailbox-Manager-Report-Recipient
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerReportRecipient
-name: ms-Exch-Mailbox-Manager-Report-Recipient
-schemaIDGUID: 445791fb-e6fc-48dd-aad5-32e32c9059d9
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Send-User-Notification-Mail  
-# Sends a notification to the user after a clean operation.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Send-User-Notification-Mail,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Send-User-Notification-Mail
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Send-User-Notification-Mail,CN=S
-attributeID: 1.2.840.113556.1.4.7000.102.50069
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Send-User-Notification-Mail
-adminDescription: ms-Exch-Mailbox-Manager-Send-User-Notification-Mail
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerSendUserNotificationMail
-name: ms-Exch-Mailbox-Manager-Send-User-Notification-Mail
-schemaIDGUID: d2888db3-2b0d-4d6a-831e-4efdfc036584
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Size-Limit   
-# Messages larger than this size will be deleted automatically when
-# their age exceeds the age limit.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Size-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Size-Limit
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Size-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50080
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Size-Limit
-adminDescription: ms-Exch-Mailbox-Manager-Size-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerSizeLimit
-name: ms-Exch-Mailbox-Manager-Size-Limit
-schemaIDGUID: 92d9302b-76bd-4156-95a1-f5b6a1463eb4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-Size-Limit-Enabled        
-# Determines if a size limit is in effect.
-#
-dn: CN=ms-Exch-Mailbox-Manager-Size-Limit-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-Size-Limit-Enabled
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Size-Limit-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50079
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Size-Limit-Enabled
-adminDescription: ms-Exch-Mailbox-Manager-Size-Limit-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerSizeLimitEnabled
-name: ms-Exch-Mailbox-Manager-Size-Limit-Enabled
-schemaIDGUID: 1563eae5-3ac1-4274-9e59-7d2fcc836f82
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-User-Message-Body    
-# The mail notification message body.
-#
-dn: CN=ms-Exch-Mailbox-Manager-User-Message-Body,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-User-Message-Body
-distinguishedName: CN=ms-Exch-Mailbox-Manager-User-Message-Body,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50072
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-User-Message-Body
-adminDescription: ms-Exch-Mailbox-Manager-User-Message-Body
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerUserMessageBody
-name: ms-Exch-Mailbox-Manager-User-Message-Body
-schemaIDGUID: 9ec3ccac-09fa-4a22-869f-9144258d230d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-User-Message-Footer  
-# The mail notification message footer.
-#
-dn: CN=ms-Exch-Mailbox-Manager-User-Message-Footer,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-User-Message-Footer
-distinguishedName: CN=ms-Exch-Mailbox-Manager-User-Message-Footer,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50073
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-User-Message-Footer
-adminDescription: ms-Exch-Mailbox-Manager-User-Message-Footer
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerUserMessageFooter
-name: ms-Exch-Mailbox-Manager-User-Message-Footer
-schemaIDGUID: 33795abb-57ba-43ec-9f7e-a4601c2e4d4f
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Manager-User-Message-Header  
-# The mail notification message header.
-#
-dn: CN=ms-Exch-Mailbox-Manager-User-Message-Header,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Manager-User-Message-Header
-distinguishedName: CN=ms-Exch-Mailbox-Manager-User-Message-Header,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50071
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-User-Message-Header
-adminDescription: ms-Exch-Mailbox-Manager-User-Message-Header
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxManagerUserMessageHeader
-name: ms-Exch-Mailbox-Manager-User-Message-Header
-schemaIDGUID: fbcffefe-8916-4ce6-ac76-eab226fe5440
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Retention-Period     
-# The number of days to retain deleted mailboxes before purging them.
-#
-dn: CN=ms-Exch-Mailbox-Retention-Period,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Retention-Period
-distinguishedName: CN=ms-Exch-Mailbox-Retention-Period,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11060
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Retention-Period
-adminDescription: ms-Exch-Mailbox-Retention-Period
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMailboxRetentionPeriod
-name: ms-Exch-Mailbox-Retention-Period
-schemaIDGUID: 7b4a7a8a-1876-11d3-aa59-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Security-Descriptor  
-# The security descriptor of the user's mailbox.
-#
-dn: CN=ms-Exch-Mailbox-Security-Descriptor,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Security-Descriptor
-distinguishedName: CN=ms-Exch-Mailbox-Security-Descriptor,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.80
-attributeSyntax: 2.5.5.15
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-mAPIID: 35956
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Security-Descriptor
-adminDescription: ms-Exch-Mailbox-Security-Descriptor
-oMSyntax: 66
-searchFlags: 8
-lDAPDisplayName: msExchMailboxSecurityDescriptor
-name: ms-Exch-Mailbox-Security-Descriptor
-schemaIDGUID: 934de926-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mailbox-Url  
-# The URL to a user's mailbox.
-#
-dn: CN=ms-Exch-Mailbox-Url,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mailbox-Url
-distinguishedName: CN=ms-Exch-Mailbox-Url,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50085
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-mAPIID: 35967
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Url
-adminDescription: ms-Exch-Mailbox-Url
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMailboxUrl
-name: ms-Exch-Mailbox-Url
-schemaIDGUID: fc1ffd10-ae3f-466c-87c7-518b91dadbd0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mail-Nickname        
-#
-dn: CN=ms-Exch-Mail-Nickname,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mail-Nickname
-distinguishedName: CN=ms-Exch-Mail-Nickname,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.447
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 14848
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mail-Nickname
-adminDescription: ms-Exch-Mail-Nickname
-oMSyntax: 64
-searchFlags: 5
-lDAPDisplayName: mailNickname
-name: ms-Exch-Mail-Nickname
-schemaIDGUID: bf9679b3-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Maintenance-Schedule  
-#
-dn: CN=ms-Exch-Maintenance-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Maintenance-Schedule
-distinguishedName: CN=ms-Exch-Maintenance-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1029
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Maintenance-Schedule
-adminDescription: ms-Exch-Maintenance-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchMaintenanceSchedule
-name: ms-Exch-Maintenance-Schedule
-schemaIDGUID: 8fa76ef0-25d7-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Maintenance-Style     
-#
-dn: CN=ms-Exch-Maintenance-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Maintenance-Style
-distinguishedName: CN=ms-Exch-Maintenance-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1030
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Maintenance-Style
-adminDescription: ms-Exch-Maintenance-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaintenanceStyle
-name: ms-Exch-Maintenance-Style
-schemaIDGUID: 8fa76ef6-25d7-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mandatory-Attributes  
-#
-dn: CN=ms-Exch-Mandatory-Attributes,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mandatory-Attributes
-distinguishedName: CN=ms-Exch-Mandatory-Attributes,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50029
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mandatory-Attributes
-adminDescription: ms-Exch-Mandatory-Attributes
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMandatoryAttributes
-name: ms-Exch-Mandatory-Attributes
-schemaIDGUID: e32977be-1d31-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MAPI-Recipient        
-#
-dn: CN=ms-Exch-MAPI-Recipient,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MAPI-Recipient
-distinguishedName: CN=ms-Exch-MAPI-Recipient,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.371
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 14912
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MAPI-Recipient
-adminDescription: ms-Exch-MAPI-Recipient
-oMSyntax: 1
-searchFlags: 16
-lDAPDisplayName: mAPIRecipient
-name: ms-Exch-MAPI-Recipient
-schemaIDGUID: bf9679b8-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Master-Account-Sid    
-#
-dn: CN=ms-Exch-Master-Account-Sid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Master-Account-Sid
-distinguishedName: CN=ms-Exch-Master-Account-Sid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.81
-attributeSyntax: 2.5.5.17
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 28
-mAPIID: 35957
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Master-Account-Sid
-adminDescription: ms-Exch-Master-Account-Sid
-oMSyntax: 4
-searchFlags: 9
-lDAPDisplayName: msExchMasterAccountSid
-name: ms-Exch-Master-Account-Sid
-schemaIDGUID: 936a855e-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Master-Service        
-# The Address List Service master server.
-#
-dn: CN=ms-Exch-Master-Service,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Master-Service
-distinguishedName: CN=ms-Exch-Master-Service,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.82
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1022
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Master-Service
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Master-Service
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMasterService
-name: ms-Exch-Master-Service
-schemaIDGUID: 944d04c4-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Master-Service-BL    
-# A backlink to the Address List Service master server.
-#
-dn: CN=ms-Exch-Master-Service-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Master-Service-BL
-distinguishedName: CN=ms-Exch-Master-Service-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.83
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1023
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Master-Service-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Master-Service-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMasterServiceBL
-name: ms-Exch-Master-Service-BL
-schemaIDGUID: 946c0356-b09e-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Maximum-Object-ID    
-#
-dn: CN=ms-Exch-Maximum-Object-ID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Maximum-Object-ID
-distinguishedName: CN=ms-Exch-Maximum-Object-ID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.458
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 22
-mAPIID: 33129
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Maximum-Object-ID
-adminDescription: ms-Exch-Maximum-Object-ID
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: maximumObjectID
-name: ms-Exch-Maximum-Object-ID
-schemaIDGUID: a8df741e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Maximum-Recurring-Instances  
-# The maximum number of instances generated per day.
-#
-dn: CN=ms-Exch-Maximum-Recurring-Instances,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Maximum-Recurring-Instances
-distinguishedName: CN=ms-Exch-Maximum-Recurring-Instances,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.10014
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Maximum-Recurring-Instances
-adminDescription: ms-Exch-Maximum-Recurring-Instances
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaximumRecurringInstances
-name: ms-Exch-Maximum-Recurring-Instances
-schemaIDGUID: a8b8d132-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Maximum-Recurring-Instances-Months   
-# The maximum window of instances (months) generated by the store
-# expansion agent.
-#
-dn: CN=ms-Exch-Maximum-Recurring-Instances-Months,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Maximum-Recurring-Instances-Months
-distinguishedName: CN=ms-Exch-Maximum-Recurring-Instances-Months,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.10015
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Maximum-Recurring-Instances-Months
-adminDescription: ms-Exch-Maximum-Recurring-Instances-Months
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaximumRecurringInstancesMonths
-name: ms-Exch-Maximum-Recurring-Instances-Months
-schemaIDGUID: a8da321e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Max-Cached-Views      
-# The maximum number of restricted views cached for any given folder
-# in the MDB.
-#
-dn: CN=ms-Exch-Max-Cached-Views,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Cached-Views
-distinguishedName: CN=ms-Exch-Max-Cached-Views,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11083
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Cached-Views
-adminDescription: ms-Exch-Max-Cached-Views
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxCachedViews
-name: ms-Exch-Max-Cached-Views
-schemaIDGUID: 1529cf69-2fdb-11d3-aa6d-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Connections      
-# Defines the maximum allowed connections.
-#
-dn: CN=ms-Exch-Max-Connections,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Connections
-distinguishedName: CN=ms-Exch-Max-Connections,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9013
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Connections
-adminDescription: ms-Exch-Max-Connections
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxConnections
-name: ms-Exch-Max-Connections
-schemaIDGUID: a7c33efc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Extension-Time   
-# The maximum minutes a video conference can be extended.
-#
-dn: CN=ms-Exch-Max-Extension-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Extension-Time
-distinguishedName: CN=ms-Exch-Max-Extension-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9028
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Extension-Time
-adminDescription: ms-Exch-Max-Extension-Time
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxExtensionTime
-name: ms-Exch-Max-Extension-Time
-schemaIDGUID: 99f58668-12e8-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Max-Incoming-Connections 
-# The maximum number of incoming connections allowed for this
-# resource.
-#
-dn: CN=ms-Exch-Max-Incoming-Connections,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Incoming-Connections
-distinguishedName: CN=ms-Exch-Max-Incoming-Connections,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2004
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Incoming-Connections
-adminDescription: ms-Exch-Max-Incoming-Connections
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxIncomingConnections
-name: ms-Exch-Max-Incoming-Connections
-schemaIDGUID: a808632e-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Participants        
-# The maximum number of participants allowed in a video conference.
-#
-dn: CN=ms-Exch-Max-Participants,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Participants
-distinguishedName: CN=ms-Exch-Max-Participants,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9027
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Participants
-adminDescription: ms-Exch-Max-Participants
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxParticipants
-name: ms-Exch-Max-Participants
-schemaIDGUID: 99f58663-12e8-11d3-aa58-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Pool-Threads 
-#
-dn: CN=ms-Exch-Max-Pool-Threads,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Pool-Threads
-distinguishedName: CN=ms-Exch-Max-Pool-Threads,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11041
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Pool-Threads
-adminDescription: ms-Exch-Max-Pool-Threads
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxPoolThreads
-name: ms-Exch-Max-Pool-Threads
-schemaIDGUID: a82e88ce-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Restore-Storage-Groups            
-#
-dn: CN=ms-Exch-Max-Restore-Storage-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Restore-Storage-Groups
-distinguishedName: CN=ms-Exch-Max-Restore-Storage-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11095
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Restore-Storage-Groups
-adminDescription: ms-Exch-Max-Restore-Storage-Groups
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxRestoreStorageGroups
-name: ms-Exch-Max-Restore-Storage-Groups
-schemaIDGUID: 3ef2a80e-ea82-421b-8a62-a12543c34141
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Storage-Groups                    
-# The maximum number of Jet instances allowed on this computer.
-#
-dn: CN=ms-Exch-Max-Storage-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Storage-Groups
-distinguishedName: CN=ms-Exch-Max-Storage-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11027
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Storage-Groups
-adminDescription: ms-Exch-Max-Storage-Groups
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxStorageGroups
-name: ms-Exch-Max-Storage-Groups
-schemaIDGUID: a84fe9ba-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Max-Stores-Per-Group     
-# The maximum number of stores allowed per Jet instance on this
-# computer.
-#
-dn: CN=ms-Exch-Max-Stores-Per-Group,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Stores-Per-Group
-distinguishedName: CN=ms-Exch-Max-Stores-Per-Group,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11028
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Stores-Per-Group
-adminDescription: ms-Exch-Max-Stores-Per-Group
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxStoresPerGroup
-name: ms-Exch-Max-Stores-Per-Group
-schemaIDGUID: a8714aa6-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Max-Threads       
-# The maximum remote procedure call (RPC) threads for the server.
-#
-dn: CN=ms-Exch-Max-Threads,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Max-Threads
-distinguishedName: CN=ms-Exch-Max-Threads,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11042
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Max-Threads
-adminDescription: ms-Exch-Max-Threads
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMaxThreads
-name: ms-Exch-Max-Threads
-schemaIDGUID: a8950dec-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MCU-Hosts-Sites 
-# A forward link to Microsoft® Windows® sites supported by the
-# specified multipoint control unit (MCU).
-#
-dn: CN=ms-Exch-MCU-Hosts-Sites,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MCU-Hosts-Sites
-distinguishedName: CN=ms-Exch-MCU-Hosts-Sites,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9031
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1038
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MCU-Hosts-Sites
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-MCU-Hosts-Sites
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMCUHostsSites
-name: ms-Exch-MCU-Hosts-Sites
-schemaIDGUID: bd062bc7-ce32-4690-8b8e-5c63b816b516
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MCU-Hosts-Sites-BL  
-# A backlink to Microsoft® Windows® sites supported by the specified multipoint control unit (MCU).
-#
-dn: CN=ms-Exch-MCU-Hosts-Sites-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MCU-Hosts-Sites-BL
-distinguishedName: CN=ms-Exch-MCU-Hosts-Sites-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9032
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1039
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MCU-Hosts-Sites-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-MCU-Hosts-Sites-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMCUHostsSitesBL
-name: ms-Exch-MCU-Hosts-Sites-BL
-schemaIDGUID: b0ab8d77-2486-467d-a331-3e3524438a57
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MDB-Backoff-Interval 
-#
-dn: CN=ms-Exch-MDB-Backoff-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Backoff-Interval
-distinguishedName: CN=ms-Exch-MDB-Backoff-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.72
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32975
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Backoff-Interval
-adminDescription: ms-Exch-MDB-Backoff-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: mDBBackoffInterval
-name: ms-Exch-MDB-Backoff-Interval
-schemaIDGUID: a8df741f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-MDB-Msg-Time-Out-Period   
-#
-dn: CN=ms-Exch-MDB-Msg-Time-Out-Period,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Msg-Time-Out-Period
-distinguishedName: CN=ms-Exch-MDB-Msg-Time-Out-Period,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.64
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32976
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Msg-Time-Out-Period
-adminDescription: ms-Exch-MDB-Msg-Time-Out-Period
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: mDBMsgTimeOutPeriod
-name: ms-Exch-MDB-Msg-Time-Out-Period
-schemaIDGUID: a8df7420-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-MDB-Over-Hard-Quota-Limit 
-# The default size limit after which messages can no longer be sent or
-# received.
-#
-dn: CN=ms-Exch-MDB-Over-Hard-Quota-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Over-Hard-Quota-Limit
-distinguishedName: CN=ms-Exch-MDB-Over-Hard-Quota-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11037
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Over-Hard-Quota-Limit
-adminDescription: ms-Exch-MDB-Over-Hard-Quota-Limit
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: mDBOverHardQuotaLimit
-name: ms-Exch-MDB-Over-Hard-Quota-Limit
-schemaIDGUID: 8fcf1ec4-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MDB-Over-Quota-Limit     
-#
-dn: CN=ms-Exch-MDB-Over-Quota-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Over-Quota-Limit
-distinguishedName: CN=ms-Exch-MDB-Over-Quota-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.272
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32977
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Over-Quota-Limit
-adminDescription: ms-Exch-MDB-Over-Quota-Limit
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: mDBOverQuotaLimit
-name: ms-Exch-MDB-Over-Quota-Limit
-schemaIDGUID: f0f8ff91-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-MDB-Storage-Quota        
-#
-dn: CN=ms-Exch-MDB-Storage-Quota,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Storage-Quota
-distinguishedName: CN=ms-Exch-MDB-Storage-Quota,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.266
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32978
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Storage-Quota
-adminDescription: ms-Exch-MDB-Storage-Quota
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: mDBStorageQuota
-name: ms-Exch-MDB-Storage-Quota
-schemaIDGUID: f0f8ff92-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-MDB-Unread-Limit         
-#
-dn: CN=ms-Exch-MDB-Unread-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Unread-Limit
-distinguishedName: CN=ms-Exch-MDB-Unread-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.69
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32979
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Unread-Limit
-adminDescription: ms-Exch-MDB-Unread-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: mDBUnreadLimit
-name: ms-Exch-MDB-Unread-Limit
-schemaIDGUID: a8df7421-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MDB-Use-Defaults         
-#
-dn: CN=ms-Exch-MDB-Use-Defaults,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MDB-Use-Defaults
-distinguishedName: CN=ms-Exch-MDB-Use-Defaults,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.309
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32980
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB-Use-Defaults
-adminDescription: ms-Exch-MDB-Use-Defaults
-oMSyntax: 1
-searchFlags: 16
-lDAPDisplayName: mDBUseDefaults
-name: ms-Exch-MDB-Use-Defaults
-schemaIDGUID: f0f8ff93-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Member-Base-DN           
-# Contains the base of the LDAP search that should be used to compute
-# this dynamic DL.
-#
-dn: CN=ms-Exch-Member-Base-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Member-Base-DN
-distinguishedName: CN=ms-Exch-Member-Base-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12524
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Member-Base-DN
-adminDescription: ms-Exch-Member-Base-DN
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchMemberBaseDN
-name: ms-Exch-Member-Base-DN
-schemaIDGUID: a921b8aa-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Member-Filter             
-# The LDAP search filter used to generate this dynamic DL.
-#
-dn: CN=ms-Exch-Member-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Member-Filter
-distinguishedName: CN=ms-Exch-Member-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12522
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Member-Filter
-adminDescription: ms-Exch-Member-Filter
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchMemberFilter
-name: ms-Exch-Member-Filter
-schemaIDGUID: a9457bf0-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Message-Journal-Recipient  
-# A pointer to the mailbox that should get a journal (copy) of all
-# messages sent on this mailbox store.
-#
-dn: CN=ms-Exch-Message-Journal-Recipient,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Message-Journal-Recipient
-distinguishedName: CN=ms-Exch-Message-Journal-Recipient,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5055
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Message-Journal-Recipient
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Message-Journal-Recipient
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchMessageJournalRecipient
-name: ms-Exch-Message-Journal-Recipient
-schemaIDGUID: a95fee9d-b634-41e9-8f8c-d3d9ac1d5941
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Message-Size-Limit 
-#
-dn: CN=ms-Exch-Message-Size-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Message-Size-Limit
-distinguishedName: CN=ms-Exch-Message-Size-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.100
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32925
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Message-Size-Limit
-adminDescription: ms-Exch-Message-Size-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: messageSizeLimit
-name: ms-Exch-Message-Size-Limit
-schemaIDGUID: 167757e2-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Message-Tracking-Enabled    
-#
-dn: CN=ms-Exch-Message-Tracking-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Message-Tracking-Enabled
-distinguishedName: CN=ms-Exch-Message-Tracking-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.453
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32981
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Message-Tracking-Enabled
-adminDescription: ms-Exch-Message-Tracking-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: messageTrackingEnabled
-name: ms-Exch-Message-Tracking-Enabled
-schemaIDGUID: a8df7422-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Message-Track-Log-Filter    
-# Defines the filter for the fields in the message tracking log. Each
-# bit controls a field.
-#
-dn: CN=ms-Exch-Message-Track-Log-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Message-Track-Log-Filter
-distinguishedName: CN=ms-Exch-Message-Track-Log-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50001
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Message-Track-Log-Filter
-adminDescription: ms-Exch-Message-Track-Log-Filter
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMessageTrackLogFilter
-name: ms-Exch-Message-Track-Log-Filter
-schemaIDGUID: a9647a82-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mime-Types     
-#
-dn: CN=ms-Exch-Mime-Types,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mime-Types
-distinguishedName: CN=ms-Exch-Mime-Types,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.550
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 10240
-mAPIID: 35868
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mime-Types
-adminDescription: ms-Exch-Mime-Types
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchMimeTypes
-name: ms-Exch-Mime-Types
-schemaIDGUID: 8addd6a2-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Minimum-Threads 
-# The minimum RPC threads for the server.
-#
-dn: CN=ms-Exch-Minimum-Threads,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Minimum-Threads
-distinguishedName: CN=ms-Exch-Minimum-Threads,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11043
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Minimum-Threads
-adminDescription: ms-Exch-Minimum-Threads
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMinimumThreads
-name: ms-Exch-Minimum-Threads
-schemaIDGUID: a9883dc8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Min-Admin-Version    
-#
-dn: CN=ms-Exch-Min-Admin-Version,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Min-Admin-Version
-distinguishedName: CN=ms-Exch-Min-Admin-Version,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50093
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Min-Admin-Version
-adminDescription: ms-Exch-Min-Admin-Version
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMinAdminVersion
-name: ms-Exch-Min-Admin-Version
-schemaIDGUID: 8fca497d-4ac7-4df4-b180-eec0bfef27df
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Mixed-Mode           
-#
-dn: CN=ms-Exch-Mixed-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Mixed-Mode
-distinguishedName: CN=ms-Exch-Mixed-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50022
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mixed-Mode
-adminDescription: ms-Exch-Mixed-Mode
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchMixedMode
-name: ms-Exch-Mixed-Mode
-schemaIDGUID: 8ddb297c-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitored-Configurations  
-#
-dn: CN=ms-Exch-Monitored-Configurations,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitored-Configurations
-distinguishedName: CN=ms-Exch-Monitored-Configurations,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.198
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32985
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitored-Configurations
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitored-Configurations
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoredConfigurations
-name: ms-Exch-Monitored-Configurations
-schemaIDGUID: bf9679c9-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitored-Servers        
-#
-dn: CN=ms-Exch-Monitored-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitored-Servers
-distinguishedName: CN=ms-Exch-Monitored-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.179
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32986
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitored-Servers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitored-Servers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoredServers
-name: ms-Exch-Monitored-Servers
-schemaIDGUID: a8df7426-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitored-Services       
-#
-dn: CN=ms-Exch-Monitored-Services,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitored-Services
-distinguishedName: CN=ms-Exch-Monitored-Services,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.199
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 32987
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitored-Services
-adminDescription: ms-Exch-Monitored-Services
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: monitoredServices
-name: ms-Exch-Monitored-Services
-schemaIDGUID: bf9679ca-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Alert-Delay    
-#
-dn: CN=ms-Exch-Monitoring-Alert-Delay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Alert-Delay
-distinguishedName: CN=ms-Exch-Monitoring-Alert-Delay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.158
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32988
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Alert-Delay
-adminDescription: ms-Exch-Monitoring-Alert-Delay
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringAlertDelay
-name: ms-Exch-Monitoring-Alert-Delay
-schemaIDGUID: a8df7427-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Alert-Units    
-#
-dn: CN=ms-Exch-Monitoring-Alert-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Alert-Units
-distinguishedName: CN=ms-Exch-Monitoring-Alert-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.57
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 32989
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Alert-Units
-adminDescription: ms-Exch-Monitoring-Alert-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringAlertUnits
-name: ms-Exch-Monitoring-Alert-Units
-schemaIDGUID: a8df7428-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Availability-Style        
-#
-dn: CN=ms-Exch-Monitoring-Availability-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Availability-Style
-distinguishedName: CN=ms-Exch-Monitoring-Availability-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.450
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 3
-mAPIID: 32990
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Availability-Style
-adminDescription: ms-Exch-Monitoring-Availability-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringAvailabilityStyle
-name: ms-Exch-Monitoring-Availability-Style
-schemaIDGUID: bf9679cb-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Availability-Window    
-#
-dn: CN=ms-Exch-Monitoring-Availability-Window,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Availability-Window
-distinguishedName: CN=ms-Exch-Monitoring-Availability-Window,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.200
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 84
-mAPIID: 32991
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Availability-Window
-adminDescription: ms-Exch-Monitoring-Availability-Window
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: monitoringAvailabilityWindow
-name: ms-Exch-Monitoring-Availability-Window
-schemaIDGUID: bf9679cc-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Cached-Via-Mail       
-#
-dn: CN=ms-Exch-Monitoring-Cached-Via-Mail,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Cached-Via-Mail
-distinguishedName: CN=ms-Exch-Monitoring-Cached-Via-Mail,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.196
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32992
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Cached-Via-Mail
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitoring-Cached-Via-Mail
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoringCachedViaMail
-name: ms-Exch-Monitoring-Cached-Via-Mail
-schemaIDGUID: bf9679cd-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Cached-Via-RPC        
-#
-dn: CN=ms-Exch-Monitoring-Cached-Via-RPC,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Cached-Via-RPC
-distinguishedName: CN=ms-Exch-Monitoring-Cached-Via-RPC,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.197
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32993
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Cached-Via-RPC
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitoring-Cached-Via-RPC
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoringCachedViaRPC
-name: ms-Exch-Monitoring-Cached-Via-RPC
-schemaIDGUID: bf9679ce-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Disk-Space                    
-#
-dn: CN=ms-Exch-Monitoring-Disk-Space,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Disk-Space
-distinguishedName: CN=ms-Exch-Monitoring-Disk-Space,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50046
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Disk-Space
-adminDescription: ms-Exch-Monitoring-Disk-Space
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringDiskSpace
-name: ms-Exch-Monitoring-Disk-Space
-schemaIDGUID: 0210cc37-34cf-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Escalation-Procedure     
-#
-dn: CN=ms-Exch-Monitoring-Escalation-Procedure,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Escalation-Procedure
-distinguishedName: CN=ms-Exch-Monitoring-Escalation-Procedure,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.188
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1064
-mAPIID: 32994
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Escalation-Procedure
-adminDescription: ms-Exch-Monitoring-Escalation-Procedure
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: monitoringEscalationProcedure
-name: ms-Exch-Monitoring-Escalation-Procedure
-schemaIDGUID: a8df7429-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Hotsite-Poll-Interval    
-#
-dn: CN=ms-Exch-Monitoring-Hotsite-Poll-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Hotsite-Poll-Interval
-distinguishedName: CN=ms-Exch-Monitoring-Hotsite-Poll-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.186
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32995
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Hotsite-Poll-Interval
-adminDescription: ms-Exch-Monitoring-Hotsite-Poll-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringHotsitePollInterval
-name: ms-Exch-Monitoring-Hotsite-Poll-Interval
-schemaIDGUID: a8df742a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Hotsite-Poll-Units              
-#
-dn: CN=ms-Exch-Monitoring-Hotsite-Poll-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Hotsite-Poll-Units
-distinguishedName: CN=ms-Exch-Monitoring-Hotsite-Poll-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.87
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 32996
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Hotsite-Poll-Units
-adminDescription: ms-Exch-Monitoring-Hotsite-Poll-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringHotsitePollUnits
-name: ms-Exch-Monitoring-Hotsite-Poll-Units
-schemaIDGUID: a8df742b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Mail-Update-Interval     
-#
-dn: CN=ms-Exch-Monitoring-Mail-Update-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Mail-Update-Interval
-distinguishedName: CN=ms-Exch-Monitoring-Mail-Update-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.195
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32997
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Mail-Update-Interval
-adminDescription: ms-Exch-Monitoring-Mail-Update-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringMailUpdateInterval
-name: ms-Exch-Monitoring-Mail-Update-Interval
-schemaIDGUID: bf9679cf-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Mail-Update-Units       
-#
-dn: CN=ms-Exch-Monitoring-Mail-Update-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Mail-Update-Units
-distinguishedName: CN=ms-Exch-Monitoring-Mail-Update-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.93
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 32998
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Mail-Update-Units
-adminDescription: ms-Exch-Monitoring-Mail-Update-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringMailUpdateUnits
-name: ms-Exch-Monitoring-Mail-Update-Units
-schemaIDGUID: bf9679d0-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Mode    
-#
-dn: CN=ms-Exch-Monitoring-Mode,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Mode
-distinguishedName: CN=ms-Exch-Monitoring-Mode,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50060
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Mode
-adminDescription: ms-Exch-Monitoring-Mode
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringMode
-name: ms-Exch-Monitoring-Mode
-schemaIDGUID: e520be0a-d2ea-449b-9177-caaadec1a4c6
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Monitored-Services         
-#
-dn: CN=ms-Exch-Monitoring-Monitored-Services,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Monitored-Services
-distinguishedName: CN=ms-Exch-Monitoring-Monitored-Services,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50045
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Monitored-Services
-adminDescription: ms-Exch-Monitoring-Monitored-Services
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringMonitoredServices
-name: ms-Exch-Monitoring-Monitored-Services
-schemaIDGUID: 0210cc30-34cf-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Normal-Poll-Interval     
-#
-dn: CN=ms-Exch-Monitoring-Normal-Poll-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Normal-Poll-Interval
-distinguishedName: CN=ms-Exch-Monitoring-Normal-Poll-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.187
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 32999
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Normal-Poll-Interval
-adminDescription: ms-Exch-Monitoring-Normal-Poll-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringNormalPollInterval
-name: ms-Exch-Monitoring-Normal-Poll-Interval
-schemaIDGUID: a8df742c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Normal-Poll-Units       
-#
-dn: CN=ms-Exch-Monitoring-Normal-Poll-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Normal-Poll-Units
-distinguishedName: CN=ms-Exch-Monitoring-Normal-Poll-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.88
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33000
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Normal-Poll-Units
-adminDescription: ms-Exch-Monitoring-Normal-Poll-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringNormalPollUnits
-name: ms-Exch-Monitoring-Normal-Poll-Units
-schemaIDGUID: a8df742d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Notification-Rate       
-# How frequently the MAD should check whether a notification (such as
-# a mail or page) should be sent.
-#
-dn: CN=ms-Exch-Monitoring-Notification-Rate,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Notification-Rate
-distinguishedName: CN=ms-Exch-Monitoring-Notification-Rate,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50057
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Notification-Rate
-adminDescription: ms-Exch-Monitoring-Notification-Rate
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringNotificationRate
-name: ms-Exch-Monitoring-Notification-Rate
-schemaIDGUID: 8bf11686-fb18-4147-95e4-f43f8c9de87d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Polling-Rate   
-# The set of polling rates for each of the types of monitored
-# resources (such as queues, CPU, and disk). The syntax of each of the
-# entries will be: [TYPE],[RATE as Seconds].
-#
-dn: CN=ms-Exch-Monitoring-Polling-Rate,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Polling-Rate
-distinguishedName: CN=ms-Exch-Monitoring-Polling-Rate,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50058
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Polling-Rate
-adminDescription: ms-Exch-Monitoring-Polling-Rate
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringPollingRate
-name: ms-Exch-Monitoring-Polling-Rate
-schemaIDGUID: a3af17a5-b2bf-442c-bd04-83dcedb19ea4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Queue-Polling-Frequency       
-#
-dn: CN=ms-Exch-Monitoring-Queue-Polling-Frequency,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Queue-Polling-Frequency
-distinguishedName: CN=ms-Exch-Monitoring-Queue-Polling-Frequency,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50038
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Queue-Polling-Frequency
-adminDescription: ms-Exch-Monitoring-Queue-Polling-Frequency
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringQueuePollingFrequency
-name: ms-Exch-Monitoring-Queue-Polling-Frequency
-schemaIDGUID: 501b8818-29ae-11d3-aa69-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Monitoring-Queue-Polling-Interval   
-#
-dn: CN=ms-Exch-Monitoring-Queue-Polling-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Queue-Polling-Interval
-distinguishedName: CN=ms-Exch-Monitoring-Queue-Polling-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50037
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Queue-Polling-Interval
-adminDescription: ms-Exch-Monitoring-Queue-Polling-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringQueuePollingInterval
-name: ms-Exch-Monitoring-Queue-Polling-Interval
-schemaIDGUID: 501b880f-29ae-11d3-aa69-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Monitoring-Recipients                 
-#
-dn: CN=ms-Exch-Monitoring-Recipients,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Recipients
-distinguishedName: CN=ms-Exch-Monitoring-Recipients,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.159
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33001
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Recipients
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitoring-Recipients
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoringRecipients
-name: ms-Exch-Monitoring-Recipients
-schemaIDGUID: a8df742e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Recipients-NDR     
-#
-dn: CN=ms-Exch-Monitoring-Recipients-NDR,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Recipients-NDR
-distinguishedName: CN=ms-Exch-Monitoring-Recipients-NDR,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.387
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33002
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Recipients-NDR
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Monitoring-Recipients-NDR
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: monitoringRecipientsNDR
-name: ms-Exch-Monitoring-Recipients-NDR
-schemaIDGUID: a8df742f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Resources          
-# The set of monitored resources (such as queues, CPU, and disk). The
-# general syntax of each of the entries will be: TYPE, ID, [Warning
-# value], [Error value]. Some TYPEs may need different formats.
-#
-dn: CN=ms-Exch-Monitoring-Resources,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Resources
-distinguishedName: CN=ms-Exch-Monitoring-Resources,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50059
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Resources
-adminDescription: ms-Exch-Monitoring-Resources
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringResources
-name: ms-Exch-Monitoring-Resources
-schemaIDGUID: c1293ac0-b228-4b41-9409-2ca7d0c19459
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Responses 
-#
-dn: CN=ms-Exch-Monitoring-Responses,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Responses
-distinguishedName: CN=ms-Exch-Monitoring-Responses,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50047
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Responses
-adminDescription: ms-Exch-Monitoring-Responses
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMonitoringResponses
-name: ms-Exch-Monitoring-Responses
-schemaIDGUID: 0210cc43-34cf-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-RPC-Update-Interval 
-#
-dn: CN=ms-Exch-Monitoring-RPC-Update-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-RPC-Update-Interval
-distinguishedName: CN=ms-Exch-Monitoring-RPC-Update-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.92
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33003
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-RPC-Update-Interval
-adminDescription: ms-Exch-Monitoring-RPC-Update-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringRPCUpdateInterval
-name: ms-Exch-Monitoring-RPC-Update-Interval
-schemaIDGUID: bf9679d1-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-RPC-Update-Units   
-#
-dn: CN=ms-Exch-Monitoring-RPC-Update-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-RPC-Update-Units
-distinguishedName: CN=ms-Exch-Monitoring-RPC-Update-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.89
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33004
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-RPC-Update-Units
-adminDescription: ms-Exch-Monitoring-RPC-Update-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringRPCUpdateUnits
-name: ms-Exch-Monitoring-RPC-Update-Units
-schemaIDGUID: bf9679d2-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Warning-Delay      
-#
-dn: CN=ms-Exch-Monitoring-Warning-Delay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Warning-Delay
-distinguishedName: CN=ms-Exch-Monitoring-Warning-Delay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.157
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33005
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Warning-Delay
-adminDescription: ms-Exch-Monitoring-Warning-Delay
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: monitoringWarningDelay
-name: ms-Exch-Monitoring-Warning-Delay
-schemaIDGUID: a8df7430-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitoring-Warning-Units      
-#
-dn: CN=ms-Exch-Monitoring-Warning-Units,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitoring-Warning-Units
-distinguishedName: CN=ms-Exch-Monitoring-Warning-Units,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.56
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33006
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitoring-Warning-Units
-adminDescription: ms-Exch-Monitoring-Warning-Units
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: monitoringWarningUnits
-name: ms-Exch-Monitoring-Warning-Units
-schemaIDGUID: a8df7431-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitor-Clock         
-#
-dn: CN=ms-Exch-Monitor-Clock,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitor-Clock
-distinguishedName: CN=ms-Exch-Monitor-Clock,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.163
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32982
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitor-Clock
-adminDescription: ms-Exch-Monitor-Clock
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: monitorClock
-name: ms-Exch-Monitor-Clock
-schemaIDGUID: a8df7423-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitor-Servers    
-#
-dn: CN=ms-Exch-Monitor-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitor-Servers
-distinguishedName: CN=ms-Exch-Monitor-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.156
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32983
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitor-Servers
-adminDescription: ms-Exch-Monitor-Servers
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: monitorServers
-name: ms-Exch-Monitor-Servers
-schemaIDGUID: a8df7424-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Monitor-Services   
-#
-dn: CN=ms-Exch-Monitor-Services,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Monitor-Services
-distinguishedName: CN=ms-Exch-Monitor-Services,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.160
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 32984
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitor-Services
-adminDescription: ms-Exch-Monitor-Services
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: monitorServices
-name: ms-Exch-Monitor-Services
-schemaIDGUID: a8df7425-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Move-To-LSA       
-#
-dn: CN=ms-Exch-Move-To-LSA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Move-To-LSA
-distinguishedName: CN=ms-Exch-Move-To-LSA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.88
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Move-To-LSA
-adminDescription: ms-Exch-Move-To-LSA
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchMoveToLSA
-name: ms-Exch-Move-To-LSA
-schemaIDGUID: ab4cc53c-4ba4-11d3-aa75-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-MTA-Database-Path   
-#
-dn: CN=ms-Exch-MTA-Database-Path,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MTA-Database-Path
-distinguishedName: CN=ms-Exch-MTA-Database-Path,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.18001
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MTA-Database-Path
-adminDescription: ms-Exch-MTA-Database-Path
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchMTADatabasePath
-name: ms-Exch-MTA-Database-Path
-schemaIDGUID: 2f2dc2a4-242e-11d3-aa66-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MTA-Local-Cred      
-#
-dn: CN=ms-Exch-MTA-Local-Cred,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MTA-Local-Cred
-distinguishedName: CN=ms-Exch-MTA-Local-Cred,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.270
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 33007
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MTA-Local-Cred
-adminDescription: ms-Exch-MTA-Local-Cred
-oMSyntax: 22
-searchFlags: 0
-lDAPDisplayName: mTALocalCred
-name: ms-Exch-MTA-Local-Cred
-schemaIDGUID: a8df7432-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MTA-Local-Desig     
-#
-dn: CN=ms-Exch-MTA-Local-Desig,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-MTA-Local-Desig
-distinguishedName: CN=ms-Exch-MTA-Local-Desig,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.271
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 33008
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MTA-Local-Desig
-adminDescription: ms-Exch-MTA-Local-Desig
-oMSyntax: 22
-searchFlags: 0
-lDAPDisplayName: mTALocalDesig
-name: ms-Exch-MTA-Local-Desig
-schemaIDGUID: a8df7433-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Non-Authoritative-Domains    
-#
-dn: CN=ms-Exch-Non-Authoritative-Domains,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Non-Authoritative-Domains
-distinguishedName: CN=ms-Exch-Non-Authoritative-Domains,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50084
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1123
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Non-Authoritative-Domains
-adminDescription: ms-Exch-Non-Authoritative-Domains
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNonAuthoritativeDomains
-name: ms-Exch-Non-Authoritative-Domains
-schemaIDGUID: ef2c7c70-f874-4280-8643-2334f2d3340c
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Non-MIME-Character-Set       
-#
-dn: CN=ms-Exch-Non-MIME-Character-Set,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Non-MIME-Character-Set
-distinguishedName: CN=ms-Exch-Non-MIME-Character-Set,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50043
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Non-MIME-Character-Set
-adminDescription: ms-Exch-Non-MIME-Character-Set
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNonMIMECharacterSet
-name: ms-Exch-Non-MIME-Character-Set
-schemaIDGUID: 974c99fe-33fc-11d3-aa6e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Connector-Mailbox      
-# Name of the Lotus Notes mailbox where the connector picks up mail
-# from Notes for delivery into Exchange.
-#
-dn: CN=ms-Exch-Notes-Connector-Mailbox,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Connector-Mailbox
-distinguishedName: CN=ms-Exch-Notes-Connector-Mailbox,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1014
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Connector-Mailbox
-adminDescription: ms-Exch-Notes-Connector-Mailbox
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesConnectorMailbox
-name: ms-Exch-Notes-Connector-Mailbox
-schemaIDGUID: aa5a0cb8-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Exclude-Groups   
-# A list of Lotus Notes groups to exclude from directory
-# synchronization.
-#
-dn: CN=ms-Exch-Notes-Exclude-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Exclude-Groups
-distinguishedName: CN=ms-Exch-Notes-Exclude-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1022
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Exclude-Groups
-adminDescription: ms-Exch-Notes-Exclude-Groups
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesExcludeGroups
-name: ms-Exch-Notes-Exclude-Groups
-schemaIDGUID: 0c74acba-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Export-Groups  
-# A flag indicating whether Lotus Notes groups should be exported to
-# Exchange during directory synchronization.
-#
-dn: CN=ms-Exch-Notes-Export-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Export-Groups
-distinguishedName: CN=ms-Exch-Notes-Export-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1021
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Export-Groups
-adminDescription: ms-Exch-Notes-Export-Groups
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchNotesExportGroups
-name: ms-Exch-Notes-Export-Groups
-schemaIDGUID: 0eb5a5ce-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Foreign-Domain      
-# The name of the Lotus Notes foreign domain that represents Exchange.
-#
-dn: CN=ms-Exch-Notes-Foreign-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Foreign-Domain
-distinguishedName: CN=ms-Exch-Notes-Foreign-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1012
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Foreign-Domain
-adminDescription: ms-Exch-Notes-Foreign-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesForeignDomain
-name: ms-Exch-Notes-Foreign-Domain
-schemaIDGUID: 137332c0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Letterhead  
-# The name of the Lotus Notes letterhead style used for messages
-# delivered into Notes from Exchange.
-#
-dn: CN=ms-Exch-Notes-Letterhead,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Letterhead
-distinguishedName: CN=ms-Exch-Notes-Letterhead,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1015
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Letterhead
-adminDescription: ms-Exch-Notes-Letterhead
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesLetterhead
-name: ms-Exch-Notes-Letterhead
-schemaIDGUID: 141552a8-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Notes-INI      
-# The full path and file name of the Lotus Notes client INI file used
-# by the connector to log on to the Notes server.
-#
-dn: CN=ms-Exch-Notes-Notes-INI,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Notes-INI
-distinguishedName: CN=ms-Exch-Notes-Notes-INI,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1017
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Notes-INI
-adminDescription: ms-Exch-Notes-Notes-INI
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesNotesINI
-name: ms-Exch-Notes-Notes-INI
-schemaIDGUID: 13d02e76-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Notes-Links     
-# Determines how Lotus Notes doclinks are converted in messages to
-# Exchange. Options are RTF, OLE, or URL.
-#
-dn: CN=ms-Exch-Notes-Notes-Links,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Notes-Links
-distinguishedName: CN=ms-Exch-Notes-Notes-Links,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1016
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Notes-Links
-adminDescription: ms-Exch-Notes-Notes-Links
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesNotesLinks
-name: ms-Exch-Notes-Notes-Links
-schemaIDGUID: aa7dcffe-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Notes-Server   
-# The name of the Lotus Notes server to which the Connector
-# attaches. Notes format name, not server name.
-#
-dn: CN=ms-Exch-Notes-Notes-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Notes-Server
-distinguishedName: CN=ms-Exch-Notes-Notes-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1011
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Notes-Server
-adminDescription: ms-Exch-Notes-Notes-Server
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesNotesServer
-name: ms-Exch-Notes-Notes-Server
-schemaIDGUID: 14b51036-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Password   
-#
-dn: CN=ms-Exch-Notes-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Password
-distinguishedName: CN=ms-Exch-Notes-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1010
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Password
-adminDescription: ms-Exch-Notes-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchNotesPassword
-name: ms-Exch-Notes-Password
-schemaIDGUID: 593fa28d-2862-11d3-aa68-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Routable-Domains    
-#
-dn: CN=ms-Exch-Notes-Routable-Domains,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Routable-Domains
-distinguishedName: CN=ms-Exch-Notes-Routable-Domains,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1023
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Routable-Domains
-adminDescription: ms-Exch-Notes-Routable-Domains
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesRoutableDomains
-name: ms-Exch-Notes-Routable-Domains
-schemaIDGUID: 90804554-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Rtr-Mailbox        
-# The name of the mailbox used by the Lotus Notes mail router. This is
-# usually MAIL.BOX.
-#
-dn: CN=ms-Exch-Notes-Rtr-Mailbox,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Rtr-Mailbox
-distinguishedName: CN=ms-Exch-Notes-Rtr-Mailbox,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1013
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Rtr-Mailbox
-adminDescription: ms-Exch-Notes-Rtr-Mailbox
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesRtrMailbox
-name: ms-Exch-Notes-Rtr-Mailbox
-schemaIDGUID: 144c28be-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Source-Books     
-# A list of the Lotus Notes Name and Address Books exported to
-# Exchange for directory synchronization.
-#
-dn: CN=ms-Exch-Notes-Source-Books,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Source-Books
-distinguishedName: CN=ms-Exch-Notes-Source-Books,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1020
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Source-Books
-adminDescription: ms-Exch-Notes-Source-Books
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesSourceBooks
-name: ms-Exch-Notes-Source-Books
-schemaIDGUID: 12b6d8fa-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Target-Book       
-# The name of the default Name and Address Book into which Exchange
-# users are imported.
-#
-dn: CN=ms-Exch-Notes-Target-Book,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Target-Book
-distinguishedName: CN=ms-Exch-Notes-Target-Book,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1018
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Target-Book
-adminDescription: ms-Exch-Notes-Target-Book
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesTargetBook
-name: ms-Exch-Notes-Target-Book
-schemaIDGUID: 13a07f6e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Notes-Target-Books    
-# A list of domain-specific Lotus Notes Name and Address Books for
-# directory import.
-#
-dn: CN=ms-Exch-Notes-Target-Books,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Notes-Target-Books
-distinguishedName: CN=ms-Exch-Notes-Target-Books,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1019
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Target-Books
-adminDescription: ms-Exch-Notes-Target-Books
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNotesTargetBooks
-name: ms-Exch-Notes-Target-Books
-schemaIDGUID: aad1424c-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-No-PF-Connection    
-# Boolean state to determine if (MAPI) clients are allowed to connect
-# to public folder content in the target routing group. By default, if
-# not set, public folder referrals will be allowed over this
-# connector.
-#
-dn: CN=ms-Exch-No-PF-Connection,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-No-PF-Connection
-distinguishedName: CN=ms-Exch-No-PF-Connection,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11067
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-No-PF-Connection
-adminDescription: ms-Exch-No-PF-Connection
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchNoPFConnection
-name: ms-Exch-No-PF-Connection
-schemaIDGUID: 9ff15c41-1ec9-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Ntds-Export-Containers     
-# The GUID of NTDS containers or OUs to search in for objects to be
-# synchronized.
-#
-dn: CN=ms-Exch-Ntds-Export-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Ntds-Export-Containers
-distinguishedName: CN=ms-Exch-Ntds-Export-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.33
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Ntds-Export-Containers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Ntds-Export-Containers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchNtdsExportContainers
-name: ms-Exch-Ntds-Export-Containers
-schemaIDGUID: 155bf4d2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Ntds-Import-Container             
-# The GUID of NTDS containers or OUs to write synchronized objects to.
-#
-dn: CN=ms-Exch-Ntds-Import-Container,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Ntds-Import-Container
-distinguishedName: CN=ms-Exch-Ntds-Import-Container,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.34
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Ntds-Import-Container
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Ntds-Import-Container
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchNtdsImportContainer
-name: ms-Exch-Ntds-Import-Container
-schemaIDGUID: 1592cae8-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-NT-Account-Options  
-#
-dn: CN=ms-Exch-NT-Account-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-NT-Account-Options
-distinguishedName: CN=ms-Exch-NT-Account-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.44
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-NT-Account-Options
-adminDescription: ms-Exch-NT-Account-Options
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchNTAccountOptions
-name: ms-Exch-NT-Account-Options
-schemaIDGUID: 14ebe64c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-NT-Authentication-Providers       
-# A list of Security Support Provider Interface (SSPI) packages that
-# may be used to authenticate to this resource.
-#
-dn: CN=ms-Exch-NT-Authentication-Providers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-NT-Authentication-Providers
-distinguishedName: CN=ms-Exch-NT-Authentication-Providers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2009
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-NT-Authentication-Providers
-adminDescription: ms-Exch-NT-Authentication-Providers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchNTAuthenticationProviders
-name: ms-Exch-NT-Authentication-Providers
-schemaIDGUID: 15278116-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Num-Of-Open-Retries        
-#
-dn: CN=ms-Exch-Num-Of-Open-Retries,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Num-Of-Open-Retries
-distinguishedName: CN=ms-Exch-Num-Of-Open-Retries,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.148
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33012
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Num-Of-Open-Retries
-adminDescription: ms-Exch-Num-Of-Open-Retries
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: numOfOpenRetries
-name: ms-Exch-Num-Of-Open-Retries
-schemaIDGUID: a8df743a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Num-Of-Transfer-Retries     
-#
-dn: CN=ms-Exch-Num-Of-Transfer-Retries,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Num-Of-Transfer-Retries
-distinguishedName: CN=ms-Exch-Num-Of-Transfer-Retries,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.134
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33013
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Num-Of-Transfer-Retries
-adminDescription: ms-Exch-Num-Of-Transfer-Retries
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: numOfTransferRetries
-name: ms-Exch-Num-Of-Transfer-Retries
-schemaIDGUID: a8df743b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-N-Address    
-#
-dn: CN=ms-Exch-N-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-N-Address
-distinguishedName: CN=ms-Exch-N-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.282
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 50
-mAPIID: 33009
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-N-Address
-adminDescription: ms-Exch-N-Address
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: nAddress
-name: ms-Exch-N-Address
-schemaIDGUID: a8df7434-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-N-Address-Type    
-#
-dn: CN=ms-Exch-N-Address-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-N-Address-Type
-distinguishedName: CN=ms-Exch-N-Address-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.222
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33010
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-N-Address-Type
-adminDescription: ms-Exch-N-Address-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: nAddressType
-name: ms-Exch-N-Address-Type
-schemaIDGUID: a8df7435-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-OAB-Default      
-#
-dn: CN=ms-Exch-OAB-Default,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-OAB-Default
-distinguishedName: CN=ms-Exch-OAB-Default,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.67
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OAB-Default
-adminDescription: ms-Exch-OAB-Default
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchOABDefault
-name: ms-Exch-OAB-Default
-schemaIDGUID: 15c279f0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-OAB-Folder       
-# The entry ID of the public folder that this offline address book
-# (OAB) is stored in.
-#
-dn: CN=ms-Exch-OAB-Folder,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-OAB-Folder
-distinguishedName: CN=ms-Exch-OAB-Folder,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.68
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OAB-Folder
-adminDescription: ms-Exch-OAB-Folder
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchOABFolder
-name: ms-Exch-OAB-Folder
-schemaIDGUID: 15f6edac-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Obj-View-Containers  
-#
-dn: CN=ms-Exch-Obj-View-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Obj-View-Containers
-distinguishedName: CN=ms-Exch-Obj-View-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.545
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33223
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Obj-View-Containers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Obj-View-Containers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: objViewContainers
-name: ms-Exch-Obj-View-Containers
-schemaIDGUID: 16775847-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Off-Line-AB-Containers   
-#
-dn: CN=ms-Exch-Off-Line-AB-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Off-Line-AB-Containers
-distinguishedName: CN=ms-Exch-Off-Line-AB-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.391
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33016
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Off-Line-AB-Containers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Off-Line-AB-Containers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: offLineABContainers
-name: ms-Exch-Off-Line-AB-Containers
-schemaIDGUID: a8df743c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Off-Line-AB-Schedule    
-#
-dn: CN=ms-Exch-Off-Line-AB-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Off-Line-AB-Schedule
-distinguishedName: CN=ms-Exch-Off-Line-AB-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.389
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-mAPIID: 33017
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Off-Line-AB-Schedule
-adminDescription: ms-Exch-Off-Line-AB-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: offLineABSchedule
-name: ms-Exch-Off-Line-AB-Schedule
-schemaIDGUID: a8df743d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Off-Line-AB-Server      
-#
-dn: CN=ms-Exch-Off-Line-AB-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Off-Line-AB-Server
-distinguishedName: CN=ms-Exch-Off-Line-AB-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.392
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33018
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Off-Line-AB-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Off-Line-AB-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: offLineABServer
-name: ms-Exch-Off-Line-AB-Server
-schemaIDGUID: a8df743e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Off-Line-AB-Style       
-#
-dn: CN=ms-Exch-Off-Line-AB-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Off-Line-AB-Style
-distinguishedName: CN=ms-Exch-Off-Line-AB-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.390
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33019
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Off-Line-AB-Style
-adminDescription: ms-Exch-Off-Line-AB-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: offLineABStyle
-name: ms-Exch-Off-Line-AB-Style
-schemaIDGUID: a8df743f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Admin-Extended-Settings  
-#
-dn: CN=ms-Exch-Oma-Admin-Extended-Settings,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Admin-Extended-Settings
-distinguishedName: CN=ms-Exch-Oma-Admin-Extended-Settings,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.126
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Admin-Extended-Settings
-adminDescription: ms-Exch-Oma-Admin-Extended-Settings
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaAdminExtendedSettings
-name: ms-Exch-Oma-Admin-Extended-Settings
-schemaIDGUID: e60ae80d-7ac9-4e61-9bc3-98cbc0726a99
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Admin-Wireless-Enable    
-#
-dn: CN=ms-Exch-Oma-Admin-Wireless-Enable,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Admin-Wireless-Enable
-distinguishedName: CN=ms-Exch-Oma-Admin-Wireless-Enable,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.124
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Admin-Wireless-Enable
-adminDescription: ms-Exch-Oma-Admin-Wireless-Enable
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchOmaAdminWirelessEnable
-name: ms-Exch-Oma-Admin-Wireless-Enable
-schemaIDGUID: c1a7bfbe-116b-4737-8cd9-d29ef5b3690e
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Carrier-Address         
-#
-dn: CN=ms-Exch-Oma-Carrier-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Carrier-Address
-distinguishedName: CN=ms-Exch-Oma-Carrier-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.139
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Carrier-Address
-adminDescription: ms-Exch-Oma-Carrier-Address
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaCarrierAddress
-name: ms-Exch-Oma-Carrier-Address
-schemaIDGUID: abe858b8-3daf-407e-b1a6-3a323ed3334b
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Carrier-Type            
-#
-dn: CN=ms-Exch-Oma-Carrier-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Carrier-Type
-distinguishedName: CN=ms-Exch-Oma-Carrier-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.145
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Carrier-Type
-adminDescription: ms-Exch-Oma-Carrier-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaCarrierType
-name: ms-Exch-Oma-Carrier-Type
-schemaIDGUID: 1fb324ad-2da3-4548-8f5a-f34457f8af4a
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Carrier-Url             
-#
-dn: CN=ms-Exch-Oma-Carrier-Url,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Carrier-Url
-distinguishedName: CN=ms-Exch-Oma-Carrier-Url,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.146
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Carrier-Url
-adminDescription: ms-Exch-Oma-Carrier-Url
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaCarrierUrl
-name: ms-Exch-Oma-Carrier-Url
-schemaIDGUID: aca0878d-89f1-45f5-a48f-680b7e550573
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Configuration           
-#
-dn: CN=ms-Exch-Oma-Configuration,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Configuration
-distinguishedName: CN=ms-Exch-Oma-Configuration,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.137
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Configuration
-adminDescription: ms-Exch-Oma-Configuration
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaConfiguration
-name: ms-Exch-Oma-Configuration
-schemaIDGUID: d7e12bc7-4288-4866-bc91-f0ee18965c15
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Deliverer                       
-#
-dn: CN=ms-Exch-Oma-Deliverer,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Deliverer
-distinguishedName: CN=ms-Exch-Oma-Deliverer,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.144
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Deliverer
-adminDescription: ms-Exch-Oma-Deliverer
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaDeliverer
-name: ms-Exch-Oma-Deliverer
-schemaIDGUID: a231009f-9df2-403d-9fbd-99809049722d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Delivery-Provider-DN     
-#
-dn: CN=ms-Exch-Oma-Delivery-Provider-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Delivery-Provider-DN
-distinguishedName: CN=ms-Exch-Oma-Delivery-Provider-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.138
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Delivery-Provider-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Oma-Delivery-Provider-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOmaDeliveryProviderDN
-name: ms-Exch-Oma-Delivery-Provider-DN
-schemaIDGUID: 1f0e1a69-d62c-4105-991d-acaff4b07d71
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Device-Capability-DN     
-#
-dn: CN=ms-Exch-Oma-Device-Capability-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Device-Capability-DN
-distinguishedName: CN=ms-Exch-Oma-Device-Capability-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.133
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Device-Capability-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Oma-Device-Capability-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOmaDeviceCapabilityDN
-name: ms-Exch-Oma-Device-Capability-DN
-schemaIDGUID: 0510bdc4-9b19-4d67-93a1-8dda04c15568
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Extended-Properties      
-#
-dn: CN=ms-Exch-Oma-Extended-Properties,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Extended-Properties
-distinguishedName: CN=ms-Exch-Oma-Extended-Properties,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.143
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Extended-Properties
-adminDescription: ms-Exch-Oma-Extended-Properties
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaExtendedProperties
-name: ms-Exch-Oma-Extended-Properties
-schemaIDGUID: 9ebe537c-f882-473d-980b-ce52202a75d8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Formatter        
-#
-dn: CN=ms-Exch-Oma-Formatter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Formatter
-distinguishedName: CN=ms-Exch-Oma-Formatter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.135
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Formatter
-adminDescription: ms-Exch-Oma-Formatter
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaFormatter
-name: ms-Exch-Oma-Formatter
-schemaIDGUID: e827cd6a-b63c-4d44-961a-781a67949a36
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Translator    
-#
-dn: CN=ms-Exch-Oma-Translator,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Translator
-distinguishedName: CN=ms-Exch-Oma-Translator,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.136
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Translator
-adminDescription: ms-Exch-Oma-Translator
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaTranslator
-name: ms-Exch-Oma-Translator
-schemaIDGUID: d0f2588a-701e-4649-9379-062c62b93ef6
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Oma-Validater            
-#
-dn: CN=ms-Exch-Oma-Validater,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Oma-Validater
-distinguishedName: CN=ms-Exch-Oma-Validater,${SCHEMADN}
-attributeID: 1.2.840.113556.1.6.20.1.134
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Validater
-adminDescription: ms-Exch-Oma-Validater
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOmaValidater
-name: ms-Exch-Oma-Validater
-schemaIDGUID: a87d0c40-cbbd-4da1-ba2e-704832fca5b1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-OOF-Reply-To-Originator    
-# Governs whether or not Out-Of-Office notifications should be sent to
-# a sender of a message to this DL.
-#
-dn: CN=ms-Exch-OOF-Reply-To-Originator,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-OOF-Reply-To-Originator
-distinguishedName: CN=ms-Exch-OOF-Reply-To-Originator,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.438
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33023
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OOF-Reply-To-Originator
-adminDescription: ms-Exch-OOF-Reply-To-Originator
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: oOFReplyToOriginator
-name: ms-Exch-OOF-Reply-To-Originator
-schemaIDGUID: a8df7440-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Open-Retry-Interval             
-#
-dn: CN=ms-Exch-Open-Retry-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Open-Retry-Interval
-distinguishedName: CN=ms-Exch-Open-Retry-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.143
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33024
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Open-Retry-Interval
-adminDescription: ms-Exch-Open-Retry-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: openRetryInterval
-name: ms-Exch-Open-Retry-Interval
-schemaIDGUID: a8df7441-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Originating-Forest              
-#
-dn: CN=ms-Exch-Originating-Forest,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Originating-Forest
-distinguishedName: CN=ms-Exch-Originating-Forest,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50300
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Originating-Forest
-adminDescription: ms-Exch-Originating-Forest
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchOriginatingForest
-name: ms-Exch-Originating-Forest
-schemaIDGUID: 16671de6-9753-47bf-9a12-be31abe0af08
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Orig-MDB 
-#
-dn: CN=ms-Exch-Orig-MDB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Orig-MDB
-distinguishedName: CN=ms-Exch-Orig-MDB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11093
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Orig-MDB
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Orig-MDB
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOrigMDB
-name: ms-Exch-Orig-MDB
-schemaIDGUID: f7b66927-7726-4e66-9ea8-efdf48d65201
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Other-Authentication-Flags    
-#
-dn: CN=ms-Exch-Other-Authentication-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Other-Authentication-Flags
-distinguishedName: CN=ms-Exch-Other-Authentication-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2017
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Other-Authentication-Flags
-adminDescription: ms-Exch-Other-Authentication-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchOtherAuthenticationFlags
-name: ms-Exch-Other-Authentication-Flags
-schemaIDGUID: b4c7fe67-b523-4d2e-b56e-ac57b686c7e3
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Outbound-Sites   
-#
-dn: CN=ms-Exch-Outbound-Sites,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Outbound-Sites
-distinguishedName: CN=ms-Exch-Outbound-Sites,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.0
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33029
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Outbound-Sites
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Outbound-Sites
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: outboundSites
-name: ms-Exch-Outbound-Sites
-schemaIDGUID: a8df7445-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Outgoing-Msg-Size-Limit   
-#
-dn: CN=ms-Exch-Outgoing-Msg-Size-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Outgoing-Msg-Size-Limit
-distinguishedName: CN=ms-Exch-Outgoing-Msg-Size-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.490
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33167
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Outgoing-Msg-Size-Limit
-adminDescription: ms-Exch-Outgoing-Msg-Size-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: outgoingMsgSizeLimit
-name: ms-Exch-Outgoing-Msg-Size-Limit
-schemaIDGUID: a8df7446-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Overall-Age-Limit        
-# Overall age limit for messages in public message databases
-# (MDBs). This is a store-wide setting.
-#
-dn: CN=ms-Exch-Overall-Age-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Overall-Age-Limit
-distinguishedName: CN=ms-Exch-Overall-Age-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11055
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Overall-Age-Limit
-adminDescription: ms-Exch-Overall-Age-Limit
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchOverallAgeLimit
-name: ms-Exch-Overall-Age-Limit
-schemaIDGUID: 9162c4ba-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-OWA-Server   
-#
-dn: CN=ms-Exch-OWA-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-OWA-Server
-distinguishedName: CN=ms-Exch-OWA-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.608
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 128
-mAPIID: 35942
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OWA-Server
-adminDescription: ms-Exch-OWA-Server
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: oWAServer
-name: ms-Exch-OWA-Server
-schemaIDGUID: a8df7447-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Owning-Org   
-#
-dn: CN=ms-Exch-Owning-Org,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Owning-Org
-distinguishedName: CN=ms-Exch-Owning-Org,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11030
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Owning-Org
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Owning-Org
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOwningOrg
-name: ms-Exch-Owning-Org
-schemaIDGUID: 16f86ba4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Owning-PF-Tree   
-# The GUID of the public folder tree that is replicated to this store.
-#
-dn: CN=ms-Exch-Owning-PF-Tree,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Owning-PF-Tree
-distinguishedName: CN=ms-Exch-Owning-PF-Tree,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11031
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1008
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Owning-PF-Tree
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Owning-PF-Tree
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOwningPFTree
-name: ms-Exch-Owning-PF-Tree
-schemaIDGUID: 172a7d06-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Owning-PF-Tree-BL    
-# A read-only multivalued GUID list of public MDB instances of this
-# TLH.
-#
-dn: CN=ms-Exch-Owning-PF-Tree-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Owning-PF-Tree-BL
-distinguishedName: CN=ms-Exch-Owning-PF-Tree-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11032
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1009
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Owning-PF-Tree-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Owning-PF-Tree-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOwningPFTreeBL
-name: ms-Exch-Owning-PF-Tree-BL
-schemaIDGUID: 175a2c0e-b098-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Owning-Server          
-# The DN of the Directory Service (DS) object for the server
-# containing this MDB.
-#
-dn: CN=ms-Exch-Owning-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Owning-Server
-distinguishedName: CN=ms-Exch-Owning-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11004
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Owning-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Owning-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchOwningServer
-name: ms-Exch-Owning-Server
-schemaIDGUID: 17910224-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Partner-CP   
-#
-dn: CN=ms-Exch-Partner-CP,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Partner-CP
-distinguishedName: CN=ms-Exch-Partner-CP,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1007
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Partner-CP
-adminDescription: ms-Exch-Partner-CP
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchPartnerCP
-name: ms-Exch-Partner-CP
-schemaIDGUID: 8a0c07b2-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Partner-Language  
-# The language (code page) of the connected foreign post office or
-# domain.
-#
-dn: CN=ms-Exch-Partner-Language,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Partner-Language
-distinguishedName: CN=ms-Exch-Partner-Language,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Partner-Language
-adminDescription: ms-Exch-Partner-Language
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchPartnerLanguage
-name: ms-Exch-Partner-Language
-schemaIDGUID: 17c7d83a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Patch-MDB 
-#
-dn: CN=ms-Exch-Patch-MDB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Patch-MDB
-distinguishedName: CN=ms-Exch-Patch-MDB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11086
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Patch-MDB
-adminDescription: ms-Exch-Patch-MDB
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchPatchMDB
-name: ms-Exch-Patch-MDB
-schemaIDGUID: bbdf5f8c-02d5-45ff-bab7-464d5452ebf4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-PF-Contacts  
-#
-dn: CN=ms-Exch-PF-Contacts,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-PF-Contacts
-distinguishedName: CN=ms-Exch-PF-Contacts,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.75
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32824
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PF-Contacts
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-PF-Contacts
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: pFContacts
-name: ms-Exch-PF-Contacts
-schemaIDGUID: f0f8ff98-1191-11d0-a060-00aa006c33ed
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Pf-Creation  
-#
-dn: CN=ms-Exch-Pf-Creation,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Pf-Creation
-distinguishedName: CN=ms-Exch-Pf-Creation,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.100
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Pf-Creation
-adminDescription: ms-Exch-Pf-Creation
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchPfCreation
-name: ms-Exch-Pf-Creation
-schemaIDGUID: ed1161ed-5d1e-4bb3-993f-11956d680ef6
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-PF-Default-Admin-ACL  
-# On the TLH, this is the default set of rights for new Top Level
-# Folders. On the administrative group, this is the set of rights for
-# public folders that are homed on Exchange Server 5.5 that are
-# associated to this administrative group or site.
-#
-dn: CN=ms-Exch-PF-Default-Admin-ACL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-PF-Default-Admin-ACL
-distinguishedName: CN=ms-Exch-PF-Default-Admin-ACL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50035
-attributeSyntax: 2.5.5.15
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PF-Default-Admin-ACL
-adminDescription: ms-Exch-PF-Default-Admin-ACL
-oMSyntax: 66
-searchFlags: 0
-lDAPDisplayName: msExchPFDefaultAdminACL
-name: ms-Exch-PF-Default-Admin-ACL
-schemaIDGUID: 3de926b2-22af-11d3-aa62-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-PF-DS-Container   
-# The DN of the container into which message databases (MDBs) in this
-# domain will create folder objects.
-#
-dn: CN=ms-Exch-PF-DS-Container,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-PF-DS-Container
-distinguishedName: CN=ms-Exch-PF-DS-Container,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11034
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PF-DS-Container
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-PF-DS-Container
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchPFDSContainer
-name: ms-Exch-PF-DS-Container
-schemaIDGUID: 17feae50-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Pf-Root-Url     
-# The URL to a user's public folder root.
-#
-dn: CN=ms-Exch-Pf-Root-Url,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Pf-Root-Url
-distinguishedName: CN=ms-Exch-Pf-Root-Url,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50086
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-mAPIID: 35970
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Pf-Root-Url
-adminDescription: ms-Exch-Pf-Root-Url
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchPfRootUrl
-name: ms-Exch-Pf-Root-Url
-schemaIDGUID: 3f50d651-bc97-47b3-aadc-c836d7fec446
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-PF-Tree-Type   
-#
-dn: CN=ms-Exch-PF-Tree-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-PF-Tree-Type
-distinguishedName: CN=ms-Exch-PF-Tree-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11035
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PF-Tree-Type
-adminDescription: ms-Exch-PF-Tree-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchPFTreeType
-name: ms-Exch-PF-Tree-Type
-schemaIDGUID: 1830bfb2-b098-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policies-Excluded   
-#
-dn: CN=ms-Exch-Policies-Excluded,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policies-Excluded
-distinguishedName: CN=ms-Exch-Policies-Excluded,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50051
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policies-Excluded
-adminDescription: ms-Exch-Policies-Excluded
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchPoliciesExcluded
-name: ms-Exch-Policies-Excluded
-schemaIDGUID: 61c47258-454e-11d3-aa72-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policies-Included   
-#
-dn: CN=ms-Exch-Policies-Included,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policies-Included
-distinguishedName: CN=ms-Exch-Policies-Included,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50050
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policies-Included
-adminDescription: ms-Exch-Policies-Included
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchPoliciesIncluded
-name: ms-Exch-Policies-Included
-schemaIDGUID: 61c47253-454e-11d3-aa72-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-Default      
-#
-dn: CN=ms-Exch-Policy-Default,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Default
-distinguishedName: CN=ms-Exch-Policy-Default,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50007
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Default
-adminDescription: ms-Exch-Policy-Default
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchPolicyDefault
-name: ms-Exch-Policy-Default
-schemaIDGUID: 1865336e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-Enabled      
-# Specifies whether or not policies should be applied to this recipient.
-#
-dn: CN=ms-Exch-Policy-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Enabled
-distinguishedName: CN=ms-Exch-Policy-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50030
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Enabled
-adminDescription: ms-Exch-Policy-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchPolicyEnabled
-name: ms-Exch-Policy-Enabled
-schemaIDGUID: e32977dc-1d31-11d3-aa5e-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-Last-Applied-Time  
-# The time/date that this policy was applied.
-#
-dn: CN=ms-Exch-Policy-Last-Applied-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Last-Applied-Time
-distinguishedName: CN=ms-Exch-Policy-Last-Applied-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50023
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Last-Applied-Time
-adminDescription: ms-Exch-Policy-Last-Applied-Time
-oMSyntax: 24
-searchFlags: 0
-lDAPDisplayName: msExchPolicyLastAppliedTime
-name: ms-Exch-Policy-Last-Applied-Time
-schemaIDGUID: 92407f6c-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-List  
-# The list of policies a leaf object uses.
-#
-dn: CN=ms-Exch-Policy-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-List
-distinguishedName: CN=ms-Exch-Policy-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50004
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1012
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-List
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Policy-List
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchPolicyList
-name: ms-Exch-Policy-List
-schemaIDGUID: 18cbb88c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-List-BL   
-# A backlink to objects that use this policy.
-#
-dn: CN=ms-Exch-Policy-List-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-List-BL
-distinguishedName: CN=ms-Exch-Policy-List-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50005
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1013
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-List-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Policy-List-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchPolicyListBL
-name: ms-Exch-Policy-List-BL
-schemaIDGUID: 19028ea2-b098-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-LockDown   
-# If this is set, this policy cannot be removed from the object this
-# policy applies to.
-#
-dn: CN=ms-Exch-Policy-LockDown,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-LockDown
-distinguishedName: CN=ms-Exch-Policy-LockDown,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50008
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-LockDown
-adminDescription: ms-Exch-Policy-LockDown
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchPolicyLockDown
-name: ms-Exch-Policy-LockDown
-schemaIDGUID: 1934a004-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-Option-List  
-# The list that defines the set of property pages that are exposed on
-# this policy. Every property page (that will be policied) will be
-# assigned a GUID to uniquely identify it in this list.
-#
-dn: CN=ms-Exch-Policy-Option-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Option-List
-distinguishedName: CN=ms-Exch-Policy-Option-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50006
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Option-List
-adminDescription: ms-Exch-Policy-Option-List
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchPolicyOptionList
-name: ms-Exch-Policy-Option-List
-schemaIDGUID: 1966b166-b098-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Policy-Order  
-# The order in which policies will be evaluated.
-#
-dn: CN=ms-Exch-Policy-Order,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Order
-distinguishedName: CN=ms-Exch-Policy-Order,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50027
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Order
-adminDescription: ms-Exch-Policy-Order
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchPolicyOrder
-name: ms-Exch-Policy-Order
-schemaIDGUID: e32977b1-1d31-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Policy-Roots  
-# The list of distinguished names (DNs) of containers where policy
-# objects reside that the AL service will process.
-#
-dn: CN=ms-Exch-Policy-Roots,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Policy-Roots
-distinguishedName: CN=ms-Exch-Policy-Roots,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50028
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policy-Roots
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Policy-Roots
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchPolicyRoots
-name: ms-Exch-Policy-Roots
-schemaIDGUID: e36ef110-1d40-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Poll-Interval        
-# The polling interval between scheduled runs if "Always" is selected.
-#
-dn: CN=ms-Exch-Poll-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Poll-Interval
-distinguishedName: CN=ms-Exch-Poll-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.58
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Poll-Interval
-adminDescription: ms-Exch-Poll-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchPollInterval
-name: ms-Exch-Poll-Interval
-schemaIDGUID: 1998c2c8-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-POP-Character-Set    
-#
-dn: CN=ms-Exch-POP-Character-Set,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-POP-Character-Set
-distinguishedName: CN=ms-Exch-POP-Character-Set,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.468
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 33145
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-POP-Character-Set
-adminDescription: ms-Exch-POP-Character-Set
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: pOPCharacterSet
-name: ms-Exch-POP-Character-Set
-schemaIDGUID: bf9679f8-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-POP-Content-Format   
-#
-dn: CN=ms-Exch-POP-Content-Format,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-POP-Content-Format
-distinguishedName: CN=ms-Exch-POP-Content-Format,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.466
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 33143
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-POP-Content-Format
-adminDescription: ms-Exch-POP-Content-Format
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: pOPContentFormat
-name: ms-Exch-POP-Content-Format
-schemaIDGUID: bf9679f9-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Port-Number         
-#
-dn: CN=ms-Exch-Port-Number,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Port-Number
-distinguishedName: CN=ms-Exch-Port-Number,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.527
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-mAPIID: 33205
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Port-Number
-adminDescription: ms-Exch-Port-Number
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: portNumber
-name: ms-Exch-Port-Number
-schemaIDGUID: a8df744a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Preferred-Backfill-Source    
-#
-dn: CN=ms-Exch-Preferred-Backfill-Source,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Preferred-Backfill-Source
-distinguishedName: CN=ms-Exch-Preferred-Backfill-Source,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11094
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Preferred-Backfill-Source
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Preferred-Backfill-Source
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchPreferredBackfillSource
-name: ms-Exch-Preferred-Backfill-Source
-schemaIDGUID: 5e03e654-d85d-4908-83a1-6141048c5c62
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Preserve-Internet-Content    
-#
-dn: CN=ms-Exch-Preserve-Internet-Content,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Preserve-Internet-Content
-distinguishedName: CN=ms-Exch-Preserve-Internet-Content,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.556
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35874
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Preserve-Internet-Content
-adminDescription: ms-Exch-Preserve-Internet-Content
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: preserveInternetContent
-name: ms-Exch-Preserve-Internet-Content
-schemaIDGUID: a8df744c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Previous-Account-Sid         
-#
-dn: CN=ms-Exch-Previous-Account-Sid,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Previous-Account-Sid
-distinguishedName: CN=ms-Exch-Previous-Account-Sid,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.93
-attributeSyntax: 2.5.5.17
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 28
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Previous-Account-Sid
-adminDescription: ms-Exch-Previous-Account-Sid
-oMSyntax: 4
-searchFlags: 9
-lDAPDisplayName: msExchPreviousAccountSid
-name: ms-Exch-Previous-Account-Sid
-schemaIDGUID: 9f7f4160-8942-4e87-a3fd-165b7711e433
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Prev-Export-DLs              
-# A flag indicating whether DL names are propagated to foreign systems
-# via directory synchronization.
-#
-dn: CN=ms-Exch-Prev-Export-DLs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Prev-Export-DLs
-distinguishedName: CN=ms-Exch-Prev-Export-DLs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1002
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Prev-Export-DLs
-adminDescription: ms-Exch-Prev-Export-DLs
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchPrevExportDLs
-name: ms-Exch-Prev-Export-DLs
-schemaIDGUID: 48464774-30ca-11d3-aa6d-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-PRMD   
-#
-dn: CN=ms-Exch-PRMD,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-PRMD
-distinguishedName: CN=ms-Exch-PRMD,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.224
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 33038
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-PRMD
-adminDescription: ms-Exch-PRMD
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: pRMD
-name: ms-Exch-PRMD
-schemaIDGUID: a8df744d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Processed-Sids   
-# A list of security identifiers (SIDs) that have already been
-# processed.
-#
-dn: CN=ms-Exch-Processed-Sids,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Processed-Sids
-distinguishedName: CN=ms-Exch-Processed-Sids,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.89
-attributeSyntax: 2.5.5.17
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Processed-Sids
-adminDescription: ms-Exch-Processed-Sids
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchProcessedSids
-name: ms-Exch-Processed-Sids
-schemaIDGUID: 5ab6a4b0-7d6c-4e84-848e-10d52b1eb735
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Promo-Expiration    
-#
-dn: CN=ms-Exch-Promo-Expiration,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Promo-Expiration
-distinguishedName: CN=ms-Exch-Promo-Expiration,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.540
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 33218
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Promo-Expiration
-adminDescription: ms-Exch-Promo-Expiration
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: promoExpiration
-name: ms-Exch-Promo-Expiration
-schemaIDGUID: 1677585d-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Settings   
-# Exchange Internet protocol settings.
-#
-dn: CN=ms-Exch-Protocol-Settings,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Protocol-Settings
-distinguishedName: CN=ms-Exch-Protocol-Settings,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.528
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 0
-rangeUpper: 256
-mAPIID: 33206
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Settings
-adminDescription: ms-Exch-Protocol-Settings
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: protocolSettings
-name: ms-Exch-Protocol-Settings
-schemaIDGUID: 1677585e-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Proxy-Custom-Proxy   
-#
-dn: CN=ms-Exch-Proxy-Custom-Proxy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Proxy-Custom-Proxy
-distinguishedName: CN=ms-Exch-Proxy-Custom-Proxy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50048
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Proxy-Custom-Proxy
-adminDescription: ms-Exch-Proxy-Custom-Proxy
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchProxyCustomProxy
-name: ms-Exch-Proxy-Custom-Proxy
-schemaIDGUID: 47bc3aa6-3634-11d3-aa6e-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Proxy-Generator-DLL  
-#
-dn: CN=ms-Exch-Proxy-Generator-DLL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Proxy-Generator-DLL
-distinguishedName: CN=ms-Exch-Proxy-Generator-DLL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.328
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 255
-mAPIID: 33039
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Proxy-Generator-DLL
-adminDescription: ms-Exch-Proxy-Generator-DLL
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: proxyGeneratorDLL
-name: ms-Exch-Proxy-Generator-DLL
-schemaIDGUID: a8df744e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Proxy-Gen-Server     
-# The time/date that this policy was applied.
-#
-dn: CN=ms-Exch-Proxy-Gen-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Proxy-Gen-Server
-distinguishedName: CN=ms-Exch-Proxy-Gen-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50013
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Proxy-Gen-Server
-adminDescription: ms-Exch-Proxy-Gen-Server
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchProxyGenServer
-name: ms-Exch-Proxy-Gen-Server
-schemaIDGUID: 1a2a323a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Proxy-Name   
-# The data conference proxy name.
-#
-dn: CN=ms-Exch-Proxy-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Proxy-Name
-distinguishedName: CN=ms-Exch-Proxy-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9018
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Proxy-Name
-adminDescription: ms-Exch-Proxy-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchProxyName
-name: ms-Exch-Proxy-Name
-schemaIDGUID: 1a610850-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Public-Delegates     
-# The DN of other mailboxes that can send on behalf of this mailbox.
-#
-dn: CN=ms-Exch-Public-Delegates,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Public-Delegates
-distinguishedName: CN=ms-Exch-Public-Delegates,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.238
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 32789
-linkID: 14
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-Delegates
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Public-Delegates
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: publicDelegates
-name: ms-Exch-Public-Delegates
-schemaIDGUID: f0f8ff9a-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: 77b5b886-944a-11d1-aebd-0000f80367c1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Public-Delegates-BL  
-#
-dn: CN=ms-Exch-Public-Delegates-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Public-Delegates-BL
-distinguishedName: CN=ms-Exch-Public-Delegates-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.295
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33040
-linkID: 15
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-Delegates-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Public-Delegates-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: publicDelegatesBL
-name: ms-Exch-Public-Delegates-BL
-schemaIDGUID: bf967a08-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Purported-Search-UI  
-# Stores the UI settings that set the purported search attribute.
-#
-dn: CN=ms-Exch-Purported-Search-UI,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Purported-Search-UI
-distinguishedName: CN=ms-Exch-Purported-Search-UI,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.66
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Purported-Search-UI
-adminDescription: ms-Exch-Purported-Search-UI
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchPurportedSearchUI
-name: ms-Exch-Purported-Search-UI
-schemaIDGUID: 1d86e324-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-P-Selector   
-#
-dn: CN=ms-Exch-P-Selector,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-P-Selector
-distinguishedName: CN=ms-Exch-P-Selector,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.285
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 33030
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-P-Selector
-adminDescription: ms-Exch-P-Selector
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: pSelector
-name: ms-Exch-P-Selector
-schemaIDGUID: a8df7448-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-P-Selector-Inbound    
-#
-dn: CN=ms-Exch-P-Selector-Inbound,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-P-Selector-Inbound
-distinguishedName: CN=ms-Exch-P-Selector-Inbound,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.52
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 33031
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-P-Selector-Inbound
-adminDescription: ms-Exch-P-Selector-Inbound
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: pSelectorInbound
-name: ms-Exch-P-Selector-Inbound
-schemaIDGUID: a8df7449-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Query-Base-DN                 
-# Defines the scope for client queries on address lists.
-#
-dn: CN=ms-Exch-Query-Base-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Query-Base-DN
-distinguishedName: CN=ms-Exch-Query-Base-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15008
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Query-Base-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Query-Base-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchQueryBaseDN
-name: ms-Exch-Query-Base-DN
-schemaIDGUID: 399eb12c-e120-473c-b0f7-97ae7ca4988b
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Queuing-MDB       
-#
-dn: CN=ms-Exch-Queuing-MDB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Queuing-MDB
-distinguishedName: CN=ms-Exch-Queuing-MDB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11054
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Queuing-MDB
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Queuing-MDB
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchQueuingMDB
-name: ms-Exch-Queuing-MDB
-schemaIDGUID: 8afa72da-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Quota-Notification-Schedule 
-#
-dn: CN=ms-Exch-Quota-Notification-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Quota-Notification-Schedule
-distinguishedName: CN=ms-Exch-Quota-Notification-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.98
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 84
-rangeUpper: 84
-mAPIID: 33041
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Quota-Notification-Schedule
-adminDescription: ms-Exch-Quota-Notification-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: quotaNotificationSchedule
-name: ms-Exch-Quota-Notification-Schedule
-schemaIDGUID: a8df744f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Quota-Notification-Style    
-#
-dn: CN=ms-Exch-Quota-Notification-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Quota-Notification-Style
-distinguishedName: CN=ms-Exch-Quota-Notification-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.388
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33042
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Quota-Notification-Style
-adminDescription: ms-Exch-Quota-Notification-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: quotaNotificationStyle
-name: ms-Exch-Quota-Notification-Style
-schemaIDGUID: a8df7450-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RAS-Callback-Number        
-#
-dn: CN=ms-Exch-RAS-Callback-Number,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RAS-Callback-Number
-distinguishedName: CN=ms-Exch-RAS-Callback-Number,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.315
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 48
-mAPIID: 33045
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-Callback-Number
-adminDescription: ms-Exch-RAS-Callback-Number
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: rASCallbackNumber
-name: ms-Exch-RAS-Callback-Number
-schemaIDGUID: a8df7452-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RAS-Phonebook-Entry-Name    
-#
-dn: CN=ms-Exch-RAS-Phonebook-Entry-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RAS-Phonebook-Entry-Name
-distinguishedName: CN=ms-Exch-RAS-Phonebook-Entry-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.313
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 33047
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-Phonebook-Entry-Name
-adminDescription: ms-Exch-RAS-Phonebook-Entry-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: rASPhonebookEntryName
-name: ms-Exch-RAS-Phonebook-Entry-Name
-schemaIDGUID: a8df7455-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RAS-Phone-Number           
-#
-dn: CN=ms-Exch-RAS-Phone-Number,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RAS-Phone-Number
-distinguishedName: CN=ms-Exch-RAS-Phone-Number,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.314
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33046
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-Phone-Number
-adminDescription: ms-Exch-RAS-Phone-Number
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: rASPhoneNumber
-name: ms-Exch-RAS-Phone-Number
-schemaIDGUID: a8df7454-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RAS-Remote-SRVR-Name       
-#
-dn: CN=ms-Exch-RAS-Remote-SRVR-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RAS-Remote-SRVR-Name
-distinguishedName: CN=ms-Exch-RAS-Remote-SRVR-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.78
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 15
-mAPIID: 33048
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RAS-Remote-SRVR-Name
-adminDescription: ms-Exch-RAS-Remote-SRVR-Name
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: rASRemoteSRVRName
-name: ms-Exch-RAS-Remote-SRVR-Name
-schemaIDGUID: a8df7456-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Recip-Limit                
-# The maximum number of recipients this user may send to, or a global
-# maximum for the organization.
-#
-dn: CN=ms-Exch-Recip-Limit,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Recip-Limit
-distinguishedName: CN=ms-Exch-Recip-Limit,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12523
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recip-Limit
-adminDescription: ms-Exch-Recip-Limit
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: msExchRecipLimit
-name: ms-Exch-Recip-Limit
-schemaIDGUID: 1dd7f318-b098-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Recip-Turf-List-Names           
-#
-dn: CN=ms-Exch-Recip-Turf-List-Names,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Recip-Turf-List-Names
-distinguishedName: CN=ms-Exch-Recip-Turf-List-Names,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5070
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recip-Turf-List-Names
-adminDescription: ms-Exch-Recip-Turf-List-Names
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchRecipTurfListNames
-name: ms-Exch-Recip-Turf-List-Names
-schemaIDGUID: 2e0a68e1-bdd7-4899-8bb2-d6ea007558c7
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Recip-Turf-List-Options  
-#
-dn: CN=ms-Exch-Recip-Turf-List-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Recip-Turf-List-Options
-distinguishedName: CN=ms-Exch-Recip-Turf-List-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5071
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recip-Turf-List-Options
-adminDescription: ms-Exch-Recip-Turf-List-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchRecipTurfListOptions
-name: ms-Exch-Recip-Turf-List-Options
-schemaIDGUID: 870b36b3-d035-402d-b873-ced07b173763
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Recovery     
-# If recovery is on, log files are generated.
-#
-dn: CN=ms-Exch-Recovery,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Recovery
-distinguishedName: CN=ms-Exch-Recovery,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11046
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recovery
-adminDescription: ms-Exch-Recovery
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchRecovery
-name: ms-Exch-Recovery
-schemaIDGUID: 1e007b12-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Referral-List         
-#
-dn: CN=ms-Exch-Referral-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Referral-List
-distinguishedName: CN=ms-Exch-Referral-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.510
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33187
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Referral-List
-adminDescription: ms-Exch-Referral-List
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: referralList
-name: ms-Exch-Referral-List
-schemaIDGUID: a8df7457-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Remote-Bridge-Head 
-#
-dn: CN=ms-Exch-Remote-Bridge-Head,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Remote-Bridge-Head
-distinguishedName: CN=ms-Exch-Remote-Bridge-Head,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.191
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 33050
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-Bridge-Head
-adminDescription: ms-Exch-Remote-Bridge-Head
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: remoteBridgeHead
-name: ms-Exch-Remote-Bridge-Head
-schemaIDGUID: a8df7458-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Remote-Bridge-Head-Address  
-#
-dn: CN=ms-Exch-Remote-Bridge-Head-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Remote-Bridge-Head-Address
-distinguishedName: CN=ms-Exch-Remote-Bridge-Head-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.94
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 1118
-mAPIID: 33051
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-Bridge-Head-Address
-adminDescription: ms-Exch-Remote-Bridge-Head-Address
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: remoteBridgeHeadAddress
-name: ms-Exch-Remote-Bridge-Head-Address
-schemaIDGUID: a8df7459-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Remote-Private-IS-List      
-# A flat delimited set of distinguished names (DNs) of remote Exchange
-# private stores. Used to set home-mdb on user objects.
-#
-dn: CN=ms-Exch-Remote-Private-IS-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Remote-Private-IS-List
-distinguishedName: CN=ms-Exch-Remote-Private-IS-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.46
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-Private-IS-List
-adminDescription: ms-Exch-Remote-Private-IS-List
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchRemotePrivateISList
-name: ms-Exch-Remote-Private-IS-List
-schemaIDGUID: 1e29030c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Remote-Server-List  
-# A flat delimited set of distinguished names (DNs) of remote Exchange
-# servers. Used to set home-mta on DL objects.
-#
-dn: CN=ms-Exch-Remote-Server-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Remote-Server-List
-distinguishedName: CN=ms-Exch-Remote-Server-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.45
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-Server-List
-adminDescription: ms-Exch-Remote-Server-List
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchRemoteServerList
-name: ms-Exch-Remote-Server-List
-schemaIDGUID: 1e58b214-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Remote-Site        
-#
-dn: CN=ms-Exch-Remote-Site,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Remote-Site
-distinguishedName: CN=ms-Exch-Remote-Site,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.27
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33053
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-Site
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Remote-Site
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: remoteSite
-name: ms-Exch-Remote-Site
-schemaIDGUID: a8df745b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Replicated-Object-Version    
-#
-dn: CN=ms-Exch-Replicated-Object-Version,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replicated-Object-Version
-distinguishedName: CN=ms-Exch-Replicated-Object-Version,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.604
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 35938
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replicated-Object-Version
-adminDescription: ms-Exch-Replicated-Object-Version
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: replicatedObjectVersion
-name: ms-Exch-Replicated-Object-Version
-schemaIDGUID: 1677586c-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Replicate-Now              
-# A flag that notifies the service to replicate this connection
-# agreement immediately.
-#
-dn: CN=ms-Exch-Replicate-Now,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replicate-Now
-distinguishedName: CN=ms-Exch-Replicate-Now,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.53
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replicate-Now
-adminDescription: ms-Exch-Replicate-Now
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchReplicateNow
-name: ms-Exch-Replicate-Now
-schemaIDGUID: 1eac2462-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Replication-Mail-Msg-Size
-#
-dn: CN=ms-Exch-Replication-Mail-Msg-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Mail-Msg-Size
-distinguishedName: CN=ms-Exch-Replication-Mail-Msg-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.103
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33128
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Mail-Msg-Size
-adminDescription: ms-Exch-Replication-Mail-Msg-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: replicationMailMsgSize
-name: ms-Exch-Replication-Mail-Msg-Size
-schemaIDGUID: a8df745c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Replication-Msg-Size 
-# The replication message size limit.
-dn: CN=ms-Exch-Replication-Msg-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Msg-Size
-distinguishedName: CN=ms-Exch-Replication-Msg-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11047
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Msg-Size
-adminDescription: ms-Exch-Replication-Msg-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchReplicationMsgSize
-name: ms-Exch-Replication-Msg-Size
-schemaIDGUID: 1ed70eb6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Replication-Schedule 
-# The schedule of when to replicate public folder changes.
-#
-dn: CN=ms-Exch-Replication-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Schedule
-distinguishedName: CN=ms-Exch-Replication-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11048
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Schedule
-adminDescription: ms-Exch-Replication-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchReplicationSchedule
-name: ms-Exch-Replication-Schedule
-schemaIDGUID: 1f01f90a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Replication-Sensitivity      
-# Used by Exchange on legacy Exchange Server 5.5 connectors to govern
-# their use by replication.
-#
-dn: CN=ms-Exch-Replication-Sensitivity,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Sensitivity
-distinguishedName: CN=ms-Exch-Replication-Sensitivity,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.223
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 100
-mAPIID: 33054
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Sensitivity
-adminDescription: ms-Exch-Replication-Sensitivity
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: replicationSensitivity
-name: ms-Exch-Replication-Sensitivity
-schemaIDGUID: bf967a1b-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Replication-Signature           
-# Signature used for replication purposes by the Active Directory Connector.
-# 
-dn: CN=ms-Exch-Replication-Signature,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Signature
-distinguishedName: CN=ms-Exch-Replication-Signature,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.52
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Signature
-adminDescription: ms-Exch-Replication-Signature
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: replicationSignature
-name: ms-Exch-Replication-Signature
-schemaIDGUID: 9909d92a-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Replication-Stagger  
-#
-dn: CN=ms-Exch-Replication-Stagger,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Stagger
-distinguishedName: CN=ms-Exch-Replication-Stagger,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.349
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33055
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Stagger
-adminDescription: ms-Exch-Replication-Stagger
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: replicationStagger
-name: ms-Exch-Replication-Stagger
-schemaIDGUID: a8df745d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Replication-Style    
-# The style for replicating public folder changes, such as Always or Never.
-#
-dn: CN=ms-Exch-Replication-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Replication-Style
-distinguishedName: CN=ms-Exch-Replication-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11049
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Style
-adminDescription: ms-Exch-Replication-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchReplicationStyle
-name: ms-Exch-Replication-Style
-schemaIDGUID: 1f2ce35e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Report-To-Originator 
-#
-dn: CN=ms-Exch-Report-To-Originator,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Report-To-Originator
-distinguishedName: CN=ms-Exch-Report-To-Originator,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.206
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33056
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Report-To-Originator
-adminDescription: ms-Exch-Report-To-Originator
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: reportToOriginator
-name: ms-Exch-Report-To-Originator
-schemaIDGUID: a8df745e-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Report-To-Owner      
-# Governs whether or not read receipts and delivery receipts will be sent to the sender of messages sent to this DL.
-#
-dn: CN=ms-Exch-Report-To-Owner,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Report-To-Owner
-distinguishedName: CN=ms-Exch-Report-To-Owner,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.207
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33057
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Report-To-Owner
-adminDescription: ms-Exch-Report-To-Owner
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: reportToOwner
-name: ms-Exch-Report-To-Owner
-schemaIDGUID: a8df745f-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-RequireAuthToSendTo   
-#
-dn: CN=ms-Exch-RequireAuthToSendTo,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RequireAuthToSendTo
-distinguishedName: CN=ms-Exch-RequireAuthToSendTo,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.5062
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RequireAuthToSendTo
-adminDescription: ms-Exch-RequireAuthToSendTo
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchRequireAuthToSendTo
-name: ms-Exch-RequireAuthToSendTo
-schemaIDGUID: f533eb3b-f75b-4fb3-b2fb-08cd537a84d1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Require-SSL           
-#
-dn: CN=ms-Exch-Require-SSL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Require-SSL
-distinguishedName: CN=ms-Exch-Require-SSL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.560
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35877
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Require-SSL
-adminDescription: ms-Exch-Require-SSL
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: requireSSL
-name: ms-Exch-Require-SSL
-schemaIDGUID: a8df7461-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Req-Seq               
-#
-dn: CN=ms-Exch-Req-Seq,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Req-Seq
-distinguishedName: CN=ms-Exch-Req-Seq,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.173
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33058
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Req-Seq
-adminDescription: ms-Exch-Req-Seq
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: reqSeq
-name: ms-Exch-Req-Seq
-schemaIDGUID: a8df7460-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Resolve-P2            
-#
-dn: CN=ms-Exch-Resolve-P2,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Resolve-P2
-distinguishedName: CN=ms-Exch-Resolve-P2,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12538
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Resolve-P2
-adminDescription: ms-Exch-Resolve-P2
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchResolveP2
-name: ms-Exch-Resolve-P2
-schemaIDGUID: e24d7aa1-439d-11d3-aa72-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Resource-GUID                 
-# The CTP GUID.
-#
-dn: CN=ms-Exch-Resource-GUID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Resource-GUID
-distinguishedName: CN=ms-Exch-Resource-GUID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9001
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Resource-GUID
-adminDescription: ms-Exch-Resource-GUID
-oMSyntax: 64
-searchFlags: 17
-lDAPDisplayName: msExchResourceGUID
-name: ms-Exch-Resource-GUID
-schemaIDGUID: 1f57cdb2-b098-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Resource-Properties  
-# Resource values specific to the CTP.
-#
-dn: CN=ms-Exch-Resource-Properties,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Resource-Properties
-distinguishedName: CN=ms-Exch-Resource-Properties,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9025
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Resource-Properties
-adminDescription: ms-Exch-Resource-Properties
-oMSyntax: 64
-searchFlags: 16
-lDAPDisplayName: msExchResourceProperties
-name: ms-Exch-Resource-Properties
-schemaIDGUID: 912beea4-b09e-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Responsible-Local-DXA        
-#
-dn: CN=ms-Exch-Responsible-Local-DXA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Responsible-Local-DXA
-distinguishedName: CN=ms-Exch-Responsible-Local-DXA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.298
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33059
-linkID: 122
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Responsible-Local-DXA
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Responsible-Local-DXA
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: responsibleLocalDXA
-name: ms-Exch-Responsible-Local-DXA
-schemaIDGUID: a8df7462-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Responsible-MTA-Server    
-#
-dn: CN=ms-Exch-Responsible-MTA-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Responsible-MTA-Server
-distinguishedName: CN=ms-Exch-Responsible-MTA-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50033
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1030
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Responsible-MTA-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Responsible-MTA-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchResponsibleMTAServer
-name: ms-Exch-Responsible-MTA-Server
-schemaIDGUID: 9ff15c37-1ec9-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Responsible-MTA-Server-BL     
-#
-dn: CN=ms-Exch-Responsible-MTA-Server-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Responsible-MTA-Server-BL
-distinguishedName: CN=ms-Exch-Responsible-MTA-Server-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50034
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1031
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Responsible-MTA-Server-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Responsible-MTA-Server-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchResponsibleMTAServerBL
-name: ms-Exch-Responsible-MTA-Server-BL
-schemaIDGUID: 9ff15c3c-1ec9-11d3-aa5e-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Restore        
-#
-dn: CN=ms-Exch-Restore,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Restore
-distinguishedName: CN=ms-Exch-Restore,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11092
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Restore
-adminDescription: ms-Exch-Restore
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchRestore
-name: ms-Exch-Restore
-schemaIDGUID: a1edcb4c-5c45-4d4a-b128-880392e9dcc6
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Return-Exact-Msg-Size           
-#
-dn: CN=ms-Exch-Return-Exact-Msg-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Return-Exact-Msg-Size
-distinguishedName: CN=ms-Exch-Return-Exact-Msg-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.594
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35922
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Return-Exact-Msg-Size
-adminDescription: ms-Exch-Return-Exact-Msg-Size
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: returnExactMsgSize
-name: ms-Exch-Return-Exact-Msg-Size
-schemaIDGUID: a8df7463-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Rid-Server  
-# A pointer to the server that maintains the Gateway Address
-# Resolution Table (GWART) for this site or administrative group.
-#
-dn: CN=ms-Exch-Rid-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Rid-Server
-distinguishedName: CN=ms-Exch-Rid-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.346
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33060
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Rid-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Rid-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: ridServer
-name: ms-Exch-Rid-Server
-schemaIDGUID: a8df7464-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Role-Includes               
-# The set of other roles that this role includes.
-#
-dn: CN=ms-Exch-Role-Includes,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Role-Includes
-distinguishedName: CN=ms-Exch-Role-Includes,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50020
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Role-Includes
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Role-Includes
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchRoleIncludes
-name: ms-Exch-Role-Includes
-schemaIDGUID: 1f8055ac-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Role-Localized-Names 
-# The OAB that this mailbox store or this user uses.
-#
-dn: CN=ms-Exch-Role-Localized-Names,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Role-Localized-Names
-distinguishedName: CN=ms-Exch-Role-Localized-Names,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50021
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Role-Localized-Names
-adminDescription: ms-Exch-Role-Localized-Names
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchRoleLocalizedNames
-name: ms-Exch-Role-Localized-Names
-schemaIDGUID: 1fa8dda6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Role-Rights  
-# The set of rights, per objectClass, that this role includes.
-#
-dn: CN=ms-Exch-Role-Rights,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Role-Rights
-distinguishedName: CN=ms-Exch-Role-Rights,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50018
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Role-Rights
-adminDescription: ms-Exch-Role-Rights
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchRoleRights
-name: ms-Exch-Role-Rights
-schemaIDGUID: 1fd165a0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Root-Newsgroups-Folder-ID   
-#
-dn: CN=ms-Exch-Root-Newsgroups-Folder-ID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Root-Newsgroups-Folder-ID
-distinguishedName: CN=ms-Exch-Root-Newsgroups-Folder-ID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.524
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33202
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Root-Newsgroups-Folder-ID
-adminDescription: ms-Exch-Root-Newsgroups-Folder-ID
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: rootNewsgroupsFolderID
-name: ms-Exch-Root-Newsgroups-Folder-ID
-schemaIDGUID: a8df7466-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Accept-Message-Type 
-#
-dn: CN=ms-Exch-Routing-Accept-Message-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Accept-Message-Type
-distinguishedName: CN=ms-Exch-Routing-Accept-Message-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12517
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Accept-Message-Type
-adminDescription: ms-Exch-Routing-Accept-Message-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchRoutingAcceptMessageType
-name: ms-Exch-Routing-Accept-Message-Type
-schemaIDGUID: 881759de-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Disallow-Priority   
-#
-dn: CN=ms-Exch-Routing-Disallow-Priority,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Disallow-Priority
-distinguishedName: CN=ms-Exch-Routing-Disallow-Priority,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12529
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Disallow-Priority
-adminDescription: ms-Exch-Routing-Disallow-Priority
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchRoutingDisallowPriority
-name: ms-Exch-Routing-Disallow-Priority
-schemaIDGUID: 909a7f32-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Routing-Display-Sender-Enabled  
-#
-dn: CN=ms-Exch-Routing-Display-Sender-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Display-Sender-Enabled
-distinguishedName: CN=ms-Exch-Routing-Display-Sender-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12519
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Display-Sender-Enabled
-adminDescription: ms-Exch-Routing-Display-Sender-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchRoutingDisplaySenderEnabled
-name: ms-Exch-Routing-Display-Sender-Enabled
-schemaIDGUID: 88dadab2-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Enabled      
-# This flag enables or disables the routing for the entire
-# organization.
-#
-dn: CN=ms-Exch-Routing-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Enabled
-distinguishedName: CN=ms-Exch-Routing-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12528
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Enabled
-adminDescription: ms-Exch-Routing-Enabled
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchRoutingEnabled
-name: ms-Exch-Routing-Enabled
-schemaIDGUID: 89f1cdd4-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Routing-ETRN-Domains   
-# Contains the list of domain names (such as example.com) for which an
-# ETRN command should be issued.
-#
-dn: CN=ms-Exch-Routing-ETRN-Domains,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-ETRN-Domains
-distinguishedName: CN=ms-Exch-Routing-ETRN-Domains,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12530
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-ETRN-Domains
-adminDescription: ms-Exch-Routing-ETRN-Domains
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchRoutingETRNDomains
-name: ms-Exch-Routing-ETRN-Domains
-schemaIDGUID: 62a383c0-2d9d-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Group-Members-BL 
-#
-dn: CN=ms-Exch-Routing-Group-Members-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Group-Members-BL
-distinguishedName: CN=ms-Exch-Routing-Group-Members-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12540
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1051
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Group-Members-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Routing-Group-Members-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchRoutingGroupMembersBL
-name: ms-Exch-Routing-Group-Members-BL
-schemaIDGUID: fa9635c0-4acb-47de-ad00-1880b590481b
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Group-Members-DN 
-# Pointers to virtual servers of servers in a Exchange Routing Group.
-#
-dn: CN=ms-Exch-Routing-Group-Members-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Group-Members-DN
-distinguishedName: CN=ms-Exch-Routing-Group-Members-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12506
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1000
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Group-Members-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Routing-Group-Members-DN
-oMSyntax: 127
-searchFlags: 1
-lDAPDisplayName: msExchRoutingGroupMembersDN
-name: ms-Exch-Routing-Group-Members-DN
-schemaIDGUID: 1ff9ed9a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-List 
-# The address space of addresses allowed to be used on the connector.
-#
-dn: CN=ms-Exch-Routing-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-List
-distinguishedName: CN=ms-Exch-Routing-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.354
-attributeSyntax: 2.5.5.4
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 2243
-mAPIID: 33062
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-List
-adminDescription: ms-Exch-Routing-List
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: routingList
-name: ms-Exch-Routing-List
-schemaIDGUID: a8df7467-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Master-DN    
-# A pointer to the virtual server of the master of the Exchange
-# Routing Group.
-#
-dn: CN=ms-Exch-Routing-Master-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Master-DN
-distinguishedName: CN=ms-Exch-Routing-Master-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12505
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Master-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Routing-Master-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchRoutingMasterDN
-name: ms-Exch-Routing-Master-DN
-schemaIDGUID: 2024d7ee-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Routing-Oversized-Schedule  
-#
-dn: CN=ms-Exch-Routing-Oversized-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Oversized-Schedule
-distinguishedName: CN=ms-Exch-Routing-Oversized-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12520
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Oversized-Schedule
-adminDescription: ms-Exch-Routing-Oversized-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchRoutingOversizedSchedule
-name: ms-Exch-Routing-Oversized-Schedule
-schemaIDGUID: 88f51490-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Routing-Oversized-Style     
-#
-dn: CN=ms-Exch-Routing-Oversized-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Oversized-Style
-distinguishedName: CN=ms-Exch-Routing-Oversized-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12521
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Oversized-Style
-adminDescription: ms-Exch-Routing-Oversized-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchRoutingOversizedStyle
-name: ms-Exch-Routing-Oversized-Style
-schemaIDGUID: 89141322-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Routing-Triggered-Schedule  
-#
-dn: CN=ms-Exch-Routing-Triggered-Schedule,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Triggered-Schedule
-distinguishedName: CN=ms-Exch-Routing-Triggered-Schedule,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12526
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Triggered-Schedule
-adminDescription: ms-Exch-Routing-Triggered-Schedule
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchRoutingTriggeredSchedule
-name: ms-Exch-Routing-Triggered-Schedule
-schemaIDGUID: 892e4d00-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Routing-Triggered-Style     
-#
-dn: CN=ms-Exch-Routing-Triggered-Style,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Routing-Triggered-Style
-distinguishedName: CN=ms-Exch-Routing-Triggered-Style,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12525
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Triggered-Style
-adminDescription: ms-Exch-Routing-Triggered-Style
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchRoutingTriggeredStyle
-name: ms-Exch-Routing-Triggered-Style
-schemaIDGUID: 894ae938-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-RTS-Checkpoint-Size        
-#
-dn: CN=ms-Exch-RTS-Checkpoint-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RTS-Checkpoint-Size
-distinguishedName: CN=ms-Exch-RTS-Checkpoint-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.152
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 100
-mAPIID: 33063
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RTS-Checkpoint-Size
-adminDescription: ms-Exch-RTS-Checkpoint-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: rTSCheckpointSize
-name: ms-Exch-RTS-Checkpoint-Size
-schemaIDGUID: a8df7468-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-RTS-Recovery-Timeout       
-#
-dn: CN=ms-Exch-RTS-Recovery-Timeout,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RTS-Recovery-Timeout
-distinguishedName: CN=ms-Exch-RTS-Recovery-Timeout,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.151
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33064
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RTS-Recovery-Timeout
-adminDescription: ms-Exch-RTS-Recovery-Timeout
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: rTSRecoveryTimeout
-name: ms-Exch-RTS-Recovery-Timeout
-schemaIDGUID: a8df7469-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-RTS-Window-Size            
-#
-dn: CN=ms-Exch-RTS-Window-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-RTS-Window-Size
-distinguishedName: CN=ms-Exch-RTS-Window-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.153
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 10
-mAPIID: 33065
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-RTS-Window-Size
-adminDescription: ms-Exch-RTS-Window-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: rTSWindowSize
-name: ms-Exch-RTS-Window-Size
-schemaIDGUID: a8df746a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Runs-On                    
-#
-dn: CN=ms-Exch-Runs-On,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Runs-On
-distinguishedName: CN=ms-Exch-Runs-On,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.185
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33066
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Runs-On
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Runs-On
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: runsOn
-name: ms-Exch-Runs-On
-schemaIDGUID: a8df746b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Sasl-Logon-Domain          
-# The logon domain used for SASL.
-dn: CN=ms-Exch-Sasl-Logon-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Sasl-Logon-Domain
-distinguishedName: CN=ms-Exch-Sasl-Logon-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2008
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Sasl-Logon-Domain
-adminDescription: ms-Exch-Sasl-Logon-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSaslLogonDomain
-name: ms-Exch-Sasl-Logon-Domain
-schemaIDGUID: 209c0d82-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-SASL-Mechanisms      
-#
-dn: CN=ms-Exch-SASL-Mechanisms,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SASL-Mechanisms
-distinguishedName: CN=ms-Exch-SASL-Mechanisms,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2018
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SASL-Mechanisms
-adminDescription: ms-Exch-SASL-Mechanisms
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSASLMechanisms
-name: ms-Exch-SASL-Mechanisms
-schemaIDGUID: d93571b4-c99a-4cfc-aaba-2d809fd68e79
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Sched-Plus-AG-Only   
-#
-dn: CN=ms-Exch-Sched-Plus-AG-Only,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Sched-Plus-AG-Only
-distinguishedName: CN=ms-Exch-Sched-Plus-AG-Only,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1191
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Sched-Plus-AG-Only
-adminDescription: ms-Exch-Sched-Plus-AG-Only
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSchedPlusAGOnly
-name: ms-Exch-Sched-Plus-AG-Only
-schemaIDGUID: b1fce956-1d44-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Sched-Plus-Full-Update   
-#
-dn: CN=ms-Exch-Sched-Plus-Full-Update,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Sched-Plus-Full-Update
-distinguishedName: CN=ms-Exch-Sched-Plus-Full-Update,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1190
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Sched-Plus-Full-Update
-adminDescription: ms-Exch-Sched-Plus-Full-Update
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSchedPlusFullUpdate
-name: ms-Exch-Sched-Plus-Full-Update
-schemaIDGUID: b1fce950-1d44-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Sched-Plus-Schedist 
-#
-dn: CN=ms-Exch-Sched-Plus-Schedist,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Sched-Plus-Schedist
-distinguishedName: CN=ms-Exch-Sched-Plus-Schedist,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1192
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Sched-Plus-Schedist
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Sched-Plus-Schedist
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchSchedPlusSchedist
-name: ms-Exch-Sched-Plus-Schedist
-schemaIDGUID: b1fce94c-1d44-11d3-aa5e-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Schema-Policy-Consumers  
-# A link to all CAs that use this schema policy.
-#
-dn: CN=ms-Exch-Schema-Policy-Consumers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Schema-Policy-Consumers
-distinguishedName: CN=ms-Exch-Schema-Policy-Consumers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.57
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1007
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Schema-Policy-Consumers
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Schema-Policy-Consumers
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchSchemaPolicyConsumers
-name: ms-Exch-Schema-Policy-Consumers
-schemaIDGUID: 20c6f7d6-b098-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Schema-Version-Adc      
-#
-dn: CN=ms-Exch-Schema-Version-Adc,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Schema-Version-Adc
-distinguishedName: CN=ms-Exch-Schema-Version-Adc,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.98
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 4197
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Schema-Version-Adc
-adminDescription: ms-Exch-Schema-Version-Adc
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSchemaVersionAdc
-name: ms-Exch-Schema-Version-Adc
-schemaIDGUID: 60735c93-c60e-405e-b5ea-cb31f68ad548
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Schema-Version-Pt       
-#
-dn: CN=ms-Exch-Schema-Version-Pt,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Schema-Version-Pt
-distinguishedName: CN=ms-Exch-Schema-Version-Pt,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.97
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 6870
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Schema-Version-Pt
-adminDescription: ms-Exch-Schema-Version-Pt
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSchemaVersionPt
-name: ms-Exch-Schema-Version-Pt
-schemaIDGUID: 5f8198d5-e7c9-4560-b166-08dc7cfc17c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Scope-Mask              
-# Defines the networks that will accept and send client connections.
-#
-dn: CN=ms-Exch-Scope-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Scope-Mask
-distinguishedName: CN=ms-Exch-Scope-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9014
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Scope-Mask
-adminDescription: ms-Exch-Scope-Mask
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchScopeMask
-name: ms-Exch-Scope-Mask
-schemaIDGUID: 20fb6b92-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Search-Base  
-#
-dn: CN=ms-Exch-Search-Base,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Search-Base
-distinguishedName: CN=ms-Exch-Search-Base,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.91
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Search-Base
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Search-Base
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchSearchBase
-name: ms-Exch-Search-Base
-schemaIDGUID: 1884a3fe-efcb-47b0-bbd4-a91ef8cd4cb4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Search-Scope 
-#
-dn: CN=ms-Exch-Search-Scope,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Search-Scope
-distinguishedName: CN=ms-Exch-Search-Scope,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.92
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Search-Scope
-adminDescription: ms-Exch-Search-Scope
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSearchScope
-name: ms-Exch-Search-Scope
-schemaIDGUID: 05ed1e50-31c8-4ed2-b01e-732dbf6dd344
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Secure-Bindings  
-# The IP port binding for non-secure connections.
-#
-dn: CN=ms-Exch-Secure-Bindings,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Secure-Bindings
-distinguishedName: CN=ms-Exch-Secure-Bindings,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2002
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 512
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Secure-Bindings
-adminDescription: ms-Exch-Secure-Bindings
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSecureBindings
-name: ms-Exch-Secure-Bindings
-schemaIDGUID: 216ddc72-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Security-Password    
-# Password for outbound security.
-#
-dn: CN=ms-Exch-Security-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Security-Password
-distinguishedName: CN=ms-Exch-Security-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5052
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Security-Password
-adminDescription: ms-Exch-Security-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchSecurityPassword
-name: ms-Exch-Security-Password
-schemaIDGUID: b8d47e4e-4b78-11d3-aa75-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Security-Policy      
-#
-dn: CN=ms-Exch-Security-Policy,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Security-Policy
-distinguishedName: CN=ms-Exch-Security-Policy,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.589
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 32767
-mAPIID: 35911
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Security-Policy
-adminDescription: ms-Exch-Security-Policy
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: securityPolicy
-name: ms-Exch-Security-Policy
-schemaIDGUID: 1677587b-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Security-Protocol    
-#
-dn: CN=ms-Exch-Security-Protocol,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Security-Protocol
-distinguishedName: CN=ms-Exch-Security-Protocol,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.82
-attributeSyntax: 2.5.5.10
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 32823
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Security-Protocol
-adminDescription: ms-Exch-Security-Protocol
-oMSyntax: 4
-searchFlags: 16
-lDAPDisplayName: securityProtocol
-name: ms-Exch-Security-Protocol
-schemaIDGUID: bf967a30-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Send-EMail-Message   
-#
-dn: CN=ms-Exch-Send-EMail-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Send-EMail-Message
-distinguishedName: CN=ms-Exch-Send-EMail-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.566
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35889
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Send-EMail-Message
-adminDescription: ms-Exch-Send-EMail-Message
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: sendEMailMessage
-name: ms-Exch-Send-EMail-Message
-schemaIDGUID: a8df746e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Send-TNEF            
-# Determines whether or not Exchange Rich Text is sent to the domain
-# specified in the domain content configuration object.
-#
-dn: CN=ms-Exch-Send-TNEF,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Send-TNEF
-distinguishedName: CN=ms-Exch-Send-TNEF,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.492
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33169
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Send-TNEF
-adminDescription: ms-Exch-Send-TNEF
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: sendTNEF
-name: ms-Exch-Send-TNEF
-schemaIDGUID: a8df746f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Always-Create-As   
-# How X.500 objects are synchronized to this directory.
-#
-dn: CN=ms-Exch-Server1-Always-Create-As,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Always-Create-As
-distinguishedName: CN=ms-Exch-Server1-Always-Create-As,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.27
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Always-Create-As
-adminDescription: ms-Exch-Server1-Always-Create-As
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer1AlwaysCreateAs
-name: ms-Exch-Server1-Always-Create-As
-schemaIDGUID: 222efaec-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Authentication-Credentials   
-# The user name to use to log on to the server for this directory.
-#
-dn: CN=ms-Exch-Server1-Authentication-Credentials,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Authentication-Credentials
-distinguishedName: CN=ms-Exch-Server1-Authentication-Credentials,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Authentication-Credentials
-adminDescription: ms-Exch-Server1-Authentication-Credentials
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1AuthenticationCredentials
-name: ms-Exch-Server1-Authentication-Credentials
-schemaIDGUID: 225ea9f4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Authentication-Password     
-# The password for the credentials specified for this directory.
-#
-dn: CN=ms-Exch-Server1-Authentication-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Authentication-Password
-distinguishedName: CN=ms-Exch-Server1-Authentication-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Authentication-Password
-adminDescription: ms-Exch-Server1-Authentication-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchServer1AuthenticationPassword
-name: ms-Exch-Server1-Authentication-Password
-schemaIDGUID: 228bf6a2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Server1-Authentication-Type  
-# The type of authentication to the server for this directory.
-#
-dn: CN=ms-Exch-Server1-Authentication-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Authentication-Type
-distinguishedName: CN=ms-Exch-Server1-Authentication-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.7
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 5
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Authentication-Type
-adminDescription: ms-Exch-Server1-Authentication-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer1AuthenticationType
-name: ms-Exch-Server1-Authentication-Type
-schemaIDGUID: 22b94350-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Deletion-Option    
-# A flag used to determine how deletions are synchronized into this directory.
-#
-dn: CN=ms-Exch-Server1-Deletion-Option,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Deletion-Option
-distinguishedName: CN=ms-Exch-Server1-Deletion-Option,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.21
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Deletion-Option
-adminDescription: ms-Exch-Server1-Deletion-Option
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer1DeletionOption
-name: ms-Exch-Server1-Deletion-Option
-schemaIDGUID: 22edb70c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Export-Containers            
-# The DN of the default container to search for objects to synchronize.
-#
-dn: CN=ms-Exch-Server1-Export-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Export-Containers
-distinguishedName: CN=ms-Exch-Server1-Export-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.13
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Export-Containers
-adminDescription: ms-Exch-Server1-Export-Containers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1ExportContainers
-name: ms-Exch-Server1-Export-Containers
-schemaIDGUID: 231b03ba-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Flags        
-# Flags used for transitive replication work.
-#
-dn: CN=ms-Exch-Server1-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Flags
-distinguishedName: CN=ms-Exch-Server1-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.61
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Flags
-adminDescription: ms-Exch-Server1-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer1Flags
-name: ms-Exch-Server1-Flags
-schemaIDGUID: 234d151c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Highest-USN 
-# The highwater mark update sequence number (USN) from the last
-# successful synchronization from this directory.
-#
-dn: CN=ms-Exch-Server1-Highest-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Highest-USN
-distinguishedName: CN=ms-Exch-Server1-Highest-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.29
-attributeSyntax: 2.5.5.16
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Highest-USN
-adminDescription: ms-Exch-Server1-Highest-USN
-oMSyntax: 65
-searchFlags: 0
-lDAPDisplayName: msExchServer1HighestUSN
-name: ms-Exch-Server1-Highest-USN
-schemaIDGUID: 237f267e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Highest-USN-Vector   
-# Stores the vectors of update sequence numbers (USNs) and servers for
-# a given naming context (NC).
-#
-dn: CN=ms-Exch-Server1-Highest-USN-Vector,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Highest-USN-Vector
-distinguishedName: CN=ms-Exch-Server1-Highest-USN-Vector,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.86
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Highest-USN-Vector
-adminDescription: ms-Exch-Server1-Highest-USN-Vector
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1HighestUSNVector
-name: ms-Exch-Server1-Highest-USN-Vector
-schemaIDGUID: 7fb58cd4-2a6e-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Import-Container    
-# The DN of the default container to write synchronized objects to.
-#
-dn: CN=ms-Exch-Server1-Import-Container,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Import-Container
-distinguishedName: CN=ms-Exch-Server1-Import-Container,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Import-Container
-adminDescription: ms-Exch-Server1-Import-Container
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1ImportContainer
-name: ms-Exch-Server1-Import-Container
-schemaIDGUID: 23aed586-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Is-Bridgehead         
-# A flag to determine whether non-mailbox associated objects are
-# replicated over this particular connection agreement.
-#
-dn: CN=ms-Exch-Server1-Is-Bridgehead,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Is-Bridgehead
-distinguishedName: CN=ms-Exch-Server1-Is-Bridgehead,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.77
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Is-Bridgehead
-adminDescription: ms-Exch-Server1-Is-Bridgehead
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchServer1IsBridgehead
-name: ms-Exch-Server1-Is-Bridgehead
-schemaIDGUID: 90b71b6a-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Last-Update-Time        
-# The time of the most recent update from the last successful
-# synchronization from this directory.
-#
-dn: CN=ms-Exch-Server1-Last-Update-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Last-Update-Time
-distinguishedName: CN=ms-Exch-Server1-Last-Update-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.31
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Last-Update-Time
-adminDescription: ms-Exch-Server1-Last-Update-Time
-oMSyntax: 24
-searchFlags: 0
-lDAPDisplayName: msExchServer1LastUpdateTime
-name: ms-Exch-Server1-Last-Update-Time
-schemaIDGUID: 23e34942-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Server1-Network-Address   
-# The network address of the server participating in this connection
-# agreement.
-#
-dn: CN=ms-Exch-Server1-Network-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Network-Address
-distinguishedName: CN=ms-Exch-Server1-Network-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.3
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Network-Address
-adminDescription: ms-Exch-Server1-Network-Address
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1NetworkAddress
-name: ms-Exch-Server1-Network-Address
-schemaIDGUID: 2412f84a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-NT-Account-Domain    
-# Domain in which Active Directory accounts should be created.
-#
-dn: CN=ms-Exch-Server1-NT-Account-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-NT-Account-Domain
-distinguishedName: CN=ms-Exch-Server1-NT-Account-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-NT-Account-Domain
-adminDescription: ms-Exch-Server1-NT-Account-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1NTAccountDomain
-name: ms-Exch-Server1-NT-Account-Domain
-schemaIDGUID: 2449ce60-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Object-Match   
-# Contains the matching rules for this server.
-#
-dn: CN=ms-Exch-Server1-Object-Match,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Object-Match
-distinguishedName: CN=ms-Exch-Server1-Object-Match,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.54
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Object-Match
-adminDescription: ms-Exch-Server1-Object-Match
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1ObjectMatch
-name: ms-Exch-Server1-Object-Match
-schemaIDGUID: 247bdfc2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Page-Size  
-# The page size to request when searching this directory.
-#
-dn: CN=ms-Exch-Server1-Page-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Page-Size
-distinguishedName: CN=ms-Exch-Server1-Page-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.25
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Page-Size
-adminDescription: ms-Exch-Server1-Page-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer1PageSize
-name: ms-Exch-Server1-Page-Size
-schemaIDGUID: 24b0537e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-Port         
-# The LDAP port of the server for this directory.
-#
-dn: CN=ms-Exch-Server1-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Port
-distinguishedName: CN=ms-Exch-Server1-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Port
-adminDescription: ms-Exch-Server1-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer1Port
-name: ms-Exch-Server1-Port
-schemaIDGUID: 24e264e0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Schema-Map 
-# The schema map to use when mapping from Active Directory to the
-# Exchange Directory Service (DS).
-#
-dn: CN=ms-Exch-Server1-Schema-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Schema-Map
-distinguishedName: CN=ms-Exch-Server1-Schema-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Schema-Map
-adminDescription: ms-Exch-Server1-Schema-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1SchemaMap
-name: ms-Exch-Server1-Schema-Map
-schemaIDGUID: 25193af6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server1-Search-Filter        
-# The search filter to use when searching this directory.
-#
-dn: CN=ms-Exch-Server1-Search-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Search-Filter
-distinguishedName: CN=ms-Exch-Server1-Search-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.19
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Search-Filter
-adminDescription: ms-Exch-Server1-Search-Filter
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer1SearchFilter
-name: ms-Exch-Server1-Search-Filter
-schemaIDGUID: 254daeb2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server1-SSL-Port     
-# The port to connect to for Secure Sockets Layer (SSL) connections.
-#
-dn: CN=ms-Exch-Server1-SSL-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-SSL-Port
-distinguishedName: CN=ms-Exch-Server1-SSL-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.39
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-SSL-Port
-adminDescription: ms-Exch-Server1-SSL-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer1SSLPort
-name: ms-Exch-Server1-SSL-Port
-schemaIDGUID: 258484c8-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Server1-Type   
-# Identifies the type of server being connected to.
-#
-dn: CN=ms-Exch-Server1-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server1-Type
-distinguishedName: CN=ms-Exch-Server1-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.23
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 5
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server1-Type
-adminDescription: ms-Exch-Server1-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer1Type
-name: ms-Exch-Server1-Type
-schemaIDGUID: 25bb5ade-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Always-Create-As    
-# How X.500 objects are synchronized to this directory.
-#
-dn: CN=ms-Exch-Server2-Always-Create-As,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Always-Create-As
-distinguishedName: CN=ms-Exch-Server2-Always-Create-As,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.28
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Always-Create-As
-adminDescription: ms-Exch-Server2-Always-Create-As
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer2AlwaysCreateAs
-name: ms-Exch-Server2-Always-Create-As
-schemaIDGUID: 25f95802-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Authentication-Credentials   
-# The user name to use to log on to the server for this directory.
-dn: CN=ms-Exch-Server2-Authentication-Credentials,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Authentication-Credentials
-distinguishedName: CN=ms-Exch-Server2-Authentication-Credentials,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.10
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Authentication-Credentials
-adminDescription: ms-Exch-Server2-Authentication-Credentials
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2AuthenticationCredentials
-name: ms-Exch-Server2-Authentication-Credentials
-schemaIDGUID: 26329072-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Authentication-Password     
-# The password for the credentials specified for this directory.
-dn: CN=ms-Exch-Server2-Authentication-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Authentication-Password
-distinguishedName: CN=ms-Exch-Server2-Authentication-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Authentication-Password
-adminDescription: ms-Exch-Server2-Authentication-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchServer2AuthenticationPassword
-name: ms-Exch-Server2-Authentication-Password
-schemaIDGUID: 266bc8e2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Authentication-Type  
-# The type of authentication to the server for this directory.
-#
-dn: CN=ms-Exch-Server2-Authentication-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Authentication-Type
-distinguishedName: CN=ms-Exch-Server2-Authentication-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.8
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 5
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Authentication-Type
-adminDescription: ms-Exch-Server2-Authentication-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer2AuthenticationType
-name: ms-Exch-Server2-Authentication-Type
-schemaIDGUID: 26a50152-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Deletion-Option    
-# A flag used to determine how deletions are synchronized into this
-# directory.
-#
-dn: CN=ms-Exch-Server2-Deletion-Option,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Deletion-Option
-distinguishedName: CN=ms-Exch-Server2-Deletion-Option,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.22
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Deletion-Option
-adminDescription: ms-Exch-Server2-Deletion-Option
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer2DeletionOption
-name: ms-Exch-Server2-Deletion-Option
-schemaIDGUID: 26e09c1c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Server2-Export-Containers            
-# The DN of the default container to search for objects to
-# synchronize.
-#
-dn: CN=ms-Exch-Server2-Export-Containers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Export-Containers
-distinguishedName: CN=ms-Exch-Server2-Export-Containers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.14
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Export-Containers
-adminDescription: ms-Exch-Server2-Export-Containers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2ExportContainers
-name: ms-Exch-Server2-Export-Containers
-schemaIDGUID: 27cca4ea-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Flags        
-# Flags for transitive replication work.
-#
-dn: CN=ms-Exch-Server2-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Flags
-distinguishedName: CN=ms-Exch-Server2-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.62
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Flags
-adminDescription: ms-Exch-Server2-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer2Flags
-name: ms-Exch-Server2-Flags
-schemaIDGUID: 28083fb4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Highest-USN  
-# The highwater mark update sequence number (USN) from the last
-# successful synchronization from this directory.
-#
-dn: CN=ms-Exch-Server2-Highest-USN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Highest-USN
-distinguishedName: CN=ms-Exch-Server2-Highest-USN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.30
-attributeSyntax: 2.5.5.16
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Highest-USN
-adminDescription: ms-Exch-Server2-Highest-USN
-oMSyntax: 65
-searchFlags: 0
-lDAPDisplayName: msExchServer2HighestUSN
-name: ms-Exch-Server2-Highest-USN
-schemaIDGUID: 283a5116-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Highest-USN-Vector   
-# Stores the vectors of update sequence numbers (USNs) and servers for
-# a given naming context (NC).
-#
-dn: CN=ms-Exch-Server2-Highest-USN-Vector,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Highest-USN-Vector
-distinguishedName: CN=ms-Exch-Server2-Highest-USN-Vector,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.87
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Highest-USN-Vector
-adminDescription: ms-Exch-Server2-Highest-USN-Vector
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2HighestUSNVector
-name: ms-Exch-Server2-Highest-USN-Vector
-schemaIDGUID: 7fb58cda-2a6e-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Import-Container    
-# The DN of the default container to write syncronized objects to.
-#
-dn: CN=ms-Exch-Server2-Import-Container,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Import-Container
-distinguishedName: CN=ms-Exch-Server2-Import-Container,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.16
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Import-Container
-adminDescription: ms-Exch-Server2-Import-Container
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2ImportContainer
-name: ms-Exch-Server2-Import-Container
-schemaIDGUID: 286c6278-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Is-Bridgehead         
-# A flag to determine whether non-mailbox associated objects are
-# replicated over this particular connection agreement.
-#
-dn: CN=ms-Exch-Server2-Is-Bridgehead,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Is-Bridgehead
-distinguishedName: CN=ms-Exch-Server2-Is-Bridgehead,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.78
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Is-Bridgehead
-adminDescription: ms-Exch-Server2-Is-Bridgehead
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchServer2IsBridgehead
-name: ms-Exch-Server2-Is-Bridgehead
-schemaIDGUID: 90d619fc-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Last-Update-Time        
-# The time of the most recent update from last successful
-# syncronization from this directory.
-#
-dn: CN=ms-Exch-Server2-Last-Update-Time,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Last-Update-Time
-distinguishedName: CN=ms-Exch-Server2-Last-Update-Time,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.32
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Last-Update-Time
-adminDescription: ms-Exch-Server2-Last-Update-Time
-oMSyntax: 24
-searchFlags: 0
-lDAPDisplayName: msExchServer2LastUpdateTime
-name: ms-Exch-Server2-Last-Update-Time
-schemaIDGUID: 28a3388e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Network-Address    
-# The network address of the server participating in the connection
-# agreement.
-#
-dn: CN=ms-Exch-Server2-Network-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Network-Address
-distinguishedName: CN=ms-Exch-Server2-Network-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.4
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Network-Address
-adminDescription: ms-Exch-Server2-Network-Address
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2NetworkAddress
-name: ms-Exch-Server2-Network-Address
-schemaIDGUID: 28d549f0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Server2-NT-Account-Domain    
-# The domain in which Active Directory accounts should be created.
-#
-dn: CN=ms-Exch-Server2-NT-Account-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-NT-Account-Domain
-distinguishedName: CN=ms-Exch-Server2-NT-Account-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.51
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-NT-Account-Domain
-adminDescription: ms-Exch-Server2-NT-Account-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2NTAccountDomain
-name: ms-Exch-Server2-NT-Account-Domain
-schemaIDGUID: 2909bdac-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Object-Match       
-# Contains the matching rules for this server.
-#
-dn: CN=ms-Exch-Server2-Object-Match,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Object-Match
-distinguishedName: CN=ms-Exch-Server2-Object-Match,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.55
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Object-Match
-adminDescription: ms-Exch-Server2-Object-Match
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2ObjectMatch
-name: ms-Exch-Server2-Object-Match
-schemaIDGUID: 293e3168-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Page-Size  
-# The page size to request when searching this directory.
-#
-dn: CN=ms-Exch-Server2-Page-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Page-Size
-distinguishedName: CN=ms-Exch-Server2-Page-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.26
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Page-Size
-adminDescription: ms-Exch-Server2-Page-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer2PageSize
-name: ms-Exch-Server2-Page-Size
-schemaIDGUID: 296de070-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Port         
-# The LDAP port of the server for this directory.
-#
-dn: CN=ms-Exch-Server2-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Port
-distinguishedName: CN=ms-Exch-Server2-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.6
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Port
-adminDescription: ms-Exch-Server2-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer2Port
-name: ms-Exch-Server2-Port
-schemaIDGUID: 29a4b686-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server2-Schema-Map 
-# The schema map to use when mapping from the Exchange Directory
-# Service (DS) to Active Directory.
-#
-dn: CN=ms-Exch-Server2-Schema-Map,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Schema-Map
-distinguishedName: CN=ms-Exch-Server2-Schema-Map,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.18
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Schema-Map
-adminDescription: ms-Exch-Server2-Schema-Map
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2SchemaMap
-name: ms-Exch-Server2-Schema-Map
-schemaIDGUID: 29d6c7e8-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Search-Filter        
-# The search filter to use when searching this directory.
-#
-dn: CN=ms-Exch-Server2-Search-Filter,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Search-Filter
-distinguishedName: CN=ms-Exch-Server2-Search-Filter,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.20
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Search-Filter
-adminDescription: ms-Exch-Server2-Search-Filter
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServer2SearchFilter
-name: ms-Exch-Server2-Search-Filter
-schemaIDGUID: 2a0b3ba4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-SSL-Port     
-# The port to connect to for SSL connections.
-#
-dn: CN=ms-Exch-Server2-SSL-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-SSL-Port
-distinguishedName: CN=ms-Exch-Server2-SSL-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.40
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 65535
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-SSL-Port
-adminDescription: ms-Exch-Server2-SSL-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServer2SSLPort
-name: ms-Exch-Server2-SSL-Port
-schemaIDGUID: 2a3faf60-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server2-Type 
-# Identifies the type of server being connected to.
-#
-dn: CN=ms-Exch-Server2-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server2-Type
-distinguishedName: CN=ms-Exch-Server2-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.24
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 5
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server2-Type
-adminDescription: ms-Exch-Server2-Type
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchServer2Type
-name: ms-Exch-Server2-Type
-schemaIDGUID: 2a74231c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Auto-Start 
-# Starts the service when the operating system is booted.
-dn: CN=ms-Exch-Server-Auto-Start,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Auto-Start
-distinguishedName: CN=ms-Exch-Server-Auto-Start,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2007
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Auto-Start
-adminDescription: ms-Exch-Server-Auto-Start
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchServerAutoStart
-name: ms-Exch-Server-Auto-Start
-schemaIDGUID: 21cf9cdc-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server-Bindings     
-# The IP port binding for SSL connections.
-#
-dn: CN=ms-Exch-Server-Bindings,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Bindings
-distinguishedName: CN=ms-Exch-Server-Bindings,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.2001
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 512
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Bindings
-adminDescription: ms-Exch-Server-Bindings
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServerBindings
-name: ms-Exch-Server-Bindings
-schemaIDGUID: 2201ae3e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Bindings-Filtering    
-#
-dn: CN=ms-Exch-Server-Bindings-Filtering,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Bindings-Filtering
-distinguishedName: CN=ms-Exch-Server-Bindings-Filtering,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5072
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Bindings-Filtering
-adminDescription: ms-Exch-Server-Bindings-Filtering
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServerBindingsFiltering
-name: ms-Exch-Server-Bindings-Filtering
-schemaIDGUID: 61aedffa-34b4-4170-8bab-b8794e1cb4f4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Bindings-Turflist     
-#
-dn: CN=ms-Exch-Server-Bindings-Turflist,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Bindings-Turflist
-distinguishedName: CN=ms-Exch-Server-Bindings-Turflist,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12533
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Bindings-Turflist
-adminDescription: ms-Exch-Server-Bindings-Turflist
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServerBindingsTurflist
-name: ms-Exch-Server-Bindings-Turflist
-schemaIDGUID: 0b836d98-3b20-11d3-aa6f-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server-Global-Groups    
-#
-dn: CN=ms-Exch-Server-Global-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Global-Groups
-distinguishedName: CN=ms-Exch-Server-Global-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50083
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Global-Groups
-adminDescription: ms-Exch-Server-Global-Groups
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchServerGlobalGroups
-name: ms-Exch-Server-Global-Groups
-schemaIDGUID: 419f00f6-fb22-4ea9-8113-ed928767baa5
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Groups                   
-# A link to all Exchange server groups within the organization.
-#
-dn: CN=ms-Exch-Server-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Groups
-distinguishedName: CN=ms-Exch-Server-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50055
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Groups
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Server-Groups
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchServerGroups
-name: ms-Exch-Server-Groups
-schemaIDGUID: 5fd75fb9-3819-4d25-b18e-7bce391d4767
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Local-Groups      
-# Contains the domain local groups for each prepared domain.
-#
-dn: CN=ms-Exch-Server-Local-Groups,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Local-Groups
-distinguishedName: CN=ms-Exch-Server-Local-Groups,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50082
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Local-Groups
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Server-Local-Groups
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchServerLocalGroups
-name: ms-Exch-Server-Local-Groups
-schemaIDGUID: 924a0b14-ea4f-4627-abd1-adbc801c4b0b
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Server-Public-Key  
-#
-dn: CN=ms-Exch-Server-Public-Key,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Public-Key
-distinguishedName: CN=ms-Exch-Server-Public-Key,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50063
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Public-Key
-adminDescription: ms-Exch-Server-Public-Key
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchServerPublicKey
-name: ms-Exch-Server-Public-Key
-schemaIDGUID: b83df2df-c304-4563-90fd-d38ec81b04cb
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Server-Role    
-# Determines if this server is a front-end or back-end server.
-dn: CN=ms-Exch-Server-Role,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Server-Role
-distinguishedName: CN=ms-Exch-Server-Role,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Server-Role
-adminDescription: ms-Exch-Server-Role
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchServerRole
-name: ms-Exch-Server-Role
-schemaIDGUID: 8c8fc29e-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Service-Action-First  
-#
-dn: CN=ms-Exch-Service-Action-First,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Service-Action-First
-distinguishedName: CN=ms-Exch-Service-Action-First,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.161
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33073
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Service-Action-First
-adminDescription: ms-Exch-Service-Action-First
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: serviceActionFirst
-name: ms-Exch-Service-Action-First
-schemaIDGUID: a8df7470-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Service-Action-Other  
-#
-dn: CN=ms-Exch-Service-Action-Other,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Service-Action-Other
-distinguishedName: CN=ms-Exch-Service-Action-Other,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.59
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33074
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Service-Action-Other
-adminDescription: ms-Exch-Service-Action-Other
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: serviceActionOther
-name: ms-Exch-Service-Action-Other
-schemaIDGUID: a8df7471-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Service-Action-Second         
-#
-dn: CN=ms-Exch-Service-Action-Second,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Service-Action-Second
-distinguishedName: CN=ms-Exch-Service-Action-Second,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.60
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-mAPIID: 33075
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Service-Action-Second
-adminDescription: ms-Exch-Service-Action-Second
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: serviceActionSecond
-name: ms-Exch-Service-Action-Second
-schemaIDGUID: a8df7472-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Service-Restart-Delay         
-#
-dn: CN=ms-Exch-Service-Restart-Delay,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Service-Restart-Delay
-distinguishedName: CN=ms-Exch-Service-Restart-Delay,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.162
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33076
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Service-Restart-Delay
-adminDescription: ms-Exch-Service-Restart-Delay
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: serviceRestartDelay
-name: ms-Exch-Service-Restart-Delay
-schemaIDGUID: a8df7473-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Service-Restart-Message    
-#
-dn: CN=ms-Exch-Service-Restart-Message,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Service-Restart-Message
-distinguishedName: CN=ms-Exch-Service-Restart-Message,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.58
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 120
-mAPIID: 33077
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Service-Restart-Message
-adminDescription: ms-Exch-Service-Restart-Message
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: serviceRestartMessage
-name: ms-Exch-Service-Restart-Message
-schemaIDGUID: a8df7474-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Session-Disconnect-Timer   
-#
-dn: CN=ms-Exch-Session-Disconnect-Timer,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Session-Disconnect-Timer
-distinguishedName: CN=ms-Exch-Session-Disconnect-Timer,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.154
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33078
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Session-Disconnect-Timer
-adminDescription: ms-Exch-Session-Disconnect-Timer
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: sessionDisconnectTimer
-name: ms-Exch-Session-Disconnect-Timer
-schemaIDGUID: a8df7475-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Site-Folder-GUID          
-# Contains a random unused GUID which is used by the store when
-# creating the public folder for this OAB.
-#
-dn: CN=ms-Exch-Site-Folder-GUID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Site-Folder-GUID
-distinguishedName: CN=ms-Exch-Site-Folder-GUID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.456
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 33126
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Folder-GUID
-adminDescription: ms-Exch-Site-Folder-GUID
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: siteFolderGUID
-name: ms-Exch-Site-Folder-GUID
-schemaIDGUID: a8df7477-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Site-Folder-Server   
-#
-dn: CN=ms-Exch-Site-Folder-Server,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Site-Folder-Server
-distinguishedName: CN=ms-Exch-Site-Folder-Server,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.457
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-mAPIID: 33127
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Folder-Server
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Site-Folder-Server
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: siteFolderServer
-name: ms-Exch-Site-Folder-Server
-schemaIDGUID: a8df7478-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Site-Proxy-Space     
-#
-dn: CN=ms-Exch-Site-Proxy-Space,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Site-Proxy-Space
-distinguishedName: CN=ms-Exch-Site-Proxy-Space,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.385
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 1123
-mAPIID: 33080
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Site-Proxy-Space
-adminDescription: ms-Exch-Site-Proxy-Space
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: siteProxySpace
-name: ms-Exch-Site-Proxy-Space
-schemaIDGUID: a8df7479-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-SLV-File            
-# The database file location for this store.
-dn: CN=ms-Exch-SLV-File,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SLV-File
-distinguishedName: CN=ms-Exch-SLV-File,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11036
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SLV-File
-adminDescription: ms-Exch-SLV-File
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchSLVFile
-name: ms-Exch-SLV-File
-schemaIDGUID: 2aaaf932-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-SMIME-Alg-List-NA 
-# The list of supported algorithms in North America by Microsoft
-# Outlook clients. This list should never be modified.
-#
-dn: CN=ms-Exch-SMIME-Alg-List-NA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMIME-Alg-List-NA
-distinguishedName: CN=ms-Exch-SMIME-Alg-List-NA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.568
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 35891
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMIME-Alg-List-NA
-adminDescription: ms-Exch-SMIME-Alg-List-NA
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: sMIMEAlgListNA
-name: ms-Exch-SMIME-Alg-List-NA
-schemaIDGUID: a8df747a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-SMIME-Alg-List-Other   
-# The list of non-North America algorithms supported by Outlook.
-#
-dn: CN=ms-Exch-SMIME-Alg-List-Other,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMIME-Alg-List-Other
-distinguishedName: CN=ms-Exch-SMIME-Alg-List-Other,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.569
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 35892
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMIME-Alg-List-Other
-adminDescription: ms-Exch-SMIME-Alg-List-Other
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: sMIMEAlgListOther
-name: ms-Exch-SMIME-Alg-List-Other
-schemaIDGUID: a8df747b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-SMIME-Alg-Selected-NA         
-# The currently-selected algorithm for North America Outlook users.
-#
-dn: CN=ms-Exch-SMIME-Alg-Selected-NA,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMIME-Alg-Selected-NA
-distinguishedName: CN=ms-Exch-SMIME-Alg-Selected-NA,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.570
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 35893
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMIME-Alg-Selected-NA
-adminDescription: ms-Exch-SMIME-Alg-Selected-NA
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: sMIMEAlgSelectedNA
-name: ms-Exch-SMIME-Alg-Selected-NA
-schemaIDGUID: a8df747c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-SMIME-Alg-Selected-Other 
-# The selected algorithm for non-North America Outlook users.
-#
-dn: CN=ms-Exch-SMIME-Alg-Selected-Other,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMIME-Alg-Selected-Other
-distinguishedName: CN=ms-Exch-SMIME-Alg-Selected-Other,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.571
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 35894
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMIME-Alg-Selected-Other
-adminDescription: ms-Exch-SMIME-Alg-Selected-Other
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: sMIMEAlgSelectedOther
-name: ms-Exch-SMIME-Alg-Selected-Other
-schemaIDGUID: a8df747d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Authorized-TRN-Accounts      
-# The list of all accounts that are authorized to use TRN.
-#
-dn: CN=ms-Exch-Smtp-Authorized-TRN-Accounts,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Authorized-TRN-Accounts
-distinguishedName: CN=ms-Exch-Smtp-Authorized-TRN-Accounts,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5047
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Authorized-TRN-Accounts
-adminDescription: ms-Exch-Smtp-Authorized-TRN-Accounts
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpAuthorizedTRNAccounts
-name: ms-Exch-Smtp-Authorized-TRN-Accounts
-schemaIDGUID: 2b164304-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Bad-Mail-Directory    
-# Location where bad mail messages are stored.
-#
-dn: CN=ms-Exch-Smtp-Bad-Mail-Directory,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Bad-Mail-Directory
-distinguishedName: CN=ms-Exch-Smtp-Bad-Mail-Directory,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5025
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Bad-Mail-Directory
-adminDescription: ms-Exch-Smtp-Bad-Mail-Directory
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpBadMailDirectory
-name: ms-Exch-Smtp-Bad-Mail-Directory
-schemaIDGUID: 2b5904dc-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Connection-Rules-Priority       
-#
-dn: CN=ms-Exch-Smtp-Connection-Rules-Priority,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Rules-Priority
-distinguishedName: CN=ms-Exch-Smtp-Connection-Rules-Priority,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5064
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Rules-Priority
-adminDescription: ms-Exch-Smtp-Connection-Rules-Priority
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionRulesPriority
-name: ms-Exch-Smtp-Connection-Rules-Priority
-schemaIDGUID: 86c24f8c-259b-4f19-88b9-9c9445936121
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-Display    
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-Display,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-Display
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-Display,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5065
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-Display
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-Display
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionTurfListDisplay
-name: ms-Exch-Smtp-Connection-Turf-List-Display
-schemaIDGUID: 73fb04ac-b2d4-4a4d-8520-757dd3c9261a
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-DNS                
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-DNS,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-DNS
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-DNS,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5067
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-DNS
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-DNS
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionTurfListDNS
-name: ms-Exch-Smtp-Connection-Turf-List-DNS
-schemaIDGUID: 3fee7de6-d3e5-43cb-8459-f7a072ae3789
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-Mask       
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-Mask
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5069
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-Mask
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-Mask
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionTurfListMask
-name: ms-Exch-Smtp-Connection-Turf-List-Mask
-schemaIDGUID: bc0241af-9d38-4c40-842e-51d802506de5
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-Options    
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-Options
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5066
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-Options
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionTurfListOptions
-name: ms-Exch-Smtp-Connection-Turf-List-Options
-schemaIDGUID: 5ae62360-1105-4d8b-8a1e-a2c793b4d57d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List-Response   
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List-Response,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Turf-List-Response
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List-Response,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5068
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List-Response
-adminDescription: ms-Exch-Smtp-Connection-Turf-List-Response
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionTurfListResponse
-name: ms-Exch-Smtp-Connection-Turf-List-Response
-schemaIDGUID: eeddd98f-da01-4ecb-a65e-5f016f1d8032
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Connection-Whitelist            
-#
-dn: CN=ms-Exch-Smtp-Connection-Whitelist,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Connection-Whitelist
-distinguishedName: CN=ms-Exch-Smtp-Connection-Whitelist,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5063
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Whitelist
-adminDescription: ms-Exch-Smtp-Connection-Whitelist
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpConnectionWhitelist
-name: ms-Exch-Smtp-Connection-Whitelist
-schemaIDGUID: 87cf463a-561e-45ce-a0ba-6d528f111d23
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Domain-String                   
-# The drop directory of the domain or route domain.
-#
-dn: CN=ms-Exch-Smtp-Domain-String,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Domain-String
-distinguishedName: CN=ms-Exch-Smtp-Domain-String,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5033
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Domain-String
-adminDescription: ms-Exch-Smtp-Domain-String
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDomainString
-name: ms-Exch-Smtp-Domain-String
-schemaIDGUID: 2bd03a70-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Do-Masquerade     
-# If set, use the Masquerade domain.
-#
-dn: CN=ms-Exch-Smtp-Do-Masquerade,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Do-Masquerade
-distinguishedName: CN=ms-Exch-Smtp-Do-Masquerade,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5022
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Do-Masquerade
-adminDescription: ms-Exch-Smtp-Do-Masquerade
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDoMasquerade
-name: ms-Exch-Smtp-Do-Masquerade
-schemaIDGUID: 2b949fa6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Drop-Directory  
-# The directory where mail messages are being dropped.
-#
-dn: CN=ms-Exch-Smtp-Drop-Directory,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Drop-Directory
-distinguishedName: CN=ms-Exch-Smtp-Drop-Directory,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5032
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Drop-Directory
-adminDescription: ms-Exch-Smtp-Drop-Directory
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDropDirectory
-name: ms-Exch-Smtp-Drop-Directory
-schemaIDGUID: 2c260f18-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ds-Data-Directory    
-# The data directory for DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ds-Data-Directory,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Data-Directory
-distinguishedName: CN=ms-Exch-Smtp-Ds-Data-Directory,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5036
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Data-Directory
-adminDescription: ms-Exch-Smtp-Ds-Data-Directory
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsDataDirectory
-name: ms-Exch-Smtp-Ds-Data-Directory
-schemaIDGUID: 2c6d95a4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ds-Default-Mail-Root    
-# The default mail root for DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ds-Default-Mail-Root,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Default-Mail-Root
-distinguishedName: CN=ms-Exch-Smtp-Ds-Default-Mail-Root,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5037
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Default-Mail-Root
-adminDescription: ms-Exch-Smtp-Ds-Default-Mail-Root
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsDefaultMailRoot
-name: ms-Exch-Smtp-Ds-Default-Mail-Root
-schemaIDGUID: 2cadf522-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Ds-Domain       
-# The default mail root for DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ds-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Domain
-distinguishedName: CN=ms-Exch-Smtp-Ds-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5038
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Domain
-adminDescription: ms-Exch-Smtp-Ds-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsDomain
-name: ms-Exch-Smtp-Ds-Domain
-schemaIDGUID: 2ce72d92-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ds-Flags        
-#
-dn: CN=ms-Exch-Smtp-Ds-Flags,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Flags
-distinguishedName: CN=ms-Exch-Smtp-Ds-Flags,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5049
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Flags
-adminDescription: ms-Exch-Smtp-Ds-Flags
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsFlags
-name: ms-Exch-Smtp-Ds-Flags
-schemaIDGUID: 2d206602-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ds-Host 
-# The host to connect in DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ds-Host,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Host
-distinguishedName: CN=ms-Exch-Smtp-Ds-Host,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5042
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Host
-adminDescription: ms-Exch-Smtp-Ds-Host
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsHost
-name: ms-Exch-Smtp-Ds-Host
-schemaIDGUID: 2d599e72-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ds-Port 
-# The port to use in DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ds-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ds-Port
-distinguishedName: CN=ms-Exch-Smtp-Ds-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5017
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ds-Port
-adminDescription: ms-Exch-Smtp-Ds-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpDsPort
-name: ms-Exch-Smtp-Ds-Port
-schemaIDGUID: 2d92d6e2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Enable-EXPN     
-#
-dn: CN=ms-Exch-Smtp-Enable-EXPN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Enable-EXPN
-distinguishedName: CN=ms-Exch-Smtp-Enable-EXPN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12537
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Enable-EXPN
-adminDescription: ms-Exch-Smtp-Enable-EXPN
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpEnableEXPN
-name: ms-Exch-Smtp-Enable-EXPN
-schemaIDGUID: e24d7a86-439d-11d3-aa72-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Enable-Ldap-Routing 
-# Configures the directory that this resource uses to route mail.
-#
-dn: CN=ms-Exch-Smtp-Enable-Ldap-Routing,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Enable-Ldap-Routing
-distinguishedName: CN=ms-Exch-Smtp-Enable-Ldap-Routing,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5019
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Enable-Ldap-Routing
-adminDescription: ms-Exch-Smtp-Enable-Ldap-Routing
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpEnableLdapRouting
-name: ms-Exch-Smtp-Enable-Ldap-Routing
-schemaIDGUID: 2dce71ac-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Enable-VRFY 
-#
-dn: CN=ms-Exch-Smtp-Enable-VRFY,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Enable-VRFY
-distinguishedName: CN=ms-Exch-Smtp-Enable-VRFY,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12536
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Enable-VRFY
-adminDescription: ms-Exch-Smtp-Enable-VRFY
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpEnableVRFY
-name: ms-Exch-Smtp-Enable-VRFY
-schemaIDGUID: e24d7a80-439d-11d3-aa72-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-External-DNS-Servers    
-# Contains the IP addresses of DNS servers that should be used by this
-# SMTP virtual server.
-#
-dn: CN=ms-Exch-Smtp-External-DNS-Servers,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-External-DNS-Servers
-distinguishedName: CN=ms-Exch-Smtp-External-DNS-Servers,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5056
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-External-DNS-Servers
-adminDescription: ms-Exch-Smtp-External-DNS-Servers
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpExternalDNSServers
-name: ms-Exch-Smtp-External-DNS-Servers
-schemaIDGUID: a1826432-f85e-42b6-b55d-1249ed2f78a3
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Fully-Qualified-Domain-Name   
-# The Fully Qualified Domain Name for this virtual server.
-#
-dn: CN=ms-Exch-Smtp-Fully-Qualified-Domain-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Fully-Qualified-Domain-Name
-distinguishedName: CN=ms-Exch-Smtp-Fully-Qualified-Domain-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5029
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Fully-Qualified-Domain-Name
-adminDescription: ms-Exch-Smtp-Fully-Qualified-Domain-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpFullyQualifiedDomainName
-name: ms-Exch-Smtp-Fully-Qualified-Domain-Name
-schemaIDGUID: 2e0547c2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-SMTP-Global-IP-Accept-List    
-#
-dn: CN=ms-Exch-SMTP-Global-IP-Accept-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMTP-Global-IP-Accept-List
-distinguishedName: CN=ms-Exch-SMTP-Global-IP-Accept-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5073
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMTP-Global-IP-Accept-List
-adminDescription: ms-Exch-SMTP-Global-IP-Accept-List
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchSMTPGlobalIPAcceptList
-name: ms-Exch-SMTP-Global-IP-Accept-List
-schemaIDGUID: 752cd028-a935-40aa-8f8b-14aeb4433c93
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-SMTP-Global-IP-Deny-List      
-#
-dn: CN=ms-Exch-SMTP-Global-IP-Deny-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SMTP-Global-IP-Deny-List
-distinguishedName: CN=ms-Exch-SMTP-Global-IP-Deny-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5074
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMTP-Global-IP-Deny-List
-adminDescription: ms-Exch-SMTP-Global-IP-Deny-List
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchSMTPGlobalIPDenyList
-name: ms-Exch-SMTP-Global-IP-Deny-List
-schemaIDGUID: 61e731dc-484d-4566-8aac-c54747f13cc4
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Inbound-Command-Support-Options   
-# The TLF encryption flag used for basic authentication.
-#
-dn: CN=ms-Exch-Smtp-Inbound-Command-Support-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Inbound-Command-Support-Options
-distinguishedName: CN=ms-Exch-Smtp-Inbound-Command-Support-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5018
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Inbound-Command-Support-Options
-adminDescription: ms-Exch-Smtp-Inbound-Command-Support-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpInboundCommandSupportOptions
-name: ms-Exch-Smtp-Inbound-Command-Support-Options
-schemaIDGUID: 2e40e28c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Ldap-Account    
-# The LDAP account to use in DSAccess.
-dn: CN=ms-Exch-Smtp-Ldap-Account,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ldap-Account
-distinguishedName: CN=ms-Exch-Smtp-Ldap-Account,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5044
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ldap-Account
-adminDescription: ms-Exch-Smtp-Ldap-Account
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLdapAccount
-name: ms-Exch-Smtp-Ldap-Account
-schemaIDGUID: 2e7c7d56-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ldap-Bind-Type  
-# The bind type to use in DSAccess.
-dn: CN=ms-Exch-Smtp-Ldap-Bind-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ldap-Bind-Type
-distinguishedName: CN=ms-Exch-Smtp-Ldap-Bind-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5040
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ldap-Bind-Type
-adminDescription: ms-Exch-Smtp-Ldap-Bind-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLdapBindType
-name: ms-Exch-Smtp-Ldap-Bind-Type
-schemaIDGUID: 2ebcdcd4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ldap-Naming-Context     
-# The naming context to use in DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ldap-Naming-Context,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ldap-Naming-Context
-distinguishedName: CN=ms-Exch-Smtp-Ldap-Naming-Context,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5043
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ldap-Naming-Context
-adminDescription: ms-Exch-Smtp-Ldap-Naming-Context
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLdapNamingContext
-name: ms-Exch-Smtp-Ldap-Naming-Context
-schemaIDGUID: 2ef61544-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Ldap-Password   
-# The LDAP password to use in DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Ldap-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ldap-Password
-distinguishedName: CN=ms-Exch-Smtp-Ldap-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5045
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ldap-Password
-adminDescription: ms-Exch-Smtp-Ldap-Password
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLdapPassword
-name: ms-Exch-Smtp-Ldap-Password
-schemaIDGUID: 2f2f4db4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Ldap-Schema-Type        
-# The schema type to use in DSAccess.
-dn: CN=ms-Exch-Smtp-Ldap-Schema-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Ldap-Schema-Type
-distinguishedName: CN=ms-Exch-Smtp-Ldap-Schema-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5041
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Ldap-Schema-Type
-adminDescription: ms-Exch-Smtp-Ldap-Schema-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLdapSchemaType
-name: ms-Exch-Smtp-Ldap-Schema-Type
-schemaIDGUID: 2f688624-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Local-Queue-Delay-Notification  
-# The time at which this resource should send a notification regarding
-# a local undelivered message.
-#
-dn: CN=ms-Exch-Smtp-Local-Queue-Delay-Notification,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Local-Queue-Delay-Notification
-distinguishedName: CN=ms-Exch-Smtp-Local-Queue-Delay-Notification,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5011
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Local-Queue-Delay-Notification
-adminDescription: ms-Exch-Smtp-Local-Queue-Delay-Notification
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLocalQueueDelayNotification
-name: ms-Exch-Smtp-Local-Queue-Delay-Notification
-schemaIDGUID: 2f9f5c3a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Local-Queue-Expiration-Timeout     
-# The time at which this resource should expire a local undelivered message.
-#
-dn: CN=ms-Exch-Smtp-Local-Queue-Expiration-Timeout,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Local-Queue-Expiration-Timeout
-distinguishedName: CN=ms-Exch-Smtp-Local-Queue-Expiration-Timeout,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5010
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Local-Queue-Expiration-Timeout
-adminDescription: ms-Exch-Smtp-Local-Queue-Expiration-Timeout
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpLocalQueueExpirationTimeout
-name: ms-Exch-Smtp-Local-Queue-Expiration-Timeout
-schemaIDGUID: 40bd7e66-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Masquerade-Domain      
-# The domain that mail outbound from this resource is masqueraded as.
-#
-dn: CN=ms-Exch-Smtp-Masquerade-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Masquerade-Domain
-distinguishedName: CN=ms-Exch-Smtp-Masquerade-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5026
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Masquerade-Domain
-adminDescription: ms-Exch-Smtp-Masquerade-Domain
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMasqueradeDomain
-name: ms-Exch-Smtp-Masquerade-Domain
-schemaIDGUID: 40eacb14-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Max-Hop-Count   
-# The maximum number of hops that the message transported by this
-# resource can take.
-#
-dn: CN=ms-Exch-Smtp-Max-Hop-Count,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Hop-Count
-distinguishedName: CN=ms-Exch-Smtp-Max-Hop-Count,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Hop-Count
-adminDescription: ms-Exch-Smtp-Max-Hop-Count
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxHopCount
-name: ms-Exch-Smtp-Max-Hop-Count
-schemaIDGUID: 411817c2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Max-Message-Size            
-# The maximum size that a message delivered by this resource can be.
-#
-dn: CN=ms-Exch-Smtp-Max-Message-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Message-Size
-distinguishedName: CN=ms-Exch-Smtp-Max-Message-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5007
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Message-Size
-adminDescription: ms-Exch-Smtp-Max-Message-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxMessageSize
-name: ms-Exch-Smtp-Max-Message-Size
-schemaIDGUID: 4147c6ca-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain        
-# The maximum number of messages delivered for connections outgoing
-# from each domain of this resource.
-#
-dn: CN=ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain
-distinguishedName: CN=ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5015
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain
-adminDescription: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxOutboundMsgPerDomain
-name: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain
-schemaIDGUID: 417775d2-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag         
-# The maximum number of outbound messages per domain.
-#
-dn: CN=ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag
-distinguishedName: CN=ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5023
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag
-adminDescription: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxOutboundMsgPerDomainFlag
-name: ms-Exch-Smtp-Max-Outbound-Msg-Per-Domain-Flag
-schemaIDGUID: 41a724da-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Max-Outgoing-Connections        
-# The maximum number of connections outgoing from this resource.
-#
-dn: CN=ms-Exch-Smtp-Max-Outgoing-Connections,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Outgoing-Connections
-distinguishedName: CN=ms-Exch-Smtp-Max-Outgoing-Connections,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5001
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Outgoing-Connections
-adminDescription: ms-Exch-Smtp-Max-Outgoing-Connections
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxOutgoingConnections
-name: ms-Exch-Smtp-Max-Outgoing-Connections
-schemaIDGUID: 41d9363c-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain     
-# The maximum length of time for connections outgoing from each domain
-# of this resource.
-#
-dn: CN=ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain
-distinguishedName: CN=ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain,CN=Sche
-attributeID: 1.2.840.113556.1.4.7000.102.5003
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain
-adminDescription: ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxOutgoingConnectionsPerDomain
-name: ms-Exch-Smtp-Max-Outgoing-Connections-Per-Domain
-schemaIDGUID: 420b479e-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Max-Recipients     
-# The maximum number of recipients allowed on a message transferred by
-# this resource.
-#
-dn: CN=ms-Exch-Smtp-Max-Recipients,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Recipients
-distinguishedName: CN=ms-Exch-Smtp-Max-Recipients,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5009
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Recipients
-adminDescription: ms-Exch-Smtp-Max-Recipients
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxRecipients
-name: ms-Exch-Smtp-Max-Recipients
-schemaIDGUID: 423af6a6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Max-Session-Size         
-#
-dn: CN=ms-Exch-Smtp-Max-Session-Size,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Max-Session-Size
-distinguishedName: CN=ms-Exch-Smtp-Max-Session-Size,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5008
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Max-Session-Size
-adminDescription: ms-Exch-Smtp-Max-Session-Size
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpMaxSessionSize
-name: ms-Exch-Smtp-Max-Session-Size
-schemaIDGUID: 426aa5ae-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Outbound-Security-Flag  
-# Configures which authentication is used when connecting outbound
-# from this resource.
-#
-dn: CN=ms-Exch-Smtp-Outbound-Security-Flag,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outbound-Security-Flag
-distinguishedName: CN=ms-Exch-Smtp-Outbound-Security-Flag,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outbound-Security-Flag
-adminDescription: ms-Exch-Smtp-Outbound-Security-Flag
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutboundSecurityFlag
-name: ms-Exch-Smtp-Outbound-Security-Flag
-schemaIDGUID: 429cb710-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Outbound-Security-Password      
-# The password for outbound security.
-#
-dn: CN=ms-Exch-Smtp-Outbound-Security-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outbound-Security-Password
-distinguishedName: CN=ms-Exch-Smtp-Outbound-Security-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5035
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outbound-Security-Password
-adminDescription: ms-Exch-Smtp-Outbound-Security-Password
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutboundSecurityPassword
-name: ms-Exch-Smtp-Outbound-Security-Password
-schemaIDGUID: 42edc704-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Outbound-Security-User-Name     
-# User name for outbound security.
-#
-dn: CN=ms-Exch-Smtp-Outbound-Security-User-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outbound-Security-User-Name
-distinguishedName: CN=ms-Exch-Smtp-Outbound-Security-User-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5034
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outbound-Security-User-Name
-adminDescription: ms-Exch-Smtp-Outbound-Security-User-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutboundSecurityUserName
-name: ms-Exch-Smtp-Outbound-Security-User-Name
-schemaIDGUID: 43249d1a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Outgoing-Connection-Timeout     
-# The maximum length of time for connections outgoing from this resource.
-#
-dn: CN=ms-Exch-Smtp-Outgoing-Connection-Timeout,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outgoing-Connection-Timeout
-distinguishedName: CN=ms-Exch-Smtp-Outgoing-Connection-Timeout,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5002
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outgoing-Connection-Timeout
-adminDescription: ms-Exch-Smtp-Outgoing-Connection-Timeout
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutgoingConnectionTimeout
-name: ms-Exch-Smtp-Outgoing-Connection-Timeout
-schemaIDGUID: 436037e4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Outgoing-Port      
-# The outbound connection port number.
-#
-dn: CN=ms-Exch-Smtp-Outgoing-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outgoing-Port
-distinguishedName: CN=ms-Exch-Smtp-Outgoing-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5004
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outgoing-Port
-adminDescription: ms-Exch-Smtp-Outgoing-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutgoingPort
-name: ms-Exch-Smtp-Outgoing-Port
-schemaIDGUID: 43b3aa32-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-
-#
-# ms-Exch-Smtp-Outgoing-Secure-Port    
-# The outbound connection SSL port number.
-#
-dn: CN=ms-Exch-Smtp-Outgoing-Secure-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Outgoing-Secure-Port
-distinguishedName: CN=ms-Exch-Smtp-Outgoing-Secure-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5005
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Outgoing-Secure-Port
-adminDescription: ms-Exch-Smtp-Outgoing-Secure-Port
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpOutgoingSecurePort
-name: ms-Exch-Smtp-Outgoing-Secure-Port
-schemaIDGUID: 43f1a756-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Perform-Reverse-Dns-Lookup      
-# Performs reverse DNS lookup for delivery.
-#
-dn: CN=ms-Exch-Smtp-Perform-Reverse-Dns-Lookup,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Perform-Reverse-Dns-Lookup
-distinguishedName: CN=ms-Exch-Smtp-Perform-Reverse-Dns-Lookup,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5021
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Perform-Reverse-Dns-Lookup
-adminDescription: ms-Exch-Smtp-Perform-Reverse-Dns-Lookup
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpPerformReverseDnsLookup
-name: ms-Exch-Smtp-Perform-Reverse-Dns-Lookup
-schemaIDGUID: 441ef404-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Pickup-Directory        
-# The directory from which mail messages are being picked up.
-#
-dn: CN=ms-Exch-Smtp-Pickup-Directory,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Pickup-Directory
-distinguishedName: CN=ms-Exch-Smtp-Pickup-Directory,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5030
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Pickup-Directory
-adminDescription: ms-Exch-Smtp-Pickup-Directory
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpPickupDirectory
-name: ms-Exch-Smtp-Pickup-Directory
-schemaIDGUID: 444054f0-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Queue-Directory 
-# The directory where mail messages are being queued.
-#
-dn: CN=ms-Exch-Smtp-Queue-Directory,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Queue-Directory
-distinguishedName: CN=ms-Exch-Smtp-Queue-Directory,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5031
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Queue-Directory
-adminDescription: ms-Exch-Smtp-Queue-Directory
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpQueueDirectory
-name: ms-Exch-Smtp-Queue-Directory
-schemaIDGUID: 4468dcea-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Relay-For-Auth 
-# Checks if the relay IP requires authentication.
-#
-dn: CN=ms-Exch-Smtp-Relay-For-Auth,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Relay-For-Auth
-distinguishedName: CN=ms-Exch-Smtp-Relay-For-Auth,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5020
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Relay-For-Auth
-adminDescription: ms-Exch-Smtp-Relay-For-Auth
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRelayForAuth
-name: ms-Exch-Smtp-Relay-For-Auth
-schemaIDGUID: 449164e4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Relay-Ip-List   
-# List of Internet Protocols (IPs) for relay restriction.
-#
-dn: CN=ms-Exch-Smtp-Relay-Ip-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Relay-Ip-List
-distinguishedName: CN=ms-Exch-Smtp-Relay-Ip-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5048
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Relay-Ip-List
-adminDescription: ms-Exch-Smtp-Relay-Ip-List
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRelayIpList
-name: ms-Exch-Smtp-Relay-Ip-List
-schemaIDGUID: 44b5282a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Remote-Queue-Delay-Notification 
-# The time at which this resource should send a notification regarding
-# an undelivered outbound message.
-#
-dn: CN=ms-Exch-Smtp-Remote-Queue-Delay-Notification,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Remote-Queue-Delay-Notification
-distinguishedName: CN=ms-Exch-Smtp-Remote-Queue-Delay-Notification,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5013
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Remote-Queue-Delay-Notification
-adminDescription: ms-Exch-Smtp-Remote-Queue-Delay-Notification
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRemoteQueueDelayNotification
-name: ms-Exch-Smtp-Remote-Queue-Delay-Notification
-schemaIDGUID: 44ddb024-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Remote-Queue-Expiration-Timeout    
-# The time at which this resource should expire an undelivered
-# outbound message.
-#
-dn: CN=ms-Exch-Smtp-Remote-Queue-Expiration-Timeout,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Remote-Queue-Expiration-Timeout
-distinguishedName: CN=ms-Exch-Smtp-Remote-Queue-Expiration-Timeout,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5012
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Remote-Queue-Expiration-Timeout
-adminDescription: ms-Exch-Smtp-Remote-Queue-Expiration-Timeout
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRemoteQueueExpirationTimeout
-name: ms-Exch-Smtp-Remote-Queue-Expiration-Timeout
-schemaIDGUID: 4501736a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Remote-Queue-Retries   
-# The first, second, third, and subsequent retries for remote mail
-# delivery.
-#
-dn: CN=ms-Exch-Smtp-Remote-Queue-Retries,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Remote-Queue-Retries
-distinguishedName: CN=ms-Exch-Smtp-Remote-Queue-Retries,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5046
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Remote-Queue-Retries
-adminDescription: ms-Exch-Smtp-Remote-Queue-Retries
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRemoteQueueRetries
-name: ms-Exch-Smtp-Remote-Queue-Retries
-schemaIDGUID: 4527990a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Routing-Table-Type       
-# The routing table type for DSAccess.
-#
-dn: CN=ms-Exch-Smtp-Routing-Table-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Routing-Table-Type
-distinguishedName: CN=ms-Exch-Smtp-Routing-Table-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5039
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Routing-Table-Type
-adminDescription: ms-Exch-Smtp-Routing-Table-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpRoutingTableType
-name: ms-Exch-Smtp-Routing-Table-Type
-schemaIDGUID: 454dbeaa-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Smtp-Send-Badmail-To 
-# The address to send bad mail to.
-#
-dn: CN=ms-Exch-Smtp-Send-Badmail-To,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Send-Badmail-To
-distinguishedName: CN=ms-Exch-Smtp-Send-Badmail-To,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5028
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Send-Badmail-To
-adminDescription: ms-Exch-Smtp-Send-Badmail-To
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpSendBadmailTo
-name: ms-Exch-Smtp-Send-Badmail-To
-schemaIDGUID: 4586f71a-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Send-NDR-To     
-# The address to send a non-delivery report to.
-#
-dn: CN=ms-Exch-Smtp-Send-NDR-To,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Send-NDR-To
-distinguishedName: CN=ms-Exch-Smtp-Send-NDR-To,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5027
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Send-NDR-To
-adminDescription: ms-Exch-Smtp-Send-NDR-To
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpSendNDRTo
-name: ms-Exch-Smtp-Send-NDR-To
-schemaIDGUID: 45bb6ad6-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Smart-Host  
-# Sets a Smart Host route domain for mail outbound from this resource.
-#
-dn: CN=ms-Exch-Smtp-Smart-Host,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Smart-Host
-distinguishedName: CN=ms-Exch-Smtp-Smart-Host,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5024
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Smart-Host
-adminDescription: ms-Exch-Smtp-Smart-Host
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpSmartHost
-name: ms-Exch-Smtp-Smart-Host
-schemaIDGUID: 45e19076-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-Smart-Host-Type 
-# The Smart Host type.
-#
-dn: CN=ms-Exch-Smtp-Smart-Host-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-Smart-Host-Type
-distinguishedName: CN=ms-Exch-Smtp-Smart-Host-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5014
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Smart-Host-Type
-adminDescription: ms-Exch-Smtp-Smart-Host-Type
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchSmtpSmartHostType
-name: ms-Exch-Smtp-Smart-Host-Type
-schemaIDGUID: 46008f08-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Smtp-TRN-Smart-Host  
-# Contains an alternate Smart Host to which the server should issue
-# the TURN or ETRN command.
-#
-dn: CN=ms-Exch-Smtp-TRN-Smart-Host,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Smtp-TRN-Smart-Host
-distinguishedName: CN=ms-Exch-Smtp-TRN-Smart-Host,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12531
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-TRN-Smart-Host
-adminDescription: ms-Exch-Smtp-TRN-Smart-Host
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchSmtpTRNSmartHost
-name: ms-Exch-Smtp-TRN-Smart-Host
-schemaIDGUID: be41789c-2da8-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Source-BH-Address 
-#
-dn: CN=ms-Exch-Source-BH-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Source-BH-Address
-distinguishedName: CN=ms-Exch-Source-BH-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12509
-attributeSyntax: 2.5.5.4
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 255
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Source-BH-Address
-adminDescription: ms-Exch-Source-BH-Address
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchSourceBHAddress
-name: ms-Exch-Source-BH-Address
-schemaIDGUID: 203d2f32-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Source-Bridgehead-Servers-DN           
-# Pointers to SMTP virtual servers of servers in bridgehead on the
-# local side of Exchange Connector.
-#
-dn: CN=ms-Exch-Source-Bridgehead-Servers-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Source-Bridgehead-Servers-DN
-distinguishedName: CN=ms-Exch-Source-Bridgehead-Servers-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12511
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1002
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Source-Bridgehead-Servers-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Source-Bridgehead-Servers-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchSourceBridgeheadServersDN
-name: ms-Exch-Source-Bridgehead-Servers-DN
-schemaIDGUID: 206f4094-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Space-Last-Computed      
-# The time at which the site-proxy-space was last computed.
-#
-dn: CN=ms-Exch-Space-Last-Computed,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Space-Last-Computed
-distinguishedName: CN=ms-Exch-Space-Last-Computed,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.386
-attributeSyntax: 2.5.5.11
-isSingleValued: TRUE
-mAPIID: 33081
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Space-Last-Computed
-adminDescription: ms-Exch-Space-Last-Computed
-oMSyntax: 23
-searchFlags: 0
-lDAPDisplayName: spaceLastComputed
-name: ms-Exch-Space-Last-Computed
-schemaIDGUID: 9928d7bc-b093-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Submission-Cont-Length   
-# Contains the maximum size message allowed to be submitted, either
-# globally or by this user.
-#
-dn: CN=ms-Exch-Submission-Cont-Length,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Submission-Cont-Length
-distinguishedName: CN=ms-Exch-Submission-Cont-Length,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.280
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33084
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Submission-Cont-Length
-adminDescription: ms-Exch-Submission-Cont-Length
-oMSyntax: 2
-searchFlags: 16
-lDAPDisplayName: submissionContLength
-name: ms-Exch-Submission-Cont-Length
-schemaIDGUID: bf967a3e-0de6-11d0-a285-00aa003049e2
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-SubmitRelaySD          
-#
-dn: CN=ms-Exch-SubmitRelaySD,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-SubmitRelaySD
-distinguishedName: CN=ms-Exch-SubmitRelaySD,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.5060
-attributeSyntax: 2.5.5.15
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SubmitRelaySD
-adminDescription: ms-Exch-SubmitRelaySD
-oMSyntax: 66
-searchFlags: 0
-lDAPDisplayName: msExchSubmitRelaySD
-name: ms-Exch-SubmitRelaySD
-schemaIDGUID: e2cefbcc-dcc1-45a5-bab8-d5f4bd78884d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Supported-Algorithms    
-#
-dn: CN=ms-Exch-Supported-Algorithms,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Supported-Algorithms
-distinguishedName: CN=ms-Exch-Supported-Algorithms,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.597
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32767
-mAPIID: 35925
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Supported-Algorithms
-adminDescription: ms-Exch-Supported-Algorithms
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: supportedAlgorithms
-name: ms-Exch-Supported-Algorithms
-schemaIDGUID: 1677588e-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Supporting-Stack        
-#
-dn: CN=ms-Exch-Supporting-Stack,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Supporting-Stack
-distinguishedName: CN=ms-Exch-Supporting-Stack,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.28
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33086
-linkID: 132
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Supporting-Stack
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Supporting-Stack
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: supportingStack
-name: ms-Exch-Supporting-Stack
-schemaIDGUID: a8df7480-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Supporting-Stack-BL     
-#
-dn: CN=ms-Exch-Supporting-Stack-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Supporting-Stack-BL
-distinguishedName: CN=ms-Exch-Supporting-Stack-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.357
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33087
-linkID: 133
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Supporting-Stack-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Supporting-Stack-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: supportingStackBL
-name: ms-Exch-Supporting-Stack-BL
-schemaIDGUID: 16775891-47f3-11d1-a9c3-0000f80367c1
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Support-SMIME-Signatures 
-#
-dn: CN=ms-Exch-Support-SMIME-Signatures,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Support-SMIME-Signatures
-distinguishedName: CN=ms-Exch-Support-SMIME-Signatures,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.590
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 35912
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Support-SMIME-Signatures
-adminDescription: ms-Exch-Support-SMIME-Signatures
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: supportSMIMESignatures
-name: ms-Exch-Support-SMIME-Signatures
-schemaIDGUID: a8df747f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Synchronization-Direction    
-# The direction in which the directories will be synchronized.
-#
-dn: CN=ms-Exch-Synchronization-Direction,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Synchronization-Direction
-distinguishedName: CN=ms-Exch-Synchronization-Direction,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.1
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 2
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Synchronization-Direction
-adminDescription: ms-Exch-Synchronization-Direction
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: msExchSynchronizationDirection
-name: ms-Exch-Synchronization-Direction
-schemaIDGUID: 20a151f6-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-S-Selector          
-#
-dn: CN=ms-Exch-S-Selector,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-S-Selector
-distinguishedName: CN=ms-Exch-S-Selector,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.284
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 33067
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-S-Selector
-adminDescription: ms-Exch-S-Selector
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: sSelector
-name: ms-Exch-S-Selector
-schemaIDGUID: a8df746c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-S-Selector-Inbound   
-#
-dn: CN=ms-Exch-S-Selector-Inbound,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-S-Selector-Inbound
-distinguishedName: CN=ms-Exch-S-Selector-Inbound,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.46
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 16
-mAPIID: 33068
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-S-Selector-Inbound
-adminDescription: ms-Exch-S-Selector-Inbound
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: sSelectorInbound
-name: ms-Exch-S-Selector-Inbound
-schemaIDGUID: a8df746d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Target-Address       
-# Contains the destination address for this object.
-dn: CN=ms-Exch-Target-Address,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Target-Address
-distinguishedName: CN=ms-Exch-Target-Address,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.352
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1123
-mAPIID: 32785
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Target-Address
-adminDescription: ms-Exch-Target-Address
-oMSyntax: 64
-searchFlags: 1
-lDAPDisplayName: targetAddress
-name: ms-Exch-Target-Address
-schemaIDGUID: f0f8ff9f-1191-11d0-a060-00aa006c33ed
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Target-Bridgehead-Servers-DN 
-# Pointers to bridgehead SMTP virtual servers in the connector target
-# routing group (RG).
-#
-dn: CN=ms-Exch-Target-Bridgehead-Servers-DN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Target-Bridgehead-Servers-DN
-distinguishedName: CN=ms-Exch-Target-Bridgehead-Servers-DN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12514
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1004
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Target-Bridgehead-Servers-DN
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Target-Bridgehead-Servers-DN
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchTargetBridgeheadServersDN
-name: ms-Exch-Target-Bridgehead-Servers-DN
-schemaIDGUID: 20da8a66-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Target-MTAs      
-# Used by Exchange Server 5.5 to indicate the message transfer agents
-# (MTAs) on the remote side of a connector.
-#
-dn: CN=ms-Exch-Target-MTAs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Target-MTAs
-distinguishedName: CN=ms-Exch-Target-MTAs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.259
-attributeSyntax: 2.5.5.4
-isSingleValued: FALSE
-rangeLower: 1
-rangeUpper: 36
-mAPIID: 33090
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Target-MTAs
-adminDescription: ms-Exch-Target-MTAs
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: targetMTAs
-name: ms-Exch-Target-MTAs
-schemaIDGUID: a8df7483-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Telephone-Assistant  
-# The telephone number of the assistant that corresponds to this user.
-#
-dn: CN=ms-Exch-Telephone-Assistant,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Telephone-Assistant
-distinguishedName: CN=ms-Exch-Telephone-Assistant,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.79
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 64
-mAPIID: 14894
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Telephone-Assistant
-adminDescription: ms-Exch-Telephone-Assistant
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: telephoneAssistant
-name: ms-Exch-Telephone-Assistant
-schemaIDGUID: a8df7484-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Telephone-Personal-Pager 
-#
-dn: CN=ms-Exch-Telephone-Personal-Pager,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Telephone-Personal-Pager
-distinguishedName: CN=ms-Exch-Telephone-Personal-Pager,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.612
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 35944
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Telephone-Personal-Pager
-adminDescription: ms-Exch-Telephone-Personal-Pager
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: personalPager
-name: ms-Exch-Telephone-Personal-Pager
-schemaIDGUID: a8df7487-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Template-RDNs         
-# The Relative Distinguished Names (RDNs) to the child template
-# objects.
-#
-dn: CN=ms-Exch-Template-RDNs,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Template-RDNs
-distinguishedName: CN=ms-Exch-Template-RDNs,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.65
-attributeSyntax: 2.5.5.4
-isSingleValued: FALSE
-mAPIID: 65528
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Template-RDNs
-adminDescription: ms-Exch-Template-RDNs
-oMSyntax: 20
-searchFlags: 0
-lDAPDisplayName: msExchTemplateRDNs
-name: ms-Exch-Template-RDNs
-schemaIDGUID: 211fae98-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Temp-Assoc-Threshold 
-#
-dn: CN=ms-Exch-Temp-Assoc-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Temp-Assoc-Threshold
-distinguishedName: CN=ms-Exch-Temp-Assoc-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.329
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32767
-mAPIID: 33092
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Temp-Assoc-Threshold
-adminDescription: ms-Exch-Temp-Assoc-Threshold
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: tempAssocThreshold
-name: ms-Exch-Temp-Assoc-Threshold
-schemaIDGUID: a8df7488-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Tracking-Log-Path-Name    
-#
-dn: CN=ms-Exch-Tracking-Log-Path-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Tracking-Log-Path-Name
-distinguishedName: CN=ms-Exch-Tracking-Log-Path-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.347
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 256
-mAPIID: 33094
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Tracking-Log-Path-Name
-adminDescription: ms-Exch-Tracking-Log-Path-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: trackingLogPathName
-name: ms-Exch-Tracking-Log-Path-Name
-schemaIDGUID: bf967a57-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Track-Duplicates         
-# The number of hours for which information about received messages
-# will be kept and duplicates will be eliminated.
-#
-dn: CN=ms-Exch-Track-Duplicates,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Track-Duplicates
-distinguishedName: CN=ms-Exch-Track-Duplicates,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.11006
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Track-Duplicates
-adminDescription: ms-Exch-Track-Duplicates
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchTrackDuplicates
-name: ms-Exch-Track-Duplicates
-schemaIDGUID: 2196e42c-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Transfer-Retry-Interval 
-#
-dn: CN=ms-Exch-Transfer-Retry-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Transfer-Retry-Interval
-distinguishedName: CN=ms-Exch-Transfer-Retry-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.133
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33097
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transfer-Retry-Interval
-adminDescription: ms-Exch-Transfer-Retry-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transferRetryInterval
-name: ms-Exch-Transfer-Retry-Interval
-schemaIDGUID: a8df748c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Transfer-Timeout-Non-Urgent 
-#
-dn: CN=ms-Exch-Transfer-Timeout-Non-Urgent,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Transfer-Timeout-Non-Urgent
-distinguishedName: CN=ms-Exch-Transfer-Timeout-Non-Urgent,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.136
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33098
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transfer-Timeout-Non-Urgent
-adminDescription: ms-Exch-Transfer-Timeout-Non-Urgent
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transferTimeoutNonUrgent
-name: ms-Exch-Transfer-Timeout-Non-Urgent
-schemaIDGUID: a8df748d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Transfer-Timeout-Normal     
-#
-dn: CN=ms-Exch-Transfer-Timeout-Normal,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Transfer-Timeout-Normal
-distinguishedName: CN=ms-Exch-Transfer-Timeout-Normal,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.137
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33099
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transfer-Timeout-Normal
-adminDescription: ms-Exch-Transfer-Timeout-Normal
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transferTimeoutNormal
-name: ms-Exch-Transfer-Timeout-Normal
-schemaIDGUID: a8df748e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Transfer-Timeout-Urgent     
-#
-dn: CN=ms-Exch-Transfer-Timeout-Urgent,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Transfer-Timeout-Urgent
-distinguishedName: CN=ms-Exch-Transfer-Timeout-Urgent,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.142
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33100
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transfer-Timeout-Urgent
-adminDescription: ms-Exch-Transfer-Timeout-Urgent
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transferTimeoutUrgent
-name: ms-Exch-Transfer-Timeout-Urgent
-schemaIDGUID: a8df748f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Translation-Table-Used      
-#
-dn: CN=ms-Exch-Translation-Table-Used,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Translation-Table-Used
-distinguishedName: CN=ms-Exch-Translation-Table-Used,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.396
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33101
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Translation-Table-Used
-adminDescription: ms-Exch-Translation-Table-Used
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: translationTableUsed
-name: ms-Exch-Translation-Table-Used
-schemaIDGUID: a8df7490-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Transport-Expedited-Data    
-#
-dn: CN=ms-Exch-Transport-Expedited-Data,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Transport-Expedited-Data
-distinguishedName: CN=ms-Exch-Transport-Expedited-Data,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.150
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33102
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transport-Expedited-Data
-adminDescription: ms-Exch-Transport-Expedited-Data
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: transportExpeditedData
-name: ms-Exch-Transport-Expedited-Data
-schemaIDGUID: a8df7491-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Trans-Retry-Mins           
-#
-dn: CN=ms-Exch-Trans-Retry-Mins,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Trans-Retry-Mins
-distinguishedName: CN=ms-Exch-Trans-Retry-Mins,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.219
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33095
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Trans-Retry-Mins
-adminDescription: ms-Exch-Trans-Retry-Mins
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transRetryMins
-name: ms-Exch-Trans-Retry-Mins
-schemaIDGUID: a8df748a-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Trans-Timeout-Mins         
-#
-dn: CN=ms-Exch-Trans-Timeout-Mins,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Trans-Timeout-Mins
-distinguishedName: CN=ms-Exch-Trans-Timeout-Mins,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.220
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-mAPIID: 33096
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Trans-Timeout-Mins
-adminDescription: ms-Exch-Trans-Timeout-Mins
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: transTimeoutMins
-name: ms-Exch-Trans-Timeout-Mins
-schemaIDGUID: a8df748b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Trk-Log-Cleaning-Interval   
-# The number of days after which to remove a tracking log file.
-#
-dn: CN=ms-Exch-Trk-Log-Cleaning-Interval,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Trk-Log-Cleaning-Interval
-distinguishedName: CN=ms-Exch-Trk-Log-Cleaning-Interval,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.50016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Trk-Log-Cleaning-Interval
-adminDescription: ms-Exch-Trk-Log-Cleaning-Interval
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchTrkLogCleaningInterval
-name: ms-Exch-Trk-Log-Cleaning-Interval
-schemaIDGUID: 21d27ef6-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Trust-Level  
-#
-dn: CN=ms-Exch-Trust-Level,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Trust-Level
-distinguishedName: CN=ms-Exch-Trust-Level,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.70
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 100
-mAPIID: 33103
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Trust-Level
-adminDescription: ms-Exch-Trust-Level
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: trustLevel
-name: ms-Exch-Trust-Level
-schemaIDGUID: a8df7492-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-TUI-Password 
-# The user logon authentication password when accessed by phone.
-#
-dn: CN=ms-Exch-TUI-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-TUI-Password
-distinguishedName: CN=ms-Exch-TUI-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17025
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-TUI-Password
-adminDescription: ms-Exch-TUI-Password
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: msExchTUIPassword
-name: ms-Exch-TUI-Password
-schemaIDGUID: 567d521f-2f6a-11d3-aa6c-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-TUI-Speed   
-# The speed at which to play text to speech.
-#
-dn: CN=ms-Exch-TUI-Speed,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-TUI-Speed
-distinguishedName: CN=ms-Exch-TUI-Speed,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17027
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-TUI-Speed
-adminDescription: ms-Exch-TUI-Speed
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchTUISpeed
-name: ms-Exch-TUI-Speed
-schemaIDGUID: 567d522a-2f6a-11d3-aa6c-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-TUI-Volume   
-# The volume at which to play voice mail and text-to-speech mail via
-# Telephone User Interface (TUI).
-#
-dn: CN=ms-Exch-TUI-Volume,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-TUI-Volume
-distinguishedName: CN=ms-Exch-TUI-Volume,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17026
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-TUI-Volume
-adminDescription: ms-Exch-TUI-Volume
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchTUIVolume
-name: ms-Exch-TUI-Volume
-schemaIDGUID: 567d5225-2f6a-11d3-aa6c-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Turf-List 
-#
-dn: CN=ms-Exch-Turf-List,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Turf-List
-distinguishedName: CN=ms-Exch-Turf-List,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5051
-attributeSyntax: 2.5.5.5
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Turf-List
-adminDescription: ms-Exch-Turf-List
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: msExchTurfList
-name: ms-Exch-Turf-List
-schemaIDGUID: 8b60f7f8-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Turf-List-Action    
-#
-dn: CN=ms-Exch-Turf-List-Action,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Turf-List-Action
-distinguishedName: CN=ms-Exch-Turf-List-Action,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12535
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Turf-List-Action
-adminDescription: ms-Exch-Turf-List-Action
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchTurfListAction
-name: ms-Exch-Turf-List-Action
-schemaIDGUID: 0b836daa-3b20-11d3-aa6f-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Turf-List-Names     
-#
-dn: CN=ms-Exch-Turf-List-Names,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Turf-List-Names
-distinguishedName: CN=ms-Exch-Turf-List-Names,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12534
-attributeSyntax: 2.5.5.12
-isSingleValued: FALSE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Turf-List-Names
-adminDescription: ms-Exch-Turf-List-Names
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchTurfListNames
-name: ms-Exch-Turf-List-Names
-schemaIDGUID: 0b836da0-3b20-11d3-aa6f-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Turf-List-Options   
-#
-dn: CN=ms-Exch-Turf-List-Options,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Turf-List-Options
-distinguishedName: CN=ms-Exch-Turf-List-Options,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.5054
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Turf-List-Options
-adminDescription: ms-Exch-Turf-List-Options
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchTurfListOptions
-name: ms-Exch-Turf-List-Options
-schemaIDGUID: 01dbe64c-bfeb-47cd-9939-8911946bdd6d
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Turn-Request-Threshold  
-#
-dn: CN=ms-Exch-Turn-Request-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Turn-Request-Threshold
-distinguishedName: CN=ms-Exch-Turn-Request-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.38
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33104
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Turn-Request-Threshold
-adminDescription: ms-Exch-Turn-Request-Threshold
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: turnRequestThreshold
-name: ms-Exch-Turn-Request-Threshold
-schemaIDGUID: a8df7493-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Two-Way-Alternate-Facility  
-#
-dn: CN=ms-Exch-Two-Way-Alternate-Facility,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Two-Way-Alternate-Facility
-distinguishedName: CN=ms-Exch-Two-Way-Alternate-Facility,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.40
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33105
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Two-Way-Alternate-Facility
-adminDescription: ms-Exch-Two-Way-Alternate-Facility
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: twoWayAlternateFacility
-name: ms-Exch-Two-Way-Alternate-Facility
-schemaIDGUID: a8df7494-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Type            
-#
-dn: CN=ms-Exch-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Type
-distinguishedName: CN=ms-Exch-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.573
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 35896
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Type
-adminDescription: ms-Exch-Type
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: type
-name: ms-Exch-Type
-schemaIDGUID: 167758aa-47f3-11d1-a9c3-0000f80367c1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-T-Selector      
-#
-dn: CN=ms-Exch-T-Selector,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-T-Selector
-distinguishedName: CN=ms-Exch-T-Selector,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.283
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 32
-mAPIID: 33088
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-T-Selector
-adminDescription: ms-Exch-T-Selector
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: tSelector
-name: ms-Exch-T-Selector
-schemaIDGUID: a8df7481-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Uce-Block-Threshold  
-#
-dn: CN=ms-Exch-Uce-Block-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Uce-Block-Threshold
-distinguishedName: CN=ms-Exch-Uce-Block-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12601
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Uce-Block-Threshold
-adminDescription: ms-Exch-Uce-Block-Threshold
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchUceBlockThreshold
-name: ms-Exch-Uce-Block-Threshold
-schemaIDGUID: 9f297c14-d715-4631-a259-bf51dc52eac1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Uce-Enabled         
-#
-dn: CN=ms-Exch-Uce-Enabled,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Uce-Enabled
-distinguishedName: CN=ms-Exch-Uce-Enabled,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12600
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Uce-Enabled
-adminDescription: ms-Exch-Uce-Enabled
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchUceEnabled
-name: ms-Exch-Uce-Enabled
-schemaIDGUID: 15e2db2e-7206-4109-9b94-830f4def1b05
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Uce-Store-Action-Threshold   
-#
-dn: CN=ms-Exch-Uce-Store-Action-Threshold,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Uce-Store-Action-Threshold
-distinguishedName: CN=ms-Exch-Uce-Store-Action-Threshold,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.12602
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Uce-Store-Action-Threshold
-adminDescription: ms-Exch-Uce-Store-Action-Threshold
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchUceStoreActionThreshold
-name: ms-Exch-Uce-Store-Action-Threshold
-schemaIDGUID: 44ccbd60-6ede-46f0-8f13-931a9bb5b8e8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Unauth-Orig     
-# Contains objects that may not send to this recipient.
-#
-dn: CN=ms-Exch-Unauth-Orig,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Unauth-Orig
-distinguishedName: CN=ms-Exch-Unauth-Orig,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.221
-attributeSyntax: 2.5.5.7
-isSingleValued: FALSE
-linkID: 114
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Unauth-Orig
-oMObjectClass:: VgYBAgULHQ==
-adminDescription: ms-Exch-Unauth-Orig
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: unauthOrig
-name: ms-Exch-Unauth-Orig
-schemaIDGUID: a8df7495-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Unauth-Orig-BL   
-# A backlink to ms-Exch-Unauth-Orig.
-#
-dn: CN=ms-Exch-Unauth-Orig-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Unauth-Orig-BL
-distinguishedName: CN=ms-Exch-Unauth-Orig-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.292
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-mAPIID: 33106
-linkID: 115
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Unauth-Orig-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Unauth-Orig-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: unauthOrigBL
-name: ms-Exch-Unauth-Orig-BL
-schemaIDGUID: a8df7496-c5ea-11d1-bbcb-0080c76670c0
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-systemFlags: 1
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-UNC-Password   
-# Specifies the encrypted password used to gain access to Universal
-# Naming Convention (UNC) virtual roots.
-#
-dn: CN=ms-Exch-UNC-Password,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-UNC-Password
-distinguishedName: CN=ms-Exch-UNC-Password,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15004
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-UNC-Password
-adminDescription: ms-Exch-UNC-Password
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchUNCPassword
-name: ms-Exch-UNC-Password
-schemaIDGUID: 8c07dc94-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-UNC-Username  
-# Specifies the user name for UNC virtual roots.
-#
-dn: CN=ms-Exch-UNC-Username,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-UNC-Username
-distinguishedName: CN=ms-Exch-UNC-Username,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15003
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-UNC-Username
-adminDescription: ms-Exch-UNC-Username
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchUNCUsername
-name: ms-Exch-UNC-Username
-schemaIDGUID: 8be8de02-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Unmerged-Atts        
-# A set of DN syntax attribute values that were not set on the target
-# object because the object they pointed to was not found in the
-# target directory.
-#
-dn: CN=ms-Exch-Unmerged-Atts,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Unmerged-Atts
-distinguishedName: CN=ms-Exch-Unmerged-Atts,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.48
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Unmerged-Atts
-adminDescription: ms-Exch-Unmerged-Atts
-oMSyntax: 4
-searchFlags: 1
-lDAPDisplayName: unmergedAtts
-name: ms-Exch-Unmerged-Atts
-schemaIDGUID: 9947d64e-b093-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Unmerged-Atts-Pt  
-# Exchange-specific unmerged attributes.
-#
-dn: CN=ms-Exch-Unmerged-Atts-Pt,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Unmerged-Atts-Pt
-distinguishedName: CN=ms-Exch-Unmerged-Atts-Pt,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.90
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Unmerged-Atts-Pt
-adminDescription: ms-Exch-Unmerged-Atts-Pt
-oMSyntax: 4
-searchFlags: 1
-lDAPDisplayName: msExchUnmergedAttsPt
-name: ms-Exch-Unmerged-Atts-Pt
-schemaIDGUID: a5924ad4-c597-4db1-8f9d-1799909dc166
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Usenet-Site-Name     
-#
-dn: CN=ms-Exch-Usenet-Site-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Usenet-Site-Name
-distinguishedName: CN=ms-Exch-Usenet-Site-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.484
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33161
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Usenet-Site-Name
-adminDescription: ms-Exch-Usenet-Site-Name
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: usenetSiteName
-name: ms-Exch-Usenet-Site-Name
-schemaIDGUID: f0f8ffa8-1191-11d0-a060-00aa006c33ed
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-User-Account-Control 
-#
-dn: CN=ms-Exch-User-Account-Control,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-User-Account-Control
-distinguishedName: CN=ms-Exch-User-Account-Control,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.101
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-User-Account-Control
-adminDescription: ms-Exch-User-Account-Control
-oMSyntax: 2
-searchFlags: 25
-lDAPDisplayName: msExchUserAccountControl
-name: ms-Exch-User-Account-Control
-schemaIDGUID: 07c31f12-a3e8-4fa0-af8e-4932c75b2241
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Use-OAB    
-# The OAB that this mailbox store or this user uses.
-#
-dn: CN=ms-Exch-Use-OAB,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Use-OAB
-distinguishedName: CN=ms-Exch-Use-OAB,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.69
-attributeSyntax: 2.5.5.1
-isSingleValued: TRUE
-linkID: 1014
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Use-OAB
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Use-OAB
-oMSyntax: 127
-searchFlags: 16
-lDAPDisplayName: msExchUseOAB
-name: ms-Exch-Use-OAB
-schemaIDGUID: 2209550c-b099-11d2-aa06-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Use-OAB-BL   
-#
-dn: CN=ms-Exch-Use-OAB-BL,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Use-OAB-BL
-distinguishedName: CN=ms-Exch-Use-OAB-BL,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.70
-attributeSyntax: 2.5.5.1
-isSingleValued: FALSE
-linkID: 1015
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Use-OAB-BL
-oMObjectClass:: KwwCh3McAIVK
-adminDescription: ms-Exch-Use-OAB-BL
-oMSyntax: 127
-searchFlags: 0
-lDAPDisplayName: msExchUseOABBL
-name: ms-Exch-Use-OAB-BL
-schemaIDGUID: 22428d7c-b099-11d2-aa06-00c04f8eedd8
-systemFlags: 1
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Use-Site-Values   
-#
-dn: CN=ms-Exch-Use-Site-Values,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Use-Site-Values
-distinguishedName: CN=ms-Exch-Use-Site-Values,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.478
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33155
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Use-Site-Values
-adminDescription: ms-Exch-Use-Site-Values
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: useSiteValues
-name: ms-Exch-Use-Site-Values
-schemaIDGUID: a8df7497-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Visibility-Mask   
-# The data conference visibility mask.
-dn: CN=ms-Exch-Visibility-Mask,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Visibility-Mask
-distinguishedName: CN=ms-Exch-Visibility-Mask,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.9016
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Visibility-Mask
-adminDescription: ms-Exch-Visibility-Mask
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: msExchVisibilityMask
-name: ms-Exch-Visibility-Mask
-schemaIDGUID: 22770138-b099-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-Voice-Mailbox-ID     
-# The telephone extension of a user's mailbox ID when accessed by phone.
-#
-dn: CN=ms-Exch-Voice-Mailbox-ID,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Voice-Mailbox-ID
-distinguishedName: CN=ms-Exch-Voice-Mailbox-ID,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17019
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Voice-Mailbox-ID
-adminDescription: ms-Exch-Voice-Mailbox-ID
-oMSyntax: 64
-searchFlags: 1
-lDAPDisplayName: msExchVoiceMailboxID
-name: ms-Exch-Voice-Mailbox-ID
-schemaIDGUID: 567d5200-2f6a-11d3-aa6c-00c04f8eedd8
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: TRUE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-VPIM-Convert-Inbound     
-# Convert inbound Voice Profile for Internet Mail (VPIM) messages via
-# SMTP to Multimedia Message format.
-#
-dn: CN=ms-Exch-VPIM-Convert-Inbound,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-VPIM-Convert-Inbound
-distinguishedName: CN=ms-Exch-VPIM-Convert-Inbound,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17008
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-VPIM-Convert-Inbound
-adminDescription: ms-Exch-VPIM-Convert-Inbound
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchVPIMConvertInbound
-name: ms-Exch-VPIM-Convert-Inbound
-schemaIDGUID: 2d0977eb-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-VPIM-Convert-Outbound           
-# Convert outbound Multimedia Message format to Voice Profile for
-# Internet Mail (VPIM) based on address or non-delivery report (NDR).
-#
-dn: CN=ms-Exch-VPIM-Convert-Outbound,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-VPIM-Convert-Outbound
-distinguishedName: CN=ms-Exch-VPIM-Convert-Outbound,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.17009
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-VPIM-Convert-Outbound
-adminDescription: ms-Exch-VPIM-Convert-Outbound
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: msExchVPIMConvertOutbound
-name: ms-Exch-VPIM-Convert-Outbound
-schemaIDGUID: 2d0977f1-2b54-11d3-aa6b-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Web-Access-Name   
-# The name through which users will access Exchange data via HTTP.
-#
-dn: CN=ms-Exch-Web-Access-Name,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-Web-Access-Name
-distinguishedName: CN=ms-Exch-Web-Access-Name,${SCHEMADN}
-attributeID: 1.2.840.113556.1.4.7000.102.15007
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Web-Access-Name
-adminDescription: ms-Exch-Web-Access-Name
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: msExchWebAccessName
-name: ms-Exch-Web-Access-Name
-schemaIDGUID: 8df7c5b4-b09e-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-Call-User-Data-Incoming    
-#
-dn: CN=ms-Exch-X25-Call-User-Data-Incoming,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Call-User-Data-Incoming
-distinguishedName: CN=ms-Exch-X25-Call-User-Data-Incoming,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.316
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33113
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Call-User-Data-Incoming
-adminDescription: ms-Exch-X25-Call-User-Data-Incoming
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x25CallUserDataIncoming
-name: ms-Exch-X25-Call-User-Data-Incoming
-schemaIDGUID: a8df749b-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X25-Call-User-Data-Outgoing    
-#
-dn: CN=ms-Exch-X25-Call-User-Data-Outgoing,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Call-User-Data-Outgoing
-distinguishedName: CN=ms-Exch-X25-Call-User-Data-Outgoing,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.317
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 128
-mAPIID: 33114
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Call-User-Data-Outgoing
-adminDescription: ms-Exch-X25-Call-User-Data-Outgoing
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x25CallUserDataOutgoing
-name: ms-Exch-X25-Call-User-Data-Outgoing
-schemaIDGUID: a8df749c-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-Facilities-Data-Incoming   
-#
-dn: CN=ms-Exch-X25-Facilities-Data-Incoming,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Facilities-Data-Incoming
-distinguishedName: CN=ms-Exch-X25-Facilities-Data-Incoming,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.318
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 109
-mAPIID: 33115
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Facilities-Data-Incoming
-adminDescription: ms-Exch-X25-Facilities-Data-Incoming
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x25FacilitiesDataIncoming
-name: ms-Exch-X25-Facilities-Data-Incoming
-schemaIDGUID: a8df749d-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-Facilities-Data-Outgoing   
-#
-dn: CN=ms-Exch-X25-Facilities-Data-Outgoing,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Facilities-Data-Outgoing
-distinguishedName: CN=ms-Exch-X25-Facilities-Data-Outgoing,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.319
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 109
-mAPIID: 33116
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Facilities-Data-Outgoing
-adminDescription: ms-Exch-X25-Facilities-Data-Outgoing
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x25FacilitiesDataOutgoing
-name: ms-Exch-X25-Facilities-Data-Outgoing
-schemaIDGUID: a8df749e-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-#
-# ms-Exch-X25-Leased-Line-Port           
-#
-dn: CN=ms-Exch-X25-Leased-Line-Port,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Leased-Line-Port
-distinguishedName: CN=ms-Exch-X25-Leased-Line-Port,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.321
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 3
-mAPIID: 33117
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Leased-Line-Port
-adminDescription: ms-Exch-X25-Leased-Line-Port
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x25LeasedLinePort
-name: ms-Exch-X25-Leased-Line-Port
-schemaIDGUID: a8df749f-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X25-Leased-Or-Switched         
-#
-dn: CN=ms-Exch-X25-Leased-Or-Switched,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Leased-Or-Switched
-distinguishedName: CN=ms-Exch-X25-Leased-Or-Switched,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.372
-attributeSyntax: 2.5.5.8
-isSingleValued: TRUE
-mAPIID: 33118
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Leased-Or-Switched
-adminDescription: ms-Exch-X25-Leased-Or-Switched
-oMSyntax: 1
-searchFlags: 0
-lDAPDisplayName: x25LeasedOrSwitched
-name: ms-Exch-X25-Leased-Or-Switched
-schemaIDGUID: a8df74a0-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X25-Remote-MTA-Phone           
-#
-dn: CN=ms-Exch-X25-Remote-MTA-Phone,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X25-Remote-MTA-Phone
-distinguishedName: CN=ms-Exch-X25-Remote-MTA-Phone,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.373
-attributeSyntax: 2.5.5.5
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 55
-mAPIID: 33119
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X25-Remote-MTA-Phone
-adminDescription: ms-Exch-X25-Remote-MTA-Phone
-oMSyntax: 19
-searchFlags: 0
-lDAPDisplayName: x25RemoteMTAPhone
-name: ms-Exch-X25-Remote-MTA-Phone
-schemaIDGUID: a8df74a1-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X400-Attachment-Type           
-#
-dn: CN=ms-Exch-X400-Attachment-Type,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X400-Attachment-Type
-distinguishedName: CN=ms-Exch-X400-Attachment-Type,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.99
-attributeSyntax: 2.5.5.10
-isSingleValued: TRUE
-mAPIID: 33120
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X400-Attachment-Type
-adminDescription: ms-Exch-X400-Attachment-Type
-oMSyntax: 4
-searchFlags: 0
-lDAPDisplayName: x400AttachmentType
-name: ms-Exch-X400-Attachment-Type
-schemaIDGUID: a8df74a2-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X400-Selector-Syntax           
-#
-dn: CN=ms-Exch-X400-Selector-Syntax,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X400-Selector-Syntax
-distinguishedName: CN=ms-Exch-X400-Selector-Syntax,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.443
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 1
-mAPIID: 33121
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X400-Selector-Syntax
-adminDescription: ms-Exch-X400-Selector-Syntax
-oMSyntax: 10
-searchFlags: 0
-lDAPDisplayName: x400SelectorSyntax
-name: ms-Exch-X400-Selector-Syntax
-schemaIDGUID: a8df74a3-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X500-NC    
-#
-dn: CN=ms-Exch-X500-NC,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X500-NC
-distinguishedName: CN=ms-Exch-X500-NC,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.509
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 1024
-mAPIID: 33186
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X500-NC
-adminDescription: ms-Exch-X500-NC
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: dnQualifier
-name: ms-Exch-X500-NC
-schemaIDGUID: 167758c6-47f3-11d1-a9c3-0000f80367c1
-attributeSecurityGUID: e48d0154-bcf8-11d1-8702-00c04fb96050
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-X500-RDN   
-#
-dn: CN=ms-Exch-X500-RDN,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-X500-RDN
-distinguishedName: CN=ms-Exch-X500-RDN,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.508
-attributeSyntax: 2.5.5.12
-isSingleValued: TRUE
-rangeLower: 1
-rangeUpper: 256
-mAPIID: 33185
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X500-RDN
-adminDescription: ms-Exch-X500-RDN
-oMSyntax: 64
-searchFlags: 0
-lDAPDisplayName: x500RDN
-name: ms-Exch-X500-RDN
-schemaIDGUID: bf967a7d-0de6-11d0-a285-00aa003049e2
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-XMIT-Timeout-Non-Urgent         
-#
-dn: CN=ms-Exch-XMIT-Timeout-Non-Urgent,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-XMIT-Timeout-Non-Urgent
-distinguishedName: CN=ms-Exch-XMIT-Timeout-Non-Urgent,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.84
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33123
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-XMIT-Timeout-Non-Urgent
-adminDescription: ms-Exch-XMIT-Timeout-Non-Urgent
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: xMITTimeoutNonUrgent
-name: ms-Exch-XMIT-Timeout-Non-Urgent
-schemaIDGUID: a8df74a4-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-XMIT-Timeout-Normal             
-#
-dn: CN=ms-Exch-XMIT-Timeout-Normal,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-XMIT-Timeout-Normal
-distinguishedName: CN=ms-Exch-XMIT-Timeout-Normal,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.67
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33124
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-XMIT-Timeout-Normal
-adminDescription: ms-Exch-XMIT-Timeout-Normal
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: xMITTimeoutNormal
-name: ms-Exch-XMIT-Timeout-Normal
-schemaIDGUID: a8df74a5-c5ea-11d1-bbcb-0080c76670c0
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
-
-
-
-
-#
-# ms-Exch-XMIT-Timeout-Urgent             
-#
-dn: CN=ms-Exch-XMIT-Timeout-Urgent,${SCHEMADN}
-objectClass: top
-objectClass: attributeSchema
-cn: ms-Exch-XMIT-Timeout-Urgent
-distinguishedName: CN=ms-Exch-XMIT-Timeout-Urgent,${SCHEMADN}
-attributeID: 1.2.840.113556.1.2.53
-attributeSyntax: 2.5.5.9
-isSingleValued: TRUE
-rangeLower: 0
-rangeUpper: 32767
-mAPIID: 33125
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-XMIT-Timeout-Urgent
-adminDescription: ms-Exch-XMIT-Timeout-Urgent
-oMSyntax: 2
-searchFlags: 0
-lDAPDisplayName: xMITTimeoutUrgent
-name: ms-Exch-XMIT-Timeout-Urgent
-schemaIDGUID: 1482fed4-b098-11d2-aa06-00c04f8eedd8
-isMemberOfPartialAttributeSet: FALSE
-objectCategory: CN=Attribute-Schema,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_auxiliary_class.ldif b/branches/plugfest/setup/AD/oc_provision_schema_auxiliary_class.ldif
deleted file mode 100644 (file)
index 11501b5..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-##############################################################################
-# Auxiliary classes added
-##############################################################################
-
-#
-# ms-Exch-Base-Class
-# description: The base auxiliary class that is applied to all classes 
-# that are extended by CDO for Exchange 2000 Server (CDOEX) and the base 
-# Microsoft Windows classes that are used.
-#
-dn: CN=ms-Exch-Base-Class,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Base-Class
-distinguishedName: CN=ms-Exch-Base-Class,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.14
-mayContain: msExchInconsistentState
-mayContain: heuristics
-mayContain: auxiliaryClass
-mayContain: msExchUserAccountControl
-mayContain: msExchALObjectVersion
-mayContain: msExchUnmergedAttsPt
-mayContain: showInAddressBook
-mayContain: unmergedAtts
-mayContain: replicationSignature
-mayContain: replicatedObjectVersion
-mayContain: msExchHideFromAddressLists
-mayContain: msExchADCGlobalNames
-mayContain: legacyExchangeDN
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Base-Class
-adminDescription: ms-Exch-Base-Class
-objectClassCategory: 3
-lDAPDisplayName: msExchBaseClass
-schemaIDGUID: d8782c34-46ca-11d3-aa72-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-defaultObjectCategory: CN=ms-Exch-Base-Class,${SCHEMADN}
-
-
-#
-# ms-Exch-Certificate-Information
-# The auxiliary class of users and contacts that contains all
-# certificates and certificate information. Users publish their
-# certificates to attributes located on this object.
-#
-dn: CN=ms-Exch-Certificate-Information,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Certificate-Information
-distinguishedName: CN=ms-Exch-Certificate-Information,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.7
-mayContain: userCertificate
-mayContain: userSMIMECertificate
-mayContain: userCert
-mayContain: supportedAlgorithms
-mayContain: attributeCertificate
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Certificate-Information
-adminDescription: ms-Exch-Certificate-Information
-objectClassCategory: 3
-lDAPDisplayName: msExchCertificateInformation
-name: ms-Exch-Certificate-Information
-schemaIDGUID: e8977034-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Certificate-Information,${SCHEMADN}
-
-
-#
-# ms-Exch-Custom-Attributes
-# The auxiliary class for objects that require custom attributes.
-#
-dn: CN=ms-Exch-Custom-Attributes,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Custom-Attributes
-distinguishedName: CN=ms-Exch-Custom-Attributes,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.6
-#mayContain: extensionAttribute9
-#mayContain: extensionAttribute8
-#mayContain: extensionAttribute7
-#mayContain: extensionAttribute6
-#mayContain: extensionAttribute5
-#mayContain: extensionAttribute4
-#mayContain: extensionAttribute3
-#mayContain: extensionAttribute2
-#mayContain: extensionAttribute15
-#mayContain: extensionAttribute14
-#mayContain: extensionAttribute13
-#mayContain: extensionAttribute12
-#mayContain: extensionAttribute11
-#mayContain: extensionAttribute10
-#mayContain: extensionAttribute1
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Custom-Attributes
-adminDescription: ms-Exch-Custom-Attributes
-objectClassCategory: 3
-lDAPDisplayName: msExchCustomAttributes
-name: ms-Exch-Custom-Attributes
-schemaIDGUID: 00e629c8-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Custom-Attributes,${SCHEMADN}
-
-
-#
-# ms-Exch-IM-Recipient 
-# The auxiliary class for all objects that will be enabled for Instant
-# Messaging.
-#
-dn: CN=ms-Exch-IM-Recipient,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-IM-Recipient
-distinguishedName: CN=ms-Exch-IM-Recipient,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.7008
-mayContain: msExchIMVirtualServer
-mayContain: msExchIMAddress
-mayContain: msExchIMPhysicalURL
-mayContain: msExchIMMetaPhysicalURL
-mayContain: msExchIMACL
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Recipient
-adminDescription: ms-Exch-IM-Recipient
-objectClassCategory: 3
-lDAPDisplayName: msExchIMRecipient
-name: ms-Exch-IM-Recipient
-schemaIDGUID: 028502f4-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-IM-Recipient,${SCHEMADN}
-
-
-#
-# ms-Exch-Mail-Storage         
-# The auxiliary class for objects that require store-specific information.
-#
-dn: CN=ms-Exch-Mail-Storage,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Mail-Storage
-distinguishedName: CN=ms-Exch-Mail-Storage,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5
-mayContain: msExchPfRootUrl
-mayContain: msExchMailboxUrl
-mayContain: msExchUseOAB
-mayContain: msExchMailboxGuid
-mayContain: mDBUseDefaults
-mayContain: mDBStorageQuota
-mayContain: mDBOverQuotaLimit
-mayContain: mDBOverHardQuotaLimit
-mayContain: msExchHomeServerName
-mayContain: homeMDB
-mayContain: deletedItemFlags
-mayContain: autoReply
-mayContain: garbageCollPeriod
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mail-Storage
-adminDescription: ms-Exch-Mail-Storage
-objectClassCategory: 3
-lDAPDisplayName: msExchMailStorage
-name: ms-Exch-Mail-Storage
-schemaIDGUID: 03652000-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Mail-Storage,${SCHEMADN}
-
-
-#
-# ms-Exch-Mailbox-Manager-Policy
-#
-dn: CN=ms-Exch-Mailbox-Manager-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Mailbox-Manager-Policy
-distinguishedName: CN=ms-Exch-Mailbox-Manager-Policy,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50033
-mayContain: msExchMailboxManagerUserMessageHeader
-mayContain: msExchMailboxManagerUserMessageFooter
-mayContain: msExchMailboxManagerUserMessageBody
-mayContain: msExchMailboxManagerSizeLimitEnabled
-mayContain: msExchMailboxManagerSizeLimit
-mayContain: msExchMailboxManagerSendUserNotificationMail
-mayContain: msExchMailboxManagerMode
-mayContain: msExchMailboxManagerKeepMessageClasses
-mayContain: msExchMailboxManagerFolderSettings
-mayContain: msExchMailboxManagerCustomMessage
-mayContain: msExchMailboxManagerAgeLimit
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mailbox-Manager-Policy
-adminDescription: ms-Exch-Mailbox-Manager-Policy
-objectClassCategory: 3
-lDAPDisplayName: msExchMailboxManagerPolicy
-name: ms-Exch-Mailbox-Manager-Policy
-schemaIDGUID: 36f94fcc-ebbb-4a32-b721-1cae42b2dbab
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Mailbox-Manager-Policy,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_container.ldif b/branches/plugfest/setup/AD/oc_provision_schema_container.ldif
deleted file mode 100644 (file)
index 60edb3d..0000000
+++ /dev/null
@@ -1,1004 +0,0 @@
-#
-# ms-Exch-Container
-# An Exchange container. Used for extended rights and roles.
-#
-dn: CN=ms-Exch-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Container
-distinguishedName: CN=ms-Exch-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50010
-mayContain: msExchMinAdminVersion
-mayContain: msExchAdminGroupMode
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Container
-adminDescription: ms-Exch-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchContainer
-name: ms-Exch-Container
-schemaIDGUID: 006c91da-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Admin-Group-Container
-# description: An administrative group container. Used for extended rights and roles.
-#
-dn: CN=ms-Exch-Admin-Group-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Admin-Group-Container
-distinguishedName: CN=ms-Exch-Admin-Group-Container,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50019
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Group-Container
-adminDescription: ms-Exch-Admin-Group-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAdminGroupContainer
-name: ms-Exch-Admin-Group-Container
-schemaIDGUID: e7a44058-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Admin-Group-Container,${SCHEMADN}
-
-#
-# ms-Exch-Advanced-Security-Container
-# A container object to hold the Encryption Configuration and Key
-# Manager objects
-#
-dn: CN=ms-Exch-Advanced-Security-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Advanced-Security-Container
-distinguishedName: CN=ms-Exch-Advanced-Security-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.13001
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Advanced-Security-Container
-adminDescription: ms-Exch-Advanced-Security-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAdvancedSecurityContainer
-name: ms-Exch-Advanced-Security-Container
-schemaIDGUID: 8cc8fb0e-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Advanced-Security-Container,${SCHEMADN}
-
-#
-# ms-Exch-Conference-Container  
-# A conferencing container. Used for extended rights and
-# roles. CN=Exchange Conferencing.
-#
-dn: CN=ms-Exch-Conference-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Conference-Container
-distinguishedName: CN=ms-Exch-Conference-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.9005
-mayContain: objectCount
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Container
-adminDescription: ms-Exch-Conference-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchConferenceContainer
-name: ms-Exch-Conference-Container
-schemaIDGUID: ed7fe77a-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;CI;LCLORPRC;;;WD)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Conference-Container,${SCHEMADN}
-
-#
-# ms-Exch-Content-Config-Container
-#
-dn: CN=ms-Exch-Content-Config-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Content-Config-Container
-distinguishedName: CN=ms-Exch-Content-Config-Container,${SCHEMADN}
-possSuperiors: container
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50026
-mayContain: msExchMinAdminVersion
-mayContain: msExchMimeTypes
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Content-Config-Container
-adminDescription: ms-Exch-Content-Config-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchContentConfigContainer
-name: ms-Exch-Content-Config-Container
-schemaIDGUID: ab3a1acc-1df5-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Content-Config-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Monitors-Container   
-# A container used to hold monitors. Used for extended rights and roles.
-#
-dn: CN=ms-Exch-Monitors-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Monitors-Container
-distinguishedName: CN=ms-Exch-Monitors-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50012
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Monitors-Container
-adminDescription: ms-Exch-Monitors-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchMonitorsContainer
-name: ms-Exch-Monitors-Container
-schemaIDGUID: 03f68f72-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Monitors-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Organization-Container       
-# An organization container. Used for extended rights and roles.
-#
-dn: CN=ms-Exch-Organization-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Organization-Container
-distinguishedName: CN=ms-Exch-Organization-Container,${SCHEMADN}
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50020
-mayContain: msExchMinAdminVersion
-mayContain: heuristics
-mayContain: msExchDisableUDGConversion
-mayContain: msExchServerLocalGroups
-mayContain: msExchServerGroups
-mayContain: msExchServerGlobalGroups
-mayContain: msExchAdmins
-mayContain: msExchAdminGroupsEnabled
-mayContain: msExchWebAccessName
-mayContain: submissionContLength
-mayContain: msExchMixedMode
-mayContain: msExchMimeTypes
-mayContain: delivContLength
-mayContain: msExchRoutingEnabled
-mayContain: msExchRecipLimit
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Organization-Container
-adminDescription: ms-Exch-Organization-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchOrganizationContainer
-name: ms-Exch-Organization-Container
-schemaIDGUID: 366a319c-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Organization-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Generic-Policy-Container
-#
-dn: CN=ms-Exch-Generic-Policy-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Generic-Policy-Container
-distinguishedName: CN=ms-Exch-Generic-Policy-Container,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50021
-mayContain: msExchADCOptions
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Generic-Policy-Container
-adminDescription: ms-Exch-Generic-Policy-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchGenericPolicyContainer
-name: ms-Exch-Generic-Policy-Container
-schemaIDGUID: e32977c3-1d31-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Generic-Policy-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Policies-Container 
-# A container used to hold policies. Used for extended rights and
-# roles.
-#
-dn: CN=ms-Exch-Policies-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Policies-Container
-distinguishedName: CN=ms-Exch-Policies-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50014
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Policies-Container
-adminDescription: ms-Exch-Policies-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPoliciesContainer
-name: ms-Exch-Policies-Container
-schemaIDGUID: 3630f92c-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Policies-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Servers-Container     
-# A container used to hold servers. Used for extended rights and roles.
-#
-dn: CN=ms-Exch-Servers-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Servers-Container
-distinguishedName: CN=ms-Exch-Servers-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50013
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Servers-Container
-adminDescription: ms-Exch-Servers-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchServersContainer
-name: ms-Exch-Servers-Container
-schemaIDGUID: 346e5cba-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;LC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Servers-Container,${SCHEMADN}
-
-#
-# ms-Exch-IM-Global-Settings-Container 
-# A container for global objects.
-#
-dn: CN=ms-Exch-IM-Global-Settings-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-IM-Global-Settings-Container
-distinguishedName: CN=ms-Exch-IM-Global-Settings-Container,${SCHEMADN}
-possSuperiors: container
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.7014
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-IM-Global-Settings-Container
-adminDescription: ms-Exch-IM-Global-Settings-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchIMGlobalSettingsContainer
-name: ms-Exch-IM-Global-Settings-Container
-schemaIDGUID: 9f116eb8-284e-11d3-aa68-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-IM-Global-Settings-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-MHS-Monitoring-Config        
-# The EMS saved Monitoring configuration.
-#
-dn: CN=ms-Exch-MHS-Monitoring-Config,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MHS-Monitoring-Config
-distinguishedName: CN=ms-Exch-MHS-Monitoring-Config,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.6
-mustContain: cn
-mayContain: runsOn
-mayContain: monitoringNormalPollUnits
-mayContain: monitoringNormalPollInterval
-mayContain: monitoringHotsitePollUnits
-mayContain: monitoringHotsitePollInterval
-mayContain: monitoringEscalationProcedure
-mayContain: monitoringAvailabilityWindow
-mayContain: monitoringAvailabilityStyle
-mayContain: monitoredServers
-mayContain: logFilename
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MHS-Monitoring-Config
-adminDescription: ms-Exch-MHS-Monitoring-Config
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mHSMonitoringConfig
-name: ms-Exch-MHS-Monitoring-Config
-schemaIDGUID: a8df74bb-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MHS-Monitoring-Config,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg         
-#
-dn: CN=ms-Exch-Protocol-Cfg,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg
-distinguishedName: CN=ms-Exch-Protocol-Cfg,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.68
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: msExchDS2MBOptions
-mayContain: heuristics
-mayContain: useSiteValues
-mayContain: sendTNEF
-mayContain: requireSSL
-mayContain: preserveInternetContent
-mayContain: portNumber
-mayContain: incomingMsgSizeLimit
-mayContain: enabledProtocolCfg
-mayContain: enabledAuthorizationPackages
-mayContain: diagnosticRegKey
-mayContain: contentType
-mayContain: clientAccessEnabled
-mayContain: characterSet
-mayContain: associationLifetime
-mayContain: anonymousAccess
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg
-adminDescription: ms-Exch-Protocol-Cfg
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfg
-name: ms-Exch-Protocol-Cfg
-schemaIDGUID: a8df74c0-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-Shared-Container
-#
-dn: CN=ms-Exch-Protocol-Cfg-Shared-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-Shared-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-Shared-Container,${SCHEMADN}
-#possSuperiors: protocolCfgSharedServer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.2001
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-Shared-Container
-adminDescription: ms-Exch-Protocol-Cfg-Shared-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgSharedContainer
-name: ms-Exch-Protocol-Cfg-Shared-Container
-schemaIDGUID: 939ef91a-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-Shared-Container,${SCHEMADN}
-
-
-dn: CN=ms-Exch-Protocol-Cfg-Shared-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-Shared-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-Shared-Server,${SCHEMADN}
-instanceType: 4
-possSuperiors: msExchExchangeServer
-possSuperiors: container
-possSuperiors: computer
-subClassOf: protocolCfgShared
-governsID: 1.2.840.113556.1.3.67
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-Shared-Server
-adminDescription: ms-Exch-Protocol-Cfg-Shared-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSharedServer
-name: ms-Exch-Protocol-Cfg-Shared-Server
-schemaIDGUID: a8df74d1-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-Shared-Server,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-Shared-Site
-#
-dn: CN=ms-Exch-Protocol-Cfg-Shared-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-Shared-Site
-distinguishedName: CN=ms-Exch-Protocol-Cfg-Shared-Site,${SCHEMADN}
-instanceType: 4
-possSuperiors: container
-subClassOf: protocolCfgShared
-governsID: 1.2.840.113556.1.3.66
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-Shared-Site
-adminDescription: ms-Exch-Protocol-Cfg-Shared-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSharedSite
-name: ms-Exch-Protocol-Cfg-Shared-Site
-schemaIDGUID: a8df74d2-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-Shared-Site,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-Protocol-Container
-#
-dn: CN=ms-Exch-Protocol-Cfg-Protocol-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-Protocol-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-Protocol-Container,${SCHEMADN}
-instanceType: 4
-#possSuperiors: protocolCfgSharedServer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.2000
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-Protocol-Container
-adminDescription: ms-Exch-Protocol-Cfg-Protocol-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgProtocolContainer
-name: ms-Exch-Protocol-Cfg-Protocol-Container
-schemaIDGUID: 90f2b634-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-Protocol-Container,${SCHEMADN}
-
-#
-# ms-Exch-System-Objects-Container       
-# The Exchange container for system-related objects, such as public
-# folder proxies.
-#
-dn: CN=ms-Exch-System-Objects-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-System-Objects-Container
-distinguishedName: CN=ms-Exch-System-Objects-Container,${SCHEMADN}
-possSuperiors: domainDNS
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.50034
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-System-Objects-Container
-adminDescription: ms-Exch-System-Objects-Container
-objectClassCategory: 1
-lDAPDisplayName: msExchSystemObjectsContainer
-name: ms-Exch-System-Objects-Container
-schemaIDGUID: 0bffa04c-7d8e-44cd-968a-b2cac11d17e1
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;RPLCLORC;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-System-Objects-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Storage-Group 
-# The list of stores for this Microsoft Jet instance.
-#
-dn: CN=ms-Exch-Storage-Group,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Storage-Group
-distinguishedName: CN=ms-Exch-Storage-Group,${SCHEMADN}
-possSuperiors: computer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.11006
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: msExchESEParamCachedClosedTables
-mayContain: msExchRestore
-mayContain: msExchESEParamPageTempDBMin
-mayContain: msExchESEParamPageFragment
-mayContain: msExchESEParamMaxTemporaryTables
-mayContain: msExchESEParamMaxCursors
-mayContain: msExchESEParamEnableOnlineDefrag
-mayContain: msExchESEParamEnableIndexChecking
-mayContain: msExchESEParamDbExtensionSize
-mayContain: msExchESEParamCommitDefault
-mayContain: msExchESEParamCheckpointDepthMax
-mayContain: msExchESEParamBaseName
-mayContain: msExchRecovery
-mayContain: msExchESEParamZeroDatabaseDuringBackup
-mayContain: msExchESEParamWaitLogFlush
-mayContain: msExchESEParamTempPath
-mayContain: msExchESEParamSystemPath
-mayContain: msExchESEParamPreferredVerPages
-mayContain: msExchESEParamPreferredMaxOpenTables
-mayContain: msExchESEParamMaxVerPages
-mayContain: msExchESEParamMaxSessions
-mayContain: msExchESEParamMaxOpenTables
-mayContain: msExchESEParamLogWaitingUserMax
-mayContain: msExchESEParamLogFileSize
-mayContain: msExchESEParamLogFilePath
-mayContain: msExchESEParamLogCheckpointPeriod
-mayContain: msExchESEParamLogBuffers
-mayContain: msExchESEParamEventSource
-mayContain: msExchESEParamCircularLog
-mayContain: displayName
-mayContain: description
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Storage-Group
-adminDescription: ms-Exch-Storage-Group
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchStorageGroup
-name: ms-Exch-Storage-Group
-schemaIDGUID: 3435244a-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Storage-Group,${SCHEMADN}
-
-#
-# ms-Exch-MDB  
-# Used for generic database configuration.
-#
-dn: CN=ms-Exch-MDB,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MDB
-distinguishedName: CN=ms-Exch-MDB,${SCHEMADN}
-#possSuperiors: msExchStorageGroup
-possSuperiors: msExchExchangeServer
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.11002
-mustContain: deliveryMechanism
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: msExchPatchMDB
-mayContain: msExchDatabaseCreated
-mayContain: msExchDatabaseBeingRestored
-mayContain: msExchAllowEnhancedSecurity
-mayContain: msExchMaxCachedViews
-mayContain: msExchCIUpdateStyle
-mayContain: msExchCIUpdateSchedule
-mayContain: msExchCIRebuildStyle
-mayContain: msExchCIRebuildSchedule
-mayContain: msExchCILocation
-mayContain: msExchCIAvailable
-mayContain: msExchAgingKeepTime
-mayContain: homeMDBBL
-mayContain: msExchTrackDuplicates
-mayContain: msExchSLVFile
-mayContain: quotaNotificationStyle
-mayContain: quotaNotificationSchedule
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyList
-mayContain: msExchOwningServer
-mayContain: messageTrackingEnabled
-mayContain: mDBStorageQuota
-mayContain: mDBOverQuotaLimit
-mayContain: mDBOverHardQuotaLimit
-mayContain: maximumObjectID
-mayContain: msExchEDBOffline
-mayContain: msExchEDBFile
-mayContain: msExchDownGradeMultipartSigned
-mayContain: diagnosticRegKey
-mayContain: deletedItemFlags
-mayContain: msExchConvertToFixedFont
-mayContain: msExchCatalog
-mayContain: activationStyle
-mayContain: activationSchedule
-mayContain: garbageCollPeriod
-mayContain: displayName
-mayContain: description
-mayContain: adminDisplayName
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MDB
-adminDescription: ms-Exch-MDB
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchMDB
-name: ms-Exch-MDB
-schemaIDGUID: 03d069d2-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MDB,${SCHEMADN}
-
-#
-# ms-Exch-MTA  
-# Represents the message transfer agent (MTA) process on the computer.
-#
-dn: CN=ms-Exch-MTA,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MTA
-distinguishedName: CN=ms-Exch-MTA,${SCHEMADN}
-possSuperiors: msExchExchangeServer
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.49
-mustContain: transTimeoutMins
-mustContain: transRetryMins
-mustContain: mTALocalDesig
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: msExchEncryptedPassword
-mayContain: msExchResponsibleMTAServerBL
-mayContain: msExchMTADatabasePath
-mayContain: xMITTimeoutUrgent
-mayContain: xMITTimeoutNormal
-mayContain: xMITTimeoutNonUrgent
-mayContain: transportExpeditedData
-mayContain: transferTimeoutUrgent
-mayContain: transferTimeoutNormal
-mayContain: transferTimeoutNonUrgent
-mayContain: transferRetryInterval
-mayContain: tempAssocThreshold
-mayContain: sessionDisconnectTimer
-mayContain: rTSWindowSize
-mayContain: rTSRecoveryTimeout
-mayContain: rTSCheckpointSize
-mayContain: openRetryInterval
-mayContain: numOfTransferRetries
-mayContain: numOfOpenRetries
-mayContain: messageTrackingEnabled
-mayContain: domainDefAltRecip
-mayContain: associationLifetime
-mayContain: mTALocalCred
-mayContain: msExchHomeRoutingGroupDNBL
-mayContain: expandDLsLocally
-mayContain: diagnosticRegKey
-mayContain: delivExtContTypes
-mayContain: delivEITs
-mayContain: delivContLength
-mayContain: msExchBridgeheadedRemoteConnectorsDNBL
-mayContain: msExchBridgeheadedLocalConnectorsDNBL
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MTA
-adminDescription: ms-Exch-MTA
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mTA
-name: ms-Exch-MTA
-schemaIDGUID: a8df74a7-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MTA,${SCHEMADN}
-
-
-#
-# ms-Exch-DXA-Site-Server
-# The hub for all of the directory exchange agent (DXA) server
-# connections.  
-#
-dn: CN=ms-Exch-DXA-Site-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-DXA-Site-Server
-distinguishedName: CN=ms-Exch-DXA-Site-Server,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.60
-mustContain: cn
-mayContain: versionNumber
-mayContain: assocRemoteDXA
-mayContain: responsibleLocalDXA
-mayContain: dXALocalAdmin
-mayContain: dXAAdminForward
-mayContain: dXAAdminCopy
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-DXA-Site-Server
-adminDescription: ms-Exch-DXA-Site-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: dXASiteServer
-name: ms-Exch-DXA-Site-Server
-schemaIDGUID: a8df74b0-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-DXA-Site-Server,${SCHEMADN}
-
-
-#
-# ms-Exch-Replication-Connector-Container      
-#
-dn: CN=ms-Exch-Replication-Connector-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Replication-Connector-Container
-distinguishedName: CN=ms-Exch-Replication-Connector-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.12
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Replication-Connector-Container
-adminDescription: ms-Exch-Replication-Connector-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchReplicationConnectorContainer
-name: ms-Exch-Replication-Connector-Container
-schemaIDGUID: 99f5867e-12e8-11d3-aa58-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Replication-Connector-Container,${SCHEMADN}
-
-#
-# ms-Exch-Routing-Group-Container
-# Container used to hold routing groups.
-#
-dn: CN=ms-Exch-Routing-Group-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Routing-Group-Container
-distinguishedName: CN=ms-Exch-Routing-Group-Container,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.12001
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Routing-Group-Container
-adminDescription: ms-Exch-Routing-Group-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchRoutingGroupContainer
-name: ms-Exch-Routing-Group-Container
-schemaIDGUID: 34de6b40-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Routing-Group-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Connectors
-# Container used to hold connection objects.
-#
-dn: CN=ms-Exch-Connectors,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Connectors
-distinguishedName: CN=ms-Exch-Connectors,${SCHEMADN}
-#possSuperiors: msExchRoutingGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.12003
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connectors
-adminDescription: ms-Exch-Connectors
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchConnectors
-name: ms-Exch-Connectors
-schemaIDGUID: eee325dc-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Connectors,${SCHEMADN}
-
-
-#
-# ms-Exch-Exchange-Admin-Service
-# The MAD process.
-#
-dn: CN=ms-Exch-Exchange-Admin-Service,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Exchange-Admin-Service
-distinguishedName: CN=ms-Exch-Exchange-Admin-Service,${SCHEMADN}
-possSuperiors: msExchExchangeServer
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.62
-mustContain: deliveryMechanism
-mayContain: msExchMinAdminVersion
-mayContain: diagnosticRegKey
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Exchange-Admin-Service
-adminDescription: ms-Exch-Exchange-Admin-Service
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: exchangeAdminService
-name: ms-Exch-Exchange-Admin-Service
-schemaIDGUID: a8df74b2-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Exchange-Admin-Service,${SCHEMADN}
-
-
-#
-# ms-Exch-Message-Delivery-Config
-#
-dn: CN=ms-Exch-Message-Delivery-Config,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Message-Delivery-Config
-distinguishedName: CN=ms-Exch-Message-Delivery-Config,${SCHEMADN}
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50028
-mayContain: msExchMinAdminVersion
-mayContain: msExchTurfListAction
-mayContain: submissionContLength
-mayContain: msExchRecipLimit
-mayContain: msExchLocalDomains
-mayContain: delivContLength
-mayContain: msExchAdminMailbox
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Message-Delivery-Config
-adminDescription: ms-Exch-Message-Delivery-Config
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchMessageDeliveryConfig
-name: ms-Exch-Message-Delivery-Config
-schemaIDGUID: ab3a1ad7-1df5-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Message-Delivery-Config,${SCHEMADN}
-
-
-#
-# ms-Exch-Smtp-Connection-Turf-List       
-# Contains the attributes for Accept and Deny Internet Protocol (IP)
-# lists.
-#
-dn: CN=ms-Exch-Smtp-Connection-Turf-List,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Smtp-Connection-Turf-List
-distinguishedName: CN=ms-Exch-Smtp-Connection-Turf-List,${SCHEMADN}
-possSuperiors: msExchSMTPTurfList
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.12010
-mayContain: msExchSMTPGlobalIPDenyList
-mayContain: msExchSMTPGlobalIPAcceptList
-mayContain: msExchMinAdminVersion
-mayContain: msExchSmtpConnectionWhitelist
-mayContain: msExchSmtpConnectionRulesPriority
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Smtp-Connection-Turf-List
-adminDescription: ms-Exch-Smtp-Connection-Turf-List
-objectClassCategory: 1
-lDAPDisplayName: msExchSmtpConnectionTurfList
-name: ms-Exch-Smtp-Connection-Turf-List
-schemaIDGUID: 7eea7de9-319e-408a-8460-e35e2c9da389
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Smtp-Connection-Turf-List,${SCHEMADN}
-
-
-#
-# ms-Exch-CTP
-# An Exchange conference technology provider (CTP)
-# template. CN=Exchange Data Conferencing Service.
-#
-dn: CN=ms-Exch-CTP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-CTP
-distinguishedName: CN=ms-Exch-CTP,${SCHEMADN}
-possSuperiors: msExchConferenceSite
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.9002
-mayContain: objectCount
-mayContain: msExchCTPSnapinGUID
-mayContain: msExchCTPRequireCMSAuthentication
-mayContain: msExchCTPProviderName
-mayContain: msExchCTPProviderGUID
-mayContain: msExchCTPPropertySchema
-mayContain: msExchCTPFrameHint
-mayContain: msExchCTPClassGUID
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-CTP
-adminDescription: ms-Exch-CTP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchCTP
-name: ms-Exch-CTP
-schemaIDGUID: 00aa8efe-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-CTP,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_modify.ldif b/branches/plugfest/setup/AD/oc_provision_schema_modify.ldif
deleted file mode 100644 (file)
index 2a67df7..0000000
+++ /dev/null
@@ -1,681 +0,0 @@
-#
-# ms-Exch-Configuration-Container class: see oc_provision_schema.ldif
-#
-
-dn: CN=Address-Book-Container,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: msExchMinAdminVersion
-mayContain: msExchAddressListOU
-mayContain: msExchSearchScope
-mayContain: msExchSearchBase
-mayContain: msExchEnableInternalEvaluator
-mayContain: msExchPurportedSearchUI
-add: possSuperiors
-possSuperiors: msExchConfigurationContainer
-possSuperiors: container
-
-#
-# Computer class
-# Represents a computer account in the domain
-#
-dn: CN=Computer,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: msExchExchangeServerLink
-mayContain: logRolloverInterval
-mayContain: monitoredConfigurations
-mayContain: monitoredServices
-mayContain: monitoringAvailabilityStyle
-mayContain: monitoringAvailabilityWindow
-mayContain: monitoringCachedViaMail
-mayContain: monitoringCachedViaRPC
-mayContain: monitoringMailUpdateInterval
-mayContain: monitoringMailUpdateUnits
-mayContain: monitoringRPCUpdateInterval
-mayContain: monitoringRPCUpdateUnits
-#mayContain: ms-Exch-Policy-List Attribute
-#mayContain: ms-Exch-Policy-Option-List Attribute
-mayContain: promoExpiration
-mayContain: securityProtocol
-mayContain: trackingLogPathName
-mayContain: type
-
-
-
-#
-# Container Class
-# Used to hold other classes
-dn: CN=Container,${SCHEMADN}
-changetype: modify
-add: auxiliaryClass
-auxiliaryClass: msExchBaseClass
-add: possSuperiors
-possSuperiors: protocolCfgSharedServer
-add: mayContain
-mayContain: containerInfo
-mayContain: msExchPolicyList
-mayContain: msExchTemplateRDNs
-mayContain: x500RDN
-mayContain: msExchExportContainersBL
-
-
-
-#
-# Domain-DNS
-# Windows NT domain with DNS-based (DC=) naming. 
-#
-dn: CN=Domain-DNS,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: msExchPolicyList
-
-
-
-#
-# Group
-# Stores a list of user names. Used to apply security principals on
-# resources.
-#
-dn: CN=Group,${SCHEMADN}
-changetype: modify
-add: auxiliaryClass
-auxiliaryClass: msExchCustomAttributes
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchIMRecipient
-add: mayContain
-mayContain: hideDLMembership
-mayContain: oOFReplyToOriginator
-mayContain: reportToOriginator
-mayContain: reportToOwner
-mayContain: dLMemberRule
-mayContain: owner
-mayContain: msExchOriginatingForest
-
-
-
-#
-# Mail-Recipient
-# Stores e-mail configuration information.
-#
-dn: CN=Mail-Recipient,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: assistant
-mayContain: altRecipient
-mayContain: authOrig
-mayContain: autoReplyMessage
-mayContain: delivContLength
-mayContain: deliverAndRedirect
-mayContain: dLMemRejectPerms
-mayContain: dLMemSubmitPerms
-mayContain: enabledProtocols
-mayContain: msExchExpansionServerName
-mayContain: expirationTime
-mayContain: folderPathname
-mayContain: formData
-mayContain: forwardingAddress
-mayContain: homeMTA
-mayContain: internetEncoding
-mayContain: languageCode
-mayContain: language
-mayContain: mailNickname
-mayContain: mAPIRecipient
-mayContain: pOPCharacterSet
-mayContain: pOPContentFormat
-mayContain: protocolSettings
-mayContain: publicDelegates
-mayContain: replicationSensitivity
-mayContain: securityProtocol
-mayContain: submissionContLength
-mayContain: targetAddress
-mayContain: unauthOrig
-mayContain: dnQualifier
-mayContain: msExchMailboxSecurityDescriptor
-mayContain: msExchMasterAccountSid
-mayContain: importedFrom
-mayContain: versionNumber
-mayContain: msExchPreviousAccountSid
-mayContain: msExchCustomProxyAddresses
-mayContain: dLMemDefault
-mayContain: mail
-mayContain: deliveryMechanism
-mayContain: extensionData
-mayContain: delivExtContTypes
-mayContain: msExchFBURL
-mayContain: msExchRecipLimit
-mayContain: altRecipientBL
-mayContain: authOrigBL
-mayContain: dLMemRejectPermsBL
-mayContain: dLMemSubmitPermsBL
-mayContain: publicDelegatesBL
-mayContain: unauthOrigBL
-mayContain: msExchPoliciesExcluded
-mayContain: msExchPoliciesIncluded
-mayContain: msExchPolicyEnabled
-mayContain: msExchPolicyOptionList
-
-#dn: CN=Mail-Recipient,${SCHEMADN}
-#changetype: modify
-#add: mayContain
-#mayContain: msExchUserAccountControl 
-#mayContain: msExchProxyCustomProxy 
-#mayContain: msExchMailboxFolderSet 
-#mayContain: msExchRequireAuthToSendTo 
-
-
-
-#
-# NTDS-DSA
-# Represents the Active Directory DSA process on the server.
-#
-dn: CN=NTDS-DSA,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: deliveryMechanism
-mayContain: diagnosticRegKey
-
-
-
-#
-# Organizational-Person
-# Contains organizational information about a user.
-#
-dn: CN=Organizational-Person,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: employeeType
-mayContain: businessRoles
-mayContain: telephoneAssistant
-mayContain: personalPager
-mayContain: employeeNumber
-
-
-
-
-#
-# Organizational-Unit
-# A container for storing users, computers, and other account objects.
-#
-dn: CN=Organizational-Unit,${SCHEMADN}
-changetype: modify
-add: auxiliaryClass
-auxiliaryClass: msExchBaseClass
-add: mayContain
-mayContain: msExchPolicyList
-
-
-
-#
-# Sam-Domain
-# Auxiliary class holding common properties for Windows NT domains.
-#
-dn: CN=Sam-Domain,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: msExchAddGroupsToToken
-
-
-
-#
-# Server
-# Represents a server computer within a site.
-#
-dn: CN=Server,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: activationSchedule
-mayContain: activationStyle
-mayContain: type
-mayContain: networkAddress
-
-
-#
-# Site
-# A container for storing server objects. Represents a physical
-# location containing computers. Used to manage replication.
-#
-dn: CN=Site,${SCHEMADN}
-changetype: modify
-add: mayContain
-mayContain: msExchConferenceZoneBL
-mayContain: msExchMCUHostsSitesBL
-
-
-#
-# User
-# Used to store information about an employee or contractor who works
-# for an organization. Can also be applied to long-term visitors.
-#
-dn: CN=User,${SCHEMADN}
-changetype: modify
-add: auxiliaryClass
-auxiliaryClass: msExchCustomAttributes
-auxiliaryClass: msExchMailStorage
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: msExchMultiMediaUser
-auxiliaryClass: msExchCertificateInformation
-auxiliaryClass: msExchIMRecipient
-auxiliaryClass: msExchOmaUser
-add: possSuperiors
-possSuperiors: msExchSystemObjectsContainer
-add: mayContain
-mayContain: msExchQueryBaseDN
-mayContain: msExchControllingZone
-mayContain: msExchResourceGUID
-mayContain: msExchResourceProperties
-mayContain: msExchConferenceMailboxBL
-mayContain: kMServer
-mayContain: msExchIMAPOWAURLPrefixOverride
-mayContain: msExchOriginatingForest
-
-
-
-##################################################################
-# Attributes
-##################################################################
-
-
-#
-# Address
-# The user's address
-#
-dn: CN=Address,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-#
-# Admin-Display-Name
-# The name to be displayed on administrator screens.
-#
-dn: CN=Admin-Display-Name,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-#
-# Attribute-Syntax
-# The object identifier (OID) for the syntax for this attribute.
-#
-dn: CN=Attribute-Syntax,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Comment
-# The user's comments. Can be a null string.
-#
-dn: CN=Comment,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Company
-# The user's company name.
-#
-dn: CN=Company,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Department
-# Contains the name for the department in which the user works.
-#
-dn: CN=Department,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Display-Name-Printable
-# The name displayed in the address book for a particular
-# user. Usually the combination of the user's first name, middle
-# initial, and last name.
-#
-dn: CN=Display-Name-Printable,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# E-mail-Addresses
-# The list of e-mail addresses for a contact.
-#
-dn: CN=E-mail-Addresses,${SCHEMADN}
-changetype: modify
-replace: searchFlags
-searchFlags: 5
-
-
-
-#
-# Facsimile-Telephone-Number
-# Contains the telephone number of the user's business fax machine.
-#
-dn: CN=Facsimile-Telephone-Number,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Garbage-Coll-Period
-# Located on the CN=Directory Service,CN=Windows
-# NT,CN=Services,CN=Configuration,... object. Represents the period in
-# hours between Directory Service (DS) garbage collection runs.
-#
-dn: CN=Garbage-Coll-Period,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-replace: searchFlags
-searchFlags: 16
-
-
-
-#
-# Given-Name
-# Contains the given name (first name) of the user. 
-#
-#dn: CN=Given-Name,${SCHEMADN}
-#changetype: modify
-#add: isMemberOfPartialAttributeSet
-#isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Initials
-# Contains the initials for parts of the user's full name. May be used
-# as the middle initial in the Windows Address Book.
-#
-dn: CN=Initials,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Managed-By
-# The distinguished name of the user that is assigned to manage this
-# object.
-#
-dn: CN=Managed-By,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Network-Address
-# The TCP/IP address for a network segment. Also called the subnet
-# address.
-#
-dn: CN=Network-Address,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# NT-Mixed-Domain
-# Indicates that the domain is in native mode or mixed mode. Found in
-# the domainDNS (head) object for the domain.
-#
-dn: CN=NT-Mixed-Domain,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# OM-Syntax
-# A number representing the OM type for the attribute. 
-#
-dn: CN=OM-Syntax,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Fax-Other
-# A list of alternate facsimile numbers. 
-#
-dn: CN=Phone-Fax-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Home-Other
-# A list of alternate home phone numbers.
-#
-dn: CN=Phone-Home-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Mobile-Other
-# A list of alternate cell phone numbers.
-#
-dn: CN=Phone-Mobile-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Mobile-Primary
-# The primary cell phone number
-#
-dn: CN=Phone-Mobile-Primary,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Office-Other
-# A list of alternate office phone numbers
-#
-dn: CN=Phone-Office-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Pager-Other
-# A list of alternate pager numbers
-#
-dn: CN=Phone-Pager-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Phone-Pager-Primary
-# The primary pager number
-#
-dn: CN=Phone-Pager-Primary,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Physical-Delivery-Office-Name
-# Contains the office location of the user's place of business.
-#
-dn: CN=Physical-Delivery-Office-Name,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Postal-Code
-# The postal or zip code for mail delivery. 
-#
-dn: CN=Postal-Code,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Post-Office-Box
-# The post office box number for this object. 
-#
-dn: CN=Post-Office-Box,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Proxy-Addresses
-# Address by which a Microsoft Exchange Server recipient object is
-# recognized in a foreign mail system. Required not just for users,
-# but for all recipient objects such as custom recipients and
-# distribution lists.
-#
-dn: CN=Proxy-Addresses,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-replace: searchFlags
-searchFlags: 13
-
-
-
-#
-# Show-In-Address-Book
-# 
-dn: CN=Show-In-Address-Book,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Sub-Class-Of
-# The parent class of a class
-#
-dn: CN=Sub-Class-Of,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Text-Country
-# The country/region in which the user is located.
-#
-dn: CN=Text-Country,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# Text-Encoded-Or-Address
-#
-dn: CN=Text-Encoded-Or-Address,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-replace: searchFlags
-searchFlags: 1
-replace: attributeSecurityGuid
-attributeSecurityGuid: e48d0154-bcf8-11d1-8702-00c04fb96050
-
-
-
-#
-# Title
-# Contains the user's job title. Property commonly used to indicate
-# the formal job title, such as Senior Programmer, rather than
-# occupational class, such as programmer. Not typically used for
-# suffix titles such as Esq. or D.D.S.
-#
-dn: CN=Title,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-replace: searchFlags
-searchFlags: 16
-
-
-
-#
-# Version-Number
-# A general-purpose version number.
-#
-dn: CN=Version-Number,${SCHEMADN}
-changetype: modify
-replace: searchFlags
-searchFlags: 8
-
-
-
-#
-# WWW-Home-Page
-# The primary Web page
-#
-dn: CN=WWW-Home-Page,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
-
-
-#
-# WWW-Page-Other
-# A list of alternate Web pages
-#
-dn: CN=WWW-Page-Other,${SCHEMADN}
-changetype: modify
-add: isMemberOfPartialAttributeSet
-isMemberOfPartialAttributeSet: TRUE
-
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_objectCategory.ldif b/branches/plugfest/setup/AD/oc_provision_schema_objectCategory.ldif
deleted file mode 100644 (file)
index 5a4b4b3..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-##############################################################################
-# objectCategory added
-##############################################################################
-
-#
-# ms-Exch-Admin-Group
-# objectCategory for cn=First Administrative Group
-# description: An administrative group.
-#
-dn: CN=ms-Exch-Admin-Group,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Admin-Group
-distinguishedName: CN=ms-Exch-Admin-Group,${SCHEMADN}
-#possSuperiors: msExchAdminGroupContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50011
-mayContain: msExchMinAdminVersion
-mayContain: domainDefAltRecip
-mayContain: msExchPfCreation
-mayContain: msExchEncryptedPassword
-mayContain: msExchAdmins
-mayContain: msExchPFDefaultAdminACL
-mayContain: msExchLegacyPW
-mayContain: msExchLegacyDomain
-mayContain: msExchLegacyAccount
-mayContain: siteFolderServer
-mayContain: siteFolderGUID
-mayContain: msExchDefaultAdminGroup
-mayContain: msExchAdminGroupMode
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Admin-Group
-adminDescription: ms-Exch-Admin-Group
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchAdminGroup
-name: ms-Exch-Admin-Group
-schemaIDGUID: e768a58e-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Admin-Group,${SCHEMADN}
-
-
-#
-# ms-Exch-Exchange-Server
-# A representation of an Exchange server object.
-#
-dn: CN=ms-Exch-Exchange-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Exchange-Server
-distinguishedName: CN=ms-Exch-Exchange-Server,${SCHEMADN}
-#possSuperiors: msExchServersContainer
-subClassOf: server
-governsID: 1.2.840.113556.1.5.7000.62.50009
-mayContain: msExchMinAdminVersion
-mayContain: msExchFolderAffinityList
-mayContain: msExchFolderAffinityCustom
-mayContain: msExchHomeRoutingGroupDNBL
-mayContain: msExchHomeRoutingGroup
-mayContain: msExchVPIMConvertOutbound
-mayContain: msExchVPIMConvertInbound
-mayContain: msExchServerPublicKey
-mayContain: msExchMonitoringResources
-mayContain: msExchMonitoringPollingRate
-mayContain: msExchMonitoringNotificationRate
-mayContain: msExchMonitoringMode
-mayContain: msExchMailboxManagerReportRecipient
-mayContain: msExchMailboxManagerAdminMode
-mayContain: msExchMailboxManagerActivationStyle
-mayContain: msExchMailboxManagerActivationSchedule
-mayContain: msExchResponsibleMTAServer
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyList
-mayContain: msExchMonitoringResponses
-mayContain: msExchMonitoringQueuePollingInterval
-mayContain: msExchMonitoringQueuePollingFrequency
-mayContain: msExchMonitoringMonitoredServices
-mayContain: msExchMonitoringDiskSpace
-mayContain: monitoredServices
-mayContain: msExchInstalledComponents
-mayContain: msExchDataPath
-mayContain: msExchServerRole
-mayContain: msExchMessageTrackLogFilter
-mayContain: versionNumber
-mayContain: serverRole
-mayContain: serialNumber
-mayContain: msExchTrkLogCleaningInterval
-mayContain: messageTrackingEnabled
-mayContain: msExchLocales
-mayContain: msExchInstallPath
-mayContain: heuristics
-mayContain: msExchComputerLink
-mayContain: msExchAddressListServiceBL
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Exchange-Server
-adminDescription: ms-Exch-Exchange-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchExchangeServer
-name: ms-Exch-Exchange-Server
-schemaIDGUID: 01a9aa9c-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:(A;;RP;;;AU)
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Exchange-Server,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-Shared
-#
-dn: CN=ms-Exch-Protocol-Cfg-Shared,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-Shared
-distinguishedName: CN=ms-Exch-Protocol-Cfg-Shared,${SCHEMADN}
-instanceType: 4
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.65
-mustContain: cn
-mayContain: msExchMinAdminVersion
-mayContain: useSiteValues
-mayContain: oWAServer
-mayContain: formData
-mayContain: folderPathname
-mayContain: connectionListFilterType
-mayContain: connectionListFilter
-mayContain: characterSetList
-mayContain: availableAuthorizationPackages
-mayContain: helpData32
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-Shared
-adminDescription: ms-Exch-Protocol-Cfg-Shared
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgShared
-name: ms-Exch-Protocol-Cfg-Shared
-schemaIDGUID: a8df74d0-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-Shared,${SCHEMADN}
-
-
-#
-# ms-Exch-Connector
-#
-dn: CN=ms-Exch-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Connector
-distinguishedName: CN=ms-Exch-Connector,${SCHEMADN}
-#possSuperiors: msExchConnectors
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.12004
-mayContain: msExchMinAdminVersion
-mayContain: msExchInconsistentState
-mayContain: delivContLength
-mayContain: msExchNoPFConnection
-mayContain: versionNumber
-mayContain: msExchMasterAccountSid
-mayContain: msExchMailboxSecurityDescriptor
-mayContain: msExchMailboxGuid
-mayContain: msExchRoutingDisallowPriority
-mayContain: unauthOrig
-mayContain: msExchTargetBridgeheadServersDN
-mayContain: msExchSourceBridgeheadServersDN
-mayContain: msExchRoutingTriggeredStyle
-mayContain: msExchRoutingTriggeredSchedule
-mayContain: msExchRoutingOversizedStyle
-mayContain: msExchRoutingOversizedSchedule
-mayContain: routingList
-mayContain: messageSizeLimit
-mayContain: dLMemSubmitPerms
-mayContain: dLMemRejectPerms
-mayContain: dLMemDefault
-mayContain: msExchDestinationRGDN
-mayContain: msExchConnectorType
-mayContain: connectedDomains
-mayContain: authOrig
-mayContain: activationStyle
-mayContain: activationSchedule
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Connector
-adminDescription: ms-Exch-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchConnector
-name: ms-Exch-Connector
-schemaIDGUID: 89652316-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Connector,${SCHEMADN}
-
-
-# 
-# ms-Exch-Generic-Policy
-#
-dn: CN=ms-Exch-Generic-Policy,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Generic-Policy
-distinguishedName: CN=ms-Exch-Generic-Policy,${SCHEMADN}
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.50022
-mayContain: purportedSearch
-mayContain: msExchPurportedSearchUI
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Generic-Policy
-adminDescription: ms-Exch-Generic-Policy
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchGenericPolicy
-name: ms-Exch-Generic-Policy
-schemaIDGUID: e32977cd-1d31-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Generic-Policy,${SCHEMADN}
-
-
-#
-# ms-Exch-SMTP-Turf-List
-#
-dn: CN=ms-Exch-SMTP-Turf-List,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-SMTP-Turf-List
-distinguishedName: CN=ms-Exch-SMTP-Turf-List,${SCHEMADN}
-#possSuperiors: msExchMessageDeliveryConfig
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.12009
-mayContain: msExchMinAdminVersion
-mayContain: msExchRecipTurfListOptions
-mayContain: msExchRecipTurfListNames
-mayContain: msExchTurfListOptions
-mayContain: versionNumber
-mayContain: msExchTurfListNames
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-SMTP-Turf-List
-adminDescription: ms-Exch-SMTP-Turf-List
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSMTPTurfList
-name: ms-Exch-SMTP-Turf-List
-schemaIDGUID: 0b836da5-3b20-11d3-aa6f-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-SMTP-Turf-List,${SCHEMADN}
-
-#
-# ms-Exch-Conference-Site
-# An Exchange Conferencing-Zone Configuration Interface Class.
-#
-dn: CN=ms-Exch-Conference-Site,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Conference-Site
-distinguishedName: CN=ms-Exch-Conference-Site,${SCHEMADN}
-#possSuperiors: msExchConferenceContainer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.9001
-mayContain: msExchConferenceMailbox
-mayContain: msExchConferenceZone
-mayContain: displayName
-mayContain: wWWHomePage
-mayContain: serverName
-mayContain: objectCount
-mayContain: msExchGracePeriodPrior
-mayContain: msExchGracePeriodAfter
-mayContain: msExchAvailableServers
-mayContain: msExchAuditFlags
-mayContain: msExchAllowTimeExtensions
-mayContain: msExchAllowAdditionalResources
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Conference-Site
-adminDescription: ms-Exch-Conference-Site
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchConferenceSite
-name: ms-Exch-Conference-Site
-schemaIDGUID: eddce330-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Conference-Site,${SCHEMADN}
\ No newline at end of file
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_possSuperior.ldif b/branches/plugfest/setup/AD/oc_provision_schema_possSuperior.ldif
deleted file mode 100644 (file)
index e59bf1b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-dn: CN=ms-Exch-Admin-Group,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchAdminGroupContainer
-
-dn: CN=ms-Exch-Exchange-Server,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchServersContainer
-
-dn: CN=ms-Exch-Connector,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchConnectors
-
-dn: CN=ms-Exch-SMTP-Turf-List,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchMessageDeliveryConfig
-
-dn: CN=ms-Exch-Conference-Site,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchConferenceContainer
-
-dn: CN=ms-Exch-Protocol-Cfg-Shared-Container,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: protocolCfgSharedServer
-
-dn: CN=ms-Exch-Protocol-Cfg-Protocol-Container,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: protocolCfgSharedServer
-
-dn: CN=ms-Exch-MDB,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchStorageGroup
-
-dn: CN=ms-Exch-Connectors,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchRoutingGroup
-
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Domain-Container,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: protocolCfgSMTPServer
-
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: protocolCfgSMTPServer
-
-dn: CN=ms-Exch-Chat-Ban,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchChatVirtualNetwork
-
-dn: CN=ms-Exch-Chat-Channel,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchChatVirtualNetwork
-
-dn: CN=ms-Exch-Chat-User-Class,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchChatVirtualNetwork
-
-dn: CN=ms-Exch-MCU,${SCHEMADN}
-changetype: modify
-add: possSuperiors
-possSuperiors: msExchMCUContainer
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_sub_CfgProtocol.ldif b/branches/plugfest/setup/AD/oc_provision_schema_sub_CfgProtocol.ldif
deleted file mode 100644 (file)
index 3b4c846..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#
-# ms-Exch-Protocol-Cfg-HTTP-Server     
-# The Exchange HTTP virtual server configuration.
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgHTTPContainer
-subClassOf: protocolCfgHTTP
-governsID: 1.2.840.113556.1.3.80
-mayContain: msExchEncryptedAnonymousPassword
-mayContain: msExchDefaultLoadFile
-mayContain: msExchAuthorizationPersistence
-mayContain: msExchServerAutoStart
-mayContain: msExchServerRole
-mayContain: msExchDiscussionFolder
-mayContain: msExchDefaultDomain
-mayContain: msExchUNCUsername
-mayContain: msExchUNCPassword
-mayContain: msExchServerBindings
-mayContain: msExchSecureBindings
-mayContain: msExchMaxIncomingConnections
-mayContain: msExchLogonMethod
-mayContain: msExchLogType
-mayContain: msExchIncomingConnectionTimeout
-mayContain: folderPathname
-mayContain: msExchDirBrowseFlags
-mayContain: msExchDefaultLogonDomain
-mayContain: msExchBasicAuthenticationDomain
-mayContain: msExchAuthenticationFlags
-mayContain: anonymousAccount
-mayContain: msExchAccessFlags
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Server
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgHTTPServer
-name: ms-Exch-Protocol-Cfg-HTTP-Server
-schemaIDGUID: a8df74c2-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Server,${SCHEMADN}
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Server           
-# Contains the settings for an SMTP virtual server.
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgSMTPContainer
-subClassOf: protocolCfgSMTP
-governsID: 1.2.840.113556.1.5.7000.62.5002
-mayContain: msExchSubmitRelaySD
-mayContain: msExchServerBindingsFiltering
-mayContain: msExchAuthMailDisposition
-mayContain: msExchSmtpExternalDNSServers
-mayContain: msExchEncryptedPassword
-mayContain: msExchAppliesToSmtpVSBL
-mayContain: msExchSmtpEnableVRFY
-mayContain: msExchSmtpEnableEXPN
-mayContain: msExchServerBindingsTurflist
-mayContain: msExchSecurityPassword
-mayContain: msExchAlternateServer
-mayContain: msExchSmtpSmartHostType
-mayContain: msExchSmtpSmartHost
-mayContain: msExchSmtpSendNDRTo
-mayContain: msExchSmtpSendBadmailTo
-mayContain: msExchSmtpRemoteQueueRetries
-mayContain: msExchSmtpRemoteQueueExpirationTimeout
-mayContain: msExchSmtpRemoteQueueDelayNotification
-mayContain: msExchSmtpRelayIpList
-mayContain: msExchSmtpRelayForAuth
-mayContain: msExchSmtpQueueDirectory
-mayContain: msExchSmtpPickupDirectory
-mayContain: msExchSmtpPerformReverseDnsLookup
-mayContain: msExchSmtpOutgoingSecurePort
-mayContain: msExchSmtpOutgoingPort
-mayContain: msExchSmtpOutgoingConnectionTimeout
-mayContain: msExchSmtpOutboundSecurityUserName
-mayContain: msExchSmtpOutboundSecurityPassword
-mayContain: msExchSmtpOutboundSecurityFlag
-mayContain: msExchSmtpMaxSessionSize
-mayContain: msExchSmtpMaxRecipients
-mayContain: msExchSmtpMaxOutgoingConnectionsPerDomain
-mayContain: msExchSmtpMaxOutgoingConnections
-mayContain: msExchSmtpMaxOutboundMsgPerDomainFlag
-mayContain: msExchSmtpMaxOutboundMsgPerDomain
-mayContain: msExchSmtpMaxMessageSize
-mayContain: msExchSmtpMaxHopCount
-mayContain: msExchSmtpMasqueradeDomain
-mayContain: msExchSmtpLocalQueueExpirationTimeout
-mayContain: msExchSmtpLocalQueueDelayNotification
-mayContain: msExchSmtpInboundCommandSupportOptions
-mayContain: msExchSmtpFullyQualifiedDomainName
-mayContain: msExchSmtpDropDirectory
-mayContain: msExchSmtpDoMasquerade
-mayContain: msExchSmtpBadMailDirectory
-mayContain: msExchServerBindings
-mayContain: msExchServerAutoStart
-mayContain: msExchSecureBindings
-mayContain: msExchSaslLogonDomain
-mayContain: msExchNTAuthenticationProviders
-mayContain: msExchMaxIncomingConnections
-mayContain: msExchLogType
-mayContain: msExchIPSecurity
-mayContain: msExchIncomingConnectionTimeout
-mayContain: msExchHomeRoutingGroupDNBL
-mayContain: msExchDefaultDomain
-mayContain: msExchBridgeheadedRemoteConnectorsDNBL
-mayContain: msExchBridgeheadedLocalConnectorsDNBL
-mayContain: msExchAuthenticationFlags
-mayContain: msExchAdminACL
-mayContain: msExchAccessSSLFlags
-mayContain: msExchAccessFlags
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Server
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPServer
-name: ms-Exch-Protocol-Cfg-SMTP-Server
-schemaIDGUID: 3378ca84-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Server,${SCHEMADN}
-
-#
-# ms-Exch-Protocol-Cfg-IMAP-Server        
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP-Server,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP-Server
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP-Server,${SCHEMADN}
-possSuperiors: msExchProtocolCfgIMAPContainer
-subClassOf: protocolCfgIMAP
-governsID: 1.2.840.113556.1.3.85
-mayContain: msExchOtherAuthenticationFlags
-mayContain: msExchServerRole
-mayContain: msExchDefaultLogonDomain
-mayContain: msExchServerBindings
-mayContain: msExchServerAutoStart
-mayContain: msExchSecureBindings
-mayContain: msExchNTAuthenticationProviders
-mayContain: msExchMaxIncomingConnections
-mayContain: msExchLogType
-mayContain: msExchIPSecurity
-mayContain: msExchIncomingConnectionTimeout
-mayContain: msExchDefaultDomain
-mayContain: msExchBasicAuthenticationDomain
-mayContain: msExchAuthenticationFlags
-mayContain: msExchAdminACL
-mayContain: msExchAccessSSLFlags
-mayContain: msExchAccessFlags
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP-Server
-adminDescription: ms-Exch-Protocol-Cfg-IMAP-Server
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgIMAPServer
-name: ms-Exch-Protocol-Cfg-IMAP-Server
-schemaIDGUID: a8df74c5-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP-Server,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_sub_mailGateway.ldif b/branches/plugfest/setup/AD/oc_provision_schema_sub_mailGateway.ldif
deleted file mode 100644 (file)
index 15d1b04..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-#
-# ms-Exch-ccMail-Connector
-# The ccMail connector
-#
-dn: CN=ms-Exch-ccMail-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-ccMail-Connector
-distinguishedName: CN=ms-Exch-ccMail-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1001
-mayContain: msExchccMailPassword
-mayContain: msExchccMailConnectAsUserid
-mayContain: msExchccMailConnectAsPassword
-mayContain: objViewContainers
-mayContain: msExchccMailPOPath
-mayContain: msExchccMailPOName
-#mayContain: msExchccMailKeepForwardHistory
-#mayContain: msExchccMailImportExportVersion
-#mayContain: msExchccMailFilterType
-mayContain: msExchccMailADEProp
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-ccMail-Connector
-adminDescription: ms-Exch-ccMail-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchccMailConnector
-name: ms-Exch-ccMail-Connector
-schemaIDGUID: e85710b6-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-ccMail-Connector,${SCHEMADN}
-
-#
-# ms-Exch-Calendar-Connector
-# The calendar connector
-#
-dn: CN=ms-Exch-Calendar-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Calendar-Connector
-distinguishedName: CN=ms-Exch-Calendar-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1007
-mayContain: msExchNotesNotesServer
-mayContain: msExchNotesNotesINI
-mayContain: msExchEncryptedPassword
-mayContain: msExchGWiseAPIGateway
-mayContain: msExchCalConTargetSiteDN
-mayContain: msExchCalConRefreshInterval
-mayContain: msExchCalConQueryWindow
-mayContain: msExchCalConProviders
-mayContain: msExchCalConClientWait
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Calendar-Connector
-adminDescription: ms-Exch-Calendar-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchCalendarConnector
-name: ms-Exch-Calendar-Connector
-schemaIDGUID: 922180da-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Calendar-Connector,${SCHEMADN}
-
-#
-# ms-Exch-GroupWise-Connector   
-# The GroupWise Connector.
-#
-dn: CN=ms-Exch-GroupWise-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-GroupWise-Connector
-distinguishedName: CN=ms-Exch-GroupWise-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1005
-mayContain: msExchGWiseUserId
-mayContain: msExchGWisePassword
-mayContain: msExchGWiseForeignDomain
-mayContain: msExchGWiseFilterType
-mayContain: msExchGWiseAPIGatewayPath
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-GroupWise-Connector
-adminDescription: ms-Exch-GroupWise-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchGroupWiseConnector
-name: ms-Exch-GroupWise-Connector
-schemaIDGUID: 91eaaac4-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-GroupWise-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-Active-Directory-Connector
-# Represents the service that synchronizes information between the
-# Exchange Server 5.5 directory and Active Directory.
-#
-dn: CN=ms-Exch-Active-Directory-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Active-Directory-Connector
-distinguishedName: CN=ms-Exch-Active-Directory-Connector,${SCHEMADN}
-possSuperiors: organizationalUnit
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.4
-mayContain: versionNumberHi
-mayContain: versionNumber
-mayContain: msExchServer2SchemaMap
-mayContain: msExchServer1SchemaMap
-mayContain: msExchChildSyncAgreements
-mayContain: displayName
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Active-Directory-Connector
-adminDescription: ms-Exch-Active-Directory-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchActiveDirectoryConnector
-name: ms-Exch-Active-Directory-Connector
-schemaIDGUID: e605672c-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Active-Directory-Connector,${SCHEMADN}
-
-
-
-#
-# ms-Exch-MS-Mail-Connector       
-# The Microsoft Mail Connector object.
-#
-dn: CN=ms-Exch-MS-Mail-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-MS-Mail-Connector
-distinguishedName: CN=ms-Exch-MS-Mail-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.3.31
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-MS-Mail-Connector
-adminDescription: ms-Exch-MS-Mail-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mSMailConnector
-name: ms-Exch-MS-Mail-Connector
-schemaIDGUID: a8df74be-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-MS-Mail-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-Notes-Connector 
-# The Lotus Notes Connector object.
-#
-dn: CN=ms-Exch-Notes-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Notes-Connector
-distinguishedName: CN=ms-Exch-Notes-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1002
-mayContain: msExchNotesPassword
-mayContain: msExchNotesTargetBooks
-mayContain: msExchNotesTargetBook
-mayContain: msExchNotesSourceBooks
-mayContain: msExchNotesRtrMailbox
-mayContain: msExchNotesRoutableDomains
-mayContain: msExchNotesNotesServer
-mayContain: msExchNotesNotesLinks
-mayContain: msExchNotesNotesINI
-mayContain: msExchNotesLetterhead
-mayContain: msExchNotesForeignDomain
-mayContain: msExchNotesExportGroups
-mayContain: msExchNotesExcludeGroups
-mayContain: msExchNotesConnectorMailbox
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Notes-Connector
-adminDescription: ms-Exch-Notes-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchNotesConnector
-name: ms-Exch-Notes-Connector
-schemaIDGUID: 04c85e62-a981-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Notes-Connector,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Oma-Connector  
-#
-dn: CN=ms-Exch-Oma-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Oma-Connector
-distinguishedName: CN=ms-Exch-Oma-Connector,${SCHEMADN}
-subClassOf: msExchConnector
-governsID: 1.2.840.113556.1.6.20.2.39
-mayContain: msExchSourceBridgeheadServersDN
-mayContain: msExchOmaCarrierUrl
-mayContain: deliveryMechanism
-mayContain: legacyExchangeDN
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Oma-Connector
-adminDescription: ms-Exch-Oma-Connector
-objectClassCategory: 1
-lDAPDisplayName: msExchOmaConnector
-name: ms-Exch-Oma-Connector
-schemaIDGUID: 4dc9d0b1-594c-407e-a7d2-426e6c20dabb
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Oma-Connector,${SCHEMADN}
-
-
-#
-# ms-Exch-OVVM-Connector       
-# The OVVM Connector.
-#
-dn: CN=ms-Exch-OVVM-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-OVVM-Connector
-distinguishedName: CN=ms-Exch-OVVM-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.5.7000.62.1004
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-OVVM-Connector
-adminDescription: ms-Exch-OVVM-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchOVVMConnector
-name: ms-Exch-OVVM-Connector
-schemaIDGUID: 91ce0e8c-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-OVVM-Connector,${SCHEMADN}
-
-# 
-# ms-Exch-Mail-Connector    
-# The Microsoft Mail Connector object.
-#
-dn: CN=ms-Exch-Mail-Connector,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Mail-Connector
-distinguishedName: CN=ms-Exch-Mail-Connector,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.3.61
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mail-Connector
-adminDescription: ms-Exch-Mail-Connector
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mailConnector
-name: ms-Exch-Mail-Connector
-schemaIDGUID: a8df74b6-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Mail-Connector,${SCHEMADN}
-
-#
-# ms-Exch-X400-Link     
-# Specifies a remote X.400 MTA.
-#
-dn: CN=ms-Exch-X400-Link,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-X400-Link
-distinguishedName: CN=ms-Exch-X400-Link,${SCHEMADN}
-possSuperiors: container
-subClassOf: mailGateway
-governsID: 1.2.840.113556.1.3.29
-mayContain: x400SelectorSyntax
-mayContain: x400AttachmentType
-mayContain: twoWayAlternateFacility
-mayContain: turnRequestThreshold
-mayContain: transportExpeditedData
-mayContain: tempAssocThreshold
-mayContain: tSelector
-mayContain: supportingStack
-mayContain: sessionDisconnectTimer
-mayContain: sSelectorInbound
-mayContain: sSelector
-mayContain: rTSWindowSize
-mayContain: rTSRecoveryTimeout
-mayContain: rTSCheckpointSize
-mayContain: pSelectorInbound
-mayContain: pSelector
-mayContain: openRetryInterval
-mayContain: numOfTransferRetries
-mayContain: numOfOpenRetries
-mayContain: nAddressType
-mayContain: nAddress
-mayContain: mTALocalDesig
-mayContain: mTALocalCred
-mayContain: localInitialTurn
-mayContain: gatewayLocalDesig
-mayContain: gatewayLocalCred
-mayContain: associationLifetime
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-X400-Link
-adminDescription: ms-Exch-X400-Link
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: x400Link
-name: ms-Exch-X400-Link
-schemaIDGUID: a8df74e0-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-X400-Link,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/oc_provision_schema_subcontainer.ldif b/branches/plugfest/setup/AD/oc_provision_schema_subcontainer.ldif
deleted file mode 100644 (file)
index 5d73deb..0000000
+++ /dev/null
@@ -1,815 +0,0 @@
-#
-# ms-Exch-Protocol-Cfg-HTTP-Container  
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Container,${SCHEMADN}
-subClassOf: msExchProtocolCfgSharedContainer
-governsID: 1.2.840.113556.1.5.7000.62.14001
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Container
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgHTTPContainer
-name: ms-Exch-Protocol-Cfg-HTTP-Container
-schemaIDGUID: 9432cae6-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Recipient-Policy-Container
-#
-dn: CN=ms-Exch-Recipient-Policy-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Recipient-Policy-Container
-distinguishedName: CN=ms-Exch-Recipient-Policy-Container,${SCHEMADN}
-possSuperiors: msExchOrganizationContainer
-subClassOf: msExchGenericPolicyContainer
-governsID: 1.2.840.113556.1.5.7000.62.50023
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Recipient-Policy-Container
-adminDescription: ms-Exch-Recipient-Policy-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchRecipientPolicyContainer
-name: ms-Exch-Recipient-Policy-Container
-schemaIDGUID: e32977d2-1d31-11d3-aa5e-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Recipient-Policy-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-HTTP
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.3.79
-mustContain: hTTPPubGAL
-mayContain: hTTPServers
-mayContain: hTTPPubPF
-mayContain: hTTPPubGALLimit
-mayContain: hTTPPubABAttributes
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP
-adminDescription: ms-Exch-Protocol-Cfg-HTTP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgHTTP
-name: ms-Exch-Protocol-Cfg-HTTP
-schemaIDGUID: a8df74c1-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP,${SCHEMADN}
-
-#
-# ms-Exch-Protocol-Cfg-IM-Container       
-#
-dn: CN=ms-Exch-Protocol-Cfg-IM-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IM-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IM-Container,${SCHEMADN}
-subClassOf: msExchProtocolCfgSharedContainer
-governsID: 1.2.840.113556.1.5.7000.62.7011
-mayContain: msExchIMDBPath
-mayContain: msExchIMDBLogPath
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IM-Container
-adminDescription: ms-Exch-Protocol-Cfg-IM-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIMContainer
-name: ms-Exch-Protocol-Cfg-IM-Container
-schemaIDGUID: 9f116ea3-284e-11d3-aa68-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IM-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-IM          
-#
-dn: CN=ms-Exch-Protocol-Cfg-IM,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IM
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IM,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.5.7000.62.7012
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IM
-adminDescription: ms-Exch-Protocol-Cfg-IM
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIM
-name: ms-Exch-Protocol-Cfg-IM
-schemaIDGUID: 9f116ea7-284e-11d3-aa68-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IM,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-IMAP-Container  
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP-Container,${SCHEMADN}
-subClassOf: msExchProtocolCfgSharedContainer
-governsID: 1.2.840.113556.1.5.7000.62.3001
-mayContain: msExchSASLMechanisms
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP-Container
-adminDescription: ms-Exch-Protocol-Cfg-IMAP-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgIMAPContainer
-name: ms-Exch-Protocol-Cfg-IMAP-Container
-schemaIDGUID: 93da93e4-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP-Container,${SCHEMADN}
-
-#
-# ms-Exch-Protocol-Cfg-IMAP          
-#
-dn: CN=ms-Exch-Protocol-Cfg-IMAP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-IMAP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-IMAP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.3.84
-mayContain: msExchLogonACL
-mayContain: msExchServerBindings
-mayContain: msExchSecureBindings
-mayContain: returnExactMsgSize
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyList
-mayContain: oWAServer
-mayContain: listPublicFolders
-mayContain: formData
-mayContain: folderPathname
-mayContain: delegateUser
-mayContain: anonymousAccount
-mayContain: helpData32
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-IMAP
-adminDescription: ms-Exch-Protocol-Cfg-IMAP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgIMAP
-name: ms-Exch-Protocol-Cfg-IMAP
-schemaIDGUID: a8df74c4-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-IMAP,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-LDAP           
-#
-dn: CN=ms-Exch-Protocol-Cfg-LDAP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-LDAP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-LDAP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.3.75
-mayContain: outgoingMsgSizeLimit
-mayContain: lDAPSearchCfg
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-LDAP
-adminDescription: ms-Exch-Protocol-Cfg-LDAP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgLDAP
-name: ms-Exch-Protocol-Cfg-LDAP
-schemaIDGUID: a8df74c7-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-LDAP,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-NNTP          
-#
-dn: CN=ms-Exch-Protocol-Cfg-NNTP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-NNTP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-NNTP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.3.72
-mayContain: usenetSiteName
-mayContain: supportSMIMESignatures
-mayContain: rootNewsgroupsFolderID
-mayContain: iNSAdmin
-mayContain: controlMsgRules
-mayContain: controlMsgFolderID
-mayContain: availableDistributions
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-NNTP
-adminDescription: ms-Exch-Protocol-Cfg-NNTP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgNNTP
-name: ms-Exch-Protocol-Cfg-NNTP
-schemaIDGUID: a8df74ca-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-NNTP,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-NNTP-Container  
-#
-dn: CN=ms-Exch-Protocol-Cfg-NNTP-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-NNTP-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-NNTP-Container,${SCHEMADN}
-subClassOf: msExchProtocolCfgSharedContainer
-governsID: 1.2.840.113556.1.5.7000.62.6001
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-NNTP-Container
-adminDescription: ms-Exch-Protocol-Cfg-NNTP-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgNNTPContainer
-name: ms-Exch-Protocol-Cfg-NNTP-Container
-schemaIDGUID: 94162eae-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-NNTP-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP,${SCHEMADN}
-possSuperiors: protocolCfgSharedSite
-possSuperiors: protocolCfgSharedServer
-subClassOf: protocolCfg
-governsID: 1.2.840.113556.1.5.7000.62.5001
-mayContain: msExchLogonACL
-mayContain: msExchPolicyOptionList
-mayContain: msExchPolicyList
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP
-adminDescription: ms-Exch-Protocol-Cfg-SMTP
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTP
-name: ms-Exch-Protocol-Cfg-SMTP
-schemaIDGUID: 33f98980-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP,${SCHEMADN}
-
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Container  
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Container,${SCHEMADN}
-subClassOf: msExchProtocolCfgSharedContainer
-governsID: 1.2.840.113556.1.5.7000.62.5010
-mayContain: versionNumber
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Container
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgSMTPContainer
-name: ms-Exch-Protocol-Cfg-SMTP-Container
-schemaIDGUID: 93bb9552-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-Domain-Container     
-# Contains superior domain level settings under an SMTP virtual
-# server.
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-Domain-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-Domain-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-Domain-Container,${SCHEMADN}
-#possSuperiors: protocolCfgSMTPServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.5004
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-Domain-Container
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-Domain-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: protocolCfgSMTPDomainContainer
-name: ms-Exch-Protocol-Cfg-SMTP-Domain-Container
-schemaIDGUID: 33bb8c5c-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-Domain-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container       
-#
-dn: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container
-distinguishedName: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container,${SCHEMADN}
-#possSuperiors: protocolCfgSMTPServer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.5008
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container
-adminDescription: ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgSMTPIPAddressContainer
-name: ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container
-schemaIDGUID: 8b2c843c-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-SMTP-IP-Address-Container,${SCHEMADN}
-
-#
-# ms-Exch-Public-MDB 
-# A public database configuration.
-#
-dn: CN=ms-Exch-Public-MDB,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Public-MDB
-distinguishedName: CN=ms-Exch-Public-MDB,${SCHEMADN}
-possSuperiors: container
-possSuperiors: computer
-subClassOf: msExchMDB
-governsID: 1.2.840.113556.1.5.7000.62.11005
-mayContain: msExchPreferredBackfillSource
-mayContain: messageSizeLimit
-mayContain: msExchOverallAgeLimit
-mayContain: msExchReplicationStyle
-mayContain: msExchReplicationSchedule
-mayContain: msExchReplicationMsgSize
-mayContain: msExchPollInterval
-mayContain: msExchOwningPFTree
-mayContain: msExchFirstInstance
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Public-MDB
-adminDescription: ms-Exch-Public-MDB
-auxiliaryClass: msExchBaseClass
-auxiliaryClass: mailRecipient
-objectClassCategory: 1
-lDAPDisplayName: msExchPublicMDB
-name: ms-Exch-Public-MDB
-schemaIDGUID: 3568b3a4-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Public-MDB,${SCHEMADN}
-
-
-#
-# ms-Exch-Transport-Stack         
-# Represents the X.400 Transport Stacks.
-#
-dn: CN=ms-Exch-Transport-Stack,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Transport-Stack
-distinguishedName: CN=ms-Exch-Transport-Stack,${SCHEMADN}
-possSuperiors: mTA
-possSuperiors: container
-possSuperiors: computer
-subClassOf: top
-governsID: 1.2.840.113556.1.3.18
-mustContain: cn
-mayContain: supportingStackBL
-mayContain: x400SelectorSyntax
-mayContain: tSelector
-mayContain: sSelector
-mayContain: pSelector
-mayContain: nAddressType
-mayContain: nAddress
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Transport-Stack
-adminDescription: ms-Exch-Transport-Stack
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: transportStack
-name: ms-Exch-Transport-Stack
-schemaIDGUID: a8df74dd-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Transport-Stack,${SCHEMADN}
-
-#
-# ms-Exch-Mail-Gateway    
-# The main Gateway class.
-#
-dn: CN=ms-Exch-Mail-Gateway,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Mail-Gateway
-distinguishedName: CN=ms-Exch-Mail-Gateway,${SCHEMADN}
-possSuperiors: container
-subClassOf: msExchConnector
-governsID: 1.2.840.113556.1.3.51
-mustContain: homeMTA
-mustContain: deliveryMechanism
-mustContain: cn
-mayContain: msExchBarMessageClass
-mayContain: msExchEncryptedPassword2
-mayContain: msExchEncryptedPassword
-mayContain: msExchServer1NetworkAddress
-mayContain: msExchMaintenanceStyle
-mayContain: msExchMaintenanceSchedule
-mayContain: msExchImportContainerLinked
-mayContain: msExchExportContainersLinked
-mayContain: msExchServer1AlwaysCreateAs
-mayContain: msExchDirsyncStyle
-mayContain: msExchDirsyncSchedule
-mayContain: supportedApplicationContext
-mayContain: translationTableUsed
-mayContain: transferTimeoutUrgent
-mayContain: transferTimeoutNormal
-mayContain: transferTimeoutNonUrgent
-mayContain: transferRetryInterval
-mayContain: msExchSourceBHAddress
-mayContain: replicationSensitivity
-mayContain: pRMD
-mayContain: msExchPartnerLanguage
-mayContain: msExchPartnerCP
-mayContain: mDBUnreadLimit
-mayContain: mDBStorageQuota
-mayContain: mDBMsgTimeOutPeriod
-mayContain: mDBBackoffInterval
-mayContain: lineWrap
-mayContain: importContainer
-mayContain: homeMDB
-mayContain: msExchExportDLs
-mayContain: exportCustomRecipients
-mayContain: exportContainers
-mayContain: encapsulationMethod
-mayContain: msExchDirsyncFilters
-mayContain: diagnosticRegKey
-mayContain: msExchDestinationRGDN
-mayContain: msExchDestBHAddress
-mayContain: msExchDeliveryOrder
-mayContain: delivExtContTypes
-mayContain: delivEITs
-mayContain: delivContLength
-mayContain: msExchConnectorType
-mayContain: computerName
-mayContain: canPreserveDNs
-mayContain: msExchAdminMailbox
-mayContain: aDMD
-mayContain: c
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Mail-Gateway
-adminDescription: ms-Exch-Mail-Gateway
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: mailGateway
-name: ms-Exch-Mail-Gateway
-schemaIDGUID: a8df74b7-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Mail-Gateway,${SCHEMADN}
-
-#
-# ms-Exch-System-Policy-Container
-#
-dn: CN=ms-Exch-System-Policy-Container,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-System-Policy-Container
-distinguishedName: CN=ms-Exch-System-Policy-Container,${SCHEMADN}
-possSuperiors: msExchOrganizationContainer
-subClassOf: msExchGenericPolicyContainer
-governsID: 1.2.840.113556.1.5.7000.62.15
-mayContain: msExchMinAdminVersion
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-System-Policy-Container
-adminDescription: ms-Exch-System-Policy-Container
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchSystemPolicyContainer
-name: ms-Exch-System-Policy-Container
-schemaIDGUID: 32412a7a-22af-479c-a444-624c0137122e
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-System-Policy-Container,${SCHEMADN}
-
-
-#
-# ms-Exch-Remote-DXA      
-# The remote directory Exchange objects (requester and server).
-#
-dn: CN=ms-Exch-Remote-DXA,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Remote-DXA
-distinguishedName: CN=ms-Exch-Remote-DXA,${SCHEMADN}
-possSuperiors: dXASiteServer
-possSuperiors: container
-subClassOf: top
-governsID: 1.2.840.113556.1.3.2
-mustContain: exportCustomRecipients
-mustContain: dXARemoteClient
-mustContain: cn
-mayContain: versionNumber
-mayContain: msExchServer1AlwaysCreateAs
-mayContain: msExchPrevExportDLs
-mayContain: msExchImportContainerLinked
-mayContain: msExchExportDLs
-mayContain: msExchExportContainersLinked
-mayContain: assocRemoteDXA
-mayContain: deletedItemFlags
-mayContain: responsibleLocalDXA
-mayContain: reqSeq
-mayContain: replicationSensitivity
-mayContain: messageSizeLimit
-mayContain: importContainer
-mayContain: exportContainers
-mayContain: dXAUnConfContainerList
-mayContain: dXATypes
-mayContain: dXATemplateOptions
-mayContain: dXASvrSeqUSN
-mayContain: dXASvrSeqTime
-mayContain: dXASvrSeq
-mayContain: dXAReqName
-mayContain: dXAReqSeqUSN
-mayContain: dXAReqSeqTime
-mayContain: dXAReqSeq
-mayContain: dXARecipientCP
-mayContain: dXAPrevTypes
-mayContain: dXAPrevTemplateOptions
-mayContain: dXAPrevReplicationSensitivity
-mayContain: dXAPrevRemoteEntries
-mayContain: dXAPrevInExchangeSensitivity
-mayContain: dXAPrevExportNativeOnly
-mayContain: dXAPrevExchangeOptions
-mayContain: dXAPassword
-mayContain: dXANativeAddressType
-mayContain: dXALocalAdmin
-mayContain: dXAImportNow
-mayContain: dXAImpSeqUSN
-mayContain: dXAImpSeqTime
-mayContain: dXAImpSeq
-mayContain: dXAExportNow
-mayContain: dXAExchangeOptions
-mayContain: dXAConfSeqUSN
-mayContain: dXAConfSeq
-mayContain: dXAConfReqTime
-mayContain: dXAConfContainerList
-mayContain: dXAAppendReqCN
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Remote-DXA
-adminDescription: ms-Exch-Remote-DXA
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: remoteDXA
-name: ms-Exch-Remote-DXA
-schemaIDGUID: a8df74d5-c5ea-11d1-bbcb-0080c76670c0
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Remote-DXA,${SCHEMADN}
-
-#
-# ms-Exch-Private-MDB     
-# A private database configuration.
-#
-dn: CN=ms-Exch-Private-MDB,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Private-MDB
-distinguishedName: CN=ms-Exch-Private-MDB,${SCHEMADN}
-possSuperiors: container
-possSuperiors: computer
-subClassOf: msExchMDB
-governsID: 1.2.840.113556.1.5.7000.62.11004
-mayContain: msExchRestore
-mayContain: msExchOrigMDB
-mayContain: msExchMessageJournalRecipient
-mayContain: msExchUseOAB
-mayContain: msExchMailboxRetentionPeriod
-mayContain: msExchMaximumRecurringInstancesMonths
-mayContain: msExchMaximumRecurringInstances
-mayContain: msExchHomePublicMDB
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Private-MDB
-adminDescription: ms-Exch-Private-MDB
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchPrivateMDB
-name: ms-Exch-Private-MDB
-schemaIDGUID: 36145cf4-a982-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Private-MDB,${SCHEMADN}
-
-#
-# ms-Exch-Chat-Protocol
-# A Chat Service user class.
-#
-dn: CN=ms-Exch-Chat-Protocol,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-Protocol
-distinguishedName: CN=ms-Exch-Chat-Protocol,${SCHEMADN}
-possSuperiors: protocolCfgSharedServer
-subClassOf: top
-governsID: 1.2.840.113556.1.5.7000.62.8005
-mayContain: msExchServerBindings
-mayContain: msExchChatServerPort
-mayContain: msExchChatBroadcastAddress
-mayContain: msExchChatAccess
-mayContain: msExchChatNetworkName
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Protocol
-adminDescription: ms-Exch-Chat-Protocol
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatProtocol
-name: ms-Exch-Chat-Protocol
-schemaIDGUID: e9621816-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-Protocol,${SCHEMADN}
-
-#
-# ms-Exch-Chat-Network
-# A Chat Service community object.
-#
-dn: CN=ms-Exch-Chat-Network,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Chat-Network
-distinguishedName: CN=ms-Exch-Chat-Network,${SCHEMADN}
-possSuperiors: msExchAdminGroup
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.8001
-mayContain: msExchBasicAuthenticationDomain
-mayContain: msExchAuthenticationFlags
-mayContain: msExchChatNetworkMode
-mayContain: msExchChatAccess
-mayContain: msExchChatTitle
-mayContain: msExchChatMOTD
-mayContain: msExchChatMaxMemberships
-mayContain: msExchChatMaxConnections
-mayContain: msExchChatMaxAnonymous
-#mayContain: msExchChatEnableAuthenticated
-mayContain: msExchChatEnableAnonymous
-mayContain: msExchChatDNSReverseMode
-mayContain: msExchChatClientPort
-mayContain: msExchChatChannelMode
-mayContain: msExchChatChannelLimit
-mayContain: msExchChatChannelLCID
-mayContain: msExchChatChannelLanguage
-mayContain: msExchChatAdminMessage
-mayContain: Enabled
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Chat-Network
-adminDescription: ms-Exch-Chat-Network
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchChatNetwork
-name: ms-Exch-Chat-Network
-schemaIDGUID: e934cb68-a980-11d2-a9ff-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Chat-Network,${SCHEMADN}
-
-#
-# ms-Exch-Protocol-Cfg-HTTP-Filters    
-# The Exchange HTTP service filters container.
-#
-dn: CN=ms-Exch-Protocol-Cfg-HTTP-Filters,${SCHEMADN}
-objectClass: top
-objectClass: classSchema
-cn: ms-Exch-Protocol-Cfg-HTTP-Filters
-distinguishedName: CN=ms-Exch-Protocol-Cfg-HTTP-Filters,${SCHEMADN}
-possSuperiors: protocolCfgSharedServer
-subClassOf: container
-governsID: 1.2.840.113556.1.5.7000.62.15002
-rDNAttID: cn
-showInAdvancedViewOnly: TRUE
-adminDisplayName: ms-Exch-Protocol-Cfg-HTTP-Filters
-adminDescription: ms-Exch-Protocol-Cfg-HTTP-Filters
-auxiliaryClass: msExchBaseClass
-objectClassCategory: 1
-lDAPDisplayName: msExchProtocolCfgHTTPFilters
-name: ms-Exch-Protocol-Cfg-HTTP-Filters
-schemaIDGUID: 8c58ec88-b09e-11d2-aa06-00c04f8eedd8
-systemOnly: FALSE
-defaultSecurityDescriptor: D:S:
-defaultHidingValue: TRUE
-objectCategory: CN=Class-Schema,${SCHEMADN}
-defaultObjectCategory: CN=ms-Exch-Protocol-Cfg-HTTP-Filters,${SCHEMADN}
diff --git a/branches/plugfest/setup/AD/prefixMap.txt b/branches/plugfest/setup/AD/prefixMap.txt
deleted file mode 100644 (file)
index 23efcec..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-0:2.5.4
-1:2.5.6
-2:1.2.840.113556.1.2
-3:1.2.840.113556.1.3
-4:2.16.840.1.101.2.2.1
-5:2.16.840.1.101.2.2.3
-6:2.16.840.1.101.2.1.5
-7:2.16.840.1.101.2.1.4
-8:2.5.5
-9:1.2.840.113556.1.4
-10:1.2.840.113556.1.5
-19:0.9.2342.19200300.100
-20:2.16.840.1.113730.3
-21:0.9.2342.19200300.100.1
-22:2.16.840.1.113730.3.1
-23:1.2.840.113556.1.5.7000
-24:2.5.21
-25:2.5.18
-26:2.5.20
-11:1.2.840.113556.1.4.260
-12:1.2.840.113556.1.5.56
-13:1.2.840.113556.1.4.262
-14:1.2.840.113556.1.5.57
-15:1.2.840.113556.1.4.263
-16:1.2.840.113556.1.5.58
-17:1.2.840.113556.1.5.73
-18:1.2.840.113556.1.4.305
-27:1.3.6.1.4.1.1466.101.119
-28:2.16.840.1.113730.3.2
-29:1.3.6.1.4.1.250.1
-30:1.2.840.113549.1.9
-31:0.9.2342.19200300.100.4
-32:1.3.6.1.4.1.7165.4.1
-33:1.3.6.1.4.1.7165.4.2
-34:1.2.840.113556.1.5.7000.62
-35:1.2.840.113556.1.4.7000.102
-36:1.2.840.113556.1.6.20.1
-37:1.2.840.113556.1.6.20.2
-
diff --git a/branches/plugfest/setup/AD/provision_schema_basedn_modify.ldif b/branches/plugfest/setup/AD/provision_schema_basedn_modify.ldif
deleted file mode 100644 (file)
index d6c4589..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################
-# Schema Naming Context
-###############################
-dn: ${SCHEMADN}
-changetype: modify
-replace: fSMORoleOwner
-fSMORoleOwner: CN=NTDS Settings,${SERVERDN}
--
-replace: objectVersion
-objectVersion: 30
--
-replace: prefixMap
-prefixMap:: ${PREFIXMAP_B64}
-
diff --git a/branches/plugfest/setup/openchange_newuser b/branches/plugfest/setup/openchange_newuser
deleted file mode 100755 (executable)
index d78a08e..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/python
-# OpenChange provision script
-#
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-import optparse
-import os,sys
-
-# To allow running from the source directory
-sys.path.append("python")
-
-import openchange
-
-import samba
-import samba.getopt as options
-import openchange.provision as openchange
-
-parser = optparse.OptionParser("openchange_newuser [options] <username>")
-
-sambaopts = options.SambaOptions(parser)
-parser.add_option_group(sambaopts)
-
-credopts = options.CredentialsOptions(parser)
-parser.add_option_group(credopts)
-parser.add_option("--enable", action="store_true", metavar="ENABLE",
-                 help="Enable access to OpenChange server")
-parser.add_option("--disable", action="store_true", metavar="DISABLE",
-                 help="Disable access to OpenChange server")
-parser.add_option("--create", action="store_true", metavar="CREATE",
-                 help="Create the OpenChange user account")
-parser.add_option("--mailbox", action="store_true", metavar="MAILBOX",
-                 help="Create the OpenChange user mailbox")
-parser.add_option("--mapistore", type="string", metavar="STORE",
-                 help="The backend storage type to use (only for --mailbox)")
-opts, args = parser.parse_args()
-
-if len(args) == 0:
-       parser.print_usage()
-       sys.exit(1)
-
-lp = sambaopts.get_loadparm()
-creds = credopts.get_credentials(lp)
-
-def setup_path(*args):
-       return os.path.join(os.path.dirname(__file__), *args)
-
-if opts.enable == True:
-       openchange.accountcontrol(lp, creds, username=args[0], value=0)
-
-if opts.disable == True:
-       openchange.accountcontrol(lp, creds, username=args[0], value=2)
-
-if opts.create == True:
-       openchange.newuser(lp, creds, username=args[0])
-
-backend = "fsocpf" #default
-if opts.mapistore is not None:
-       backend = opts.mapistore
-
-if opts.mailbox == True:
-       openchange.newmailbox(lp, username=args[0], firstorg=None, firstou=None, backend=backend)
diff --git a/branches/plugfest/setup/openchange_provision b/branches/plugfest/setup/openchange_provision
deleted file mode 100755 (executable)
index e827de1..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-# OpenChange provision script
-#
-# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2008
-#   
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-import optparse
-import os,sys
-
-# To allow running from the source directory
-sys.path.append("python")
-
-import openchange
-
-import samba
-import samba.getopt as options
-import openchange.provision as openchange
-
-parser = optparse.OptionParser("openchange_provision [options]")
-
-sambaopts = options.SambaOptions(parser)
-parser.add_option_group(sambaopts)
-
-credopts = options.CredentialsOptions(parser)
-parser.add_option_group(credopts)
-parser.add_option("--firstorg", type="string", metavar="FIRSTORG", 
-                  help="set OpenChange First Organization (otherwise First Organization)")
-parser.add_option("--firstou", type="string", metavar="FIRSTOU", 
-                  help="set OpenChange First Organization Unit (otherwise First Organization Unit)")
-parser.add_option("--openchangedb", action="store_true", help="Initialize OpenChange dispatcher database")
-parser.add_option("--mapistore", type="string", metavar="STORE",
-                 help="The backend storage type to use (only for --openchangedb)")
-opts,args = parser.parse_args()
-if len(args) != 0:
-    parser.print_usage()
-    sys.exit(1)
-    
-lp = sambaopts.get_loadparm()
-creds = credopts.get_credentials(lp)
-
-def setup_path(*args):
-    return os.path.join(os.path.dirname(__file__), *args)
-
-backend = "fsocpf" #default
-if opts.mapistore is not None:
-       backend = opts.mapistore
-
-if not opts.openchangedb:
-       openchange.provision(setup_path, lp, creds, firstorg=opts.firstorg, firstou=opts.firstou)
-else:
-       openchange.openchangedb_provision(lp, firstorg=opts.firstorg, firstou=opts.firstou, mapistore=backend)
diff --git a/branches/plugfest/setup/openchangedb/oc_provision_openchange_init.ldif b/branches/plugfest/setup/openchangedb/oc_provision_openchange_init.ldif
deleted file mode 100644 (file)
index d158ac1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-dn: @OPTIONS
-checkBaseOnSearch: TRUE
-
-dn: @INDEXLIST
-@IDXATTR: cn
-
-dn: @ATTRIBUTES
-cn: CASE_INSENSITIVE
-dn: CASE_INSENSITIVE
\ No newline at end of file
diff --git a/branches/plugfest/setup/openchangedb/oc_provision_openchange_mailbox.ldif b/branches/plugfest/setup/openchangedb/oc_provision_openchange_mailbox.ldif
deleted file mode 100644 (file)
index ce832d5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-dn: CN=${FOLDER_IDX},${USERDN}
-cn: ${FOLDER_IDX}
-fid: ${FOLDER_IDX}
-name: ${NAME}
diff --git a/branches/plugfest/setup/profiles/oc_profiles_init.ldif b/branches/plugfest/setup/profiles/oc_profiles_init.ldif
deleted file mode 100644 (file)
index 66b281e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-dn: @ATTRIBUTES
-dnsDomain: CASE_INSENSITIVE
-cn: CASE_INSENSITIVE
-dc: CASE_INSENSITIVE
-name: CASE_INSENSITIVE
-dn: CASE_INSENSITIVE
-objectClass: CASE_INSENSITIVE
diff --git a/branches/plugfest/setup/profiles/oc_profiles_schema.ldif b/branches/plugfest/setup/profiles/oc_profiles_schema.ldif
deleted file mode 100644 (file)
index 81793ec..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-#
-# Exchange organization
-#
-dn: CN=Organization
-objectClass: top
-objectClass: attributeSchema
-name: Organization
-CN: Organization
-description: Exchange Organization
-isSingleValued: TRUE
-
-#
-# Exchange organization unit
-#
-dn: CN=OrganizationUnit
-objectClass: top
-objectClass: attributeSchema
-name: OrganizationUnit
-CN: OrganizationUnit
-description: Exchange Organization Unit
-isSingleValued: TRUE
-
-#
-# User display name
-#
-dn: CN=DisplayName
-objectClass: top
-objectClass: attributeSchema
-name: DisplayName
-CN: DisplayName
-description: User display name
-isSingleValued: TRUE
-
-#
-# Office Telephone Number
-#
-dn: CN=OfficeTelephoneNumber
-objectClass: top
-objectClass: attributeSchema
-name: OfficeTelephoneNumber
-CN: OfficeTelephoneNumber
-description: Office Telephone Number
-isSingleValued: TRUE
-
-#
-# Office Location
-#
-dn: CN=OfficeLocation
-objectClass: top
-objectClass: attributeSchema
-name: OfficeLocation
-CN: OfficeLocation
-description: Office Location
-isSingleValued: TRUE
-
-#
-# User title
-#
-dn: CN=Title
-objectClass: top
-objectClass: attributeSchema
-name: Title
-CN: Title
-description: User Title
-isSingleValued: TRUE
-
-#
-# Company Name
-#
-dn: CN=CompanyName
-objectClass: top
-objectClass: attributeSchema
-name: CompanyName
-CN: CompanyName
-description: Company Name
-isSingleValued: TRUE
-
-#
-# User account name
-#
-dn: CN=AccountName
-objectClass: top
-objectClass: attributeSchema
-name: AccountName
-CN: AccountName
-description: User account name
-isSingleValued: TRUE
-
-#
-# User email address
-#
-dn: CN=EmailAddress
-objectClass: top
-objectClass: attributeSchema
-name: EmailAddress
-CN: EmailAddress
-description: User email address
-isSingleValued: TRUE
-
-#
-# Email Address type
-#
-dn: CN=AddrType
-objectClass: top
-objectClass: attributeSchema
-name: AddrType
-CN: AddrType
-description: User Email Address Type
-isSingleValued: TRUE
-
-#
-# Entry ID
-#
-dn: CN=EntryID
-objectClass: top
-objectClass: attributeSchema
-name: EntryID
-CN: ENtryID
-description: Unique identifier for the given object
-isSingleValued: TRUE
-
-#
-# Object Type
-#
-dn: CN=ObjectType
-objectClass: top
-objectClass: attributeSchema
-name: ObjectType
-CN: ObjectType
-description: Object Type
-isSingleValued: TRUE
-
-#
-# Home MDB
-#
-dn: CN=HomeMDB
-objectClass: top
-objectClass: attributeSchema
-name: HomeMDB
-CN: HomeMDB
-description: Path to the user Mailbox
-isSingleValued: TRUE
-
-#
-# User Proxy addresses for different connectors
-#
-dn: CN=ProxyAddress
-objectClass: top
-objectClass: attributeSchema
-name: ProxyAddress
-CN: ProxyAddress
-description: Proxy addresses for other connectors
-isSingleValued: FALSE
-
-#
-# PR_DEFAULT_PROFILE
-#
-dn: CN=PR_DEFAULT_PROFILE
-objectClass: top
-objectClass: attributeSchema
-name: PR_DEFAULT_PROFILE
-CN: PR_DEFAULT_PROFILE
-description: Indicates if the profile is the default one
-isSingleValued: TRUE
-
-########################################################
-# Attributes for Exchange Servers containers
-########################################################
-
-#
-# Exchange server binding strings
-#
-dn: CN=NetworkAddress
-objectClass: top
-objectClass: attributeSchema
-name: NetworkAddress
-CN: NetworkAddress
-description: binding string we can use to connect to the Exchange Server
-isSingleValued: FALSE
-
-#
-# Container flags
-#
-dn: CN=ContainerFlags
-objectClass: top
-objectClass: attributeSchema
-name: ContainerFlags
-CN: ContainerFlags
-isSingleValued: TRUE
-
-#
-# Depth
-#
-dn: CN=Depth
-objectClass: top
-objectClass: attributeSchema
-name: Depth
-CN: Depth
-isSingleValued: TRUE
-
-#
-# AB Container ID
-#
-dn: CN=ABContainerID
-objectClass: top
-objectClass: attributeSchema
-name: ABContainerID
-CN: ABContainerID
-isSingleValued: TRUE
-
-#
-# AB is Master
-#
-dn: CN=ABIsMaster
-objectClass: top
-objectClass: attributeSchema
-name: ABIsMaster
-CN: ABIsMaster
-isSingleValued: TRUE
\ No newline at end of file
diff --git a/branches/plugfest/testprogs/blackbox/expected_output--help.txt b/branches/plugfest/testprogs/blackbox/expected_output--help.txt
deleted file mode 100644 (file)
index 4a11f86..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Usage: openchangeclient [OPTION...]
-  -f, --database=STRING        set the profile database path
-  --pf                         access public folders instead of mailbox
-  -p, --profile=STRING         set the profile name
-  -P, --password=STRING        set the profile password
-  -S, --sendmail               send a mail
-  --sendappointment            send an appointment
-  --sendcontact                send a contact
-  --sendtask                   send a task
-  --sendnote                   send a note
-  -F, --fetchmail              fetch user INBOX mails
-  --fetchsummary               fetch message summaries only
-  -G, --storemail=STRING       retrieve a mail on the filesystem
-  -i, --fetch-items=STRING     fetch specified user INBOX items
-  --freebusy=STRING            display free / busy information for the
-                               specified user
-  --force                      force openchangeclient behavior in some
-                               circumstances
-  --delete=STRING              delete a message given its unique ID
-  -u, --update=STRING          update the specified item
-  -m, --mailbox                list mailbox folder summary
-  -D, --deletemail             delete a mail from user INBOX
-  -A, --attachments=STRING     send a list of attachments
-  -I, --html-inline=STRING     send PR_HTML content
-  -W, --html-file=STRING       use HTML file as content
-  -t, --to=STRING              set the To recipients
-  -c, --cc=STRING              set the Cc recipients
-  -b, --bcc=STRING             set the Bcc recipients
-  -s, --subject=STRING         set the mail subject
-  -B, --body=STRING            set the mail body
-  --location=STRING            set the item location
-  --label=STRING               set the event label
-  --dtstart=STRING             set the event start date
-  --dtend=STRING               set the event end date
-  --busystatus=STRING          set the item busy status
-  --taskstatus=STRING          set the task status
-  --importance=STRING          Set the item importance
-  --email=STRING               set the email address
-  --fullname=STRING            set the full name
-  --cardname=STRING            set a contact card name
-  --color=STRING               set the note color
-  --notifications              monitor INBOX newmail notifications
-  --folder=STRING              set the folder to use instead of inbox
-  --mkdir                      create a folder
-  --rmdir                      delete a folder
-  --userlist                   list Address Book entries
-  --folder-name=STRING         set the folder name
-  --folder-comment=STRING      set the folder comment
-  -d, --debuglevel=STRING      set Debug Level
-  --dump-data                  dump the hex data
-  --private                    set the private flag on messages
-  --ocpf-file=STRING           set OCPF file
-  --ocpf-dump=STRING           dump message into OCPF file
-  --ocpf-syntax                check OCPF files syntax
-  --ocpf-sender                send message using OCPF files contents
-
-Help options:
-  -?, --help                   Show this help message
-  --usage                      Display brief usage message
-
-Common openchange options:
-  -V, --version                Print version 
diff --git a/branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax1.txt b/branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax1.txt
deleted file mode 100644 (file)
index f6e7e5f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-
-TYPE:
-=====
-       * IPM.Appointment
-
-FOLDER:
-=======
-       * 0x9
-
-OLEGUID:
-========
-       PS_PUBLIC_STRINGS        : 00020329-0000-0000-c000-000000000046
-       PSETID_Common            : 00062008-0000-0000-c000-000000000046
-       PSETID_Appointment       : 00062002-0000-0000-c000-000000000046
-
-RECIPIENTS:
-===========
-       * To: 
-       * Cc: 
-       * Bcc: 
-
-       VARIABLE:
-       =========
-               wrong
-               private
-               keywords
-               reminder
-               end_date
-               start_date
-               subject
-
-       PROPERTIES:
-       ===========
-               0x00360003 = PR_SENSITIVITY
-               0x00610040 = PR_END_DATE
-               0x00600040 = PR_START_DATE
-               0x1000001e = PR_BODY
-               0x0e1d001e = PR_NORMALIZED_SUBJECT
-               0x0070001e = PR_CONVERSATION_TOPIC
-
-       NAMED PROPERTIES:
-       =================
-
-               OOM:
-               ----
-                       * Private
-                       * Location
-                       * CommonEnd
-                       * ApptEndDate
-                       * CommonStart
-                       * ApptStartDate
-                       * BusyStatus
-
-               MNID_ID:
-               --------
-                       * 0x8501
-                       * 0x8217
-
-               MNID_STRING:
-               ------------
-                       * Keywords
diff --git a/branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax2.txt b/branches/plugfest/testprogs/blackbox/expected_output--ocpf-syntax2.txt
deleted file mode 100644 (file)
index ea224e5..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-../../libocpf/examples/sample_task.ocpf:46: Unknown OOM
-../../libocpf/examples/sample_task.ocpf:47: Unknown OOM
-../../libocpf/examples/sample_task.ocpf:48: Unknown OOM
-
-TYPE:
-=====
-       * IPM.Task
-
-FOLDER:
-=======
-       * 0xd
-
-OLEGUID:
-========
-       PS_PUBLIC_STRINGS        : 00020329-0000-0000-c000-000000000046
-       PSETID_Common            : 00062008-0000-0000-c000-000000000046
-       PSETID_Task              : 00062003-0000-0000-c000-000000000046
-
-RECIPIENTS:
-===========
-       * To: 
-       * Cc: 
-       * Bcc: 
-
-       VARIABLE:
-       =========
-               task_status
-               importance
-               end_date
-               start_date
-               body
-               subject
-
-       PROPERTIES:
-       ===========
-               0x00360003 = PR_SENSITIVITY
-               0x00170003 = PR_IMPORTANCE
-               0x1000001e = PR_BODY
-               0x0e1d001e = PR_NORMALIZED_SUBJECT
-               0x0070001e = PR_CONVERSATION_TOPIC
-
-       NAMED PROPERTIES:
-       =================
-
-               OOM:
-               ----
-                       * Private
-                       * Companies
-
-               MNID_ID:
-               --------
-
-               MNID_STRING:
-               ------------
-                       * Keywords
diff --git a/branches/plugfest/testprogs/blackbox/expected_output--usage.txt b/branches/plugfest/testprogs/blackbox/expected_output--usage.txt
deleted file mode 100644 (file)
index 38eb883..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Usage: openchangeclient [-?SFmDV] [-?|--help] [--usage] [-f|--database STRING]
-        [--pf] [-p|--profile STRING] [-P|--password STRING] [-S|--sendmail]
-        [--sendappointment] [--sendcontact] [--sendtask] [--sendnote]
-        [-F|--fetchmail] [--fetchsummary] [-G|--storemail STRING]
-        [-i|--fetch-items STRING] [--freebusy=STRING] [--force]
-        [--delete=STRING] [-u|--update STRING] [-m|--mailbox] [-D|--deletemail]
-        [-A|--attachments STRING] [-I|--html-inline STRING]
-        [-W|--html-file STRING] [-t|--to STRING] [-c|--cc STRING]
-        [-b|--bcc STRING] [-s|--subject STRING] [-B|--body STRING]
-        [--location=STRING] [--label=STRING] [--dtstart=STRING]
-        [--dtend=STRING] [--busystatus=STRING] [--taskstatus=STRING]
-        [--importance=STRING] [--email=STRING] [--fullname=STRING]
-        [--cardname=STRING] [--color=STRING] [--notifications]
-        [--folder=STRING] [--mkdir] [--rmdir] [--userlist]
-        [--folder-name=STRING] [--folder-comment=STRING]
-        [-d|--debuglevel STRING] [--dump-data] [--private]
-        [--ocpf-file=STRING] [--ocpf-dump=STRING] [--ocpf-syntax]
-        [--ocpf-sender] [-V|--version]
diff --git a/branches/plugfest/testprogs/blackbox/expected_output--version.txt b/branches/plugfest/testprogs/blackbox/expected_output--version.txt
deleted file mode 100644 (file)
index ba13de0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Version 0.10 (Nomad)
diff --git a/branches/plugfest/testprogs/blackbox/subunit.sh b/branches/plugfest/testprogs/blackbox/subunit.sh
deleted file mode 100755 (executable)
index cee8cf6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-#  subunit.sh: shell functions to report test status via the subunit protocol.
-#  Copyright (C) 2006  Robert Collins <robertc@robertcollins.net>
-#  Copyright (C) 2008  Jelmer Vernooij <jelmer@samba.org>
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-
-subunit_start_test () {
-  # emit the current protocol start-marker for test $1
-  echo "test: $1"
-}
-
-
-subunit_pass_test () {
-  # emit the current protocol test passed marker for test $1
-  echo "success: $1"
-}
-
-
-subunit_fail_test () {
-  # emit the current protocol fail-marker for test $1, and emit stdin as
-  # the error text.
-  # we use stdin because the failure message can be arbitrarily long, and this
-  # makes it convenient to write in scripts (using <<END syntax.
-  echo "failure: $1 ["
-  cat -
-  echo "]"
-}
-
-
-subunit_error_test () {
-  # emit the current protocol error-marker for test $1, and emit stdin as
-  # the error text.
-  # we use stdin because the failure message can be arbitrarily long, and this
-  # makes it convenient to write in scripts (using <<END syntax.
-  echo "error: $1 ["
-  cat -
-  echo "]"
-}
-
-testit () {
-       name="$1"
-       shift
-       cmdline="$*"
-       subunit_start_test "$name"
-       output=`$cmdline 2>&1`
-       status=$?
-       if [ x$status = x0 ]; then
-               subunit_pass_test "$name"
-       else
-               echo "$output" | subunit_fail_test "$name"
-       fi
-       return $status
-}
diff --git a/branches/plugfest/testprogs/blackbox/test_mapiprofile.sh b/branches/plugfest/testprogs/blackbox/test_mapiprofile.sh
deleted file mode 100755 (executable)
index 9c6c299..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-# Black tests for mapiprofile
-# Copyright (C) 2009 Julien Kerihuel <j.kerihuel@openchange.org>
-
-if [ $# -lt 4 ]; then
-cat <<EOF
-Usage: mapiprofile.sh SERVER USERNAME PASSWORD DOMAIN
-EOF
-exit 1;
-fi
-
-SERVER=$1
-USERNAME=$2
-PASSWORD=$3
-DOMAIN=$4
-shift 4
-failed=0
-
-ocbindir=`dirname $0`/../../bin
-mapiprofile=$ocbindir/mapiprofile
-profdb=`dirname $0`/profiles.ldb
-
-. `dirname $0`/subunit.sh
-
-testit "create new database" $VALGRIND $mapiprofile --newdb --database=$profdb || failed=`expr $failed + 1`
-
-testit "create new profile" $VALGRIND $mapiprofile --database=$profdb -P mapiprofile --create --username=$USERNAME --password=$PASSWORD -I $SERVER -D $DOMAIN || failed=`expr $failed + 1`
-
-testit "list profiles" $VALGRIND $mapiprofile --database=$profdb --list || failed=`expr $failed + 1`
-
-testit "set it as default" $VALGRIND $mapiprofile --database=$profdb -P mapiprofile -S || failed=`expr $failed + 1`
-
-# Check if the default profile has the proper name
-list_test=`mapiprofile --list --database=$profdb | grep default | cut -d= -f2 | sed 's/\[default\]//' | sed 's/\s*//' | sed 's/ //'`
-if [ "$list_test" != "mapiprofile" ]; then
-    subunit_fail_test "\"$list_test\" is not the default profile"
-    failed=`expr $failed + 1`
-fi
-
-testit "rename profile" $VALGRIND $mapiprofile --database=$profdb -P mapiprofile --rename=mapiprofile_rename || failed=`expr $failed + 1`
-
-# Check if the new profile has the proper name
-rename=`mapiprofile --list --database=$profdb | grep default | cut -d= -f2 | sed 's/\[default\]//' | sed 's/\s*//' | sed 's/ //'`
-if [ "$rename" != "mapiprofile_rename" ]; then
-    subunit_fail_test "mapiprofile was not renamed to mapiprofile_rename"
-    failed=`expr $failed + 1`
-fi
-
-testit "get FQDN" $VALGRIND $mapiprofile --database=$profdb -P mapiprofile_rename --getfqdn || failed=`expr $failed + 1`
-
-testit "delete profile" $VALGRIND $mapiprofile --database=$profdb -P mapiprofile_rename --delete || failed=`expr $failed + 1`
-
-rm -f profiles.ldb
\ No newline at end of file
diff --git a/branches/plugfest/testprogs/blackbox/test_openchangeclient.py b/branches/plugfest/testprogs/blackbox/test_openchangeclient.py
deleted file mode 100644 (file)
index 6b3eb7d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-import testtools\r
-import unittest\r
-import subprocess\r
-import subunit\r
-from testtools.matchers import DocTestMatches\r
-import sys\r
-\r
-class TestProgram(testtools.TestCase):\r
-\r
-    def get_output(self, args, retcode=0):\r
-        proc = subprocess.Popen(args, stdin=None, stdout=subprocess.PIPE, \r
-            stderr=subprocess.PIPE)\r
-        out, err = proc.communicate()\r
-        self.assertEqual(retcode, proc.returncode,\r
-            "Unexpected return code %d, stdout=%r, stderr=%r" % (proc.returncode, out, err))\r
-        return out, err\r
-\r
-class OpenChangeTestCase(TestProgram):\r
-\r
-    progpath = "../../bin/openchangeclient"\r
-\r
-    def verify_command_noerrors(self, command, expectedStandardOutput):\r
-        out, err = self.get_output(command)\r
-        self.assertThat(err, DocTestMatches(""))\r
-        self.assertThat(out, DocTestMatches(expectedStandardOutput))\r
-        \r
-    def test_help(self):\r
-        refout = open("expected_output--help.txt").read()\r
-        self.verify_command_noerrors([self.progpath, "--help"], refout)\r
-        self.verify_command_noerrors([self.progpath, "-?"], refout)\r
-\r
-    def test_version(self):\r
-        refout = open("expected_output--version.txt").read()\r
-        self.verify_command_noerrors([self.progpath, "--version"], refout)\r
-\r
-    def test_usage(self):\r
-        refout = open("expected_output--usage.txt").read()\r
-        self.verify_command_noerrors([self.progpath, "--usage"], refout)\r
-\r
-    def test_ocpf_syntax1(self):\r
-        refout = open("expected_output--ocpf-syntax1.txt").read()\r
-        self.verify_command_noerrors([self.progpath, "--ocpf-syntax", "--ocpf-file=../../libocpf/examples/sample_appointment.ocpf"], refout)\r
-\r
-    def test_ocpf_syntax2(self):\r
-        refout = open("expected_output--ocpf-syntax2.txt").read()\r
-        self.verify_command_noerrors([self.progpath, "--ocpf-syntax", "--ocpf-file=../../libocpf/examples/sample_task.ocpf"], refout)\r
-\r
-if __name__ == '__main__':\r
-     unittest.main()\r
diff --git a/branches/plugfest/testprogs/check_fasttransfer.c b/branches/plugfest/testprogs/check_fasttransfer.c
deleted file mode 100644 (file)
index ffc4d0f..0000000
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
-   Test fast transfer operations and parser
-
-   OpenChange Project
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "mapiproxy/libmapistore/mapistore.h"
-#include "mapiproxy/libmapistore/mapistore_errors.h"
-
-#include <samba/popt.h>
-#include <ldb.h>
-#include <talloc.h>
-
-#include <inttypes.h>
-
-static void popt_openchange_version_callback(poptContext con,
-                                             enum poptCallbackReason reason,
-                                             const struct poptOption *opt,
-                                             const char *arg,
-                                             const void *data)
-{
-        switch (opt->val) {
-        case 'V':
-                printf("Version %s\n", OPENCHANGE_VERSION_STRING);
-                exit (0);
-        }
-}
-
-struct poptOption popt_openchange_version[] = {
-        { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_openchange_version_callback, '\0', NULL, NULL },
-        { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version ", NULL },
-        POPT_TABLEEND
-};
-
-#define POPT_OPENCHANGE_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_openchange_version, 0, "Common openchange options:", NULL },
-#define DEFAULT_PROFDB  "%s/.openchange/profiles.ldb"
-
-/* These callbacks are for deserialising the fast transfer stream to a mapistore instance */
-struct parent_fid {
-        struct parent_fid      *prev;
-        struct parent_fid      *next;
-        uint64_t               fid;
-};
-
-struct mapistore_output_ctx {
-       struct mapistore_context        *mstore_ctx;
-       uint32_t                        mapistore_context_id;
-       uint64_t                        root_fid;
-       struct parent_fid               *parent_fids; /* stack */
-       uint64_t                        current_id;
-       uint8_t                         current_output_type;
-       struct SRow                     *proplist; /* the properties on the "current" object */
-};
-
-static enum MAPISTATUS mapistore_marker(uint32_t marker, void *priv)
-{
-       struct mapistore_output_ctx *mapistore = priv;
-
-       if (mapistore->proplist) {
-               struct parent_fid *it;
-               printf("parent_fids: ");
-               for (it = mapistore->parent_fids; it->next; it = it->next) {
-                       printf("0x%016"PRIx64",", it->fid);
-               }
-               printf("\n");
-               if (mapistore->current_id == mapistore->root_fid) {
-                       /* This is the top level folder */
-                       mapistore_setprops(mapistore->mstore_ctx, mapistore->mapistore_context_id,
-                                          mapistore->root_fid, mapistore->current_output_type,
-                                          mapistore->proplist);
-               } else if (mapistore->current_output_type == MAPISTORE_FOLDER) {
-                        struct parent_fid *element = talloc_zero(mapistore->mstore_ctx, struct parent_fid);
-                       mapistore_mkdir(mapistore->mstore_ctx, mapistore->mapistore_context_id,
-                                       mapistore->parent_fids->fid, mapistore->current_id,
-                                       mapistore->proplist);
-                        element->fid = mapistore->current_id;
-                       DLIST_ADD(mapistore->parent_fids, element);
-               } else {
-                       mapistore_createmessage(mapistore->mstore_ctx, mapistore->mapistore_context_id,
-                                               mapistore->parent_fids->fid, mapistore->current_id);
-                       mapistore_setprops(mapistore->mstore_ctx, mapistore->mapistore_context_id,
-                                          mapistore->current_id, mapistore->current_output_type,
-                                          mapistore->proplist);
-                       mapistore_savechangesmessage(mapistore->mstore_ctx, mapistore->mapistore_context_id,
-                                                    mapistore->current_id, 0);
-               }
-               talloc_free(mapistore->proplist);
-               mapistore->proplist = 0;
-               (mapistore->current_id)++;
-       }
-
-       switch (marker) {
-       case PR_START_TOP_FLD:
-       {
-               /* start collecting properties */
-               struct SPropValue one_prop;
-               struct parent_fid *element = talloc_zero(mapistore->mstore_ctx, struct parent_fid);
-               mapistore->proplist = talloc_zero(mapistore->mstore_ctx, struct SRow);
-               one_prop.ulPropTag = PR_FID;
-               one_prop.dwAlignPad = 0;
-               one_prop.value.d = mapistore->root_fid;
-               SRow_addprop(mapistore->proplist, one_prop);
-               one_prop.ulPropTag = PR_FOLDER_TYPE;
-               one_prop.value.l = MAPISTORE_FOLDER;
-               SRow_addprop(mapistore->proplist, one_prop);
-               mapistore->current_id = mapistore->root_fid;
-               mapistore->parent_fids = talloc_zero(mapistore->mstore_ctx, struct parent_fid);
-               element->fid = mapistore->current_id;
-               DLIST_ADD(mapistore->parent_fids, element);
-               mapistore->current_output_type = MAPISTORE_FOLDER;
-               break;
-       }
-       case PR_START_SUB_FLD:
-               mapistore->proplist = talloc_zero(mapistore->mstore_ctx, struct SRow);
-               mapistore->current_output_type = MAPISTORE_FOLDER;
-               break;
-       case PR_START_MESSAGE:
-               mapistore->proplist = talloc_zero(mapistore->mstore_ctx, struct SRow);
-               mapistore->current_output_type = MAPISTORE_MESSAGE;
-               break;
-       case PR_START_FAI_MSG:
-       case PR_START_RECIP:
-       case PR_START_EMBED:
-       case PR_NEW_ATTACH:
-               break;
-       case PR_END_FOLDER:
-               DLIST_REMOVE(mapistore->parent_fids, mapistore->parent_fids);
-               break;
-       case PR_END_MESSAGE:
-       case PR_END_RECIP:
-       case PR_END_ATTACH:
-       case PR_END_EMBED:
-               break;
-       default:
-               printf("***unhandled *** TODO: Marker: %s (0x%08x)\n", get_proptag_name(marker), marker);
-       }
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS mapistore_delprop(uint32_t proptag, void *priv)
-{
-       printf("TODO: DelProps: 0x%08x (%s)\n", proptag, get_proptag_name(proptag));
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS mapistore_namedprop(uint32_t proptag, struct MAPINAMEID nameid, void *priv)
-{
-       TALLOC_CTX *mem_ctx;
-       // struct mapistore_output_ctx *mapistore = priv;
-       mem_ctx = talloc_init("process_namedprop");
-       printf("TODO: Named Property: 0x%08x has GUID %s and ", proptag, GUID_string(mem_ctx, &(nameid.lpguid)));
-       if (nameid.ulKind == MNID_ID) {
-               printf("dispId 0x%08x\n", nameid.kind.lid);
-       } else if (nameid.ulKind == MNID_STRING) {
-               printf("name %s\n", nameid.kind.lpwstr.Name);
-       }
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS mapistore_property(struct SPropValue prop, void *priv)
-{
-       struct mapistore_output_ctx *mapistore = priv;
-       SRow_addprop(mapistore->proplist, prop);
-       return MAPI_E_SUCCESS;
-}
-
-/* These callbacks are for the "dump-data" mode, so they don't do much */
-
-static enum MAPISTATUS dump_marker(uint32_t marker, void *priv)
-{
-       printf("Marker: %s (0x%08x)\n", get_proptag_name(marker), marker);
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS dump_delprop(uint32_t proptag, void *priv)
-{
-       printf("DelProps: 0x%08x (%s)\n", proptag, get_proptag_name(proptag));
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS dump_namedprop(uint32_t proptag, struct MAPINAMEID nameid, void *priv)
-{
-       TALLOC_CTX *mem_ctx;
-       mem_ctx = talloc_init("process_namedprop");
-       printf("Named Property: 0x%08x has GUID %s and ", proptag, GUID_string(mem_ctx, &(nameid.lpguid)));
-       if (nameid.ulKind == MNID_ID) {
-               printf("dispId 0x%08x\n", nameid.kind.lid);
-       } else if (nameid.ulKind == MNID_STRING) {
-               printf("name %s\n", nameid.kind.lpwstr.Name);
-       }
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS dump_property(struct SPropValue prop, void *priv)
-{
-       mapidump_SPropValue(prop, "\t");
-       return MAPI_E_SUCCESS;
-}
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_session             *session = NULL;
-       struct mapi_profile             *profile;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_fx_context;
-       mapi_id_t                       id_folder;
-
-       uint16_t                        progressCount;
-       uint16_t                        totalStepCount;
-       int                             transfers = 0;
-       enum TransferStatus             fxTransferStatus;
-       DATA_BLOB                       transferdata;
-       struct fx_parser_context        *parser;
-       struct mapistore_output_ctx     output_ctx;
-       poptContext                     pc;
-       int                             opt;
-       const char                      *opt_profdb = NULL;
-       char                            *opt_profname = NULL;
-       const char                      *opt_password = NULL;
-       uint32_t                        opt_maxsize = 0;
-       const char                      *opt_mapistore = NULL;
-       bool                            opt_showprogress = false;
-       bool                            opt_dumpdata = false;
-       const char                      *opt_debug = NULL;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, OPT_MAXDATA, OPT_SHOWPROGRESS, OPT_MAPISTORE, OPT_DEBUG, OPT_DUMPDATA};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", "PATH"},
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", "PROFILE"},
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", "PASSWORD"},
-               {"maxdata", 0, POPT_ARG_INT, NULL, OPT_MAXDATA, "the maximum transfer data size", "SIZE"},
-               {"showprogress", 0, POPT_ARG_NONE, NULL, OPT_SHOWPROGRESS, "enable progress display", NULL},
-               {"mapistore", 0, POPT_ARG_STRING, NULL, OPT_MAPISTORE, "serialise to mapistore", "FILESYSTEM_PATH"},
-               {"debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG, "set the debug level", "LEVEL"},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the transfer data", NULL},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "check_fasttransfer");
-
-       pc = poptGetContext("check_fasttransfer", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, (char *)poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_MAXDATA:
-                       opt_maxsize = *poptGetOptArg(pc);
-                       break;
-               case OPT_SHOWPROGRESS:
-                       opt_showprogress = true;
-                       break;
-               case OPT_MAPISTORE:
-                       opt_mapistore = poptGetOptArg(pc);
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               }
-       }
-
-       /**
-        * Sanity checks
-        */
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       /**
-        * Initialize MAPI subsystem
-        */
-
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", retval);
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-
-       /* if no profile is supplied use the default one */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       printf("No profile specified and no default profile found\n");
-                       exit (1);
-               }
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &session, opt_profname, opt_password);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", retval);
-               exit (1);
-       }
-       profile = session->profile;
-
-       /* Open the default message store */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       /* mapi_object_init(&obj_table); */
-       mapi_object_init(&obj_fx_context);
-
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore", retval);
-               exit (1);
-       }
-
-       /* Open the top level folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("GetReceiveFolder", retval);
-               exit (1);
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenFolder", retval);
-               exit (1);
-       }
-
-       retval = FXCopyFolder(&obj_folder, FastTransferCopyFolder_CopySubfolders, FastTransfer_Unicode, &obj_fx_context);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("FXCopyFolder", retval);
-               exit (1);
-       }
-
-       if (opt_mapistore) {
-               char *root_folder;
-               // TODO: check the path is valid / exists / can be opened, etc.
-               // TODO: maybe allow a URI instead of path.
-               output_ctx.root_fid = 0x0000000000010001;
-               output_ctx.current_id = output_ctx.root_fid;
-               root_folder = talloc_asprintf(mem_ctx, "fsocpf://%s/0x%016"PRIx64, opt_mapistore, output_ctx.root_fid);
-               parser = fxparser_init(mem_ctx, &output_ctx);
-               retval = mapistore_set_mapping_path(opt_mapistore);
-               if (retval != MAPISTORE_SUCCESS) {
-                       mapi_errstr("mapistore_set_mapping_path", retval);
-                       exit (1);
-               }
-
-               output_ctx.mstore_ctx = mapistore_init(mem_ctx, NULL);
-               if (!(output_ctx.mstore_ctx)) {
-                       mapi_errstr("mapistore_init", retval);
-                       exit (1);
-               }
-
-               retval = mapistore_add_context(output_ctx.mstore_ctx, root_folder, &(output_ctx.mapistore_context_id));
-               if (retval != MAPISTORE_SUCCESS) {
-                       DEBUG(0, ("%s\n", mapistore_errstr(retval)));
-                       exit (1);
-               }
-               
-               output_ctx.proplist = 0;
-
-               fxparser_set_marker_callback(parser, mapistore_marker);
-               fxparser_set_delprop_callback(parser, mapistore_delprop);
-               fxparser_set_namedprop_callback(parser, mapistore_namedprop);
-               fxparser_set_property_callback(parser, mapistore_property);
-       } else if (opt_dumpdata) {
-               parser = fxparser_init(mem_ctx, NULL);
-               fxparser_set_marker_callback(parser, dump_marker);
-               fxparser_set_delprop_callback(parser, dump_delprop);
-               fxparser_set_namedprop_callback(parser, dump_namedprop);
-               fxparser_set_property_callback(parser, dump_property);
-       } else {
-               parser = fxparser_init(mem_ctx, NULL);
-       }
-
-       do {
-               retval = FXGetBuffer(&obj_fx_context, opt_maxsize, &fxTransferStatus, &progressCount, &totalStepCount, &transferdata);
-               transfers++;
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("FXGetBuffer", retval);
-                       exit (1);
-               }
-
-               if (opt_showprogress) {
-                       printf("progress: (%d/%d)\n", progressCount, totalStepCount);
-                       printf("status: 0x%04x\n", fxTransferStatus);
-               }
-
-               fxparser_parse(parser, &transferdata);
-       } while ((fxTransferStatus == TransferStatus_Partial) || (fxTransferStatus == TransferStatus_NoRoom));
-
-       printf("total transfers: %i\n", transfers);
-
-       if (opt_mapistore) {
-               retval = mapistore_del_context(output_ctx.mstore_ctx, output_ctx.mapistore_context_id);
-               if (retval != MAPISTORE_SUCCESS) {
-                       mapi_errstr("mapistore_del_context", retval);
-                       exit (1);
-               }
-
-               retval = mapistore_release(output_ctx.mstore_ctx);
-               if (retval != MAPISTORE_SUCCESS) {
-                       mapi_errstr("mapistore_release", retval);
-                       exit (1);
-               }
-       }
-
-       talloc_free(parser);
-
-       mapi_object_release(&obj_fx_context);
-
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-       MAPIUninitialize(mapi_ctx);
-
-       talloc_free(mem_ctx);
-
-       return 0;
-}
diff --git a/branches/plugfest/testprogs/check_mbox.py b/branches/plugfest/testprogs/check_mbox.py
deleted file mode 100755 (executable)
index 9d1175e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-
-import argparse
-import mailbox
-import os
-import shutil
-import subprocess
-import tempfile
-
-mboxparser = argparse.ArgumentParser(description='Test an mbox file for general compatibility')
-mboxparser.add_argument('--mbox', required=True)
-
-args = mboxparser.parse_args()
-
-###-----------------------
-print "Internal (python mailbox) parser:"
-print "\tmessage count", len(mailbox.mbox(args.mbox))
-
-###-----------------------
-print "mbox2eml:"
-emldir = tempfile.mkdtemp()
-print "\treturn code:", subprocess.call(["mbox2eml", "--input-file", args.mbox, "--output-dir", emldir])
-print "\tmessage count", len(os.listdir(emldir))
-shutil.rmtree(emldir, ignore_errors=True)
-
-###-----------------------
-print "mailx:"
-p1 = subprocess.Popen(["mailx", "-H", "-f", args.mbox,], stdout=subprocess.PIPE)
-p2 = subprocess.Popen(["wc", "-l"], stdin=p1.stdout, stdout=subprocess.PIPE)
-print "\tmessage count", p2.communicate()[0]
-
-
-
diff --git a/branches/plugfest/testprogs/test_asyncnotif.c b/branches/plugfest/testprogs/test_asyncnotif.c
deleted file mode 100644 (file)
index 5344db7..0000000
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
-   Test asynchronous notifications
-
-   OpenChange Project
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-
-#include <samba/popt.h>
-#include <talloc.h>
-
-static void popt_openchange_version_callback(poptContext con,
-                                             enum poptCallbackReason reason,
-                                             const struct poptOption *opt,
-                                             const char *arg,
-                                             const void *data)
-{
-        switch (opt->val) {
-        case 'V':
-                printf("Version %s\n", OPENCHANGE_VERSION_STRING);
-                exit (0);
-        }
-}
-
-struct poptOption popt_openchange_version[] = {
-        { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_openchange_version_callback, '\0', NULL, NULL },
-        { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version ", NULL },
-        POPT_TABLEEND
-};
-
-#define POPT_OPENCHANGE_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_openchange_version, 0, "Common openchange options:", NULL },
-#define DEFAULT_PROFDB  "%s/.openchange/profiles.ldb"
-
-#if 0
-static int callback(uint16_t NotificationType, void *NotificationData, void *private_data)
-{
-       struct HierarchyTableChange     *htable;
-       struct ContentsTableChange      *ctable;
-       struct ContentsTableChange      *stable;
-
-       switch(NotificationType) {
-       case fnevNewMail:
-       case fnevNewMail|fnevMbit:
-               DEBUG(0, ("[+] New mail Received\n"));
-               break;
-       case fnevObjectCreated:
-               DEBUG(0, ("[+] Folder Created\n"));
-               break;
-       case fnevObjectDeleted:
-               DEBUG(0, ("[+] Folder Deleted\n"));
-               break;
-       case fnevObjectModified:
-       case fnevTbit|fnevObjectModified:
-       case fnevUbit|fnevObjectModified:
-       case fnevTbit|fnevUbit|fnevObjectModified:
-               DEBUG(0, ("[+] Folder Modified\n"));
-               break;
-       case fnevObjectMoved:
-               DEBUG(0, ("[+] Folder Moved\n"));
-               break;
-       case fnevObjectCopied:
-               DEBUG(0, ("[+] Folder Copied\n"));
-               break;
-       case fnevSearchComplete:
-               DEBUG(0, ("[+] Search complete in search folder\n"));
-               break;
-       case fnevTableModified:
-               htable = (struct HierarchyTableChange *) NotificationData;
-               DEBUG(0, ("[+] Hierarchy Table: "));
-               switch (htable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       case fnevStatusObjectModified:
-               DEBUG(0, ("[+] ICS Notification\n"));
-               break;
-       case fnevMbit|fnevObjectCreated:
-               DEBUG(0, ("[+] Message created\n"));
-               break;
-       case fnevMbit|fnevObjectDeleted:
-               DEBUG(0, ("[+] Message deleted\n"));
-       case fnevMbit|fnevObjectModified:
-               DEBUG(0, ("[+] Message modified\n"));
-       case fnevMbit|fnevObjectMoved:
-               DEBUG(0, ("[+] Message moved\n"));
-       case fnevMbit|fnevObjectCopied:
-               DEBUG(0, ("[+] Message copied\n"));
-       case fnevMbit|fnevTableModified:
-               ctable = (struct ContentsTableChange *) NotificationData;
-               DEBUG(0, ("[+] Contents Table: "));
-               switch (ctable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       case fnevMbit|fnevSbit|fnevObjectDeleted:
-               DEBUG(0, ("[+] A message is no longer part of a search folder\n"));
-               break;
-       case fnevMbit|fnevSbit|fnevObjectModified:
-               DEBUG(0, ("[+] A property on a message in a search folder has changed\n"));
-       case fnevMbit|fnevSbit|fnevTableModified:
-               stable = (struct ContentsTableChange *) NotificationData;
-               DEBUG(0, ("[+] Search Table: "));
-               switch (stable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       default:
-               printf("[+] Unsupported notification (0x%x)\n", NotificationType);
-               break;
-       }
-
-       return 0;
-}
-#endif
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct mapi_session             *session = NULL;
-       struct mapi_profile             *profile;
-       struct mapi_context             *mapi_ctx;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_inbox;
-       mapi_object_t                   obj_contentstable;
-       uint32_t                        count;
-       mapi_id_t                       fid;
-       poptContext                     pc;
-       int                             opt;
-       const char                      *opt_profdb = NULL;
-       char                            *opt_profname = NULL;
-       const char                      *opt_password = NULL;
-       uint32_t                        opt_maxsize = 0;
-       const char                      *opt_mapistore = NULL;
-       bool                            opt_showprogress = false;
-       bool                            opt_dumpdata = false;
-       const char                      *opt_debug = NULL;
-       int                             exit_code = 0;
-//     uint16_t                        ulEventMask;
-//     uint32_t                        ulConnection;
-       uint32_t                        notificationFlag = 0;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, OPT_MAXDATA, OPT_SHOWPROGRESS, OPT_MAPISTORE, OPT_DEBUG, OPT_DUMPDATA};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", "PATH"},
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", "PROFILE"},
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", "PASSWORD"},
-               {"debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG, "set the debug level", "LEVEL"},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the transfer data", NULL},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "check_fasttransfer");
-
-       pc = poptGetContext("check_fasttransfer", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, (char *)poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_MAXDATA:
-                       opt_maxsize = *poptGetOptArg(pc);
-                       break;
-               case OPT_SHOWPROGRESS:
-                       opt_showprogress = true;
-                       break;
-               case OPT_MAPISTORE:
-                       opt_mapistore = poptGetOptArg(pc);
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               }
-       }
-
-       /**
-        * Sanity checks
-        */
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       /**
-        * Initialize MAPI subsystem
-        */
-
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", retval);
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-
-       /* if no profile is supplied use the default one */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       printf("No profile specified and no default profile found\n");
-                       exit_code = 1;
-                       goto cleanup;
-               }
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &session, opt_profname, opt_password);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", retval);
-               exit_code = 1;
-               goto cleanup;
-       }
-       profile = session->profile;
-
-       /* Open the default message store */
-       mapi_object_init(&obj_store);
-
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore", retval);
-               exit_code = 1;
-               goto cleanup;
-       }
-
-       retval = GetReceiveFolder(&obj_store, &fid, NULL);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       mapi_object_init(&obj_inbox);
-       retval = OpenFolder(&obj_store, fid, &obj_inbox);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       mapi_object_init(&obj_contentstable);
-       retval = GetContentsTable(&obj_inbox, &obj_contentstable, 0, &count);
-       printf("mailbox contains %i messages\n", count);
-
-#if 0
-       ulEventMask = fnevNewMail|fnevObjectCreated|fnevObjectDeleted|fnevObjectModified|fnevObjectMoved|fnevObjectCopied|fnevSearchComplete|fnevTableModified|fnevStatusObjectModified;
-       retval = Subscribe(&obj_store, &ulConnection, ulEventMask, true, (mapi_notify_callback_t)callback, (void*) (&obj_store));
-        if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("Subscribe", retval);
-               exit_code = 2;
-               goto cleanup;
-       }
-#endif
-
-       printf("about to start a long wait\n");
-       while ((retval = RegisterAsyncNotification(session, &notificationFlag)) == MAPI_E_SUCCESS) {
-               if (notificationFlag != 0x00000000) {
-                       printf("Got a Notification: 0x%08x, woo hoo!\n", notificationFlag);
-                       mapi_object_release(&obj_contentstable);
-                       mapi_object_init(&obj_contentstable);
-                       retval = GetContentsTable(&obj_inbox, &obj_contentstable, 0, &count);
-                       printf("\tNew inbox count is %i\n", count);
-               } else {
-                       printf("going around again, ^C to break out\n");
-               }
-       }
-        if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("RegisterAsyncNotification", retval);
-               exit_code = 2;
-               goto cleanup;
-       }
-
-cleanup:
-       mapi_object_release(&obj_contentstable);
-       mapi_object_release(&obj_inbox);
-       mapi_object_release(&obj_store);
-       MAPIUninitialize(mapi_ctx);
-
-       talloc_free(mem_ctx);
-
-       exit(exit_code);
-}
diff --git a/branches/plugfest/utils/backup/openchangebackup.c b/branches/plugfest/utils/backup/openchangebackup.c
deleted file mode 100644 (file)
index 432f0c9..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
-   MAPI Backup application suite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "openchangebackup.h"
-#include "libmapi/libmapi_private.h"
-
-/**
- * Initialize OCB (OpenChange Backup) subsystem
- * and open a pointer on the LDB database
- */
-struct ocb_context *ocb_init(TALLOC_CTX *mem_ctx, const char *dbpath)
-{
-       struct ocb_context      *ocb_ctx = NULL;
-       char                    *url = NULL;
-       int                     ret;
-       struct tevent_context   *ev;
-
-       /* sanity check */
-       OCB_RETVAL_IF_CODE(!mem_ctx, "invalid memory context", NULL, NULL);
-       OCB_RETVAL_IF_CODE(!dbpath, "dbpath not set", NULL, NULL);
-
-       ocb_ctx = talloc_zero(mem_ctx, struct ocb_context);
-
-       ev = tevent_context_init(ocb_ctx);
-       if (!ev) goto failed;
-
-       /* init ldb store */
-       ocb_ctx->ldb_ctx = ldb_init((TALLOC_CTX *)ocb_ctx, ev);
-       if (!ocb_ctx->ldb_ctx) goto failed;
-
-       url = talloc_asprintf(mem_ctx, "tdb://%s", dbpath);
-       ret = ldb_connect(ocb_ctx->ldb_ctx, url, 0, NULL);
-       talloc_free(url);
-       if (ret != LDB_SUCCESS) goto failed;
-
-       return ocb_ctx;
-failed:
-       ocb_release(ocb_ctx);
-       return NULL;
-}
-
-/**
- * Release OCB subsystem
- */
-uint32_t ocb_release(struct ocb_context *ocb_ctx)
-{
-       OCB_RETVAL_IF(!ocb_ctx, "subsystem not initialized\n", NULL);
-       talloc_free(ocb_ctx);
-
-       return 0;
-}
-
-/**
- * init and prepare a record
- */
-
-int ocb_record_init(struct ocb_context *ocb_ctx, const char *objclass, const char *dn, 
-                   const char *id, struct mapi_SPropValue_array *props)
-{
-       TALLOC_CTX              *mem_ctx;
-       struct ldb_context      *ldb_ctx;
-       struct ldb_result       *res;
-       enum ldb_scope          scope = LDB_SCOPE_SUBTREE;
-       struct ldb_dn           *basedn;
-       int                     ret;
-       const char * const      attrs[] = { "*", NULL };
-
-       /* sanity check */
-       OCB_RETVAL_IF(!ocb_ctx, "Subsystem not initialized", NULL);
-       OCB_RETVAL_IF(!dn, "Not a valid DN", NULL);
-       OCB_RETVAL_IF(!id, "Not a valid ID", NULL);
-
-       mem_ctx = (TALLOC_CTX *)ocb_ctx;
-       ldb_ctx = ocb_ctx->ldb_ctx;
-
-       /* Check if the record already exists */
-       ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "%s", dn);
-       OCB_RETVAL_IF(res->msgs, "Record already exists", NULL);
-
-       /* Retrieve the record basedn */
-       basedn = ldb_dn_new(ldb_ctx, ldb_ctx, dn);
-       OCB_RETVAL_IF(!ldb_dn_validate(basedn), "Invalid DN", NULL);
-
-       ocb_ctx->msg = ldb_msg_new(mem_ctx);
-       ocb_ctx->msg->dn = ldb_dn_copy(mem_ctx, basedn);
-
-       /* add records for cn */
-       ldb_msg_add_string(ocb_ctx->msg, "cn", id);
-
-       /* add filters attributes */
-       ldb_msg_add_string(ocb_ctx->msg, "objectClass", objclass);
-
-       talloc_free(basedn);
-
-       return 0;
-}
-
-
-/**
- * Commit the record with all its attributes: single transaction
- */
-uint32_t ocb_record_commit(struct ocb_context *ocb_ctx)
-{
-       int             ret;
-
-       /* sanity checks */
-       OCB_RETVAL_IF(!ocb_ctx, "Subsystem not initialized", NULL);
-       OCB_RETVAL_IF(!ocb_ctx->ldb_ctx, "LDB context not initialized", NULL);
-       OCB_RETVAL_IF(!ocb_ctx->msg, "Message not initialized", NULL);
-
-       ret = ldb_add(ocb_ctx->ldb_ctx, ocb_ctx->msg);
-       if (ret != LDB_SUCCESS) {
-               DEBUG(3, ("LDB operation failed: %s\n", ldb_errstring(ocb_ctx->ldb_ctx)));
-               return -1;
-       }
-
-       talloc_free(ocb_ctx->msg);
-
-       return 0;
-}
-
-
-/**
- * Add a property (attr, value) couple to the current record
- */
-uint32_t ocb_record_add_property(struct ocb_context *ocb_ctx, 
-                                struct mapi_SPropValue *lpProp)
-{
-       TALLOC_CTX      *mem_ctx;
-       uint32_t        i;
-       char            *attr;
-       char            *value = NULL;
-       const char      *tag;
-
-       /* sanity checks */
-       OCB_RETVAL_IF(!ocb_ctx, "Subsystem not initialized", NULL);
-       OCB_RETVAL_IF(!ocb_ctx->ldb_ctx, "LDB context not initialized", NULL);
-       OCB_RETVAL_IF(!ocb_ctx->msg, "Message not initialized", NULL);
-
-       mem_ctx = (TALLOC_CTX *)ocb_ctx->msg;
-
-       tag = get_proptag_name(lpProp->ulPropTag);
-       if (tag) {
-               attr = talloc_asprintf(mem_ctx, "%s", tag);
-       } else {
-               attr = talloc_asprintf(mem_ctx, "PR-x%.8x", lpProp->ulPropTag);
-       }
-
-       for (i = 0; attr[i]; i++) {
-               if (attr[i] == '_') attr[i] = '-';
-       }
-       
-       switch (lpProp->ulPropTag & 0xFFFF) {
-       case PT_SHORT:
-               ldb_msg_add_fmt(ocb_ctx->msg, attr, "%hd", lpProp->value.i);
-               break;
-       case PT_STRING8:
-               ldb_msg_add_string(ocb_ctx->msg, attr, lpProp->value.lpszA);
-               break;
-       case PT_UNICODE:
-               ldb_msg_add_string(ocb_ctx->msg, attr, lpProp->value.lpszW);
-               break;
-       case PT_ERROR: /* We shouldn't need to backup error properties */
-               return 0;
-       case PT_LONG:
-               ldb_msg_add_fmt(ocb_ctx->msg, attr, "%d", lpProp->value.l);
-               break;
-       case PT_BOOLEAN:
-               ldb_msg_add_fmt(ocb_ctx->msg, attr, "%s", 
-                               ((lpProp->value.b == true) ? "true" : "false"));
-               break;
-       case PT_I8:
-               ldb_msg_add_fmt(ocb_ctx->msg, attr, "%16"PRIx64, lpProp->value.d);
-               break;
-       case PT_SYSTIME:
-               value = ocb_ldb_timestring(mem_ctx, &lpProp->value.ft);
-               ldb_msg_add_string(ocb_ctx->msg, attr, value);
-               break;
-       case 0xFB:
-       case PT_BINARY:
-               if (lpProp->value.bin.cb) {
-                       value = ldb_base64_encode(mem_ctx, (char *)lpProp->value.bin.lpb,
-                                                 lpProp->value.bin.cb);
-                       ldb_msg_add_string(ocb_ctx->msg, attr, value);
-               }
-               break;
-       case PT_MV_LONG:
-               for (i = 0; i < lpProp->value.MVl.cValues; i++) {
-                       ldb_msg_add_fmt(ocb_ctx->msg, attr, "%d", 
-                                       lpProp->value.MVl.lpl[i]);
-               }
-               break;
-       case PT_MV_BINARY:
-               for (i = 0; i < lpProp->value.MVbin.cValues; i++) {
-                       struct SBinary_short bin;
-
-                       bin = lpProp->value.MVbin.bin[i];
-                       if (bin.cb) {
-                               value = ldb_base64_encode(mem_ctx, (char *)bin.lpb, bin.cb);
-                               ldb_msg_add_string(ocb_ctx->msg, attr, value);
-                       }
-               }
-               break;
-       case PT_MV_STRING8:
-               for (i = 0; i < lpProp->value.MVszA.cValues; i++) {
-                       ldb_msg_add_string(ocb_ctx->msg, attr, 
-                                          lpProp->value.MVszA.strings[i].lppszA);
-               }
-               break;
-       default:
-               printf("%s case %d not supported\n", attr, lpProp->ulPropTag & 0xFFFF);
-               break;
-       }
-
-       talloc_free(attr);
-       return 0;
-}
-
-/**
- * Retrieve UUID from Sbinary_short struct
- * Generally used to map PR_STORE_KEY to a string
- * Used for attachments
- */
-char *get_record_uuid(TALLOC_CTX *mem_ctx, const struct SBinary_short *bin)
-{
-       uint32_t        i;
-       char            *lpb;
-
-       OCB_RETVAL_IF_CODE(!bin, "Invalid PR_RECORD_KEY val", NULL, NULL);
-       lpb = talloc_asprintf(mem_ctx, "%.2X", bin->lpb[0]);
-       for (i = 1; i < bin->cb; i++) {
-               lpb = talloc_asprintf_append(lpb, "%.2X", bin->lpb[i]);
-       }
-       
-       return lpb;
-}
-
-
-/**
- * Extract MAPI object unique ID from PR_SOURCE_KEY Sbinary_short data:
- * PR_SOURCE_KEY = 22 bytes field
- * - 16 first bytes = MAPI Store GUID
- * - 6 last bytes = MAPI object unique ID
- */
-char *get_MAPI_uuid(TALLOC_CTX *mem_ctx, const struct SBinary_short *bin)
-{
-       uint32_t        i;
-       char            *ab;
-
-       OCB_RETVAL_IF_CODE(!bin || bin->cb != 22, "Invalid SBinary", NULL, NULL);
-
-       ab = talloc_asprintf(mem_ctx, "%.2X", bin->lpb[16]);
-       for (i = 17; i < bin->cb; i++) {
-               ab = talloc_asprintf_append(ab, "%.2X", bin->lpb[i]);
-       }
-
-       return ab;
-}
-
-
-/**
- * Retrieve the store GUID from a given record.
- * This GUID should be unique for each store and identical for all
- * objects belonging to this store
- */
-char *get_MAPI_store_guid(TALLOC_CTX *mem_ctx, const struct SBinary_short *bin)
-{
-       int             i;
-       char            *ab;
-
-       OCB_RETVAL_IF_CODE(!bin || bin->cb != 22, "Invalid SBinary", NULL, NULL);
-
-       ab = talloc_asprintf(mem_ctx, "%.2X", bin->lpb[0]);
-       for (i = 1; i < 16; i++) {
-               ab = talloc_asprintf_append(ab, "%.2X", bin->lpb[i]);
-       }
-       
-       return ab;
-}
-
-
-/**
- * Convert date from MAPI property to ldb format
- * Easier to manipulate
- */
-char *ocb_ldb_timestring(TALLOC_CTX *mem_ctx, struct FILETIME *ft)
-{
-       NTTIME          time;
-       time_t          t;
-
-       OCB_RETVAL_IF_CODE(!ft, "Invalid FILTIME", NULL, NULL);
-
-       time = ft->dwHighDateTime;
-       time = time << 32;
-       time |= ft->dwLowDateTime;
-
-       t = nt_time_to_unix(time);
-       return ldb_timestring(mem_ctx, t);
-}
diff --git a/branches/plugfest/utils/backup/openchangebackup.h b/branches/plugfest/utils/backup/openchangebackup.h
deleted file mode 100644 (file)
index fe91bb7..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-   MAPI Backup application suite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __OPENCHANGEBACKUP_H__
-#define        __OPENCHANGEBACKUP_H__
-
-#include "libmapi/libmapi.h"
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdint.h>
-#include <stdbool.h>
-
-/* Samba4 includes */
-#include <util.h>
-#include <talloc.h>
-#include <ldb_errors.h>
-#include <ldb.h>
-
-/* Data structures */
-
-struct ocb_context {
-       struct ldb_context      *ldb_ctx;       /* ldb database context */
-       struct ldb_message      *msg;           /* pointer on record msg */
-};
-
-/* Prototypes */
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-__BEGIN_DECLS
-struct ocb_context     *ocb_init(TALLOC_CTX *, const char *);
-uint32_t               ocb_release(struct ocb_context *);
-
-int                    ocb_record_init(struct ocb_context *, const char *, 
-                                       const char *, const char *, struct mapi_SPropValue_array *);
-uint32_t               ocb_record_commit(struct ocb_context *);
-uint32_t               ocb_record_add_property(struct ocb_context *, struct mapi_SPropValue *);
-
-char                   *get_record_uuid(TALLOC_CTX *, const struct SBinary_short *);
-char                   *get_MAPI_uuid(TALLOC_CTX *, const struct SBinary_short *);
-char                   *get_MAPI_store_guid(TALLOC_CTX *, const struct SBinary_short *);
-char                   *ocb_ldb_timestring(TALLOC_CTX *, struct FILETIME *);
-__END_DECLS
-
-#define        OCB_RETVAL_IF_CODE(x, m, c, r)          \
-do {                                           \
-       if (x) {                                \
-               DEBUG(3, ("[OCB] %s\n", m));    \
-               if (c) {                        \
-                       talloc_free(c);         \
-               }                               \
-               return r;                       \
-       }                                       \
-} while (0);
-
-#define        OCB_RETVAL_IF(x, m, c) OCB_RETVAL_IF_CODE(x, m, c, -1)
-
-
-#define        DEFAULT_PROFDB          "%s/.openchange/profiles.ldb"
-#define        DEFAULT_OCBCONF         "%s/.openchange/openchangebackup.conf"
-#define        DEFAULT_OCBDB           "%s/.openchange/openchangebackup_%s.ldb"
-
-/* objectClass */
-#define        OCB_OBJCLASS_CONTAINER  "container"
-#define        OCB_OBJCLASS_MESSAGE    "message"
-#define        OCB_OBJCLASS_ATTACHMENT "attachment"
-
-#endif /* __OPENCHANGEBACKUP_H__ */
diff --git a/branches/plugfest/utils/backup/openchangemapidump.c b/branches/plugfest/utils/backup/openchangemapidump.c
deleted file mode 100644 (file)
index 7eb55eb..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
-   MAPI Backup application suite
-   Dump a Mailbox store in a database
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include <samba/popt.h>
-#include <param.h>
-
-#include "openchangebackup.h"
-#include "utils/openchange-tools.h"
-
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <time.h>
-
-/**
- * write attachment to the database
- */
-static enum MAPISTATUS mapidump_write_attachment(struct ocb_context *ocb_ctx,
-                                                struct mapi_SPropValue_array *props,
-                                                const char *contentdn,
-                                                const char *uuid)
-{
-       int                     ret;
-       uint32_t                i;
-
-       ret = ocb_record_init(ocb_ctx, OCB_OBJCLASS_ATTACHMENT, contentdn, uuid, props);
-       if (ret == -1) return MAPI_E_SUCCESS;
-       for (i = 0; i < props->cValues; i++) {
-               ret = ocb_record_add_property(ocb_ctx, &props->lpProps[i]);
-       }
-       ret = ocb_record_commit(ocb_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * write message to the database (email, appointment, contact, task, note etc.)
- */
-static enum MAPISTATUS mapidump_write_message(struct ocb_context *ocb_ctx,
-                                             struct mapi_SPropValue_array *props,
-                                             const char *contentdn,
-                                             const char *uuid)
-{
-       int                     ret;
-       uint32_t                i;
-
-       ret = ocb_record_init(ocb_ctx, OCB_OBJCLASS_MESSAGE, contentdn, uuid, props);
-       if (ret == -1) return MAPI_E_SUCCESS;
-       for (i = 0; i < props->cValues; i++) {
-               ret = ocb_record_add_property(ocb_ctx, &props->lpProps[i]);
-       }
-       ret = ocb_record_commit(ocb_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * write containers to the database (folders)
- */
-static enum MAPISTATUS mapidump_write_container(struct ocb_context *ocb_ctx,
-                                               struct mapi_SPropValue_array *props,
-                                               const char *containerdn,
-                                               const char *uuid)
-{
-       int                     ret;
-       uint32_t                i;
-
-       ret = ocb_record_init(ocb_ctx, OCB_OBJCLASS_CONTAINER, containerdn, uuid, props);
-       if (ret == -1) return MAPI_E_SUCCESS;
-       for (i = 0; i < props->cValues; i++) {
-               ret = ocb_record_add_property(ocb_ctx, &props->lpProps[i]);
-       }
-       ret = ocb_record_commit(ocb_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Retrieve all the attachments for a given message
- */
-static enum MAPISTATUS mapidump_walk_attachment(TALLOC_CTX *mem_ctx,
-                                               struct ocb_context *ocb_ctx,
-                                               mapi_object_t *obj_message,
-                                               const char *messagedn)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  rowset;
-       struct mapi_SPropValue_array    props;
-       mapi_object_t                   obj_atable;
-       mapi_object_t                   obj_attach;
-       uint32_t                        Numerator = 0;
-       uint32_t                        Denominator = 0;
-       uint32_t                        i;
-       const uint32_t                  *attach_num;
-       const struct SBinary_short      *sbin;
-       char                            *uuid;
-       char                            *contentdn;
-
-       /* Get attachment table */
-       mapi_object_init(&obj_atable);
-       retval = GetAttachmentTable(obj_message, &obj_atable);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       /* Customize the table view */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_ATTACH_NUM);
-       retval = SetColumns(&obj_atable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       /* Walk through the table */
-       retval = QueryPosition(&obj_atable, &Numerator, &Denominator);
-
-       while ((retval = QueryRows(&obj_atable, Denominator, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND && rowset.cRows) {
-               for (i = 0; i < rowset.cRows; i++) {
-                       attach_num = (const uint32_t *)find_SPropValue_data(&(rowset.aRow[i]), PR_ATTACH_NUM);
-                       /* Open attachment */
-                       mapi_object_init(&obj_attach);
-                       retval = OpenAttach(obj_message, *attach_num, &obj_attach);
-                       if (retval == MAPI_E_SUCCESS) {
-                               retval = GetPropsAll(&obj_attach, &props);
-                               if (retval == MAPI_E_SUCCESS) {
-                                       /* extract unique identifier from PR_RECORD_KEY */
-                                       sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_RECORD_KEY);
-                                       uuid = get_record_uuid(mem_ctx, sbin);
-                                       contentdn = talloc_asprintf(mem_ctx, "cn=%s,%s", uuid, messagedn);
-                                       mapidump_write_attachment(ocb_ctx, &props, contentdn, uuid);
-
-                                       /* free allocated strings */
-                                       talloc_free(uuid);
-                                       talloc_free(contentdn);
-                               }
-                       }
-                       mapi_object_release(&obj_attach);
-               }
-       }
-
-       mapi_object_release(&obj_atable);
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Retrieve all the content within a folder
- */
-static enum MAPISTATUS mapidump_walk_content(TALLOC_CTX *mem_ctx,
-                                            struct ocb_context *ocb_ctx,
-                                            mapi_object_t *obj_folder,
-                                            const char *containerdn)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct mapi_SPropValue_array    props;
-       struct SRowSet                  rowset;
-       mapi_object_t                   obj_ctable;
-       mapi_object_t                   obj_message;
-       uint32_t                        count = 0;
-       uint32_t                        i;
-       const mapi_id_t                 *fid;
-       const mapi_id_t                 *mid;
-       char                            *uuid;
-       const struct SBinary_short      *sbin;
-       const uint8_t                   *has_attach;
-       char                            *contentdn;
-
-       /* Get Contents Table */
-       mapi_object_init(&obj_ctable);
-       retval = GetContentsTable(obj_folder, &obj_ctable, 0, &count);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       /* Customize the table view */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x5,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM,
-                                         PR_SUBJECT);
-       retval = SetColumns(&obj_ctable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       while ((retval = QueryRows(&obj_ctable, count, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND && rowset.cRows) {
-               for (i = 0; i < rowset.cRows; i++) {
-                       mapi_object_init(&obj_message);
-                       fid = (const uint64_t *) get_SPropValue_SRow_data(&rowset.aRow[i], PR_FID);
-                       mid = (const uint64_t *) get_SPropValue_SRow_data(&rowset.aRow[i], PR_MID);
-                       /* Open Message */
-                       retval = OpenMessage(obj_folder, *fid, *mid, &obj_message, 0);
-                       if (GetLastError() == MAPI_E_SUCCESS) {
-                               retval = GetPropsAll(&obj_message, &props);
-                               if (GetLastError() == MAPI_E_SUCCESS) {
-                                       /* extract unique identifier from PR_SOURCE_KEY */
-                                       sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_SOURCE_KEY);
-                                       uuid = get_MAPI_uuid(mem_ctx, sbin);
-                                       contentdn = talloc_asprintf(mem_ctx, "cn=%s,%s", uuid, containerdn);
-                                       mapidump_write_message(ocb_ctx, &props, contentdn, uuid);
-
-                                       /* If Message has attachments then process them */
-                                       has_attach = (const uint8_t *)find_mapi_SPropValue_data(&props, PR_HASATTACH);
-                                       if (has_attach && *has_attach) {
-                                               mapidump_walk_attachment(mem_ctx, ocb_ctx, &obj_message, contentdn);
-                                       }
-
-                                       /* free allocated strings */
-                                       talloc_free(uuid);
-                                       talloc_free(contentdn);
-                               }
-                       }
-                       mapi_object_release(&obj_message);
-               }
-       }
-
-       mapi_object_release(&obj_ctable);
-       
-       return MAPI_E_SUCCESS;
-}
-
-
-/**
- * Recursively retrieve folders
- */
-static enum MAPISTATUS mapidump_walk_container(TALLOC_CTX *mem_ctx,
-                                              struct ocb_context *ocb_ctx,
-                                              mapi_object_t *obj_parent,
-                                              mapi_id_t folder_id,
-                                              char *parentdn,
-                                              int count)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  rowset;
-       struct mapi_SPropValue_array    props;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_htable;
-       const uint32_t                  *child_content;
-       const uint32_t                  *child_folder;
-       char                            *containerdn;
-       char                            *uuid;
-       const mapi_id_t                 *fid;
-       uint32_t                        rcount;
-       uint32_t                        i;
-       const struct SBinary_short      *sbin;
-
-       /* Open folder */
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(obj_parent, folder_id, &obj_folder);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       /* Retrieve all its properties */
-       retval = GetPropsAll(&obj_folder, &props);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-       child_content = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_CONTENT_COUNT);
-       child_folder = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_FOLDER_CHILD_COUNT);
-
-       /* extract unique identifier from PR_SOURCE_KEY */
-       sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_SOURCE_KEY);
-       uuid = get_MAPI_uuid(mem_ctx, sbin);
-
-       if (parentdn == NULL && count == 0) {
-               parentdn = talloc_asprintf(mem_ctx, "cn=%s", 
-                                          get_MAPI_store_guid(mem_ctx, sbin));
-       }
-
-       containerdn = talloc_asprintf(mem_ctx, "cn=%s,%s", uuid, parentdn);
-
-       /* Write entry for container */
-       mapidump_write_container(ocb_ctx, &props, containerdn, uuid);
-       talloc_free(uuid);
-
-       /* Get Contents Table if PR_CONTENT_COUNT >= 1 */
-       if (child_content && *child_content >= 1) {
-               retval = mapidump_walk_content(mem_ctx, ocb_ctx, &obj_folder, containerdn);
-       }
-
-       /* Get Container Table if PR_FOLDER_CHILD_COUNT >= 1 */
-
-       if (child_folder && *child_folder >= 1) {
-               mapi_object_init(&obj_htable);
-               retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, &rcount);
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x3,
-                                                 PR_FID,
-                                                 PR_CONTENT_COUNT,
-                                                 PR_FOLDER_CHILD_COUNT);
-               retval = SetColumns(&obj_htable, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-               while ((retval = QueryRows(&obj_htable, rcount, TBL_ADVANCE, &rowset) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-                       for (i = 0; i < rowset.cRows; i++) {
-                               fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[i], PR_FID);
-                               retval = mapidump_walk_container(mem_ctx, ocb_ctx, &obj_folder, *fid, containerdn, count + 1);
-                       }
-               }
-       } 
-
-       talloc_free(containerdn);
-       mapi_object_release(&obj_folder);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Walk through known mapi folders
- */
-
-static enum MAPISTATUS mapidump_walk(TALLOC_CTX *mem_ctx,
-                                              struct ocb_context *ocb_ctx,
-                                              mapi_object_t *obj_store)
-{
-       enum MAPISTATUS                 retval;
-       mapi_id_t                       id_mailbox;
-
-       retval = GetDefaultFolder(obj_store, &id_mailbox, 
-                                 olFolderTopInformationStore);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       return mapidump_walk_container(mem_ctx, ocb_ctx, obj_store, id_mailbox, NULL, 0);
-}
-
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct ocb_context              *ocb_ctx = NULL;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_session             *session = NULL;
-       mapi_object_t                   obj_store;
-       poptContext                     pc;
-       int                             opt;
-       /* command line options */
-       const char                      *opt_profdb = NULL;
-       char                            *opt_profname = NULL;
-       const char                      *opt_password = NULL;
-       const char                      *opt_backupdb = NULL;
-       const char                      *opt_debug = NULL;
-       bool                            opt_dumpdata = false;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, 
-             OPT_MAILBOX, OPT_CONFIG, OPT_BACKUPDB, OPT_PF,
-             OPT_DEBUG, OPT_DUMPDATA};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", NULL},
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", NULL},
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", NULL},
-               {"backup-db", 'b', POPT_ARG_STRING, NULL, OPT_BACKUPDB, "set the openchangebackup store path", NULL},
-               {"debuglevel", 0, POPT_ARG_STRING, NULL, OPT_DEBUG, "set the debug level", NULL},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the hex data", NULL},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, 0, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "openchangemapidump");
-
-       pc = poptGetContext("openchangemapidump", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt)  {
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, (char *)poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_BACKUPDB:
-                       opt_backupdb = poptGetOptArg(pc);
-                       break;
-               }
-       }
-
-       /* Sanity check on options */
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       /* Initialize MAPI subsystem */
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-
-       /* If no profile is specified try to load the default one from
-        * the database 
-        */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       exit (1);
-               }
-       }
-
-       if (!opt_backupdb) {
-               opt_backupdb = talloc_asprintf(mem_ctx, DEFAULT_OCBDB, 
-                                              getenv("HOME"),
-                                              opt_profname);
-       }
-
-       /* Initialize OpenChange Backup subsystem */
-       if (!(ocb_ctx = ocb_init(mem_ctx, opt_backupdb))) {
-               talloc_free(mem_ctx);
-               exit(-1);
-       }
-
-       /* We only need to log on EMSMDB to backup Mailbox store or Public Folders */
-       retval = MapiLogonProvider(mapi_ctx, &session, opt_profname, opt_password, PROVIDER_ID_EMSMDB);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", GetLastError());
-               exit (1);
-       }
-
-       /* Open default message store */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore", GetLastError());
-               exit (1);
-       }
-
-       retval = mapidump_walk(mem_ctx, ocb_ctx, &obj_store);
-
-       /* Uninitialize MAPI and OCB subsystem */
-       mapi_object_release(&obj_store);
-       MAPIUninitialize(mapi_ctx);
-       ocb_release(ocb_ctx);
-       talloc_free(mem_ctx);
-
-       return 0;
-}
diff --git a/branches/plugfest/utils/exchange2ical_tool.c b/branches/plugfest/utils/exchange2ical_tool.c
deleted file mode 100644 (file)
index 2580215..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
-   Convert Exchange appointments and meetings to ICAL files
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libexchange2ical/libexchange2ical.h"
-
-static void getRange(const char *range, struct tm *start, struct tm *end)
-{
-       char *startString;
-       char *endString;
-
-       startString = strtok((char *) range, "-");
-       endString = strtok(NULL, "-");
-
-       end->tm_mon     = atoi(strtok(endString, "/"))-1;
-       end->tm_mday    = atoi(strtok(NULL, "/"));
-       end->tm_year    = atoi(strtok(NULL, "/"))-1900;
-       end->tm_min     = 0;
-       end->tm_hour    = 0;
-       end->tm_sec     = 0;
-
-       
-       start->tm_mon   = atoi(strtok(startString, "/"))-1;
-       start->tm_mday  = atoi(strtok(NULL, "/"));
-       start->tm_year  = atoi(strtok(NULL, "/"))-1900;
-       start->tm_min   = 0;
-       start->tm_hour  = 0;
-       start->tm_sec   = 0;
-       
-       return;
-}
-
-static char* read_stream(char *s, size_t size, void *d) 
-{ 
-  char *c = fgets(s, size, (FILE*)d);
-
-  return c;
-}
-
-int main(int argc, const char *argv[])
-{
-       enum MAPISTATUS                 retval;
-       poptContext                     pc;
-       int                             opt;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       const char                      *opt_profdb = NULL;
-       const char                      *opt_profname = NULL;
-       const char                      *opt_password = NULL;
-       const char                      *opt_debug = NULL;
-       const char                      *opt_filename = NULL;
-       const char                      *opt_icalsync = NULL;
-       const char                      *opt_range = NULL;
-       bool                            opt_dumpdata = false;
-       FILE                            *fp = NULL;
-       mapi_id_t                       fid;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_session             *session = NULL;
-       icalcomponent                   *vcal;
-       struct tm                       start;
-       struct tm                       end;
-       icalparser                      *parser;
-       icalcomponent                   *ical;
-       icalcomponent                   *vevent;
-       TALLOC_CTX                      *mem_ctx;
-
-       
-
-       enum { OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, OPT_DEBUG, OPT_DUMPDATA, OPT_FILENAME, OPT_RANGE, OPT_ICALSYNC };
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               { "database",   'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB,     "set the profile database path",                NULL },
-               { "profile",    'p', POPT_ARG_STRING, NULL, OPT_PROFILE,        "set the profile name",                         NULL },
-               { "password",   'P', POPT_ARG_STRING, NULL, OPT_PASSWORD,       "set the profile password",                     NULL },
-               { "icalsync",   'i', POPT_ARG_STRING, NULL, OPT_ICALSYNC,       "set the icalendar to convert to exchange",     NULL },
-               { "filename",   'o', POPT_ARG_STRING, NULL, OPT_FILENAME,       "set the output iCalendar filename",            NULL },
-               { "range",      'R', POPT_ARG_STRING, NULL, OPT_RANGE,          "set the range of accepted start dates",        NULL },
-               { "debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG,          "set the debug level",                          NULL },
-               { "dump-data",    0, POPT_ARG_NONE,   NULL, OPT_DUMPDATA,       "dump the hex data",                            NULL },
-               POPT_OPENCHANGE_VERSION
-               { NULL,           0, 0,               NULL, 0,                  NULL,                                   NULL }
-       };
-
-       
-       pc = poptGetContext("exchange2ical", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_FILENAME:
-                       opt_filename = poptGetOptArg(pc);
-                       break;
-               case OPT_ICALSYNC:
-                       opt_icalsync = poptGetOptArg(pc);
-                       break;
-               case OPT_RANGE:
-                       opt_range = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = poptGetOptArg(pc);
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               }
-       }
-       
-       mem_ctx = talloc_named(NULL, 0, "exchange2ical_tool");
-
-       /* Sanity Checks */
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       /* Initialize MAPI subsystem */
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               return 1;
-       }
-       
-       /* debug options */
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-       
-       session = octool_init_mapi(mapi_ctx, opt_profname, opt_password, 0);
-       if(!session){
-               mapi_errstr("Session", GetLastError());
-               return 1;
-       }
-
-
-               
-       /* Open Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore", GetLastError());
-               return 1;
-       }
-
-       /* Get default calendar folder */
-       retval = GetDefaultFolder(&obj_store, &fid, olFolderCalendar);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("GetDefaultFolder", GetLastError());
-               return 1;
-       }
-       
-       /* Open default calendar folder */
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, fid, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenFolder", GetLastError());
-               return 1;
-       }
-       
-
-       /*Ical2exchange*/
-       if(opt_icalsync){
-               if ((fp = fopen(opt_icalsync, "r")) == NULL) {
-                       perror("Can not open Icalendar file");
-               } else {
-                       parser = icalparser_new();
-                       icalparser_set_gen_data(parser,fp);
-                       ical = icalparser_parse(parser, read_stream);
-                       printf("\n\nICAL file:\n%s\n", icalcomponent_as_ical_string(ical));
-
-                       icalcomponent_strip_errors(ical);
-               
-                       vevent = icalcomponent_get_first_component(ical, ICAL_VEVENT_COMPONENT);
-                       while(vevent){
-                               _IcalEvent2Exchange(&obj_folder, vevent);
-                               vevent = icalcomponent_get_next_component(ical, ICAL_VEVENT_COMPONENT);
-                       }       
-                       icalcomponent_free(ical);
-                       icalparser_free(parser);
-                       fclose(fp);
-                       fp = NULL;
-               }
-       }
-       
-       if(opt_range){
-               getRange(opt_range, &start, &end);
-               vcal = Exchange2IcalRange(&obj_folder, &start, &end);
-       } else {
-               vcal = Exchange2Ical(&obj_folder);
-       }
-
-
-       if(vcal){                               
-               /* Icalendar save or print to console */
-               char *cal = icalcomponent_as_ical_string(vcal);
-               if (!opt_filename) {
-                       printf("\n\nICAL file:\n%s\n", cal);
-               } else {
-                       size_t bytesWritten;
-                       
-                       if ((fp = fopen(opt_filename, "w")) == NULL) {
-                               perror("fopen");
-                               exit (1);
-                       }
-                       bytesWritten = fwrite(cal, strlen(cal), 1, fp);
-                       if (bytesWritten < 1) {
-                               printf("BOGUS write length: %zi", bytesWritten);
-                       }
-                       fclose(fp);
-               }
-               free(cal);
-               icalcomponent_free(vcal);
-       }
-       poptFreeContext(pc);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-       MAPIUninitialize(mapi_ctx);
-       talloc_free(mem_ctx);   
-
-       return 0;
-}
-
-
diff --git a/branches/plugfest/utils/exchange2mbox.c b/branches/plugfest/utils/exchange2mbox.c
deleted file mode 100644 (file)
index 7881cca..0000000
+++ /dev/null
@@ -1,823 +0,0 @@
-/*
-   Convert Exchange mails to mbox
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include <samba/popt.h>
-#include <ldb.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <param.h>
-#include <magic.h>
-
-#include "openchange-tools.h"
-
-/* Ugly and lazy but working ... */
-#define BOUNDARY       "DocE+STaALJfprDB"
-#define        MAX_READ_SIZE   0x4000
-#define        MESSAGEID       "Message-ID: "
-#define        MESSAGEID_LEN   11
-
-/**
- * delete a message on the exchange server
- */
-static bool delete_message(struct mapi_context *mapi_ctx,
-                          TALLOC_CTX *mem_ctx, char *msgid, 
-                          const char *profname, const char *password)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_session     *session;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_inbox;
-       mapi_object_t           obj_table;
-       mapi_id_t               id_inbox;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                i;
-       uint64_t                id_message;
-
-       if (!msgid) {
-               return false;
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &session, profname, password);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Open the default message store */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Open Inbox */
-       retval = GetReceiveFolder(&obj_store, &id_inbox, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_inbox);
-       retval = OpenFolder(&obj_store, id_inbox, &obj_inbox);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_table);
-       retval = GetContentsTable(&obj_inbox, &obj_table, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x3,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INTERNET_MESSAGE_ID);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       while ((retval = QueryRows(&obj_table, 0xa, TBL_ADVANCE, &SRowSet)) == MAPI_E_SUCCESS) {
-               if (!SRowSet.cRows) break;
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       const char      *message_id;
-
-                       message_id = (const char *)find_SPropValue_data(&(SRowSet.aRow[i]), PR_INTERNET_MESSAGE_ID);
-
-                       if (message_id && !strncmp(message_id, msgid, strlen(msgid))) {
-                               id_message = SRowSet.aRow[i].lpProps[1].value.d;
-                               retval = DeleteMessage(&obj_inbox, &id_message, 1);
-                               if (retval != MAPI_E_SUCCESS) return false;
-                               break;
-                       }
-               }
-       }
-       
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_inbox);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-/**
- * Fetch message ids from the existing mbox
- */
-static uint32_t update(TALLOC_CTX *mem_ctx, FILE *fp, 
-                      const char *profdb, char *profname,
-                      const char *password)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_profile     profile;
-       size_t                  read_size;
-       char                    *line = NULL;
-#if !defined(__FreeBSD__)
-       ssize_t                 size;
-#endif
-       const char              *msgid;
-       char                    *id;
-       char                    **mbox_msgids;
-       char                    **prof_msgids;
-       unsigned int            mbox_count = 0;
-       unsigned int            count;
-       unsigned int            i, j;
-       bool                    found = false;
-
-       retval = MAPIInitialize(&mapi_ctx, profdb);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       if (!profname) {
-               retval = GetDefaultProfile(mapi_ctx, &profname);
-               MAPI_RETVAL_IF(retval, retval, NULL);
-       }
-
-       retval = OpenProfile(mapi_ctx, &profile, profname, password);
-       MAPI_RETVAL_IF(retval, retval, profname);
-
-       mbox_msgids = talloc_zero(mem_ctx, char *);
-       /* Add Message-ID attribute to the profile if it is missing */
-#if defined(__FreeBSD__)
-       while ((line = fgetln(fp, &read_size)) != NULL) {
-#else
-       while ((size = getline(&line, &read_size, fp)) != -1) {
-#endif
-               if (line && !strncmp(line, MESSAGEID, strlen(MESSAGEID))) {
-                       msgid = strstr(line, MESSAGEID);
-                       id = talloc_strdup(mem_ctx, msgid + strlen(MESSAGEID));
-                       id[strlen(id) - 1] = 0;
-
-                       mbox_msgids = talloc_realloc(mem_ctx, mbox_msgids, char *, mbox_count + 2);
-                       mbox_msgids[mbox_count] = talloc_strdup(mem_ctx, id);
-                       mbox_count++;
-
-                       retval = FindProfileAttr(&profile, "Message-ID", id);
-                       if (GetLastError() == MAPI_E_NOT_FOUND) {
-                               errno = 0;
-                               printf("[+] Adding %s to %s\n", id, profname);
-                               retval = mapi_profile_add_string_attr(mapi_ctx, profname, "Message-ID", id);
-                               if (retval != MAPI_E_SUCCESS) {
-                                       mapi_errstr("mapi_profile_add_string_attr", GetLastError());
-                                       talloc_free(profname);
-                                       MAPIUninitialize(mapi_ctx);
-                                       return -1;
-                               }
-                       }
-                       talloc_free(id);
-               }
-               
-       }
-       if (line)
-               free(line);
-
-       /* Remove Message-ID and update Exchange mailbox if a
-        * Message-ID is missing in mbox 
-        */
-       retval = GetProfileAttr(&profile, "Message-ID", &count, &prof_msgids);
-       MAPI_RETVAL_IF(retval, retval, profname);
-
-       if (count != mbox_count) {
-               printf("{+] Synchonizing mbox with Exchange mailbox\n");
-               for (i = 0; i < count; i++) {
-                       found = false;
-                       for (j = 0; j < mbox_count; j++) {
-                               if (!strcmp(prof_msgids[i], mbox_msgids[j])) {
-                                       found = true;
-                               }
-                       }
-                       if (found == false) {
-                               if (delete_message(mapi_ctx, mem_ctx, prof_msgids[i], profname, password) == true) {
-                                       printf("%s deleted from the Exchange server\n", prof_msgids[i]);
-                                       mapi_profile_delete_string_attr(mapi_ctx, profname, "Message-ID", prof_msgids[i]);
-                               }
-                       }
-               }
-       } else {
-               printf("[+] mbox already synchronized with Exchange Mailbox\n");
-       }
-
-       talloc_free(prof_msgids);
-       talloc_free(mbox_msgids);
-       talloc_free(profname);
-       MAPIUninitialize(mapi_ctx);
-
-       return MAPI_E_SUCCESS;
-}
-
-static const char *get_filename(const char *filename)
-{
-       const char *substr;
-
-       if (!filename) return NULL;
-
-       substr = rindex(filename, '/');
-       if (substr) return substr;
-
-       return filename;
-}
-
-
-static char *get_base64_attachment(TALLOC_CTX *mem_ctx, mapi_object_t obj_attach, const uint32_t size, char **magic)
-{
-       enum MAPISTATUS retval;
-       const char      *tmp;
-       mapi_object_t   obj_stream;
-       uint16_t        read_size;
-       unsigned char   buf[MAX_READ_SIZE];
-       DATA_BLOB       data;
-       magic_t         cookie = NULL;
-       char            *base64_data;
-       char            *linewrapped_base64_data;
-       int             i;
-
-       data.length = 0;
-       data.data = talloc_zero(mem_ctx, uint8_t);
-
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 0, &obj_stream);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       do {
-               retval = ReadStream(&obj_stream, buf, MAX_READ_SIZE, &read_size);
-               if (retval != MAPI_E_SUCCESS) return NULL;
-               if (read_size) {
-                       data.data = talloc_realloc(mem_ctx, data.data, uint8_t, data.length + read_size);
-                       memcpy(&(data.data[data.length]), buf, read_size);
-                       data.length += read_size;
-               }
-       } while (read_size);
-
-       cookie = magic_open(MAGIC_MIME);
-       if (cookie == NULL) {
-               printf("%s\n", magic_error(cookie));
-               return NULL;
-       }
-       if (magic_load(cookie, NULL) == -1) {
-               printf("%s\n", magic_error(cookie));
-               return NULL;
-       }
-       tmp = magic_buffer(cookie, (void *)data.data, data.length);
-       *magic = talloc_strdup(mem_ctx, tmp);
-       magic_close(cookie);
-       
-       base64_data = ldb_base64_encode(mem_ctx, (const char *)data.data, data.length);
-
-       linewrapped_base64_data = talloc_array(mem_ctx, char, 0);
-
-       for (i = 0; i < strlen(base64_data); i += 72) {
-               linewrapped_base64_data = talloc_strndup_append_buffer(linewrapped_base64_data, &(base64_data[i]), 72);
-               linewrapped_base64_data = talloc_strdup_append(linewrapped_base64_data, "\n");
-       }
-
-       /* convert attachment to base64 */
-       return linewrapped_base64_data;
-}
-
-/**
-   Sample mbox mail:
-
-   From Administrator Mon Apr 23 14:43:01 2007
-   Date: Mon Apr 23 14:43:01 2007
-   From: Administrator 
-   To: Julien Kerihuel
-   Subject: This is the subject
-
-   This is a sample mail
-
-**/
-
-static bool message2mbox(TALLOC_CTX *mem_ctx, FILE *fp, 
-                        struct SRow *aRow, mapi_object_t *obj_message)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_tb_attach;
-       mapi_object_t                   obj_attach;
-       const uint64_t                  *delivery_date;
-       const char                      *date = NULL;
-       const char                      *to = NULL;
-       const char                      *cc = NULL;
-       const char                      *bcc = NULL;
-       const char                      *from = NULL;
-       const char                      *normalizedsubject = NULL;
-       const char                      *subject_prefix = NULL;
-       const char                      *subject = NULL;
-       const char                      *thread_topic = NULL;
-       const char                      *msgid;
-       DATA_BLOB                       body;
-       const char                      *attach_filename;
-       const uint32_t                  *attach_size;
-       char                            *attachment_data;
-       const uint32_t                  *has_attach = NULL;
-       const uint32_t                  *attach_num = NULL;
-       char                            *magic;
-       char                            *line = NULL;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropValue               *lpProps;
-       struct SRow                     aRow2;
-       struct SRowSet                  rowset_attach;
-       uint32_t                        count;
-       uint8_t                         format;
-       unsigned int                    i;
-       ssize_t                         len;
-
-       has_attach = (const uint32_t *) octool_get_propval(aRow, PR_HASATTACH);
-       to = (const char *) octool_get_propval(aRow, PR_DISPLAY_TO);
-       cc = (const char *) octool_get_propval(aRow, PR_DISPLAY_CC);
-       bcc = (const char *) octool_get_propval(aRow, PR_DISPLAY_BCC);
-
-       if (!to && !cc && !bcc) {
-               return false;
-       }
-
-       delivery_date = (const uint64_t *)octool_get_propval(aRow, PR_MESSAGE_DELIVERY_TIME);
-       if (delivery_date) {
-               date = nt_time_string(mem_ctx, *delivery_date);
-       } else {
-               date = "None";
-       }
-
-
-       from = (const char *) octool_get_propval(aRow, PR_SENT_REPRESENTING_NAME);
-       subject_prefix = (const char *) octool_get_propval(aRow, PR_SUBJECT_PREFIX);
-       normalizedsubject = (const char *) octool_get_propval(aRow, PR_NORMALIZED_SUBJECT);
-       subject = (const char*) octool_get_propval(aRow, PR_SUBJECT);
-       thread_topic = (const char *) octool_get_propval(aRow, PR_CONVERSATION_TOPIC);
-       msgid = (const char *) octool_get_propval(aRow, PR_INTERNET_MESSAGE_ID);
-
-       /* First line From */
-       line = talloc_asprintf(mem_ctx, "From \"%s\" %s\n", from, date);
-       if (line) {
-               len = fwrite(line, strlen(line), 1, fp);
-       }
-       talloc_free(line);
-
-       /* Second line: Date */
-       line = talloc_asprintf(mem_ctx, "Date: %s\n", date);
-       if (line) {
-               len = fwrite(line, strlen(line), 1, fp);
-       }
-       talloc_free(line);
-
-       /* Third line From */
-       line = talloc_asprintf(mem_ctx, "From: %s\n", from);
-       if (line) {
-               len = fwrite(line, strlen(line), 1, fp);
-       }
-       talloc_free(line);
-
-       /* To, Cc, Bcc */
-       if (to) {
-               line = talloc_asprintf(mem_ctx, "To: %s\n", to);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       if (cc) {
-               line = talloc_asprintf(mem_ctx, "Cc: %s\n", cc);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       if (bcc) {
-               line = talloc_asprintf(mem_ctx, "Bcc: %s\n", bcc);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       if (normalizedsubject && subject_prefix) {
-               line = talloc_asprintf(mem_ctx, "Subject: %s%s\n", subject_prefix, normalizedsubject);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       } else {
-               line = talloc_asprintf(mem_ctx, "Subject: %s\n", subject);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       if (thread_topic) {
-               line = talloc_asprintf(mem_ctx, "Thread-Topic: %s\n", thread_topic);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       if (msgid) {
-               line = talloc_asprintf(mem_ctx, "Message-ID: %s\n", msgid);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       retval = octool_get_body(mem_ctx, obj_message, aRow, &body);
-
-       /* Set multi-type if we have attachment */
-       if (has_attach && *has_attach) {
-               line = talloc_asprintf(mem_ctx, "Content-Type: multipart/mixed; boundary=\"%s\"\n", BOUNDARY);
-               if (line) {
-                       len = fwrite(line, strlen(line), 1, fp);
-               }
-               talloc_free(line);
-       }
-
-       /* body */
-       if (body.length) {
-               if (has_attach && *has_attach) {
-                       line = talloc_asprintf(mem_ctx, "--%s\n", BOUNDARY);
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);
-               }
-               retval = GetBestBody(obj_message, &format);
-               switch (format) {
-               case olEditorText:
-                       line = talloc_asprintf(mem_ctx, "Content-Type: text/plain; charset=us-ascii\n");
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);
-                       
-                       /* Just display UTF8 content inline */
-                       line = talloc_asprintf(mem_ctx, "Content-Disposition: inline\n");
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);
-                       break;
-               case olEditorHTML:
-                       line = talloc_asprintf(mem_ctx, "Content-Type: text/html\n");
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);              
-                       break;
-               case olEditorRTF:
-                       line = talloc_asprintf(mem_ctx, "Content-Type: text/rtf\n");
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);                                      
-
-                       line = talloc_asprintf(mem_ctx, "--%s\n", BOUNDARY);
-                       if (line) {
-                               len = fwrite(line, strlen(line), 1, fp);
-                       }
-                       talloc_free(line);
-                       break;
-               }
-
-               len = fwrite(body.data, body.length, 1, fp);
-               talloc_free(body.data);
-       } 
-
-       /* We are now fetching attachments */
-       if (has_attach && *has_attach) {
-               mapi_object_init(&obj_tb_attach);
-               retval = GetAttachmentTable(obj_message, &obj_tb_attach);
-               if (retval == MAPI_E_SUCCESS) {
-                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_ATTACH_NUM);
-                       retval = SetColumns(&obj_tb_attach, SPropTagArray);
-                       MAPIFreeBuffer(SPropTagArray);
-                       MAPI_RETVAL_IF(retval, retval, NULL);
-                       
-                       retval = QueryRows(&obj_tb_attach, 0xa, TBL_ADVANCE, &rowset_attach);
-                       MAPI_RETVAL_IF(retval, retval, NULL);
-                       
-                       for (i = 0; i < rowset_attach.cRows; i++) {
-                               attach_num = (const uint32_t *)find_SPropValue_data(&(rowset_attach.aRow[i]), PR_ATTACH_NUM);
-                               retval = OpenAttach(obj_message, *attach_num, &obj_attach);
-                               if (retval == MAPI_E_SUCCESS) {
-                                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x3,
-                                                                         PR_ATTACH_FILENAME,
-                                                                         PR_ATTACH_LONG_FILENAME,
-                                                                         PR_ATTACH_SIZE);
-                                       lpProps = talloc_zero(mem_ctx, struct SPropValue);
-                                       retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
-                                       MAPIFreeBuffer(SPropTagArray);
-                                       if (retval == MAPI_E_SUCCESS) {
-                                               aRow2.ulAdrEntryPad = 0;
-                                               aRow2.cValues = count;
-                                               aRow2.lpProps = lpProps;
-
-                                               attach_filename = get_filename(octool_get_propval(&aRow2, PR_ATTACH_LONG_FILENAME));
-                                               if (!attach_filename || (attach_filename && !strcmp(attach_filename, ""))) {
-                                                       attach_filename = get_filename(octool_get_propval(&aRow2, PR_ATTACH_FILENAME));
-                                               }
-                                               attach_size = (const uint32_t *) octool_get_propval(&aRow2, PR_ATTACH_SIZE);                                            
-                                               attachment_data = get_base64_attachment(mem_ctx, obj_attach, *attach_size, &magic);
-                                               if (attachment_data) {
-                                                       line = talloc_asprintf(mem_ctx, "\n\n--%s\n", BOUNDARY);
-                                                       if (line) {
-                                                               len = fwrite(line, strlen(line), 1, fp);
-                                                       }
-                                                       talloc_free(line);
-
-                                                       line = talloc_asprintf(mem_ctx, "Content-Disposition: attachment; filename=\"%s\"\n", attach_filename);
-                                                       if (line) {
-                                                               len = fwrite(line, strlen(line), 1, fp);
-                                                       }
-                                                       talloc_free(line);
-                                                       
-                                                       line = talloc_asprintf(mem_ctx, "Content-Type: \"%s\"\n", magic);
-                                                       if (line) {
-                                                               len = fwrite(line, strlen(line), 1, fp);
-                                                       }
-                                                       talloc_free(line);
-                                                       
-                                                       line = talloc_asprintf(mem_ctx, "Content-Transfer-Encoding: base64\n\n");
-                                                       if (line) {
-                                                               len = fwrite(line, strlen(line), 1, fp);
-                                                       }
-                                                       talloc_free(line);
-                                                       
-                                                       len = fwrite(attachment_data, strlen(attachment_data), 1, fp);
-                                                       talloc_free(attachment_data);
-                                               }
-                                       }
-                                       MAPIFreeBuffer(lpProps);
-                               }
-                       }
-                       if (has_attach && *has_attach) {
-                               line = talloc_asprintf(mem_ctx, "\n\n--%s--\n\n\n", BOUNDARY);
-                               if (line) {
-                                       len = fwrite(line, strlen(line), 1, fp);
-                               }
-                               talloc_free(line);
-                       }
-               }
-               
-       }
-       
-       len = fwrite("\n\n\n", 3, 1, fp);
-
-       return true;
-}
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct mapi_context             *mapi_ctx;
-       struct mapi_session             *session = NULL;
-       struct mapi_profile             *profile;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_inbox;
-       mapi_object_t                   obj_table;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       id_inbox;
-       uint32_t                        count;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropValue               *lpProps;
-       struct SRow                     aRow;
-       struct SRowSet                  rowset;
-       poptContext                     pc;
-       int                             opt;
-       FILE                            *fp;
-       unsigned int                    i;
-       const char                      *opt_profdb = NULL;
-       char                            *opt_profname = NULL;
-       const char                      *opt_password = NULL;
-       const char                      *opt_mbox = NULL;
-       bool                            opt_update = false;
-       bool                            opt_dumpdata = false;
-       const char                      *opt_debug = NULL;
-       const char                      *msgid;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, OPT_MBOX, OPT_UPDATE,
-             OPT_DEBUG, OPT_DUMPDATA};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", "PATH"},
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", "PROFILE"},
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", "PASSWORD"},
-               {"mbox", 'm', POPT_ARG_STRING, NULL, OPT_MBOX, "set the mbox file", "FILENAME"},
-               {"update", 'u', POPT_ARG_NONE, 0, OPT_UPDATE, "mirror mbox changes back to the Exchange server", NULL},
-               {"debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG, "set the debug level", "LEVEL"},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the hex data", NULL},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "exchange2mbox");
-
-       pc = poptGetContext("exchange2mbox", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, (char *)poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_MBOX:
-                       opt_mbox = poptGetOptArg(pc);
-                       break;
-               case OPT_UPDATE:
-                       opt_update = true;
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               }
-       }
-
-       /**
-        * Sanity checks
-        */
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       if (!opt_mbox) {
-               opt_mbox = talloc_asprintf(mem_ctx, DEFAULT_MBOX, getenv("HOME"));
-       }
-
-       /**
-        * Open the MBOX
-        */
-
-       if ((fp = fopen(opt_mbox, "a+")) == NULL) {
-               perror("fopen");
-               exit (1);
-       }
-
-       if (opt_update == true) {
-               retval = update(mem_ctx, fp, opt_profdb, opt_profname, opt_password);
-               if (GetLastError() != MAPI_E_SUCCESS) {
-                       printf("Problem encountered during update\n");
-                       exit (1);
-               }
-       }
-       
-       /**
-        * Initialize MAPI subsystem
-        */
-
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-
-       /* if no profile is supplied use the default one */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       printf("No profile specified and no default profile found\n");
-                       exit (1);
-               }
-       }
-       
-       retval = MapiLogonEx(mapi_ctx, &session, opt_profname, opt_password);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", GetLastError());
-               exit (1);
-       }
-       profile = session->profile;
-
-       /* Open the default message store */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenMsgStore", GetLastError());
-               exit (1);
-       }
-
-       /* Open Inbox */
-       retval = GetReceiveFolder(&obj_store, &id_inbox, NULL);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       mapi_object_init(&obj_inbox);
-       retval = OpenFolder(&obj_store, id_inbox, &obj_inbox);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       mapi_object_init(&obj_table);
-       retval = GetContentsTable(&obj_inbox, &obj_table, 0, &count);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x5,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM,
-                                         PR_INTERNET_MESSAGE_ID);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       while ((retval = QueryRows(&obj_table, 0xa, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND && rowset.cRows) {
-               for (i = 0; i < rowset.cRows; i++) {
-                       mapi_object_init(&obj_message);
-                       retval = OpenMessage(&obj_store, 
-                                            rowset.aRow[i].lpProps[0].value.d, 
-                                            rowset.aRow[i].lpProps[1].value.d, 
-                                            &obj_message, 0);
-                       if (GetLastError() == MAPI_E_SUCCESS) {
-                               SPropTagArray = set_SPropTagArray(mem_ctx, 0x19,
-                                                                 PR_INTERNET_MESSAGE_ID,
-                                                                 PR_INTERNET_MESSAGE_ID_UNICODE,
-                                                                 PR_CONVERSATION_TOPIC,
-                                                                 PR_CONVERSATION_TOPIC_UNICODE,
-                                                                 PR_MESSAGE_DELIVERY_TIME,
-                                                                 PR_MSG_EDITOR_FORMAT,
-                                                                 PR_BODY,
-                                                                 PR_BODY_UNICODE,
-                                                                 PR_HTML,
-                                                                 PR_RTF_COMPRESSED,
-                                                                 PR_SENT_REPRESENTING_NAME,
-                                                                 PR_SENT_REPRESENTING_NAME_UNICODE,
-                                                                 PR_DISPLAY_TO,
-                                                                 PR_DISPLAY_TO_UNICODE,
-                                                                 PR_DISPLAY_CC,
-                                                                 PR_DISPLAY_CC_UNICODE,
-                                                                 PR_DISPLAY_BCC,
-                                                                 PR_DISPLAY_BCC_UNICODE,
-                                                                 PR_HASATTACH,
-                                                                 PR_SUBJECT_PREFIX,
-                                                                 PR_SUBJECT_PREFIX_UNICODE,
-                                                                 PR_NORMALIZED_SUBJECT,
-                                                                 PR_NORMALIZED_SUBJECT_UNICODE,
-                                                                 PR_SUBJECT,
-                                                                 PR_SUBJECT_UNICODE);
-                               retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
-                               MAPIFreeBuffer(SPropTagArray);
-                               if (retval != MAPI_E_SUCCESS) {
-                                       exit (1);
-                               }
-
-                               /* Build a SRow structure */
-                               aRow.ulAdrEntryPad = 0;
-                               aRow.cValues = count;
-                               aRow.lpProps = lpProps;
-
-                               msgid = (const char *) octool_get_propval(&aRow, PR_INTERNET_MESSAGE_ID);
-                               if (msgid) {
-                                       retval = FindProfileAttr(profile, "Message-ID", msgid);
-                                       if (GetLastError() == MAPI_E_NOT_FOUND) {
-                                               message2mbox(mem_ctx, fp, &aRow, &obj_message);
-                                               if (mapi_profile_add_string_attr(mapi_ctx, profile->profname, "Message-ID", msgid) != MAPI_E_SUCCESS) {
-                                                       mapi_errstr("mapi_profile_add_string_attr", GetLastError());
-                                               } else {
-                                                       printf("Message-ID: %s added to profile %s\n", msgid, profile->profname);
-                                               }
-                                       } 
-                               }
-                               talloc_free(lpProps);
-                       } 
-                       mapi_object_release(&obj_message);
-                       errno = 0;
-               }
-       }
-
-       fclose(fp);
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_inbox);
-       mapi_object_release(&obj_store);
-       MAPIUninitialize(mapi_ctx);
-
-       talloc_free(mem_ctx);
-
-       return 0;
-}
diff --git a/branches/plugfest/utils/mapiprofile.c b/branches/plugfest/utils/mapiprofile.c
deleted file mode 100644 (file)
index c414548..0000000
+++ /dev/null
@@ -1,897 +0,0 @@
-/*
-   Wrapper over the MAPI Profile API
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007-2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include <samba/popt.h>
-#include <param.h>
-#include "openchange-tools.h"
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <signal.h>
-
-#define        DEFAULT_DIR                     "%s/.openchange"
-#define        DEFAULT_PROFDB                  "%s/.openchange/profiles.ldb"
-#define        DEFAULT_EXCHANGE_VERSION        "2000"
-
-/**
-   MAPI version:
-   #- 0: use EcDoConnect (0x0) / EcDoRpc (0x2) RPC calls
-   #- 1: use EcDoConnectEx (0xA) / EcDoRpcExt2 (0xB) RPC calls
-   #- 2: Same as 1, but require sealed pipe
- */
-struct exchange_version {
-       const char      *name;
-       uint8_t         version;
-};
-
-static const struct exchange_version exchange_version[] = {
-       { DEFAULT_EXCHANGE_VERSION,     0 },
-       { "2003",                       1 },
-       { "2007",                       1 },
-       { "2010",                       2 },
-       { NULL,                         0 }
-};
-
-static bool mapiprofile_createdb(const char *profdb, const char *ldif_path)
-{
-       enum MAPISTATUS retval;
-       
-       if (access(profdb, F_OK) == 0) {
-               fprintf(stderr, "[ERROR] mapiprofile: %s already exists\n", profdb);
-               return false;
-       }
-
-       retval = CreateProfileStore(profdb, ldif_path);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("CreateProfileStore", GetLastError());
-               return false;
-       }
-       return true;
-}
-
-static uint32_t callback(struct SRowSet *rowset, void *private)
-{
-       uint32_t                i;
-       struct SPropValue       *lpProp;
-       FILE                    *fd;
-       uint32_t                index;
-       char                    entry[10];
-       const char              *label = (const char *)private;
-
-       printf("%s:\n", label);
-       for (i = 0; i < rowset->cRows; i++) {
-               lpProp = get_SPropValue_SRow(&(rowset->aRow[i]), PR_DISPLAY_NAME);
-               if (lpProp && lpProp->value.lpszA) {
-                       printf("\t[%u] %s\n", i, lpProp->value.lpszA);
-               }
-       }
-       printf("\t[%u] cancel operation\n", i);
-       fd = fdopen(0, "r");
-getentry:
-       printf("Enter username id [0]: ");
-       if (fgets(entry, 10, fd) == NULL) {
-               printf("Failed to read string\n");
-               exit(1);
-       }
-
-       index = atoi(entry);
-       if (index > i) {
-               printf("Invalid id - Must be a value between 0 and %u\n", i);
-               goto getentry;
-       }
-       
-       fclose(fd);
-       return (index);
-}
-
-const char *g_profname;
-struct mapi_context *g_mapi_ctx;
-
-static void signal_delete_profile(void)
-{
-       enum MAPISTATUS retval;
-
-       fprintf(stderr, "CTRL-C caught ... Deleting profile\n");
-       if ((retval = DeleteProfile(g_mapi_ctx, g_profname)) != MAPI_E_SUCCESS) {
-               mapi_errstr("DeleteProfile", GetLastError());
-       }
-
-       (void) signal(SIGINT, SIG_DFL);
-       exit (1);
-}
-
-static bool mapiprofile_create(const char *profdb, const char *profname,
-                              const char *pattern, const char *username, 
-                              const char *password, const char *address, 
-                              const char *language, const char *workstation,
-                              const char *domain, const char *realm,
-                              uint32_t flags, bool seal,
-                              bool opt_dumpdata, const char *opt_debuglevel,
-                              uint8_t exchange_version)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session = NULL;
-       TALLOC_CTX              *mem_ctx;
-       struct mapi_profile     profile;
-       const char              *locale;
-       uint32_t                cpid;
-       uint32_t                lcid;
-       char                    *exchange_version_str;
-       char                    *cpid_str;
-       char                    *lcid_str;
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile_create");
-
-       retval = MAPIInitialize(&mapi_ctx, profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       /* catch CTRL-C */
-       g_profname = profname;
-       g_mapi_ctx = mapi_ctx;
-
-#if defined (__FreeBSD__)
-       (void) signal(SIGINT, (sig_t) signal_delete_profile);
-#elif defined (__SunOS)
-        (void) signal(SIGINT, signal_delete_profile);
-#else
-       (void) signal(SIGINT, (sighandler_t) signal_delete_profile);
-#endif
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debuglevel) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debuglevel));
-       }
-
-       /* Sanity check */
-       retval = OpenProfile(mapi_ctx, &profile, profname, NULL);
-       if (retval == MAPI_E_SUCCESS) {
-               fprintf(stderr, "[ERROR] mapiprofile: profile \"%s\" already exists\n", profname);
-               MAPIUninitialize(mapi_ctx);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       retval = CreateProfile(mapi_ctx, profname, username, password, flags);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("CreateProfile", GetLastError());
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       mapi_profile_add_string_attr(mapi_ctx, profname, "binding", address);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "workstation", workstation);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "domain", domain);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "seal", (seal == true) ? "true" : "false");
-
-       exchange_version_str = talloc_asprintf(mem_ctx, "%d", exchange_version);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "exchange_version", exchange_version_str);
-       talloc_free(exchange_version_str);
-
-       if (realm) {
-               mapi_profile_add_string_attr(mapi_ctx, profname, "realm", realm);
-       }
-
-       locale = (const char *) (language) ? mapi_get_locale_from_language(language) : mapi_get_system_locale();
-
-       if (locale) {
-               cpid = mapi_get_cpid_from_locale(locale);
-               lcid = mapi_get_lcid_from_locale(locale);
-       }
-
-       if (!locale || !cpid || !lcid) {
-               printf("Invalid Language supplied or unknown system language '%s\n'", language);
-               printf("Deleting profile\n");
-               if ((retval = DeleteProfile(mapi_ctx, profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("DeleteProfile", GetLastError());
-               }
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       cpid_str = talloc_asprintf(mem_ctx, "%d", cpid);
-       lcid_str = talloc_asprintf(mem_ctx, "0x%.4x", lcid);
-
-       mapi_profile_add_string_attr(mapi_ctx, profname, "codepage", cpid_str);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "language", lcid_str);
-       mapi_profile_add_string_attr(mapi_ctx, profname, "method", lcid_str);
-
-       talloc_free(cpid_str);
-       talloc_free(lcid_str);
-
-       retval = MapiLogonProvider(mapi_ctx, &session, profname, password, PROVIDER_ID_NSPI);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonProvider", GetLastError());
-               printf("Deleting profile\n");
-               if ((retval = DeleteProfile(mapi_ctx, profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("DeleteProfile", GetLastError());
-               }
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       if (pattern) {
-               username = pattern;
-       }
-
-       retval = ProcessNetworkProfile(session, username, (mapi_profile_callback_t) callback, "Select a user id");
-       if (retval != MAPI_E_SUCCESS && retval != 0x1) {
-               mapi_errstr("ProcessNetworkProfile", GetLastError());
-               printf("Deleting profile\n");
-               if ((retval = DeleteProfile(mapi_ctx, profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("DeleteProfile", GetLastError());
-               }
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       printf("Profile %s completed and added to database %s\n", profname, profdb);
-
-       talloc_free(mem_ctx);
-
-       MAPIUninitialize(mapi_ctx);
-
-       return true;
-}
-
-static void mapiprofile_delete(const char *profdb, const char *profname)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       if ((retval = DeleteProfile(mapi_ctx, profname)) != MAPI_E_SUCCESS) {
-               mapi_errstr("DeleteProfile", GetLastError());
-               exit (1);
-       }
-
-       printf("Profile %s deleted from database %s\n", profname, profdb);
-
-       MAPIUninitialize(mapi_ctx);
-}
-
-
-static void mapiprofile_rename(const char *profdb, const char *old_profname, const char *new_profname)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       char                    *profname;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", retval);
-               exit (1);
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile_rename");
-
-       if (!old_profname) {
-               if ((retval = GetDefaultProfile(mapi_ctx, &profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", retval);
-                       talloc_free(mem_ctx);
-                       exit (1);
-               }
-       } else {
-               profname = talloc_strdup(mem_ctx, old_profname);
-       }
-
-       if ((retval = RenameProfile(mapi_ctx, profname, new_profname)) != MAPI_E_SUCCESS) {
-               mapi_errstr("RenameProfile", retval);
-               talloc_free(profname);
-               talloc_free(mem_ctx);
-               exit (1);
-       }
-
-       talloc_free(profname);
-       talloc_free(mem_ctx);
-       MAPIUninitialize(mapi_ctx);
-}
-
-
-static void mapiprofile_set_default(const char *profdb, const char *profname)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       if ((retval = SetDefaultProfile(mapi_ctx, profname)) != MAPI_E_SUCCESS) {
-               mapi_errstr("SetDefaultProfile", GetLastError());
-               exit (1);
-       }
-
-       printf("Profile %s is now set the default one\n", profname);
-
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void mapiprofile_get_default(const char *profdb)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       char                    *profname;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-       
-       if ((retval = GetDefaultProfile(mapi_ctx, &profname)) != MAPI_E_SUCCESS) {
-               mapi_errstr("GetDefaultProfile", GetLastError());
-               exit (1);
-       }
-
-       printf("Default profile is set to %s\n", profname);
-
-       talloc_free(profname);
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void mapiprofile_get_fqdn(const char *profdb, 
-                                const char *opt_profname, 
-                                const char *password,
-                                bool opt_dumpdata)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session = NULL;
-       const char              *serverFQDN;
-       char                    *profname;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile_get_fqdn");
-
-       if (!opt_profname) {
-               if ((retval = GetDefaultProfile(mapi_ctx, &profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       talloc_free(mem_ctx);
-                       exit (1);
-               }
-       } else {
-               profname = talloc_strdup(mem_ctx, (char *)opt_profname);
-       }
-
-       retval = MapiLogonProvider(mapi_ctx, &session, profname, password, PROVIDER_ID_NSPI);
-       talloc_free(profname);
-       talloc_free(mem_ctx);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonProvider", GetLastError());
-               exit (1);
-       }
-
-       retval = RfrGetFQDNFromLegacyDN(mapi_ctx, session, &serverFQDN);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("RfrGetFQDNFromLegacyDN", GetLastError());
-               exit (1);
-       }
-
-       printf("%s is at %s\n", mapi_ctx->session->profile->homemdb, serverFQDN);
-
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void mapiprofile_list(const char *profdb)
-{
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct SRowSet          proftable;
-       uint32_t                count = 0;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       memset(&proftable, 0, sizeof (struct SRowSet));
-       if ((retval = GetProfileTable(mapi_ctx, &proftable)) != MAPI_E_SUCCESS) {
-               mapi_errstr("GetProfileTable", GetLastError());
-               exit (1);
-       }
-
-       printf("We have %u profiles in the database:\n", proftable.cRows);
-
-       for (count = 0; count != proftable.cRows; count++) {
-               const char      *name = NULL;
-               uint32_t        dflt = 0;
-
-               name = proftable.aRow[count].lpProps[0].value.lpszA;
-               dflt = proftable.aRow[count].lpProps[1].value.l;
-
-               if (dflt) {
-                       printf("\tProfile = %s [default]\n", name);
-               } else {
-                       printf("\tProfile = %s\n", name);
-               }
-
-       }
-
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void mapiprofile_dump(const char *profdb, const char *opt_profname)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_profile     profile;
-       char                    *profname;
-       char                    *exchange_version = NULL;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile_dump");
-
-       if (!opt_profname) {
-               if ((retval = GetDefaultProfile(mapi_ctx, &profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       talloc_free(mem_ctx);
-                       exit (1);
-               }
-       } else {
-               profname = talloc_strdup(mem_ctx, (const char *)opt_profname);
-       }
-
-       retval = OpenProfile(mapi_ctx, &profile, profname, NULL);
-       talloc_free(profname);
-
-       if (retval && (retval != MAPI_E_INVALID_PARAMETER)) {
-               talloc_free(mem_ctx);
-               mapi_errstr("OpenProfile", GetLastError());
-               exit (1);
-       }
-
-       switch (profile.exchange_version) {
-       case 0x0:
-               exchange_version = talloc_strdup(mem_ctx, "exchange 2000");
-               break;
-       case 0x1:
-               exchange_version = talloc_strdup(mem_ctx, "exchange 2003/2007");
-               break;
-       case 0x2:
-               exchange_version = talloc_strdup(mem_ctx, "exchange 2010");
-               break;
-       default:
-               printf("Error: unknown Exchange server\n");
-               goto end;
-       }
-
-       printf("Profile: %s\n", profile.profname);
-       printf("\texchange server == %s\n", exchange_version);
-       printf("\tencryption      == %s\n", (profile.seal == true) ? "yes" : "no");
-       printf("\tusername        == %s\n", profile.username);
-       printf("\tpassword        == %s\n", profile.password);
-       printf("\tmailbox         == %s\n", profile.mailbox);
-       printf("\tworkstation     == %s\n", profile.workstation);
-       printf("\tdomain          == %s\n", profile.domain);
-       printf("\tserver          == %s\n", profile.server);
-
-end:
-       talloc_free(mem_ctx);
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void mapiprofile_attribute(const char *profdb, const char *opt_profname, 
-                                 const char *attribute)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_profile     profile;
-       char                    *profname = NULL;
-       char                    **value = NULL;
-       unsigned int            count = 0;
-       unsigned int            i;
-
-       if ((retval = MAPIInitialize(&mapi_ctx, profdb)) != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile_attribute");
-
-       if (!opt_profname) {
-               if ((retval = GetDefaultProfile(mapi_ctx, &profname)) != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       exit (1);
-               }
-       } else {
-               profname = talloc_strdup(mem_ctx, (const char *)opt_profname);
-       }
-
-       retval = OpenProfile(mapi_ctx, &profile, profname, NULL);
-       if (retval && (retval != MAPI_E_INVALID_PARAMETER)) {
-               mapi_errstr("OpenProfile", GetLastError());
-               talloc_free(profname);
-               talloc_free(mem_ctx);
-               exit (1);
-       }
-
-       if ((retval = GetProfileAttr(&profile, attribute, &count, &value))) {
-               mapi_errstr("ProfileGetAttr", GetLastError());
-               talloc_free(profname);
-               talloc_free(mem_ctx);
-               exit (1);
-       }
-
-       printf("Profile %s: results(%u)\n", profname, count);
-       for (i = 0; i < count; i++) {
-               printf("\t%s = %s\n", attribute, value[i]);
-       }
-       MAPIFreeBuffer(value);
-       talloc_free(profname);
-       talloc_free(mem_ctx);
-
-       MAPIUninitialize(mapi_ctx);
-}
-
-static void show_help(poptContext pc, const char *param)
-{
-       printf("%s argument missing\n", param);
-       poptPrintUsage(pc, stderr, 0);
-       exit (1);
-}
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX      *mem_ctx;
-       int             error;
-       poptContext     pc;
-       int             opt;
-       int             i;
-       char            *default_path;
-       bool            found = false;
-       bool            create = false;
-       bool            delete = false;
-       bool            list = false;
-       bool            listlangs = false;
-       bool            dump = false;
-       bool            newdb = false;
-       bool            setdflt = false;
-       bool            getdflt = false;
-       bool            getfqdn = false;
-       bool            opt_dumpdata = false;
-       bool            opt_seal = false;
-       const char      *opt_debuglevel = NULL;
-       const char      *ldif = NULL;
-       const char      *address = NULL;
-       const char      *workstation = NULL;
-       const char      *domain = NULL;
-       const char      *realm = NULL;
-       const char      *username = NULL;
-       const char      *language = NULL;
-       const char      *pattern = NULL;
-       const char      *password = NULL;
-       const char      *profdb = NULL;
-       const char      *profname = NULL;
-       const char      *rename = NULL;
-       const char      *attribute = NULL;
-       const char      *opt_tmp = NULL;
-       const char      *version = NULL;
-       uint32_t        nopass = 0;
-       char            hostname[256];
-       int             retcode = EXIT_SUCCESS;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_ADDRESS, OPT_WORKSTATION,
-             OPT_DOMAIN, OPT_REALM, OPT_USERNAME, OPT_LANGUAGE, OPT_PASSWORD, 
-             OPT_CREATE_PROFILE, OPT_DELETE_PROFILE, OPT_LIST_PROFILE, OPT_DUMP_PROFILE, 
-             OPT_DUMP_ATTR, OPT_PROFILE_NEWDB, OPT_PROFILE_LDIF, OPT_LIST_LANGS,
-             OPT_PROFILE_SET_DFLT, OPT_PROFILE_GET_DFLT, OPT_PATTERN, OPT_GETFQDN,
-             OPT_NOPASS, OPT_RENAME_PROFILE, OPT_DUMPDATA, OPT_DEBUGLEVEL,
-             OPT_ENCRYPT_CONN, OPT_EXCHANGE_VERSION};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"ldif", 'L', POPT_ARG_STRING, NULL, OPT_PROFILE_LDIF, "set the ldif path", "PATH"},
-               {"getdefault", 'G', POPT_ARG_NONE, NULL, OPT_PROFILE_GET_DFLT, "get the default profile", NULL},
-               {"default", 'S', POPT_ARG_NONE, NULL, OPT_PROFILE_SET_DFLT, "set the default profile", NULL},
-               {"newdb", 'n', POPT_ARG_NONE, NULL, OPT_PROFILE_NEWDB, "create a new profile store", NULL},
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", "PATH"},
-               {"profile", 'P', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", "PROFILE"},
-               {"address", 'I', POPT_ARG_STRING, NULL, OPT_ADDRESS, "set the exchange server IP address", "xxx.xxx.xxx.xxx"},
-               {"workstation", 'M', POPT_ARG_STRING, NULL, OPT_WORKSTATION, "set the workstation", "WORKSTATION_NAME"},
-               {"domain", 'D', POPT_ARG_STRING, NULL, OPT_DOMAIN, "set the domain/workgroup", "DOMAIN"},
-               {"realm", 'R', POPT_ARG_STRING, NULL, OPT_REALM, "set the realm", "REALM"},
-               {"encrypt", 'E', POPT_ARG_NONE, NULL, OPT_ENCRYPT_CONN, "enable encryption with Exchange server", NULL },
-               {"exchange-version", 'v', POPT_ARG_STRING, NULL, OPT_EXCHANGE_VERSION, "specify Exchange server version", "2000" },
-               {"username", 'u', POPT_ARG_STRING, NULL, OPT_USERNAME, "set the profile username", "USERNAME"},
-               {"language", 'C', POPT_ARG_STRING, NULL, OPT_LANGUAGE, "set the user's language (if different from system one)", "LANGUAGE"},
-               {"pattern", 's', POPT_ARG_STRING, NULL, OPT_PATTERN, "username to search for", "USERNAME"},
-               {"password", 'p', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", "PASSWORD"},
-               {"nopass", 0, POPT_ARG_NONE, NULL, OPT_NOPASS, "do not save password in the profile", NULL},
-               {"create", 'c', POPT_ARG_NONE, NULL, OPT_CREATE_PROFILE, "create a profile in the database", NULL},
-               {"delete", 'r', POPT_ARG_NONE, NULL, OPT_DELETE_PROFILE, "delete a profile in the database", NULL},
-               {"rename", 'R', POPT_ARG_STRING, NULL, OPT_RENAME_PROFILE, "rename a profile in the database", NULL},
-               {"list", 'l', POPT_ARG_NONE, NULL, OPT_LIST_PROFILE, "list existing profiles in the database", NULL},
-               {"listlangs", 0, POPT_ARG_NONE, NULL, OPT_LIST_LANGS, "list all recognised languages", NULL},
-               {"dump", 0, POPT_ARG_NONE, NULL, OPT_DUMP_PROFILE, "dump a profile entry", NULL},
-               {"attr", 'a', POPT_ARG_STRING, NULL, OPT_DUMP_ATTR, "print an attribute value", "VALUE"},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the hex data", NULL},
-               {"debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUGLEVEL, "set the debug level", "LEVEL"},
-               {"getfqdn", 0, POPT_ARG_NONE, NULL, OPT_GETFQDN, "returns the DNS FQDN of the NSPI server matching the legacyDN", NULL},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "mapiprofile");
-
-       pc = poptGetContext("mapiprofile", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch(opt) {
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               case OPT_DEBUGLEVEL:
-                       opt_debuglevel = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE_LDIF:
-                       opt_tmp = poptGetOptArg(pc);
-                       ldif = talloc_strdup(mem_ctx, opt_tmp);
-                       free((void*)opt_tmp);
-                       opt_tmp = NULL;
-                       break;
-               case OPT_PROFILE_NEWDB:
-                       newdb = true;
-                       break;
-               case OPT_PROFILE_SET_DFLT:
-                       setdflt = true;
-                       break;
-               case OPT_PROFILE_GET_DFLT:
-                       getdflt = true;
-                       break;
-               case OPT_PROFILE_DB:
-                       opt_tmp = poptGetOptArg(pc);
-                       profdb = talloc_strdup(mem_ctx, opt_tmp); 
-                       free((void*)opt_tmp);
-                       opt_tmp = NULL;
-                       break;
-               case OPT_PROFILE:
-                       profname = poptGetOptArg(pc);
-                       break;
-               case OPT_ADDRESS:
-                       address = poptGetOptArg(pc);
-                       break;
-               case OPT_WORKSTATION:
-                       opt_tmp = poptGetOptArg(pc);
-                       workstation = talloc_strdup(mem_ctx, opt_tmp);
-                       free((void*)opt_tmp);
-                       opt_tmp = NULL;
-                       break;
-               case OPT_DOMAIN:
-                       domain = poptGetOptArg(pc);
-                       break;
-               case OPT_REALM:
-                       realm = poptGetOptArg(pc);
-                       break;
-               case OPT_ENCRYPT_CONN:
-                       opt_seal = true;
-                       break;
-               case OPT_EXCHANGE_VERSION:
-                       opt_tmp = poptGetOptArg(pc);
-                       version = talloc_strdup(mem_ctx, opt_tmp);
-                       free((void *)opt_tmp);
-                       opt_tmp = NULL;
-                       break;
-               case OPT_USERNAME:
-                       username = poptGetOptArg(pc);
-                       break;
-               case OPT_LANGUAGE:
-                       opt_tmp = poptGetOptArg(pc);
-                       language = talloc_strdup(mem_ctx, opt_tmp);
-                       free((void*)opt_tmp);
-                       opt_tmp = NULL;
-                       break;
-               case OPT_PATTERN:
-                       pattern = poptGetOptArg(pc);
-                       break;
-               case OPT_PASSWORD:
-                       password = poptGetOptArg(pc);
-                       break;
-               case OPT_NOPASS:
-                       nopass = 1;
-                       break;
-               case OPT_CREATE_PROFILE:
-                       create = true;
-                       break;
-               case OPT_DELETE_PROFILE:
-                       delete = true;
-                       break;
-               case OPT_RENAME_PROFILE:
-                       rename = poptGetOptArg(pc);
-                       break;
-               case OPT_LIST_PROFILE:
-                       list = true;
-                       break;
-               case OPT_LIST_LANGS:
-                       listlangs = true;
-                       break;
-               case OPT_DUMP_PROFILE:
-                       dump = true;
-                       break;
-               case OPT_DUMP_ATTR:
-                       attribute = poptGetOptArg(pc);
-                       break;
-               case OPT_GETFQDN:
-                       getfqdn = true;
-                       break;
-               }
-       }
-
-       /* Sanity check on options */
-       if (!profdb) {
-               default_path = talloc_asprintf(mem_ctx, DEFAULT_DIR, getenv("HOME"));
-               error = mkdir(default_path, 0700);
-               talloc_free(default_path);
-               if ((error == -1) && (errno != EEXIST)) {
-                       perror("mkdir");
-                       retcode = EXIT_FAILURE;
-                       goto cleanup;
-               }
-               profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, 
-                                        getenv("HOME"));
-       }
-
-       if ((list == false) && (getfqdn == false) && (newdb == false) && (listlangs == false)
-           && (getdflt == false) && (dump == false) && (rename == NULL) && 
-           (!attribute) && (!profname || !profdb)) {
-               poptPrintUsage(pc, stderr, 0);
-               retcode = EXIT_FAILURE;
-               goto cleanup;
-       }
-
-       if (newdb == true) {
-               if (!ldif) {
-                       ldif = talloc_strdup(mem_ctx, mapi_profile_get_ldif_path());
-               }
-               if (!ldif) show_help(pc, "ldif");
-               if (!mapiprofile_createdb(profdb, ldif)) {
-                       retcode = EXIT_FAILURE;
-                       goto cleanup;
-               }
-       }
-
-       /* Process the code here */
-
-       if (!workstation) {
-               gethostname(hostname, sizeof(hostname) - 1);
-               hostname[sizeof(hostname) - 1] = 0;
-               workstation = hostname;
-       }
-
-       if (create == true) {
-               if (!profname) show_help(pc, "profile");
-               if (!password) show_help(pc, "password");
-               if (!username) show_help(pc, "username");
-               if (!address) show_help(pc, "address");
-               if (!domain) show_help(pc, "domain");
-
-               if (!version) {
-                       version = talloc_strdup(mem_ctx, DEFAULT_EXCHANGE_VERSION);
-               }
-
-               for (i = 0; exchange_version[i].name; i++) {
-                       if (!strcasecmp(version, exchange_version[i].name)) {
-                               version = talloc_strdup(mem_ctx, exchange_version[i].name);
-                               found = true;
-                               break;
-                       }
-               }
-               if (found == false) {
-                       printf("Invalid Exchange server version. Possible values are:\n");
-                       for (i = 0; exchange_version[i].name; i++) {
-                               printf("\t[*] %s\n", exchange_version[i].name);
-                       }
-                       goto cleanup;
-               }
-
-               /* Force encrypt parameter if exchange2010 is specified */
-               if (!strcasecmp(version, "2010")) {
-                       opt_seal = true;
-               }
-               talloc_free((void *)version);
-
-               if (! mapiprofile_create(profdb, profname, pattern, username, password, address,
-                                        language, workstation, domain, realm, nopass, opt_seal, 
-                                        opt_dumpdata, opt_debuglevel,
-                                        exchange_version[i].version)) {
-                       retcode = EXIT_FAILURE;
-                       goto cleanup;
-               }
-       }
-
-       if (rename) {
-               mapiprofile_rename(profdb, profname, rename);
-       }
-
-       if (getfqdn == true) {
-               mapiprofile_get_fqdn(profdb, profname, password, opt_dumpdata);
-       }
-
-       if (listlangs == true) {
-               mapidump_languages_list();
-       }
-
-       if (setdflt == true) {
-               mapiprofile_set_default(profdb, profname);
-       }
-
-       if (getdflt == true) {
-               mapiprofile_get_default(profdb);
-       }
-
-       if (delete == true) {
-               mapiprofile_delete(profdb, profname);
-       }
-
-       if (list == true) {
-               mapiprofile_list(profdb);
-       }
-
-       if (dump == true) {
-               mapiprofile_dump(profdb, profname);
-       }
-
-       if (attribute) {
-               mapiprofile_attribute(profdb, profname, attribute);
-       }
-
-cleanup:
-       free((void*)opt_debuglevel);
-       free((void*)profname);
-       free((void*)address);
-       free((void*)domain);
-       free((void*)realm);
-       free((void*)username);
-       free((void*)pattern);
-       free((void*)password);
-       free((void*)rename);
-       free((void*)attribute);
-
-       poptFreeContext(pc);
-       talloc_free(mem_ctx);
-
-       return retcode;
-}
diff --git a/branches/plugfest/utils/mapitest/Doxyfile.in b/branches/plugfest/utils/mapitest/Doxyfile.in
deleted file mode 100644 (file)
index 6a1cae9..0000000
+++ /dev/null
@@ -1,1263 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = MAPI Tests
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidocs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = YES
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = utils/mapitest utils/mapitest/modules
-
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS          = *.h *.c *.doxy
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =  *_private.h
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *.yy.c *_private.h
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = doc/doxygen/pictures/
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = "sed \
-                       -e '20,40s/.*\<libmapi\/libmapi.h\>//'                  \
-                       -e '20,40s/.*\<samba\/popt.h\>//'                       \
-                       -e '20,40s/.*\<samba\/version.h\>//'                    \
-                       -e '20,40s/.*\<utils\/openchange-tools.h\>//'           \
-                       -e '20,40s/.*\<utils\/mapitest\/mapitest.h\>//'         \
-                       -e '20,40s/.*\<utils\/mapitest\/proto.h\>//'            \
-                       -e '20,40s/.*\<errno.h\>//'                             \
-                       -e '20,40s/.*\<err.h\>//'                               \
-                       -e '20,40s/.*\<fcntl.h\>//'                             \
-                       -e '20,40s/.*\<param.h\>//'                             \
-                       -e '20,40s/.*\<time.h\>//'                              \
-                       -e 's/_PUBLIC_//'"
-
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html/mapitest
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = doc/doxygen/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = doc/doxygen/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = doc/doxygen/apidocs.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = _PUBLIC_
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen will always 
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/branches/plugfest/utils/mapitest/data/lzfu/testcase.rtf b/branches/plugfest/utils/mapitest/data/lzfu/testcase.rtf
deleted file mode 100644 (file)
index 3ed585a..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033
-{\fonttbl {\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
-{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
-{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}
-{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}
-}
-{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
-{\stylesheet
-{\widctlpar\adjustright \fs20\cgrid \snext0 Normal;}
-{\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid \sbasedon0 \snext0 heading 1;}
-{\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid \sbasedon0 \snext0 heading 2;}
-{\s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid \sbasedon0 \snext0 heading 3;}
-{\s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext0 heading 4;}{\*\cs10 \additive Default Paragraph Font;}
-{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext0 heading 5;}{\*\cs10 \additive Default Paragraph Font;}
-{\s15\qc\sb240\sa60\widctlpar\outlinelevel0\adjustright \b\f1\fs32\kerning28\cgrid \sbasedon0 \snext15 Title;}
-{\s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid \sbasedon0 \snext16 Subtitle;}
-{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid \sbasedon0 \snext17 BodyText;}
-{\s18\widctlpar\fs22\cgrid \sbasedon0 \snext18 DenseText;}
-{\s28\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext28 header;}
-{\s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid \sbasedon0 \snext29 footer;}
-{\s30\li360\sa60\sb120\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext30 GroupHeader;}
-{\s40\li0\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext41 Code Example 0;}
-{\s41\li360\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext42 Code Example 1;}
-{\s42\li720\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext43 Code Example 2;}
-{\s43\li1080\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext44 Code Example 3;}
-{\s44\li1440\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext45 Code Example 4;}
-{\s45\li1800\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext46 Code Example 5;}
-{\s46\li2160\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext47 Code Example 6;}
-{\s47\li2520\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext48 Code Example 7;}
-{\s48\li2880\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext49 Code Example 8;}
-{\s49\li3240\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext49 Code Example 9;}
-{\s50\li0\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext51 List Continue 0;}
-{\s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext52 List Continue 1;}
-{\s52\li720\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext53 List Continue 2;}
-{\s53\li1080\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext54 List Continue 3;}
-{\s54\li1440\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext55 List Continue 4;}
-{\s55\li1800\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext56 List Continue 5;}
-{\s56\li2160\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext57 List Continue 6;}
-{\s57\li2520\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext58 List Continue 7;}
-{\s58\li2880\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext59 List Continue 8;}
-{\s59\li3240\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext59 List Continue 9;}
-{\s60\li0\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext61 DescContinue 0;}
-{\s61\li360\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext62 DescContinue 1;}
-{\s62\li720\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext63 DescContinue 2;}
-{\s63\li1080\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext64 DescContinue 3;}
-{\s64\li1440\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext65 DescContinue 4;}
-{\s65\li1800\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext66 DescContinue 5;}
-{\s66\li2160\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext67 DescContinue 6;}
-{\s67\li2520\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext68 DescContinue 7;}
-{\s68\li2880\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext69 DescContinue 8;}
-{\s69\li3240\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext69 DescContinue 9;}
-{\s70\li0\sa30\sb30\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext81 LatexTOC 0;}
-{\s71\li360\sa27\sb27\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext82 LatexTOC 1;}
-{\s72\li720\sa24\sb24\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext83 LatexTOC 2;}
-{\s73\li1080\sa21\sb21\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext84 LatexTOC 3;}
-{\s74\li1440\sa18\sb18\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext85 LatexTOC 4;}
-{\s75\li1800\sa15\sb15\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext86 LatexTOC 5;}
-{\s76\li2160\sa12\sb12\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext87 LatexTOC 6;}
-{\s77\li2520\sa9\sb9\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext88 LatexTOC 7;}
-{\s78\li2880\sa6\sb6\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext89 LatexTOC 8;}
-{\s79\li3240\sa3\sb3\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext89 LatexTOC 9;}
-{\s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid \sbasedon0 \snext81 \sautoupd List Bullet 0;}
-{\s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid \sbasedon0 \snext82 \sautoupd List Bullet 1;}
-{\s82\fi-360\li1080\widctlpar\jclisttab\tx1080{\*\pn \pnlvlbody\ilvl0\ls3\pnrnot0\pndec }\ls3\adjustright \fs20\cgrid \sbasedon0 \snext83 \sautoupd List Bullet 2;}
-{\s83\fi-360\li1440\widctlpar\jclisttab\tx1440{\*\pn \pnlvlbody\ilvl0\ls4\pnrnot0\pndec }\ls4\adjustright \fs20\cgrid \sbasedon0 \snext84 \sautoupd List Bullet 3;}
-{\s84\fi-360\li1800\widctlpar\jclisttab\tx1800{\*\pn \pnlvlbody\ilvl0\ls5\pnrnot0\pndec }\ls5\adjustright \fs20\cgrid \sbasedon0 \snext85 \sautoupd List Bullet 4;}
-{\s85\fi-360\li2160\widctlpar\jclisttab\tx2160{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pndec }\ls6\adjustright \fs20\cgrid \sbasedon0 \snext86 \sautoupd List Bullet 5;}
-{\s86\fi-360\li2520\widctlpar\jclisttab\tx2520{\*\pn \pnlvlbody\ilvl0\ls7\pnrnot0\pndec }\ls7\adjustright \fs20\cgrid \sbasedon0 \snext87 \sautoupd List Bullet 6;}
-{\s87\fi-360\li2880\widctlpar\jclisttab\tx2880{\*\pn \pnlvlbody\ilvl0\ls8\pnrnot0\pndec }\ls8\adjustright \fs20\cgrid \sbasedon0 \snext88 \sautoupd List Bullet 7;}
-{\s88\fi-360\li3240\widctlpar\jclisttab\tx3240{\*\pn \pnlvlbody\ilvl0\ls9\pnrnot0\pndec }\ls9\adjustright \fs20\cgrid \sbasedon0 \snext89 \sautoupd List Bullet 8;}
-{\s89\fi-360\li3600\widctlpar\jclisttab\tx3600{\*\pn \pnlvlbody\ilvl0\ls10\pnrnot0\pndec }\ls10\adjustright \fs20\cgrid \sbasedon0 \snext89 \sautoupd List Bullet 9;}
-{\s90\fi-360\li360\widctlpar\fs20\cgrid \sbasedon0 \snext91 \sautoupd List Enum 0;}
-{\s91\fi-360\li720\widctlpar\fs20\cgrid \sbasedon0 \snext92 \sautoupd List Enum 1;}
-{\s92\fi-360\li1080\widctlpar\fs20\cgrid \sbasedon0 \snext93 \sautoupd List Enum 2;}
-{\s93\fi-360\li1440\widctlpar\fs20\cgrid \sbasedon0 \snext94 \sautoupd List Enum 3;}
-{\s94\fi-360\li1800\widctlpar\fs20\cgrid \sbasedon0 \snext95 \sautoupd List Enum 4;}
-{\s95\fi-360\li2160\widctlpar\fs20\cgrid \sbasedon0 \snext96 \sautoupd List Enum 5;}
-{\s96\fi-360\li2520\widctlpar\fs20\cgrid \sbasedon0 \snext96 \sautoupd List Enum 5;}
-{\s97\fi-360\li2880\widctlpar\fs20\cgrid \sbasedon0 \snext98 \sautoupd List Enum 7;}
-{\s98\fi-360\li3240\widctlpar\fs20\cgrid \sbasedon0 \snext99 \sautoupd List Enum 8;}
-{\s99\fi-360\li3600\widctlpar\fs20\cgrid \sbasedon0 \snext99 \sautoupd List Enum 9;}
-}
-{\comment begin body}
-{\info 
-{\title {\comment OpenChange  {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid 
-0.11 \par
-}}OpenChange}
-{\comment Generated byDoxgyen. }
-{\creatim \yr2010\mo11\dy22\hr11\min7\sec59}
-}\pard\plain 
-\sectd\pgnlcrm
-{\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}}
-\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid 
-\vertalc\qc\par\par\par\par\par\par\par
-\pard\plain \s15\qc\sb240\sa60\widctlpar\outlinelevel0\adjustright \b\f1\fs32\kerning28\cgrid 
-{\field\fldedit {\*\fldinst TITLE \\*MERGEFORMAT}{\fldrslt TITLE}}\par
-\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid 
-\par
-\par\par\par\par\par\par\par\par\par\par\par\par
-\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid 
-{\field\fldedit {\*\fldinst AUTHOR \\*MERGEFORMAT}{\fldrslt AUTHOR}}\par
-Version 0.11\par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt CREATEDATE}}\par
-\page\page\vertalt
-\pard\plain 
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Table of Contents\par
-\pard\plain \par
-{\field\fldedit {\*\fldinst TOC \\f \\*MERGEFORMAT}{\fldrslt Table of contents}}\par
-\pard\plain 
-\sect \sbkpage \pgndec \pgnrestart
-\sect \sectd \sbknone
-{\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}}
-
-\pard\plain \sect\sbkpage
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid 
-The OpenChange Library API Reference\par \pard\plain 
-{\tc \v The OpenChange Library API Reference}
-{
-\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid 
-This is the online reference for developing with the OpenChange client libraries.Among other things, the OpenChange client libraries provide:{
-\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-MAPI client library ({\f2 libmapi})\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-MAPI administration libraries ({\f2 libmapiadmin})\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-OpenChange Property Files ({\f2 libocpf})\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-A regression test framework ({\f2 mapitest})\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-MAPIProxy project ({\f2 mapiproxy})\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-C++ bindings for libmapi ({\f2 libmapi++})\par}
-{\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {\tc\tcl \v 4}OpenChange Project Goals\par}
-The OpenChange Project aims to provide a portable Open Source implementation of Microsoft Exchange Server and Exchange protocols. Exchange is a groupware server designed to work with Microsoft Outlook, and providing features such as a messaging server, shared calendars, contact databases, public folders, notes and tasks.\par
-The OpenChange project has three goals:\par
-{
-\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-To provide a library for interoperability with Exchange protocols, and to assist implementors to use this to create groupware that interoperates with both Exchange and other OpenChange-based software.\par}
-{
-\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-To provide an alternative to Microsoft Exchange Server which uses native Exchange protocols and provides exactly equivalent functionality when viewed from Microsoft Outlook clients.\par}
-{
-\par
-\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid 
-To develop a body of knowledge about the most popular groupware protocols in use commercially today in order to promote development of a documented and unencumbered standard, with all the benefits that standards bring.\par}
-{\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {\tc\tcl \v 4}More information\par}
-Visit the {\f2 OpenChange web site} for other useful information. \par
-}}
-
-\pard\plain \sect\sbkpage
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid 
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Index\par 
-\pard\plain 
-{\tc \v Index}
-{\field\fldedit {\*\fldinst INDEX \\c2 \\*MERGEFORMAT}{\fldrslt INDEX}}
-}
\ No newline at end of file
diff --git a/branches/plugfest/utils/mapitest/data/lzxpress/001_Outlook_2007_in_ModifyRecipients_comp.dat b/branches/plugfest/utils/mapitest/data/lzxpress/001_Outlook_2007_in_ModifyRecipients_comp.dat
deleted file mode 100644 (file)
index 119c40d..0000000
Binary files a/branches/plugfest/utils/mapitest/data/lzxpress/001_Outlook_2007_in_ModifyRecipients_comp.dat and /dev/null differ
diff --git a/branches/plugfest/utils/mapitest/data/lzxpress/002_Outlook_2007_in_Tables_operations_comp.dat b/branches/plugfest/utils/mapitest/data/lzxpress/002_Outlook_2007_in_Tables_operations_comp.dat
deleted file mode 100644 (file)
index d4b8b66..0000000
Binary files a/branches/plugfest/utils/mapitest/data/lzxpress/002_Outlook_2007_in_Tables_operations_comp.dat and /dev/null differ
diff --git a/branches/plugfest/utils/mapitest/mapitest.c b/branches/plugfest/utils/mapitest/mapitest.c
deleted file mode 100644 (file)
index 3c5f58b..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/openchange-tools.h"
-
-#include <samba/popt.h>
-#include <param.h>
-
-#include "config.h"
-
-/**
-       \file
-       Core of %mapitest implementation
-*/
-
-/**
-   Initialize %mapitest structure
- */
-static void mapitest_init(TALLOC_CTX *mem_ctx, struct mapitest *mt)
-{
-       mt->mem_ctx = mem_ctx;
-       mt->stream = NULL;
-       memset(&mt->info, 0, sizeof (mt->info));
-       mt->session = NULL;
-
-       mt->session = NULL;
-       mt->mapi_all = true;
-       mt->confidential = false;
-       mt->no_server = false;
-       mt->color = false;
-       mt->online = false;
-       mt->mapi_suite = false;
-       mt->cmdline_calls = NULL;
-       mt->cmdline_suite = NULL;
-       mt->subunit_output = false;
-}
-
-/**
-  Initialize %mapitest output stream
-
-  \param mt pointer to mapitest context
-  \param filename filename to write to (can be null, for output to stdout)
-*/
-static void mapitest_init_stream(struct mapitest *mt, const char *filename)
-{
-       if (filename == NULL) {
-               mt->stream = fdopen(STDOUT_FILENO, "a");
-       } else {
-               mt->stream = fopen(filename, "w+");
-       }
-
-       if (mt->stream == NULL) {
-               err(errno, "fdopen/fopen");
-       }
-}
-
-/**
-  Clean up %mapitest output stream
-
-  \param mt pointer to mapitest context
-*/
-static void mapitest_cleanup_stream(struct mapitest *mt)
-{
-       fclose(mt->stream);
-}
-
-
-static bool mapitest_get_testnames(TALLOC_CTX *mem_ctx, struct mapitest *mt,
-                                  const char *parameter)
-{
-       struct mapitest_unit    *el = NULL;
-       char                    *temptok = NULL;
-
-       if ((temptok = strtok((char *)parameter, ";")) == NULL) {
-               fprintf(stderr, "Invalid testname list [;]\n");
-               return false;
-       }
-
-       el = talloc_zero(mem_ctx, struct mapitest_unit);
-       el->name = talloc_strdup(mem_ctx, temptok);
-       DLIST_ADD(mt->cmdline_calls, el);
-
-       while ((temptok = strtok(NULL, ";")) != NULL) {
-               el = talloc_zero(mem_ctx, struct mapitest_unit);
-               el->name = talloc_strdup(mem_ctx, temptok);
-               DLIST_ADD_END(mt->cmdline_calls, el, struct mapitest_unit *);
-       }
-
-       return true;
-}
-
-
-static void mapitest_list(struct mapitest *mt, const char *name)
-{
-       struct mapitest_suite           *sel;
-       struct mapitest_test            *el;
-
-       /* List all tests */
-       if (!name) {
-               for (sel = mt->mapi_suite; sel; sel = sel->next) {
-                       printf("[*] Suite %s\n", sel->name);
-                       printf("===================================\n");
-                       printf("    * %-15s %s\n", "Name:", sel->name);
-                       printf("    * %-15s %5s\n", "Description:", sel->description);
-                       printf("    * Running Tests:\n");
-                       for (el = sel->tests; el; el = el->next) {
-                               printf("\t    - %-35s: %-10s\n", el->name, el->description);
-                       }
-                       printf("\n\n");
-               }
-       }
-}
-
-
-/**
- * Retrieve server specific information
- */
-static bool mapitest_get_server_info(struct mapitest *mt,
-                                    char *opt_profname,
-                                    const char *password,
-                                    bool opt_dumpdata,
-                                    const char *opt_debug)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct emsmdb_info      *info = NULL;
-       struct mapi_session     *session = NULL;
-
-       /* if the user explicitly asked for just the no-server tests 
-       to be run, then we're done here */
-       if (mt->no_server == true) return 0;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_get_server_info");
-
-       /* if no profile was specified, get the default */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mt->mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", retval);
-                       talloc_free(mem_ctx);
-                       return false;
-               }
-       }
-               
-
-       /* debug options */
-       SetMAPIDumpData(mt->mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mt->mapi_ctx, atoi(opt_debug));
-       }
-
-       retval = MapiLogonEx(mt->mapi_ctx, &session, opt_profname, password);
-       MAPIFreeBuffer(opt_profname);
-       talloc_free(mem_ctx);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", retval);
-               return false;
-       }
-       mt->session = session;
-       mt->profile = session->profile;
-
-       info = emsmdb_get_info(session);
-       memcpy(&mt->info, info, sizeof (struct emsmdb_info));
-
-       /* extract org and org_unit from info.mailbox */
-       mt->org = x500_get_dn_element(mt->mem_ctx, info->szDNPrefix, "/o=");
-       mt->org_unit = x500_get_dn_element(mt->mem_ctx, info->szDNPrefix, "/ou=");
-       
-       return true;
-}
-
-
-
-/**
- *  main program
- */
-int main(int argc, const char *argv[])
-{
-       enum MAPISTATUS         retval;
-       int32_t                 num_tests_failed;
-       TALLOC_CTX              *mem_ctx;
-       struct mapitest         mt;
-       poptContext             pc;
-       int                     opt;
-       bool                    ret;
-       bool                    opt_dumpdata = false;
-       const char              *opt_debug = NULL;
-       const char              *opt_profdb = NULL;
-       char                    *opt_profname = NULL;
-       const char              *opt_password = NULL;
-       const char              *opt_outfile = NULL;
-       char                    *prof_tmp = NULL;
-       bool                    opt_leak_report = false;
-       bool                    opt_leak_report_full = false;
-
-       enum { OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD,
-              OPT_CONFIDENTIAL, OPT_OUTFILE, OPT_MAPI_CALLS,
-              OPT_NO_SERVER, OPT_LIST_ALL, OPT_DUMP_DATA,
-              OPT_DEBUG, OPT_COLOR, OPT_SUBUNIT, OPT_LEAK_REPORT,
-              OPT_LEAK_REPORT_FULL };
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               { "database",        'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB,       "set the profile database", NULL },
-               { "profile",         'p', POPT_ARG_STRING, NULL, OPT_PROFILE,          "set the profile name", NULL },
-               { "password",        'p', POPT_ARG_STRING, NULL, OPT_PASSWORD,         "set the profile or account password", NULL },
-               { "confidential",      0, POPT_ARG_NONE,   NULL, OPT_CONFIDENTIAL,     "remove any sensitive data from the report", NULL },
-               { "color",             0, POPT_ARG_NONE,   NULL, OPT_COLOR,            "color MAPI retval", NULL },
-#if HAVE_SUBUNIT
-               { "subunit",           0, POPT_ARG_NONE,   NULL, OPT_SUBUNIT,          "output in subunit protocol format", NULL },
-#endif
-               { "outfile",         'o', POPT_ARG_STRING, NULL, OPT_OUTFILE,          "set the report output file", NULL },
-               { "mapi-calls",        0, POPT_ARG_STRING, NULL, OPT_MAPI_CALLS,       "test custom ExchangeRPC tests", NULL },
-               { "list-all",          0, POPT_ARG_NONE,   NULL, OPT_LIST_ALL,         "list suite and tests - names and description", NULL },
-               { "no-server",         0, POPT_ARG_NONE,   NULL, OPT_NO_SERVER,        "only run tests that do not require server connection", NULL },
-               { "dump-data",         0, POPT_ARG_NONE,   NULL, OPT_DUMP_DATA,        "dump the hex data", NULL },
-               { "debuglevel",      'd', POPT_ARG_STRING, NULL, OPT_DEBUG,            "set debug level", NULL },
-               { "leak-report",       0, POPT_ARG_NONE,   NULL, OPT_LEAK_REPORT,      "enable talloc leak reporting on exit", NULL },
-               { "leak-report-full",  0, POPT_ARG_NONE,   NULL, OPT_LEAK_REPORT_FULL, "enable full talloc leak reporting on exit", NULL },
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, 0, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest");
-       mapitest_init(mem_ctx, &mt);
-       mapitest_register_modules(&mt);
-
-       pc = poptGetContext("mapitest", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_DUMP_DATA:
-                       opt_dumpdata = true;
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       prof_tmp = poptGetOptArg(pc);
-                       opt_profname = talloc_strdup(mem_ctx, prof_tmp);
-                       free(prof_tmp);
-                       prof_tmp = NULL;
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_CONFIDENTIAL:
-                       mt.confidential = true;
-                       break;
-               case OPT_OUTFILE:
-                       opt_outfile = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_CALLS:
-                       ret = mapitest_get_testnames(mem_ctx, &mt, poptGetOptArg(pc));
-                       if (ret == false) exit (-1);
-                       mt.mapi_all = false;
-                       break;
-               case OPT_NO_SERVER:
-                       mt.no_server = true;
-                       break;
-               case OPT_COLOR:
-                       mt.color = true;
-                       break;
-               case OPT_SUBUNIT:
-                       mt.subunit_output = true;
-                       break;
-               case OPT_LIST_ALL:
-                       mapitest_list(&mt, NULL);
-                       talloc_free(mem_ctx);
-                       poptFreeContext(pc);
-                       return 0;
-                       break;
-               case OPT_LEAK_REPORT:
-                       opt_leak_report = true;
-                       talloc_enable_leak_report();
-                       break;
-               case OPT_LEAK_REPORT_FULL:
-                       opt_leak_report_full = true;
-                       talloc_enable_leak_report_full();
-                       break;
-               }
-       }
-
-       poptFreeContext(pc);
-
-       /* Sanity check */
-       if (mt.cmdline_calls && (mt.mapi_all == true)) {
-               fprintf(stderr, "mapi-calls and mapi-all can't be set at the same time\n");
-               return -1;
-       }
-
-       /* Initialize MAPI subsystem */
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       retval = MAPIInitialize(&(mt.mapi_ctx), opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", retval);
-               return -2;
-       }
-
-       mapitest_init_stream(&mt, opt_outfile);
-       
-       mt.online = mapitest_get_server_info(&mt, opt_profname, opt_password,
-                                            opt_dumpdata, opt_debug);
-
-       mapitest_print_headers(&mt);
-
-       /* Do not run any tests if we couldn't find a profile or if
-        * server is offline and connection to server was implicitly
-        * specified */
-       if (!opt_profname && mt.online == false && mt.no_server == false) {
-               fprintf(stderr, "No MAPI profile found for online tests\n");
-               return -2;
-       }
-
-       /* Run custom tests */
-       if (mt.cmdline_calls) {
-               struct mapitest_unit    *el;
-               
-               for (el = mt.cmdline_calls; el; el = el->next) {
-                       printf("[*] %s\n", el->name);
-                       mapitest_run_test(&mt, el->name);
-               }
-       } else {
-               mapitest_run_all(&mt);
-       }
-
-       num_tests_failed = mapitest_stat_dump(&mt);
-
-       mapitest_cleanup_stream(&mt);
-
-       /* Uninitialize and free memory */
-       MAPIUninitialize(mt.mapi_ctx);
-       talloc_free(mt.mem_ctx);
-
-       if (opt_leak_report) {
-               talloc_report(NULL, stdout);
-       }
-
-       if (opt_leak_report_full) {
-               talloc_report_full(NULL, stdout);
-       }
-
-       return num_tests_failed;
-}
diff --git a/branches/plugfest/utils/mapitest/mapitest.h b/branches/plugfest/utils/mapitest/mapitest.h
deleted file mode 100644 (file)
index 20669e1..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __MAPITEST_H__
-#define        __MAPITEST_H__
-
-#include "libmapi/libmapi.h"
-
-#include <errno.h>
-#include <err.h>
-
-/* forward declaration */
-struct mapitest;
-struct mapitest_suite;
-
-
-/**
-       \file mapitest.h
-       Data structures for %mapitest
- */
-
-/**
-  Flags for changing test applicability
-  
-  If you add values here, you also need to add a matching description to
-  applicabilityFlagsDescription and suitable logic to
-  mapitest_suite_test_is_applicable().
-*/
-enum TestApplicabilityFlags {
-       ApplicableToAllVersions = 0,    /*!< This test is always applicable */
-       NotInExchange2010 = 0x1,        /*!< This test is not applicable to Exchange 2010 */
-       NotInExchange2010SP0 = 0x2,     /*!< This test is not applicable to Exchange 2010
-                                            Service Pack 0, but is applicable to later versions */
-       ExpectedFail = 0x8000,          /*!< This test is expected to fail */
-       LastTestApplicabilityFlag = 0xFFFF
-};
-
-/**
-  List of possible test results
-*/
-enum TestResult {
-       Pass,                   /*!< The test was expected to pass, and it did */
-       Fail,                   /*!< The test was expected to pass, but it failed */
-       UnexpectedPass,         /*!< The test was expected to fail, but it passed instead */
-       ExpectedFailure         /*!< The test was expected to fail, and it did */
-};
-
-#include "utils/mapitest/proto.h"
-
-/**
-       A list of %mapitest tests
-
-       %mapitest tests are grouped into test suites. This linked
-       list data structure represents the various tests as a
-       list of tests (i.e. the linked list is a suite of tests).
-
-       The function that executes the test is pointed to by the
-       fn element (i.e. fn is a function pointer).
-*/
-struct mapitest_test {
-       struct mapitest_test            *prev;          /*!< The previous test in the list */
-       struct mapitest_test            *next;          /*!< The next test in the list */
-       char                            *name;          /*!< The name of this test */
-       char                            *description;   /*!< The description of this test */
-       void                            *fn;            /*!< pointer to the test function */
-       enum TestApplicabilityFlags     flags;          /*!< any applicability for this test */
-};
-
-/**
-       List of test names
-
-       This linked list data structure has a list of names of tests. It is
-       used with mapitest_stat to record the failed tests.
-*/
-struct mapitest_unit {
-       struct mapitest_unit    *prev;          /*!< The previous test in the list */
-       struct mapitest_unit    *next;          /*!< The next test in the list */
-       char                    *name;          /*!< The name of the test */
-       char                    *reason;        /*!< Why this test was skipped or failed (if applicable) */
-};
-
-/**
-       %mapitest statistics
-
-       During a %mapitest run, %mapitest collects statistics on each test suite.
-
-       This data structure records the results for one run of a test suite.
-
-       There should be one entry in the failure_info list for each failure.
-*/
-struct mapitest_stat {
-       uint32_t                success;        /*!< Number of tests in this suite that passed */
-       uint32_t                failure;        /*!< Number of tests in this suite that failed */
-       uint32_t                skipped;        /*!< Number of tests in this suite that were skipped */
-       uint32_t                x_fail;         /*!< Number of tests in this suite that were expected failures */
-       struct mapitest_unit    *failure_info;  /*!< List of names of the tests that failed */
-       struct mapitest_unit    *skip_info;     /*!< List of names of the tests that were skipped, and why */
-       bool                    enabled;        /*!< Whether this statistics structure is valid */
-};
-
-/**
-       A list of test suites
-
-       %mapitest executes a set of tests. Those tests are grouped into
-       suites of related tests (e.g. all tests that do not require a 
-       server are in one suite, the tests for NSPI are in another suite,
-       and so on). This linked list data structure represents the various
-       test suites to be executed.
-*/
-struct mapitest_suite {
-       struct mapitest_suite   *prev;        /*!< Pointer to the previous test suite */
-       struct mapitest_suite   *next;        /*!< Pointer to the next test suite */
-       char                    *name;        /*!< The name of the test suite */
-       char                    *description; /*!< Description of the test suite */
-       bool                    online;       /*!< Whether this suite requires a server */
-       struct mapitest_test    *tests;       /*!< The tests in this suite */
-       struct mapitest_stat    *stat;        /*!< Results of running this test */
-};
-
-/**
-       The context structure for a %mapitest run
-*/
-struct mapitest {
-       TALLOC_CTX              *mem_ctx;       /*!< talloc memory context for memory allocations */
-       struct mapi_context     *mapi_ctx;      /*!< mapi context */
-       struct mapi_session     *session;
-       bool                    confidential;   /*!< true if confidential information should be omitted */
-       bool                    no_server;      /*!< true if only non-server tests should be run */
-       bool                    mapi_all;       /*!< true if all tests should be run */
-       bool                    online;         /*!< true if the server could be accessed */
-       bool                    color;          /*!< true if the output should be colored */
-       bool                    subunit_output; /*!< true if we should write output in subunit protocol format */
-       struct emsmdb_info      info;
-       struct mapi_profile     *profile;
-       struct mapitest_suite   *mapi_suite;    /*!< the various test suites */
-       struct mapitest_unit    *cmdline_calls;
-       struct mapitest_unit    *cmdline_suite;
-       const char              *org;
-       const char              *org_unit;
-       FILE                    *stream;
-       void                    *priv;
-};
-
-struct mapitest_module {
-       char                    *name;
-       
-};
-
-/**
-   Context for %mapitest test folder
-*/
-struct mt_common_tf_ctx
-{
-       mapi_object_t   obj_store;
-       mapi_object_t   obj_top_folder;
-       mapi_object_t   obj_test_folder;
-       mapi_object_t   obj_test_msg[10];
-};
-
-
-/*
- *  Defines
- */
-#define        MAPITEST_SUCCESS        0
-#define        MAPITEST_ERROR          -1
-
-#define        MT_STREAM_MAX_SIZE      0x3000
-
-#define        MT_YES                  "[yes]"
-#define        MT_NO                   "[no]"
-
-#define        MT_CONFIDENTIAL "[Confidential]"
-
-#define        MT_HDR_START            "#############################[mapitest report]#################################\n"
-#define        MT_HDR_END              "###############################################################################\n"
-#define        MT_HDR_FMT              "[*] %-25s: %-20s\n"
-#define        MT_HDR_FMT_DATE         "[*] %-25s: %-20s"
-#define        MT_HDR_FMT_SECTION      "[*] %-25s:\n"
-#define        MT_HDR_FMT_SUBSECTION   "%-21s: %-10s\n"
-#define        MT_HDR_FMT_VER_NORM     "%-21s: %02d.%02d.%04d.%04d\n"
-
-#define        MT_DIRNAME_TOP          "[MT] Top of Mailbox"
-#define        MT_DIRNAME_APPOINTMENT  "[MT] Calendar"
-#define        MT_DIRNAME_CONTACT      "[MT] Contact"
-#define        MT_DIRNAME_JOURNAL      "[MT] Journal"
-#define        MT_DIRNAME_POST         "[MT] Post"
-#define        MT_DIRNAME_NOTE         "[MT] Note"
-#define        MT_DIRNAME_STICKYNOTE   "[MT] Sticky Notes"
-#define        MT_DIRNAME_TASK         "[MT] Tasks"
-#define        MT_DIRNAME_TEST         "[MT] Test Folder1"
-
-#define        MT_MAIL_SUBJECT         "[MT] Sample E-MAIL"
-#define        MT_MAIL_ATTACH          "Attach1.txt"
-#define        MT_MAIL_ATTACH2         "Attach2.txt"
-
-#define        MODULE_TITLE            "[MODULE] %s\n"
-#define        MODULE_TITLE_DELIM      '#'
-#define        MODULE_TITLE_NEWLINE    2
-#define        MODULE_TITLE_LINELEN    80
-
-#define        MODULE_TEST_TITLE       "[TEST] %s\n"
-#define        MODULE_TEST_RESULT      "[RESULT] %s: %s\n"
-#define        MODULE_TEST_DELIM       '-'
-#define        MODULE_TEST_DELIM2      '='
-#define        MODULE_TEST_LINELEN     72
-#define        MODULE_TEST_NEWLINE     1
-#define        MODULE_TEST_SUCCESS     "[SUCCESS]"
-#define        MODULE_TEST_FAILURE     "[FAILURE]"
-
-#define        MT_ERROR        "[ERROR]: %s\n"
-
-#define        MT_STAT_FAILED_TITLE    "[STAT] FAILED TEST CASES\n"
-#define        MT_STAT_RESULT  "* %-35s: %s (%s)\n"
-#define        MT_STAT_SKIPPED_TITLE   "[STAT] SKIPPED TEST CASES\n"
-
-#define MT_SUMMARY_TITLE "[STAT] TEST SUMMARY\n"
-
-#define        MT_WHITE           "\033[0;29m"
-#define MT_RED             "\033[1;31m"
-#define MT_GREEN           "\033[1;32m"
-
-#define Exchange2010SP0Version 0x0E00
-
-#endif /* !__MAPITEST_H__ */
diff --git a/branches/plugfest/utils/mapitest/mapitest_common.c b/branches/plugfest/utils/mapitest/mapitest_common.c
deleted file mode 100644 (file)
index 31498c1..0000000
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-
-#include <fcntl.h>
-
-/**
-       \file
-       Support functions for %mapitest modules
-
-       These functions implement commonly needed functionality that
-       would otherwise be copied into each module implementation
-*/
-
-/**
-     Opens a default folder
-
-     This function opens one of the default (standard) folders,
-     returning the folder as obj_child. olNum may be one of:
-       - olFolderTopInformationStore
-       - olFolderDeletedItems
-       - olFolderOutbox
-       - olFolderSentMail
-       - olFolderInbox
-       - olFolderCalendar
-       - olFolderContacts
-       - olFolderJournal
-       - olFolderNotes
-       - olFolderTasks
-       - olFolderDrafts
-
-     \param mt pointer to the top level mapitest structure
-     \param obj_parent parent folder (usually the message store, must be opened)
-     \param obj_child the folder that has been opened
-     \param olNum the folder identifier (see list above)
-
-     \return true on success, false on failure
- */
-_PUBLIC_ bool mapitest_common_folder_open(struct mapitest *mt,
-                                         mapi_object_t *obj_parent, 
-                                         mapi_object_t *obj_child,
-                                         uint32_t olNum)
-{
-       enum MAPISTATUS retval;
-       mapi_id_t       id_child;
-
-       retval = GetDefaultFolder(obj_parent, &id_child, olNum);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "GetDefaultFolder", GetLastError());
-               return false;
-       }
-
-       retval = OpenFolder(obj_parent, id_child, obj_child);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "OpenFolder", GetLastError());
-               return false;
-       }
-
-       return true;
-}
-
-/**
-   This function deletes messages in a folder, based on matching the subject
-   name. This is meant to clean up a folder after a test has been run.
-
-   \param mt pointer to the top level mapitest structure
-   \param obj_folder the folder to search through
-   \param subject the message subject to match
-*/
-_PUBLIC_ bool mapitest_common_message_delete_by_subject(struct mapitest *mt,
-                                                       mapi_object_t *obj_folder,
-                                                       const char *subject)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_ctable;
-       mapi_id_t               msgids[1];
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                count;
-       const char              *msubject = NULL;
-       uint32_t                i;
-
-       /* Sanity checks */
-       if (subject == NULL) return false;
-
-       /* Retrieve the contents table */
-       mapi_object_init(&obj_ctable);
-       retval = GetContentsTable(obj_folder, &obj_ctable, 0, &count);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "GetContentsTable", GetLastError());
-               mapi_object_release(&obj_ctable);
-               return false;
-       }
-
-       /* Customize the content table view */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2,
-                                         PR_MID,
-                                         PR_SUBJECT);
-       retval = SetColumns(&obj_ctable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetColumns", GetLastError());
-               mapi_object_release(&obj_ctable);
-               return false;
-       }
-
-       while (((retval = QueryRows(&obj_ctable, count, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND) && !retval && SRowSet.cRows) {
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       if (retval == MAPI_E_SUCCESS) {
-                               msgids[0] = SRowSet.aRow[i].lpProps[0].value.d;
-                               msubject = (const char *)find_SPropValue_data(&SRowSet.aRow[i], PR_SUBJECT);
-                               if (msubject && !strncmp(subject, msubject, strlen(subject))) {
-                                       retval = DeleteMessage(obj_folder, msgids, 1);
-                                       if (retval != MAPI_E_SUCCESS) {
-                                               mapitest_print_retval(mt, "DeleteMessage");
-                                               mapi_object_release(&obj_ctable);
-                                               return false;
-                                       }
-                               }
-                       }
-               }
-       }
-       mapi_object_release(&obj_ctable);
-       return false;
-}
-
-
-/**
-   Find a folder within a container
- */
-_PUBLIC_ bool mapitest_common_find_folder(struct mapitest *mt,
-                                         mapi_object_t *obj_parent,
-                                         mapi_object_t *obj_child,
-                                         const char *name)
-{
-       enum MAPISTATUS         retval;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          rowset;
-       mapi_object_t           obj_htable;
-       const char              *newname;
-       const uint64_t          *fid;
-       uint32_t                count;
-       uint32_t                index;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(obj_parent, &obj_htable, 0, &count);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_htable);
-               return false;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2,
-                                         PR_DISPLAY_NAME,
-                                         PR_FID);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_htable);
-               return false;
-       }
-
-       while (((retval = QueryRows(&obj_htable, count, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-               for (index = 0; index < rowset.cRows; index++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[index], PR_FID);
-                       newname = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_DISPLAY_NAME);
-
-                       if (newname && fid && !strcmp(newname, name)) {
-                               retval = OpenFolder(obj_parent, *fid, obj_child);
-                               mapi_object_release(&obj_htable);
-                               return true;
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_htable);
-       return false;
-}
-
-
-/**
- * Create a message ready to submit
- */
-_PUBLIC_ bool mapitest_common_message_create(struct mapitest *mt,
-                                            mapi_object_t *obj_folder, 
-                                            mapi_object_t *obj_message,
-                                            const char *subject)
-{
-       enum MAPISTATUS         retval;
-
-       /* Create the message */
-       retval = CreateMessage(obj_folder, obj_message);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "(Common) CreateMessage");
-               return false;
-       }
-
-       return mapitest_common_message_fill(mt, obj_message, subject);
-}
-
-/**
- * Create a message ready to submit
- */
-_PUBLIC_ bool mapitest_common_message_fill(struct mapitest *mt,
-                                          mapi_object_t *obj_message,
-                                          const char *subject)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct SPropValue               SPropValue;
-       struct SPropValue               lpProps[4];
-       const char                      *username[2];
-       const char                      *body;
-       uint32_t                        msgflag;
-       uint32_t                        format;
-       uint32_t                        ret;
-
-       /* Sanity checks */
-       if (subject == NULL) return false;
-
-       /* Resolve recipients */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xA,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_SEND_RICH_INFO,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-
-       username[0] = (char *)mt->profile->mailbox;
-       username[1] = NULL;
-
-       SRowSet = talloc_zero(mt->mem_ctx, struct SRowSet);
-       flaglist = talloc_zero(mt->mem_ctx, struct PropertyTagArray_r);
-
-       retval = ResolveNames(mapi_object_get_session(obj_message), username, SPropTagArray, 
-                             &SRowSet, &flaglist, MAPI_UNICODE);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "(Common) ResolveNames");
-               talloc_free(SRowSet);
-               talloc_free(SPropTagArray);
-               talloc_free(flaglist);
-               return false;
-       }
-
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       ret = SRowSet_propcpy(mt->mem_ctx, SRowSet, SPropValue);
-       if (ret) return false;
-
-       /* Set Recipients */
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_TO);
-       retval = ModifyRecipients(obj_message, SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "(Common) ModifyRecipients");
-               return false;
-       }
-
-       /* Set message properties */
-       msgflag = MSGFLAG_SUBMIT;
-       set_SPropValue_proptag(&lpProps[0], PR_SUBJECT, (const void *) subject);
-       set_SPropValue_proptag(&lpProps[1], PR_MESSAGE_FLAGS, (const void *)&msgflag);
-       body = talloc_asprintf(mt->mem_ctx, "Body of message with subject: %s", subject);
-       set_SPropValue_proptag(&lpProps[2], PR_BODY, (const void *)body);
-       format = EDITOR_FORMAT_PLAINTEXT;
-       set_SPropValue_proptag(&lpProps[3], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-
-       retval = SetProps(obj_message, lpProps, 4);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "(Common) SetProps");
-               return false;
-       }
-
-       errno = 0;
-       return true;
-}
-
-
-/**
-   Generate a random blob of readable data
-
-   \param mem_ctx the talloc memory context to create the blob in
-   \param len the length of the blob to create
-
-   \return random blob of readable data, of length len bytes, with a
-           null terminator.
-
-   \note the data is from 0..len, and the null terminator is at position
-         len+1. So the returned array is actually len+1 bytes in total.
-
- */
-_PUBLIC_ char *mapitest_common_genblob(TALLOC_CTX *mem_ctx, size_t len)
-{
-       int             fd;
-       int             ret;
-       unsigned int    i;
-       char            *retstr;
-       const char      *list = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,";
-       int             list_len = strlen(list);
-
-       /* Sanity check */
-       if (!mem_ctx || (len == 0)) {
-               return NULL;
-       }
-
-       fd = open("/dev/urandom", O_RDONLY, 0);
-       if (fd == -1) {
-               return NULL;
-       }
-
-       retstr = talloc_array(mem_ctx, char, len + 1);
-       if ((ret = read(fd, retstr, len)) == -1) {
-               talloc_free(retstr);
-               return NULL;
-       }
-
-       for (i = 0; i < len; i++) {
-               retstr[i] = list[retstr[i] % list_len];
-               if (!retstr[i]) {
-                       retstr[i] = 'X';
-               }
-       }
-       retstr[i] = '\0';
-
-       return retstr;
-}
-
-/**
-       Create a test folder, and fill with 10 sample messages
-
-       This function creates a test folder (name set by the MT_DIRNAME_TEST define),
-       and fills it with 5 messages with the same subject and 5 messages with the
-       same sender.
-
-       \param mt pointer to the mapitest context
-*/
-_PUBLIC_ bool mapitest_common_create_filled_test_folder(struct mapitest *mt)
-{
-       struct mt_common_tf_ctx *context;
-       enum MAPISTATUS         retval;
-       const char              *from = NULL;
-       const char              *subject = NULL;
-       const char              *body = NULL;
-       struct SPropValue       lpProp[3];
-       int                     i;
-       uint32_t                format;
-       bool                    ret;
-
-       context = mt->priv;
-
-       /* Create test folder */
-       mapi_object_init(&(context->obj_test_folder));
-        retval = CreateFolder(&(context->obj_top_folder), FOLDER_GENERIC,
-                             MT_DIRNAME_TEST, NULL,
-                              OPEN_IF_EXISTS, &(context->obj_test_folder));
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "Create the test folder");
-               return false;
-       }
-
-       /* Create 5 test messages in the test folder with the same subject */
-       for (i = 0; i < 5; ++i) {
-               mapi_object_init(&(context->obj_test_msg[i]));
-               ret = mapitest_common_message_create(mt, &(context->obj_test_folder),
-                                                       &(context->obj_test_msg[i]), MT_MAIL_SUBJECT);
-               if (! ret) {
-                       mapitest_print(mt, "* %-35s\n", "Failed to create test message");
-                       return false;
-               }
-
-               from = talloc_asprintf(mt->mem_ctx, "[MT] Dummy%i", i);
-               set_SPropValue_proptag(&lpProp[0], PR_SENDER_NAME, (const void *)from);
-               body = talloc_asprintf(mt->mem_ctx, "Body of message %i", i);
-               set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
-               format = EDITOR_FORMAT_PLAINTEXT;
-               set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-               retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
-               MAPIFreeBuffer((void *)from);
-               MAPIFreeBuffer((void *)body);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print(mt, "* %-35s: 0x%.8x\n", "Set props on message", GetLastError());
-                       return false;
-               }
-               retval = SaveChangesMessage(&(context->obj_test_folder), &(context->obj_test_msg[i]), KeepOpenReadWrite);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print(mt, "* %-35s: 0x%.8x\n", "Save changes to  message", GetLastError());
-                       return false;
-               }
-       }
-
-       /* Create 5 test messages in the test folder with the same sender */
-       for (i = 5; i < 10; ++i) {
-               mapi_object_init(&(context->obj_test_msg[i]));
-               subject = talloc_asprintf(mt->mem_ctx, "[MT] Subject%i", i);
-               ret = mapitest_common_message_create(mt, &(context->obj_test_folder),
-                                                       &(context->obj_test_msg[i]), subject);
-               if (! ret){
-                       mapitest_print(mt, "* %-35s\n", "Failed to create test message");
-                       return false;
-               }
-
-               from = talloc_asprintf(mt->mem_ctx, "[MT] Dummy From");
-               set_SPropValue_proptag(&lpProp[0], PR_SENDER_NAME, (const void *)from);
-               body = talloc_asprintf(mt->mem_ctx, "Body of message %i", i);
-               set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
-               format = EDITOR_FORMAT_PLAINTEXT;
-               set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-               retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
-               MAPIFreeBuffer((void *)from);
-               MAPIFreeBuffer((void *)body);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print(mt, "* %-35s: 0x%.8x\n", "Set props on message", GetLastError());
-                       return false;
-               }
-               retval = SaveChangesMessage(&(context->obj_test_folder), &(context->obj_test_msg[i]), KeepOpenReadWrite);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-       }
-
-       return true;
-}
-
-/**
-   Convenience function to login to the server
-
-   This functions logs into the server, gets the top level store, and
-   gets the hierarchy table for the top level store (which is returned as
-   obj_htable). It also creates a test folder with 10 test messages.
-
-   \param mt pointer to the top-level mapitest structure
-   \param obj_htable the hierarchy table for the top level store
-   \param count the number of rows in the top level hierarchy table
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_common_setup(struct mapitest *mt, mapi_object_t *obj_htable, uint32_t *count)
-{
-       bool                    ret = false;
-       struct mt_common_tf_ctx *context;
-       enum MAPISTATUS         retval;
-
-       context = talloc(mt->mem_ctx, struct mt_common_tf_ctx);
-       mt->priv = context;
-
-       mapi_object_init(&(context->obj_store));
-       retval = OpenMsgStore(mt->session, &(context->obj_store));
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "Failed OpenMsgStore");
-               return false;
-       }
-
-       mapi_object_init(&(context->obj_top_folder));
-       ret = mapitest_common_folder_open(mt, &(context->obj_store), &(context->obj_top_folder), 
-                                         olFolderTopInformationStore);
-       if (ret == false) {
-               return false;
-       }
-
-       /* We do this before getting the hierarchy table, because otherwise the new
-          test folder will be omitted, and the count will be wrong */
-       ret = mapitest_common_create_filled_test_folder(mt);
-       if (ret == false) {
-               return false;
-       }
-
-       mapi_object_init(obj_htable);
-       retval = GetHierarchyTable(&(context->obj_top_folder), obj_htable, 0, count);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "Failed GetHierarchyTable");
-               return false;
-       }
-
-       return true;
-}
-
-/**
-   Convenience function to clean up after logging into the server
-
-   This functions cleans up after a mapitest_common_setup() call
-
-   \param mt pointer to the top-level mapitest structure
-*/
-_PUBLIC_ void mapitest_common_cleanup(struct mapitest *mt)
-{
-       struct mt_common_tf_ctx *context;
-       enum MAPISTATUS         retval;
-       int                     i;
-
-       context = mt->priv;
-
-       for (i = 0; i<10; ++i) {
-               mapi_object_release(&(context->obj_test_msg[i]));
-       }
-
-       retval = EmptyFolder(&(context->obj_test_folder));
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "Empty test folder", GetLastError());
-       }
-
-       retval = DeleteFolder(&(context->obj_top_folder), mapi_object_get_id(&(context->obj_test_folder)),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print(mt, "* %-35s: 0x%.8x\n", "Delete test folder", GetLastError());
-       }
-
-       mapi_object_release(&(context->obj_test_folder));
-       mapi_object_release(&(context->obj_top_folder));
-       mapi_object_release(&(context->obj_store));
-
-       talloc_free(mt->priv);
-}
-
diff --git a/branches/plugfest/utils/mapitest/mapitest_print.c b/branches/plugfest/utils/mapitest/mapitest_print.c
deleted file mode 100644 (file)
index d99af60..0000000
+++ /dev/null
@@ -1,688 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <samba/version.h>
-#include "utils/mapitest/mapitest.h"
-
-#include "config.h"
-#ifdef HAVE_SUBUNIT
-#include <subunit/child.h>
-#endif
-
-#include <time.h>
-
-static int count = 0;
-
-#define        CNT_INDENT()    { count++; }
-#define        CNT_DEINDENT()  { count--; if (count < 0) count = 0; }
-#define        CNT_PRINT(s)    { int i; for (i = 0; i < count; i++) { fprintf(s, "\t"); } }
-
-/**
-       \file
-       Print / display functions for %mapitest output
-*/
-
-/**
-   \details Indent the mapitest_print tabulation counter
- */
-_PUBLIC_ void mapitest_indent(void)
-{
-       CNT_INDENT();
-}
-
-
-/**
-   \details Deindent the mapitest_print tabulation counter
- */
-_PUBLIC_ void mapitest_deindent(void)
-{
-       CNT_DEINDENT();
-}
-
-
-/**
-   \details Print tabulations given the internal counter
-
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_tab(struct mapitest *mt)
-{
-       CNT_PRINT(mt->stream);
-}
-
-
-/**
-   \details Print a string in the stream
-
-   \param mt pointer to the top-level mapitest structure
-   \param format the format string
-   \param ... the format string parameters
- */
-_PUBLIC_ void mapitest_print(struct mapitest *mt, const char *format, ...)
-{
-       va_list         ap;
-       char            *s = NULL;
-       int             ret;
-
-       if (mt->subunit_output) {
-               return;
-       }
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       mapitest_print_tab(mt);
-       fprintf(mt->stream, s, strlen(s));
-       free(s);
-}
-
-/**
-   \details Print newline characters
-
-   \param mt pointer to the top-level mapitest structure
-   \param count number of newline characters to print
- */
-_PUBLIC_ void mapitest_print_newline(struct mapitest *mt, int count)
-{
-       int     i;
-
-       if (mt->subunit_output) {
-               return;
-       }
-
-       for (i = 0; i < count; i++) {
-               fprintf(mt->stream, "\n");
-       }
-}
-
-/**
-   \details Print a line using a delimiter
-
-   \param mt pointer to the top-level mapitest structure
-   \param len the length of the line to print
-   \param delim the line delimiter
- */
-_PUBLIC_ void mapitest_print_line(struct mapitest *mt, int len, char delim)
-{
-       int     i;
-
-       if (mt->subunit_output) {
-               return;
-       }
-
-       for (i = 0; i < len; i++) {
-               fprintf(mt->stream, "%c", delim);
-       }
-       mapitest_print_newline(mt, 1);
-}
-
-
-/**
-   \details Underline a string
-
-   \param mt pointer to the top-level mapitest structure
-   \param str string to underline
-   \param delim the line delimiter
- */
-_PUBLIC_ void mapitest_underline(struct mapitest *mt, const char *str, char delim)
-{
-       if (!str) return;
-
-       /* print str */
-       mapitest_print_tab(mt);
-       fprintf(mt->stream, "%s", str);
-
-       /* underline str using delim */
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, strlen(str), delim);
-}
-
-/**
-   \details Private general routine used to print a title
-
-   Avoid code redundancy over the API
-
-   \param mt pointer to the top-level mapitest structure
-   \param str the title
-   \param delim the underline delimiter
- */
-_PUBLIC_ void mapitest_print_title(struct mapitest *mt, const char *str, char delim)
-{
-       /* we handle this outside mapitest if we're using subunit */
-       if (mt->subunit_output) {
-               return;
-       }
-
-       mapitest_underline(mt, str, delim);
-       mapitest_indent();
-}
-
-
-/**
-   \details Print the module title
-
-   \param mt pointer to the top-level mapitest structure
-   \param str the module title string
- */
-_PUBLIC_ void mapitest_print_module_title_start(struct mapitest *mt, const char *str)
-{
-       char    *title = NULL;
-
-       if (!str) return;
-
-       title = talloc_asprintf(mt->mem_ctx, MODULE_TITLE, str);
-       mapitest_print(mt, "%s", title);
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, MODULE_TITLE_LINELEN, MODULE_TITLE_DELIM);
-       mapitest_indent();
-       talloc_free(title);
-}
-
-/**
-   \details Print the content at the end of the module
-
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_module_title_end(struct mapitest *mt)
-{
-       mapitest_deindent();
-
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, MODULE_TITLE_LINELEN, MODULE_TITLE_DELIM);
-       mapitest_print_newline(mt, MODULE_TITLE_NEWLINE);
-}
-
-
-/**
-   \details print the test title
-   
-   \param mt pointer to the top-level mapitest structure
-   \param str the test title
- */
-_PUBLIC_ void mapitest_print_test_title_start(struct mapitest *mt, const char *str)
-{
-       char            *title = NULL;
-
-       if (!str) return;
-
-#ifdef HAVE_SUBUNIT
-       if (mt->subunit_output) {
-               subunit_test_start(str);
-               return;
-       }
-#endif
-       title = talloc_asprintf(mt->mem_ctx, MODULE_TEST_TITLE, str);
-       mapitest_print(mt, "%s", title);
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, MODULE_TEST_LINELEN, MODULE_TEST_DELIM);
-       mapitest_indent();
-       talloc_free(title);
-}
-
-
-/**
-   \details Write the content at the end of a test
-
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_test_title_end(struct mapitest *mt)
-{
-       mapitest_deindent();
-
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, MODULE_TEST_LINELEN, MODULE_TEST_DELIM);
-}
-
-
-/**
-   \details Starts the header output
-
-   \param mt pointer on the top-level mapitest structure
- */
-static void mapitest_print_headers_start(struct mapitest *mt)
-{
-       mapitest_print(mt, MT_HDR_START);
-}
-
-
-/**
-   \details Ends the header output
- */
-static void mapitest_print_headers_end(struct mapitest *mt)
-{
-       mapitest_print(mt, MT_HDR_END);
-}
-
-/**
-   \details Print mapitest report headers information
-   
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_headers_info(struct mapitest *mt)
-{
-       time_t          t;
-       char            *date;
-
-       time (&t);
-       date = ctime(&t);
-
-       mapitest_print(mt, MT_HDR_FMT_DATE, "Date", date);
-       mapitest_print(mt, MT_HDR_FMT, "Confidential mode", 
-                      (mt->confidential == true) ? MT_YES : MT_NO);
-       mapitest_print(mt, MT_HDR_FMT, "Samba Information", SAMBA_VERSION_STRING);
-       mapitest_print(mt, MT_HDR_FMT, "OpenChange Information", OPENCHANGE_VERSION_STRING);
-
-       mapitest_print_newline(mt, 1);
-       mapitest_print(mt, MT_HDR_FMT_SECTION, "System Information");
-       mapitest_indent();
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Kernel name", OPENCHANGE_SYS_KERNEL_NAME);
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Kernel release", OPENCHANGE_SYS_KERNEL_RELEASE);
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Processor", OPENCHANGE_SYS_PROCESSOR);
-       mapitest_deindent();
-}
-
-/**
-  \details Print out a normalized version number for a client or server.
-  
-  \param mt pointer to the top level mapitest structure
-  \param label label for the version (e.g. "Store Version" or "Client Version")
-  \param word0 highest order word for the version
-  \param word1 middle word for the version
-  \param word2 low word for the version
-*/
-static void mapitest_print_version_normalised(struct mapitest *mt, const char* label,
-                                             const uint16_t word0, const uint16_t word1, const uint16_t word2)
-{
-       /* See MS-OXRPC Section 3.1.9 to understand this */
-       uint16_t normalisedword0;
-       uint16_t normalisedword1;
-       uint16_t normalisedword2;
-       uint16_t normalisedword3;
-
-       if (word1 & 0x8000) {
-               /* new format */
-               normalisedword0 = (word0 & 0xFF00) >> 8;
-               normalisedword1 = (word0 & 0x00FF);
-               normalisedword2 = (word1 & 0x7FFF);
-               normalisedword3 = word2;
-       } else {
-               normalisedword0 = word0;
-               normalisedword1 = 0;
-               normalisedword2 = word1;
-               normalisedword3 = word2;
-       }
-       mapitest_print(mt, MT_HDR_FMT_VER_NORM, label, normalisedword0,
-                      normalisedword1, normalisedword2, normalisedword3);
-}
-
-/**
-   \details Print a report of the Exchange server and account information
-
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_headers_server_info(struct mapitest *mt)
-{
-       if (mt->online == false) {
-               return;
-       }
-
-       mapitest_print_newline(mt, 1);
-       mapitest_print(mt, MT_HDR_FMT_SECTION, "Exchange Server");
-       mapitest_indent();
-       mapitest_print_version_normalised(mt, "Store Version",
-                                         mt->info.rgwServerVersion[0],
-                                         mt->info.rgwServerVersion[1],
-                                         mt->info.rgwServerVersion[2]);
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Username",
-                      (mt->confidential == true) ? MT_CONFIDENTIAL : mt->info.szDisplayName);
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Organization",
-                      (mt->confidential == true) ? MT_CONFIDENTIAL : mt->org);
-       mapitest_print(mt, MT_HDR_FMT_SUBSECTION, "Organization Unit",
-                      (mt->confidential == true) ? MT_CONFIDENTIAL : mt->org_unit);
-       mapitest_deindent();
-}
-
-
-/**
-   \details Print mapitest report headers
-
-   \param mt pointer to the top-level mapitest structure
- */
-_PUBLIC_ void mapitest_print_headers(struct mapitest *mt)
-{
-       if (mt->subunit_output) {
-               return;
-       }
-
-       mapitest_print_headers_start(mt);
-       mapitest_indent();
-       mapitest_print_headers_info(mt);
-       if (mt->no_server == false) {
-               mapitest_print_headers_server_info(mt);
-       }
-       mapitest_deindent();
-       mapitest_print_headers_end(mt);
-       mapitest_print_newline(mt, 2);
-}
-
-
-/**
-   \details Print %mapitest test result
-
-   \param mt pointer to the top-level mapitest structure
-   \param name the test name
-   \param ret boolean value with the test result
- */
-_PUBLIC_ void mapitest_print_test_result(struct mapitest *mt, char *name, bool ret)
-{
-#ifdef HAVE_SUBUNIT
-       if (mt->subunit_output) {
-               if (ret == true) {
-                       subunit_test_pass(name);
-               } else {
-                       subunit_test_fail(name, "failed");
-               }
-       } else
-#endif
-       {
-       mapitest_print(mt, MODULE_TEST_RESULT, name, (ret == true) ? 
-                      MODULE_TEST_SUCCESS : MODULE_TEST_FAILURE);
-       mapitest_print_tab(mt);
-       mapitest_print_line(mt, MODULE_TEST_LINELEN, MODULE_TEST_DELIM2);
-       mapitest_print_newline(mt, MODULE_TEST_NEWLINE);
-       }
-}
-
-
-/**
-   \details Print %mapitest return value
-
-   \param mt pointer to the top-level mapitest structure
-   \param name the test name
-
-   \sa mapitest_print_retval_fmt for a version providing an additional format string
-   \sa mapitest_print_retval_clean for a version that doesn't rely on GetLastError()
- */
-_PUBLIC_ void mapitest_print_retval(struct mapitest *mt, char *name)
-{
-       const char      *retstr = NULL;
-
-       if (mt->subunit_output) {
-               return;
-       }
-
-       retstr = mapi_get_errstr(GetLastError());
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s %s \n", name, (GetLastError() ? MT_RED : MT_GREEN), retstr, MT_WHITE);
-               } else {
-                       mapitest_print(mt, "* %-35s: %s Unknown Error (0x%.8x) %s\n", name, MT_RED, GetLastError(), MT_WHITE);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s\n", name, retstr);
-               } else {
-                       mapitest_print(mt, "* %-35s: Unknown Error (0x%.8x)\n", name, GetLastError());
-               }
-       }
-}
-
-/**
-   \details Print %mapitest return value
-   
-   This version takes an explicit return status value
-
-   \param mt pointer to the top-level mapitest structure
-   \param name the test name
-   \param retval the return value to output
-
-   \sa mapitest_print_retval_fmt_clean for a version providing an additional format string
- */
-_PUBLIC_ void mapitest_print_retval_clean(struct mapitest *mt, char *name, enum MAPISTATUS retval)
-{
-       const char      *retstr = NULL;
-
-       if (mt->subunit_output) {
-               return;
-       }
-
-       retstr = mapi_get_errstr(retval);
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s %s \n", name, (retval ? MT_RED : MT_GREEN), retstr, MT_WHITE);
-               } else {
-                       mapitest_print(mt, "* %-35s: %s Unknown Error (0x%.8x) %s\n", name, MT_RED, retval, MT_WHITE);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s\n", name, retstr);
-               } else {
-                       mapitest_print(mt, "* %-35s: Unknown Error (0x%.8x)\n", name, retval);
-               }
-       }
-}
-
-/**
-   \details Print %mapitest return value with additional format string
-
-   \param mt pointer to the top-level mapitest structure
-   \param name the test name
-   \param format the format string
-   \param ... the format string parameters
- */
-_PUBLIC_ void mapitest_print_retval_fmt(struct mapitest *mt, char *name, const char *format, ...)
-{
-       const char      *retstr = NULL;
-       va_list         ap;
-       char            *s = NULL;
-       int             ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       retstr = mapi_get_errstr(GetLastError());
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s %s %s\n", name, (GetLastError() ? MT_RED: MT_GREEN), retstr, MT_WHITE, s);
-               } else {
-                       mapitest_print(mt, "* %-35s: %s Unknown Error (0x%.8x) %s %s\n", name, MT_RED, GetLastError(), MT_WHITE, s);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s\n", name, retstr, s);
-               } else {
-                       mapitest_print(mt, "* %-35s: Unknown Error (0x%.8x) %s\n", name, GetLastError(), s);
-               }
-       }
-       free(s);
-}
-
-/**
-   \details Print %mapitest return value with additional format string
-
-   \param mt pointer to the top-level mapitest structure
-   \param name the test name
-   \param retval the return value to output
-   \param format the format string
-   \param ... the format string parameters
- */
-_PUBLIC_ void mapitest_print_retval_fmt_clean(struct mapitest *mt, char *name, enum MAPISTATUS retval, const char *format, ...)
-{
-       const char      *retstr = NULL;
-       va_list         ap;
-       char            *s = NULL;
-       int             ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       retstr = mapi_get_errstr(retval);
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s %s %s\n", name, (retval ? MT_RED: MT_GREEN), retstr, MT_WHITE, s);
-               } else {
-                       mapitest_print(mt, "* %-35s: %s Unknown Error (0x%.8x) %s %s\n", name, MT_RED, retval, MT_WHITE, s);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* %-35s: %s %s\n", name, retstr, s);
-               } else {
-                       mapitest_print(mt, "* %-35s: Unknown Error (0x%.8x) %s\n", name, retval, s);
-               }
-       }
-       free(s);
-}
-
-/**
-   \details Print %mapitest return value for a given step
-
-   \param mt pointer to the top-level mapitest structure
-   \param step the test step
-   \param name the test name
-   \param retval the return value
-
-   \sa mapitest_print_retval_step_fmt for a version providing an additional format string
- */
-_PUBLIC_ void mapitest_print_retval_step(struct mapitest *mt, char *step, char *name, enum MAPISTATUS retval)
-{
-       const char      *retstr = NULL;
-
-       retstr = mapi_get_errstr(retval);
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s %s %s\n", step, name, (retval ? MT_RED : MT_GREEN), retstr, MT_WHITE);
-               } else {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s Unknown Error (0x%.8x) %s\n", step, name, MT_RED, retval, MT_WHITE);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s\n", step, name, retstr);
-               } else {
-                       mapitest_print(mt, "* Step %-5s %-35s: Unknown Error (0x%.8x)\n", step, name, retval);
-               }
-       }
-}
-
-
-/**
-   \details Print %mapitest return value for a given step with additional format string
-
-   \param mt pointer to the top-level mapitest structure
-   \param step the test step
-   \param name the test name
-   \param format the format string
-   \param ... the format string parameters
- */
-_PUBLIC_ void mapitest_print_retval_step_fmt(struct mapitest *mt, char *step, char *name, const char *format, ...)
-{
-       const char      *retstr = NULL;
-       va_list         ap;
-       char            *s = NULL;
-       int             ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       retstr = mapi_get_errstr(GetLastError());
-
-       if (mt->color == true) {
-               if (retstr) {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s %s %s %s\n", step, name, (GetLastError() ? MT_RED : MT_GREEN), retstr, MT_WHITE, s);
-               } else {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s Unknown Error (0x%.8x) %s %s\n", step, name, MT_RED, GetLastError(), MT_WHITE, s);
-               }
-       } else {
-               if (retstr) {
-                       mapitest_print(mt, "* Step %-5s %-35s: %s %s\n", step, name, retstr, s);
-               } else {
-                       mapitest_print(mt, "* Step %-5s %-35s: Unknown Error (0x%.8x) %s\n", step, name, GetLastError(), s);
-               }
-       }
-       free(s);
-}
-
-/**
-  Output a set of rows from a table
-  
-  \param mt pointer to the top-level mapitest structure
-  \param rowset the rows to output
-  \param sep a separator / spacer to insert in front of the label
-  
-  \note this is a simple wrapper for mapidump_SRowSet(), only for use in mapitest.
-*/
-_PUBLIC_ void mapitest_print_SRowSet(struct mapitest *mt, struct SRowSet *rowset, const char *sep)
-{
-       if (mt->subunit_output) {
-               return;
-       }
-
-       mapidump_SRowSet(rowset, sep);
-}
-
-/**
-  Output a row of the public address book
-
-  \param mt pointer to the top-level mapitest structure
-  \param lpProp the property to print
-  \param sep a separator / spacer to insert in front of the label
-  
-  \note this is a simple wrapper for mapidump_SPropValue(), only for use in mapitest.
-*/
-_PUBLIC_ void mapitest_print_SPropValue(struct mapitest *mt, struct SPropValue lpProp, const char *sep)
-{
-       if (mt->subunit_output) {
-               return;
-       }
-
-       mapidump_SPropValue(lpProp, sep);
-}
-
-/**
-  Output a row of the public address book
-
-  \param mt pointer to the top-level mapitest structure
-  \param aRow one row of the public address book (Global Address List)
-  
-  This function is usually used with GetGALTable, which can obtain several
-  rows at once - you'll need to iterate over the rows.
-  
-  The SRow is assumed to contain entries for PR_ADDRTYPE_UNICODE, PR_DISPLAY_NAME_UNICODE,
-  PR_EMAIL_ADDRESS_UNICODE and PR_ACCOUNT_UNICODE.
-  
-  \note this is a simple wrapper for mapidump_PAB_entry(), only for use in mapitest.
-*/
-_PUBLIC_ void mapitest_print_PAB_entry(struct mapitest *mt, struct SRow *aRow)
-{
-       if (mt->subunit_output) {
-               return;
-       }
-
-       mapidump_PAB_entry(aRow);
-}
diff --git a/branches/plugfest/utils/mapitest/mapitest_stat.c b/branches/plugfest/utils/mapitest/mapitest_stat.c
deleted file mode 100644 (file)
index ac2edd8..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-
-#include <assert.h>
-
-/**
-       \file
-       mapitest statistics functions
-
-       mapitest records and prints the results of each test
-       using these functions
-*/
-
-/**
-  Descriptions of TestApplicabilityFlags
-*/
-struct TestApplicabilityDescription {
-       enum TestApplicabilityFlags     flags;          /*!< The flag value */
-       char*                           description;    /*!< A user-visible string equivalent */
-} applicabilityFlagsDescription[] = {
-       { ApplicableToAllVersions,      "Applicable to all server versions" },
-       { NotInExchange2010,            "Not applicable to Exchange 2010" },
-       { NotInExchange2010SP0,         "Not applicable to Exchange 2010 SP0" },
-       { LastTestApplicabilityFlag,    "Sentinel Value" }
-};
-
-/**
-   \details Initialize the mapitest statistic structure
-   
-   \param mem_ctx memory allocation context
-
-   \return Allocated stat structure on success, otherwise NULL
- */
-_PUBLIC_ struct mapitest_stat *mapitest_stat_init(TALLOC_CTX *mem_ctx)
-{
-       struct mapitest_stat    *stat = NULL;
-
-       /* Sanity check */
-       if (!mem_ctx) return NULL;
-
-       stat = talloc_zero(mem_ctx, struct mapitest_stat);
-       stat->success = 0;
-       stat->failure = 0;
-       stat->skipped = 0;
-       stat->x_fail = 0;
-       stat->failure_info = NULL;
-       stat->skip_info = NULL;
-       stat->enabled = false;
-
-       return stat;
-}
-
-
-/**
-   \details Add test result to the suite statistic parameter
-
-   \param suite the suite container
-   \param name the test name
-   \param testresult the test result
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t mapitest_stat_add_result(struct mapitest_suite *suite,
-                                          const char *name,
-                                          enum TestResult testresult)
-{
-       struct mapitest_unit    *el = NULL;
-
-       /* Sanity check */
-       if (!suite || !suite->stat || !name) return MAPITEST_ERROR;
-
-       if (testresult == Pass) {
-               suite->stat->success++;
-       } else {
-               el = talloc_zero((TALLOC_CTX *) suite->stat, struct mapitest_unit);
-               el->name = talloc_strdup((TALLOC_CTX *)el, (char *)name);
-
-               if (testresult == Fail) {
-                       suite->stat->failure++;
-                       el->reason = talloc_strdup((TALLOC_CTX *) el, "Unexpected Fail");
-               } else if (testresult == ExpectedFailure) {
-                       suite->stat->x_fail++;
-                       el->reason = talloc_strdup((TALLOC_CTX *) el, "Expected Fail");
-               } else if (testresult == UnexpectedPass) {
-                       suite->stat->failure++;
-                       el->reason = talloc_strdup((TALLOC_CTX *) el, "Unexpected Pass");
-               } else {
-                       assert(0); /* this indicates that we're passing a bad enum into this function */
-               }
-               DLIST_ADD_END(suite->stat->failure_info, el, struct mapitest_unit *);
-       }
-
-       suite->stat->enabled = true;
-
-       return MAPITEST_SUCCESS;
-}
-
-static void mapitest_stat_add_skipped_test_reason(struct mapitest_unit *stat_unit, enum TestApplicabilityFlags flags)
-{
-       int i;
-       for (i = 0; applicabilityFlagsDescription[i].flags != LastTestApplicabilityFlag; ++i) {
-               if (flags & applicabilityFlagsDescription[i].flags) {
-                       if (!stat_unit->reason) {
-                               stat_unit->reason = talloc_strdup((TALLOC_CTX *)stat_unit, applicabilityFlagsDescription[i].description);
-                       } else {
-                               stat_unit->reason = talloc_asprintf_append(stat_unit->reason, ", %s", applicabilityFlagsDescription[i].description);
-                       }
-               }
-       }
-       if (!stat_unit->reason) {
-               stat_unit->reason = talloc_strdup((TALLOC_CTX *)stat_unit, "Unknown reason");
-       }
-}
-
-/**
-   \details Add a skipped test to the suite statistic parameters
-
-   \param suite the suite container
-   \param name the test name
-   \param flags flags to indicate the reason why the test was skipped
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t mapitest_stat_add_skipped_test(struct mapitest_suite *suite,
-                                                const char *name,
-                                                enum TestApplicabilityFlags flags)
-{
-       struct mapitest_unit    *el = NULL;
-
-       /* Sanity check */
-       if (!suite || !suite->stat || !name) return MAPITEST_ERROR;
-
-       suite->stat->skipped++;
-       el = talloc_zero((TALLOC_CTX *) suite->stat, struct mapitest_unit);
-       el->name = talloc_strdup((TALLOC_CTX *)el, (char *)name);
-       mapitest_stat_add_skipped_test_reason(el, flags);
-       DLIST_ADD_END(suite->stat->skip_info, el, struct mapitest_unit *);
-
-       suite->stat->enabled = true;
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details Dump mapitest statistics about test failures
-
-   \param mt the global mapitest structure
-
-   \return the number of test steps that failed (i.e. 0 for all success)
- */
-_PUBLIC_ int32_t mapitest_stat_dump(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite;
-       struct mapitest_unit    *el;
-       int32_t                 num_passed_tests = 0;
-       int32_t                 num_failed_tests = 0;
-       int32_t                 num_skipped_tests = 0;
-       int32_t                 num_xfail_tests = 0;
-
-       mapitest_print_title(mt, MT_STAT_SKIPPED_TITLE, MODULE_TITLE_DELIM);
-       for (suite = mt->mapi_suite; suite; suite = suite->next) {
-               if (suite->stat->enabled == true) {
-                       num_skipped_tests += suite->stat->skipped;
-                       if (suite->stat->skipped) {
-                               for (el = suite->stat->skip_info; el; el = el->next) {
-                                       mapitest_print(mt, MT_STAT_RESULT, suite->name, el->name, el->reason);
-                               }
-                       }
-               }
-       }
-
-       mapitest_print_test_title_end(mt);
-
-       mapitest_print_title(mt, MT_STAT_FAILED_TITLE, MODULE_TITLE_DELIM);
-
-       for (suite = mt->mapi_suite; suite; suite = suite->next) {
-               if (suite->stat->enabled == true) {
-                       num_passed_tests += suite->stat->success;
-                       num_failed_tests += suite->stat->failure;
-                       num_xfail_tests += suite->stat->x_fail;
-                       if (suite->stat->failure || suite->stat->x_fail) {
-                               for (el = suite->stat->failure_info; el; el = el->next) {
-                                       mapitest_print(mt, MT_STAT_RESULT, suite->name, el->name, el->reason);
-                               }
-                       }
-               }
-       }
-
-       mapitest_print_test_title_end(mt);
-
-       mapitest_print_title(mt, MT_SUMMARY_TITLE, MODULE_TITLE_DELIM);
-       mapitest_print(mt, "Number of passing tests: %i\n", num_passed_tests);
-       mapitest_print(mt, "Number of failing tests: %i\n", num_failed_tests);
-       mapitest_print(mt, "Number of skipped tests: %i\n", num_skipped_tests);
-       mapitest_print(mt, "Number of expected fails: %i\n", num_xfail_tests);
-       mapitest_print_test_title_end(mt);
-
-       return num_failed_tests;
-}
diff --git a/branches/plugfest/utils/mapitest/mapitest_suite.c b/branches/plugfest/utils/mapitest/mapitest_suite.c
deleted file mode 100644 (file)
index da00f38..0000000
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-
-/**
-       \file
-
-       mapitest test suite functions
-*/
-
-/**
-   \details Initialize a mapitest suite
-   
-   \param mt the top-level mapitest structure
-   \param name the suite name
-   \param description the suite description
-   \param online whether this suite requires online (server) access
-
-   \return An allocated mapitest_suite pointer, otherwise NULL.
- */
-_PUBLIC_ struct mapitest_suite *mapitest_suite_init(struct mapitest *mt, 
-                                                   const char *name,
-                                                   const char *description,
-                                                   bool online)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       /* Sanity check */
-       if (!mt || !mt->mem_ctx) return NULL;
-       if (!name) return NULL;
-
-       suite = talloc_zero(mt->mem_ctx, struct mapitest_suite);
-       suite->tests = NULL;
-       suite->stat = mapitest_stat_init((TALLOC_CTX *)suite);
-
-       suite->name = talloc_strdup((TALLOC_CTX *) suite, name);
-       if (!description) {
-               suite->description = NULL;
-       } else {
-               suite->description = talloc_strdup((TALLOC_CTX *)suite, description);
-       }
-
-       suite->online = online;
-
-       return suite;
-}
-
-
-/**
-   \details Register a mapitest suite
-
-   \param mt the top-level mapitest structure
-   \param suite the mapitest suite we want to add
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
-
-   \sa mapitest_suite_init
- */
-_PUBLIC_ uint32_t mapitest_suite_register(struct mapitest *mt, 
-                                         struct mapitest_suite *suite)
-{
-       struct mapitest_suite *el = NULL;
-
-       /* Sanity check */
-       if (!mt || !mt->mem_ctx) return MAPITEST_ERROR;
-       if (!suite) return MAPITEST_ERROR;
-
-       /* Ensure the name is not yet registered */
-       for (el = mt->mapi_suite; el; el = el->next) {
-               if (el->name && !strcmp(el->name, suite->name)) {
-                       fprintf(stderr, "Suite already registered\n");
-                       return MAPITEST_ERROR;
-               }
-       }
-
-       DLIST_ADD_END(mt->mapi_suite, suite, struct mapitest_suite *);
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details add a test to the mapitest suite with description
-
-   \param suite pointer on the parent suite
-   \param name the test name
-   \param description the test description
-   \param run the test function
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
-   
-   \sa mapitest_suite_init, mapitest_suite_register
-   \sa mapitest_suite_add_test_flagged for an alternative function allowing the
-   test to only be run under some conditions.
-*/
-_PUBLIC_ uint32_t mapitest_suite_add_test(struct mapitest_suite *suite,
-                                         const char *name, const char *description,
-                                         bool (*run) (struct mapitest *test))
-{
-       return mapitest_suite_add_test_flagged(suite, name, description, run, ApplicableToAllVersions);
-}
-
-/**
-   \details add a test to the mapitest suite with description and flags
-
-   This is very similar to mapitest_suite_add_test(), except it allows a test to have
-   special applicability (e.g. to only run when a particular server configuration is available).
-   
-   \param suite pointer to the parent test suite
-   \param name the test name
-   \param description the test description
-   \param run the test function
-   \param applicability a set of applicability flags
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
-   
-   \sa mapitest_suite_init, mapitest_suite_register, mapitest_suite_add_test
-*/
-_PUBLIC_ uint32_t mapitest_suite_add_test_flagged(struct mapitest_suite *suite,
-                                                 const char *name, const char *description,
-                                                 bool (*run) (struct mapitest *test),
-                                                 enum TestApplicabilityFlags applicability)
-{
-       struct mapitest_test    *el = NULL;
-
-       /* Sanity check */
-       if (!suite || !name || !run || !description) return MAPITEST_ERROR;
-
-       /* Ensure the test is not yet registered */
-       for (el = suite->tests; el; el = el->next) {
-               if (el->name && !strcmp(el->name, name)) {
-                       return MAPITEST_ERROR;
-               }
-       }
-
-       el = talloc_zero((TALLOC_CTX *) suite, struct mapitest_test);
-       el->name = talloc_asprintf((TALLOC_CTX *)suite, "%s-%s", suite->name, name);
-       el->description = talloc_strdup((TALLOC_CTX *)suite, description);
-       el->fn = run;
-       el->flags = applicability;
-
-       DLIST_ADD_END(suite->tests, el, struct mapitest_test *);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Find a suite given its name
-
-   \param mt top-level mapitest structure
-   \param name the suite name to be searched
-
-   \return Pointer on a suite on success, otherwise NULL
- */
-_PUBLIC_ struct mapitest_suite *mapitest_suite_find(struct mapitest *mt, 
-                                                   const char *name)
-{
-       struct mapitest_suite   *suite = NULL;
-       
-       if (!name) return NULL;
-
-       for (suite = mt->mapi_suite; suite; suite = suite->next) {
-               if (!strcmp(name, suite->name)) {
-                       return suite;
-               }
-       }
-
-       return NULL;
-}
-
-/**
-   \details test whether a particular test is applicable
-
-   \param mt pointer to the top-level mapitest structure
-   \param el the test to check
-   
-   \return true if the test should be run, otherwise false
-*/
-static bool mapitest_suite_test_is_applicable(struct mapitest *mt, struct mapitest_test *test)
-{
-       uint16_t actualServerVer = mt->info.rgwServerVersion[0];
-
-       if ((test->flags & NotInExchange2010) && (actualServerVer >= Exchange2010SP0Version)) {
-               return false;
-       }
-       if ((test->flags & NotInExchange2010SP0) && (actualServerVer == Exchange2010SP0Version)) {
-               return false;
-       }
-       return true;
-}
-
-static bool run_test(struct mapitest *mt, struct mapitest_suite *suite, struct mapitest_test *el)
-{
-       bool                    (*fn)(struct mapitest *);
-       bool                    ret = false;
-
-       if (!mapitest_suite_test_is_applicable(mt, el)) {
-               mapitest_stat_add_skipped_test(suite, el->name, el->flags);
-       } else {
-               errno = 0;
-               mapitest_print_test_title_start(mt, el->name);
-               
-               fn = el->fn;
-               ret = fn(mt);
-
-               if (el->flags & ExpectedFail) {
-                       if (ret) {
-                               mapitest_stat_add_result(suite, el->name, UnexpectedPass);
-                       } else {
-                               mapitest_stat_add_result(suite, el->name, ExpectedFailure);
-                       }
-               } else {
-                       if (ret) {
-                               mapitest_stat_add_result(suite, el->name, Pass);
-                       } else {
-                               mapitest_stat_add_result(suite, el->name, Fail);
-                       }
-               }
-               mapitest_print_test_title_end(mt);
-               mapitest_print_test_result(mt, el->name, ret);
-       }
-       return ret;
-}
-
-/**
-   \details run a test from a suite given its name
-   
-   \param mt pointer on the top-level mapitest structure
-   \param suite pointer on the mapitest suite
-   \param name the name of the test to be run
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_suite_run_test(struct mapitest *mt,
-                                     struct mapitest_suite *suite, 
-                                     const char *name)
-{
-       struct mapitest_test    *el;
-       bool                    ret;
-
-       if (!suite || !name) return false;
-
-       for (el = suite->tests; el; el = el->next) {
-               if (!strcmp(el->name, name)) {
-                       ret = run_test(mt, suite, el);
-                       return ret;
-               }
-       }
-
-       fprintf(stderr, "[ERROR] %s test doesn't exist\n", name);
-       return false;
-}
-
-
-/**
-   \details run the special SUITE-ALL test
-
-   \param mt the top-level mapitest structure
-   \param name the mapitest test name
-
-   \return true on success, otherwise -1
- */
-static bool mapitest_run_test_all(struct mapitest *mt, const char *name)
-{
-       char                    *test_name;
-       char                    *sname;
-       char                    *tmp;
-       struct mapitest_test    *el;
-       struct mapitest_suite   *suite;
-       bool                    ret = false;
-
-       test_name = talloc_strdup(mt->mem_ctx, name);
-       if ((tmp = strtok(test_name, "-")) == NULL) {
-               talloc_free(test_name);
-       }
-
-       sname = talloc_strdup(mt->mem_ctx, tmp);
-       if ((tmp = strtok(NULL, "-")) == NULL) {
-               talloc_free(test_name);
-               talloc_free(sname);
-               return false;
-       }
-
-       if (!strcmp(tmp,"ALL")) {
-               suite = mapitest_suite_find(mt, sname);
-
-               if ((suite && (suite->online == mt->online)) || (suite && (suite->online == false))) {
-                       for (el = suite->tests; el; el = el->next) {
-                               if (mapitest_suite_test_is_applicable(mt, el)) {
-                                       mapitest_suite_run_test(mt, suite, el->name);
-                                       ret = true;
-                               } else {
-                                       printf("test is not applicable: %s\n", el->name);
-                                       return true;
-                               }
-                       }
-               }
-       }
-       talloc_free(sname);
-       talloc_free(test_name);
-       return ret;
-}
-
-
-/**
-   \details run a specific test from a particular suite
-
-   \param mt the top-level mapitest structure
-   \param name the mapitest test name
-
-   \return true on success, otherwise -1
- */
-_PUBLIC_ bool mapitest_run_test(struct mapitest *mt, const char *name)
-{
-       struct mapitest_suite   *suite;
-       struct mapitest_test    *el;
-       bool                    ret;
-
-       /* sanity check */
-       if (!mt || !name) return false;
-
-       /* try to find the test */
-       for (suite = mt->mapi_suite; suite; suite = suite->next) {
-               for (el = suite->tests; el; el = el->next) {
-                       if (!strcmp(name, el->name)) {
-                               if (((mt->online == suite->online) && mt->session) || (suite->online == false)) {
-                                       errno = 0;
-                                       ret = mapitest_suite_run_test(mt, suite, name);
-                                       return ret;
-                               } else {
-                                       fprintf(stderr, "Server is offline, skipping test: \"%s\"\n", name);
-                                       return true;
-                               }
-                       }
-               }
-       }
-       
-       /* if no name matches, look it it matches ALL */
-       ret = mapitest_run_test_all(mt, name);
-
-       if (ret != true) {
-               fprintf(stderr, "[ERROR] Unknown test: \"%s\"\n", name);
-       }
-
-       return ret;
-}
-
-static void run_tests_in_suite(struct mapitest *mt, struct mapitest_suite *suite)
-{
-       struct mapitest_test    *el;
-
-       for (el = suite->tests; el; el = el->next) {
-               run_test(mt, suite, el);
-       }
-}
-
-/**
-   \details all tests from all suites
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise -1
- */
-_PUBLIC_ void mapitest_run_all(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite;
-
-       for (suite = mt->mapi_suite; suite; suite = suite->next) {
-               if (((mt->online == suite->online) && mt->session) || (suite->online == false)) {
-                       mapitest_print_module_title_start(mt, suite->name);
-
-                       run_tests_in_suite(mt, suite);
-
-                       mapitest_print_module_title_end(mt);
-               }
-       }
-}
diff --git a/branches/plugfest/utils/mapitest/module.c b/branches/plugfest/utils/mapitest/module.c
deleted file mode 100644 (file)
index 18a71d0..0000000
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-_PUBLIC_ uint32_t mapitest_register_modules(struct mapitest *mt)
-{
-       uint32_t        ret;
-
-       ret = module_oxcstor_init(mt);
-       ret += module_oxcfold_init(mt);
-       ret += module_oxctable_init(mt);
-       ret += module_oxomsg_init(mt);
-       ret += module_oxcmsg_init(mt);
-       ret += module_oxcprpt_init(mt);
-       ret += module_oxorule_init(mt);
-       ret += module_oxcnotif_init(mt);
-       ret += module_oxcfxics_init(mt);
-       ret += module_oxcperm_init(mt);
-       ret += module_nspi_init(mt);
-       ret += module_noserver_init(mt);
-       ret += module_errorchecks_init(mt);
-       ret += module_lcid_init(mt);
-       ret += module_mapidump_init(mt);
-       ret += module_lzxpress_init(mt);
-
-       return ret;
-}
-
-
-/**
-   \details Register the Store Object Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcstor_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCSTOR", "Store Object Protocol", true);
-
-       mapitest_suite_add_test(suite, "LOGON", "Logon operation", mapitest_oxcstor_Logon);
-       mapitest_suite_add_test(suite, "GET-RECEIVE-FOLDER", "Retrieve the receive folder ID", mapitest_oxcstor_GetReceiveFolder);
-       mapitest_suite_add_test(suite, "SET-RECEIVE-FOLDER", "Set the receive folder", mapitest_oxcstor_SetReceiveFolder);
-       mapitest_suite_add_test(suite, "GET-RECEIVE-FOLDER-TABLE", "Retrieve the Receive Folder Table", mapitest_oxcstor_GetReceiveFolderTable);
-       mapitest_suite_add_test(suite, "PUBLICFOLDER-ISGHOSTED", "Determine if a public folder is ghosted", mapitest_oxcstor_PublicFolderIsGhosted);
-       mapitest_suite_add_test(suite, "GETOWNINGSERVERS", "Get the list of servers that host replicas of a given public folder", mapitest_oxcstor_GetOwningServers);
-       mapitest_suite_add_test(suite, "LONGTERMID", "Map to / from a Long Term ID", mapitest_oxcstor_LongTermId);
-       mapitest_suite_add_test_flagged(suite, "GETSTORESTATE", "Retrieve the store state", mapitest_oxcstor_GetStoreState, NotInExchange2010);
-       mapitest_suite_add_test(suite, "ISMAILBOXFOLDER", "Get the standard folder for a given folder ID", mapitest_oxcstor_IsMailboxFolder);
-
-       mapitest_suite_register(mt, suite);
-       
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Folder Object Protocol test suite
-
-   \param mt the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcfold_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCFOLD", "Folder Object Protocol", true);
-
-       mapitest_suite_add_test(suite, "OPEN",   "Open a folder", mapitest_oxcfold_OpenFolder);
-       mapitest_suite_add_test(suite, "CREATE-DELETE", "Do a basic create / delete cycle on a folder", mapitest_oxcfold_CreateDeleteFolder);
-       mapitest_suite_add_test(suite, "CREATE", "Create a folder", mapitest_oxcfold_CreateFolder);
-       mapitest_suite_add_test(suite, "CREATE-VARIANTS", "More folder creation variations", mapitest_oxcfold_CreateFolderVariants);
-       mapitest_suite_add_test(suite, "GET-HIERARCHY-TABLE", "Retrieve the hierarchy table", mapitest_oxcfold_GetHierarchyTable);
-       mapitest_suite_add_test(suite, "GET-CONTENTS-TABLE", "Retrieve the contents table", mapitest_oxcfold_GetContentsTable);
-       mapitest_suite_add_test(suite, "SET-SEARCHCRITERIA", "Set a search criteria on a container", mapitest_oxcfold_SetSearchCriteria);
-       mapitest_suite_add_test(suite, "GET-SEARCHCRITERIA", "Retrieve a search criteria associated to a container", mapitest_oxcfold_GetSearchCriteria);
-       mapitest_suite_add_test(suite, "MOVECOPY-MESSAGES", "Move or copy messages from a source to destination folder", mapitest_oxcfold_MoveCopyMessages);
-       mapitest_suite_add_test(suite, "MOVEFOLDER", "Move folder from source to destination", mapitest_oxcfold_MoveFolder);
-       mapitest_suite_add_test(suite, "COPYFOLDER", "Copy folder from source to destination", mapitest_oxcfold_CopyFolder);
-       mapitest_suite_add_test(suite, "HARDDELETEMESSAGES", "Hard delete messages", mapitest_oxcfold_HardDeleteMessages);
-       mapitest_suite_add_test(suite, "HARDDELETEMESSAGESANDSUBFOLDERS", "Hard delete messages and subfolders", mapitest_oxcfold_HardDeleteMessagesAndSubfolders);
-       mapitest_suite_add_test(suite, "DELETEMESSAGES", "Soft delete messages", mapitest_oxcfold_DeleteMessages);
-
-       mapitest_suite_register(mt, suite);
-       
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the E-mail Object Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxomsg_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXOMSG", "E-mail Object Protocol", true);
-       
-       mapitest_suite_add_test(suite, "ADDRESS-TYPES", "Address Types", mapitest_oxomsg_AddressTypes);
-       mapitest_suite_add_test(suite, "SUBMIT-MESSAGE", "Submit message", mapitest_oxomsg_SubmitMessage);
-       mapitest_suite_add_test(suite, "ABORT-SUBMIT", "Abort submitted message", mapitest_oxomsg_AbortSubmit);
-       mapitest_suite_add_test(suite, "SET-SPOOLER", "Client intends to act as a mail spooler", mapitest_oxomsg_SetSpooler);
-       mapitest_suite_add_test(suite, "SPOOLER-LOCK-MESSAGE", "Lock the specified message for spooling", mapitest_oxomsg_SpoolerLockMessage);
-       mapitest_suite_add_test(suite, "TRANSPORT-SEND", "Sends the specified message object out for message delivery", mapitest_oxomsg_TransportSend);
-       mapitest_suite_add_test(suite, "TRANSPORT-NEW-MAIL", "Submit a new message for processing", mapitest_oxomsg_TransportNewMail);
-       mapitest_suite_add_test(suite, "GET-TRANSPORT-FOLDER", "Retrieve the temporary transport folder ID", mapitest_oxomsg_GetTransportFolder);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Message and Attachment Object Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcmsg_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite =  mapitest_suite_init(mt, "OXCMSG", "Message and Attachment Object Protocol", true);
-
-       mapitest_suite_add_test(suite, "CREATE-MESSAGE", "Create message", mapitest_oxcmsg_CreateMessage);
-       mapitest_suite_add_test(suite, "SET-MESSAGE-READ-FLAGS", "Set message read flag", mapitest_oxcmsg_SetMessageReadFlag);
-       mapitest_suite_add_test(suite, "SET-READ-FLAGS", "Set read flag on multiple messages", mapitest_oxcmsg_SetReadFlags);
-       mapitest_suite_add_test(suite, "MODIFY-RECIPIENTS", "Add new recipients", mapitest_oxcmsg_ModifyRecipients);
-       mapitest_suite_add_test(suite, "READ-RECIPIENTS", "Read recipients from a message", mapitest_oxcmsg_ReadRecipients);
-       mapitest_suite_add_test(suite, "REMOVE-ALL-RECIPIENTS", "Remove all recipients from a message", mapitest_oxcmsg_RemoveAllRecipients);
-       mapitest_suite_add_test(suite, "SAVE-CHANGES-MESSAGE", "Save changes on message", mapitest_oxcmsg_SaveChangesMessage);
-       mapitest_suite_add_test(suite, "GET-MESSAGE-STATUS", "Get message status", mapitest_oxcmsg_GetMessageStatus);
-       mapitest_suite_add_test(suite, "SET-MESSAGE-STATUS", "Set message status", mapitest_oxcmsg_SetMessageStatus);
-       mapitest_suite_add_test(suite, "OPEN-EMBEDDED-MESSAGE", "Open a message embedded in another message", mapitest_oxcmsg_OpenEmbeddedMessage);
-       mapitest_suite_add_test_flagged(suite, "GET-VALID-ATTACHMENTS", "Get valid attachment IDs for a message", mapitest_oxcmsg_GetValidAttachments, NotInExchange2010);
-       mapitest_suite_add_test(suite, "RELOAD-CACHED-INFORMATION", "Reload cached information for a message", mapitest_oxcmsg_ReloadCachedInformation);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Table Object Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxctable_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCTABLE", "Table Object Protocol", true);
-       
-       mapitest_suite_add_test(suite, "SETCOLUMNS", "Set Table Columns", mapitest_oxctable_SetColumns);
-       mapitest_suite_add_test(suite, "QUERYCOLUMNS", "Query Table Columns", mapitest_oxctable_QueryColumns);
-       mapitest_suite_add_test(suite, "QUERYROWS", "Query Table Rows", mapitest_oxctable_QueryRows);
-       mapitest_suite_add_test_flagged(suite, "GETSTATUS", "Get Table Status", mapitest_oxctable_GetStatus, NotInExchange2010);
-       mapitest_suite_add_test(suite, "SEEKROW", "Seek a row", mapitest_oxctable_SeekRow);
-       mapitest_suite_add_test(suite, "RESTRICT", "Apply filters to a table", mapitest_oxctable_Restrict);
-       mapitest_suite_add_test_flagged(suite, "SEEKROW-APPROX", "Seek an approximate row", mapitest_oxctable_SeekRowApprox, NotInExchange2010);
-       mapitest_suite_add_test(suite, "CREATE-BOOKMARK", "Create a table bookmark", mapitest_oxctable_CreateBookmark);
-       mapitest_suite_add_test(suite, "SEEKROW-BOOKMARK", "Seek a row given a bookmark", mapitest_oxctable_SeekRowBookmark);
-       mapitest_suite_add_test(suite, "CATEGORY", "Expand/collapse category rows", mapitest_oxctable_Category);
-
-       mapitest_suite_register(mt, suite);
-       
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Property and Stream Object Protocol test
-   suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcprpt_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCPRPT", "Property and Stream Object Protocol", true);
-
-       mapitest_suite_add_test(suite, "GET-PROPS", "Retrieve a specific set of properties", mapitest_oxcprpt_GetProps);
-       mapitest_suite_add_test(suite, "GET-PROPSALL", "Retrieve the whole property array", mapitest_oxcprpt_GetPropsAll);
-       mapitest_suite_add_test(suite, "GET-PROPLIST", "Retrieve the property list", mapitest_oxcprpt_GetPropList);
-       mapitest_suite_add_test(suite, "SET-PROPS", "Set a specific set of properties", mapitest_oxcprpt_SetProps);
-       mapitest_suite_add_test(suite, "DELETE-PROPS", "Delete a specific set of properties", mapitest_oxcprpt_DeleteProps);
-       mapitest_suite_add_test(suite, "PROPS-NOREPLICATE", "Set / delete a specific set of properties (no replicate)", mapitest_oxcprpt_NoReplicate);
-       mapitest_suite_add_test(suite, "COPY-PROPS", "Copy a specified set of properties", mapitest_oxcprpt_CopyProps);
-       mapitest_suite_add_test(suite, "STREAM", "Test stream operations", mapitest_oxcprpt_Stream);
-       mapitest_suite_add_test(suite, "COPYTO", "Copy or move properties", mapitest_oxcprpt_CopyTo);
-       mapitest_suite_add_test_flagged(suite, "WRITE-COMMIT-STREAM", "Test atomic Write / Commit operation", mapitest_oxcprpt_WriteAndCommitStream, NotInExchange2010);
-       mapitest_suite_add_test_flagged(suite, "COPYTO-STREAM", "Copy stream from source to destination stream", mapitest_oxcprpt_CopyToStream, NotInExchange2010SP0);
-       mapitest_suite_add_test(suite, "NAME-ID", "Convert between Names and IDs", mapitest_oxcprpt_NameId);
-       mapitest_suite_add_test(suite, "PSMAPI-NAME-ID", "Convert between Names and IDs for PS_MAPI namespace", mapitest_oxcprpt_NameId_PSMAPI);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the E-Mail Rules Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxorule_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXORULE", "E-Mail Rules Protocol", true);
-
-       mapitest_suite_add_test(suite, "GET-RULES-TABLE", "Retrieve the rules table associated to a folder", mapitest_oxorule_GetRulesTable);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Core Notification Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcnotif_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCNOTIF", "Core Notification Protocol", true);
-
-       mapitest_suite_add_test(suite, "REGISTER-NOTIFICATION", "Subscribe to notifications", mapitest_oxcnotif_RegisterNotification);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Bulk Data Transfer Protocol test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcfxics_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCFXICS", "Bulk Data Transfer Protocol", true);
-       
-       mapitest_suite_add_test(suite, "GET-LOCAL-REPLICA-IDS", "Reserve a range of IDs for local replica", mapitest_oxcfxics_GetLocalReplicaIds);
-       mapitest_suite_add_test(suite, "COPYFOLDER", "Test CopyFolder operation", mapitest_oxcfxics_CopyFolder);
-       mapitest_suite_add_test(suite, "COPYMESSAGES", "Test CopyMessages operation", mapitest_oxcfxics_CopyMessages);
-       mapitest_suite_add_test(suite, "COPYTO", "Test CopyTo operation", mapitest_oxcfxics_CopyTo);
-       mapitest_suite_add_test(suite, "COPYPROPS", "Test CopyProperties operation", mapitest_oxcfxics_CopyProperties);
-       mapitest_suite_add_test(suite, "DEST-CONFIGURE", "Test Destination Configure operation", mapitest_oxcfxics_DestConfigure);
-       mapitest_suite_add_test(suite, "SYNC-CONFIGURE", "Configure ICS context for download", mapitest_oxcfxics_SyncConfigure);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Register the Permissions Protocol test suite
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_oxcperm_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "OXCPERM", "Permissions Protocol", true);
-       
-       mapitest_suite_add_test(suite, "GET-PERMISSIONS-TABLE", "Get handle to the Permissions table", mapitest_oxcperm_GetPermissionsTable);
-       mapitest_suite_add_test(suite, "MODIFY-PERMISSIONS", "Modify access permissions on a folder", mapitest_oxcperm_ModifyPermissions);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details Register the NSPI test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_nspi_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "NSPI", "Name Service Provider Interface", true);
-       
-       mapitest_suite_add_test(suite, "UPDATESTAT", "Update the STAT structure", mapitest_nspi_UpdateStat);
-       mapitest_suite_add_test(suite, "QUERYROWS", "Returns a number of rows from a specified table", mapitest_nspi_QueryRows);
-       mapitest_suite_add_test(suite, "SEEKENTRIES", "Searches for and sets the logical position in a specific table", mapitest_nspi_SeekEntries);
-       mapitest_suite_add_test(suite, "GETMATCHES", "Returns an explicit table", mapitest_nspi_GetMatches);
-       mapitest_suite_add_test(suite, "RESORTRESTRICTION", "Apply a sort order to the objects in a restricted address book container", mapitest_nspi_ResortRestriction);
-       mapitest_suite_add_test(suite, "DNTOMID", "Maps a set of DN to a set of MId", mapitest_nspi_DNToMId);
-       mapitest_suite_add_test(suite, "GETPROPLIST", "Retrieve the list of properties associated to an object", mapitest_nspi_GetPropList);
-       mapitest_suite_add_test(suite, "GETPROPS", "Returns a row containing a set of the properties and values", mapitest_nspi_GetProps);
-       mapitest_suite_add_test(suite, "COMPAREMIDS", "Compare the position in an AB container of two objects", mapitest_nspi_CompareMIds);
-       mapitest_suite_add_test(suite, "MODPROPS", "Modify an address book object", mapitest_nspi_ModProps);
-       mapitest_suite_add_test(suite, "GETSPECIALTABLE", "Returns the rows of a special table to the client", mapitest_nspi_GetSpecialTable);
-       mapitest_suite_add_test(suite, "GETTEMPLATEINFO", "Returns information about template objects", mapitest_nspi_GetTemplateInfo);
-       mapitest_suite_add_test(suite, "MODLINKATT", "Modifies the values of a specific property of a specific row", mapitest_nspi_ModLinkAtt);
-       mapitest_suite_add_test(suite, "QUERYCOLUMNS", "Returns a list of all the properties the NSPI server is aware of", mapitest_nspi_QueryColumns);
-       mapitest_suite_add_test(suite, "GETNAMESFROMIDS", "Returns a list of property names for a set of proptags", mapitest_nspi_GetNamesFromIDs);
-       mapitest_suite_add_test(suite, "GETIDSFROMNAMES", "Returns the property IDs associated with property names", mapitest_nspi_GetIDsFromNames);
-       mapitest_suite_add_test(suite, "RESOLVENAMES", "Resolve usernames", mapitest_nspi_ResolveNames);
-       mapitest_suite_add_test(suite, "GETGALTABLE", "Fetches the Global Address List", mapitest_nspi_GetGALTable);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Return the no server test suite
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_noserver_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "NOSERVER", "No server operations", false);
-
-       mapitest_suite_add_test(suite, "LZFU-DECOMPRESS", "Test Compressed RTF decompression operations", mapitest_noserver_lzfu);
-       mapitest_suite_add_test(suite, "LZFU-COMPRESS", "Test Compressed RTF compression operations", mapitest_noserver_rtfcp);
-       mapitest_suite_add_test(suite, "LZFU-COMPRESS-LARGE", "Test RTF (de)compression operations on larger file", mapitest_noserver_rtfcp_large);
-       mapitest_suite_add_test(suite, "SROWSET", "Test SRowSet parsing", mapitest_noserver_srowset);
-       mapitest_suite_add_test(suite, "GETSETPROPS", "Test Property handling", mapitest_noserver_properties);
-       mapitest_suite_add_test(suite, "MAPIPROPS", "Test MAPI Property handling", mapitest_noserver_mapi_properties);
-       mapitest_suite_add_test(suite, "PROPTAGVALUE", "Test MAPI PropTag value handling", mapitest_noserver_proptagvalue);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details Initialise the error / sanity-check test suite
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_errorchecks_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "ERRORCHECKS", "Error / sanity-check operations", false);
-
-       mapitest_suite_add_test(suite, "SIMPLEMAPI", "Test failure paths for simplemapi.c", mapitest_errorchecks_simplemapi_c);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details Initialise the language code / ID test suite
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_lcid_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "LCID", "Language code / ID operations", false);
-
-       mapitest_suite_add_test(suite, "CODE2TAG", "Tests for lcid_langcode2langtag", mapitest_lcid_langcode2langtag);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-/**
-   \details Initialise the mapidump test suite
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_mapidump_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "MAPIDUMP", "mapidump test suite", false);
-
-       mapitest_suite_add_test(suite, "SPROPVALUE", "Test dump of SPropValue", mapitest_mapidump_spropvalue);
-       mapitest_suite_add_test(suite, "SPROPTAGARRAY", "Test dump of SPropTagArray", mapitest_mapidump_sproptagarray);
-       mapitest_suite_add_test(suite, "SROWSET", "Test dump of SRowSet", mapitest_mapidump_srowset);
-       mapitest_suite_add_test(suite, "PABENTRY", "Test dump of PAB Entry", mapitest_mapidump_pabentry);
-       mapitest_suite_add_test(suite, "NOTE", "Test dump of a note message", mapitest_mapidump_note);
-       mapitest_suite_add_test(suite, "TASK", "Test dump of a task message", mapitest_mapidump_task);
-       mapitest_suite_add_test(suite, "CONTACT", "Test dump of a contact message", mapitest_mapidump_contact);
-       mapitest_suite_add_test(suite, "APPOINTMENT", "Test dump of an appointment message", mapitest_mapidump_appointment);
-       mapitest_suite_add_test(suite, "MESSAGE", "Test dump of an email message", mapitest_mapidump_message);
-       mapitest_suite_add_test(suite, "NEWMAIL", "Test dump of a new mail notification", mapitest_mapidump_newmail);
-       mapitest_suite_add_test(suite, "FREEBUSY", "Test dump of a free/busy event", mapitest_mapidump_freebusy);
-       mapitest_suite_add_test(suite, "RECIPIENTS", "Test dump of a free/busy event", mapitest_mapidump_recipients);
-       mapitest_suite_add_test(suite, "FOLDERCREATEDNOTIF", "Test dump of a folder created notification", mapitest_mapidump_foldercreated);
-       mapitest_suite_add_test(suite, "FOLDERDELETEDNOTIF", "Test dump of a folder deleted notification", mapitest_mapidump_folderdeleted);
-       mapitest_suite_add_test(suite, "FOLDERMOVEDNOTIF", "Test dump of a folder move notification", mapitest_mapidump_foldermoved);
-       mapitest_suite_add_test(suite, "FOLDERCOPYNOTIF", "Test dump of a folder copy notification", mapitest_mapidump_foldercopied);
-       mapitest_suite_add_test(suite, "MESSAGECREATEDNOTIF", "Test dump of a message created notification", mapitest_mapidump_messagecreated);
-       mapitest_suite_add_test(suite, "MESSAGEDELETEDNOTIF", "Test dump of a message deleted notification", mapitest_mapidump_messagedeleted);
-       mapitest_suite_add_test(suite, "MESSAGEMOVEDNOTIF", "Test dump of a message move notification", mapitest_mapidump_messagemoved);
-       mapitest_suite_add_test(suite, "MESSAGECOPYNOTIF", "Test dump of a message copy notification", mapitest_mapidump_messagecopied);
-       mapitest_suite_add_test(suite, "MESSAGEMODIFIEDNOTIF", "Test dump of a message modification notification", mapitest_mapidump_messagemodified);
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
-
-
-/**
-   \details Initialise the language code / ID test suite
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
- */
-_PUBLIC_ uint32_t module_lzxpress_init(struct mapitest *mt)
-{
-       struct mapitest_suite   *suite = NULL;
-
-       suite = mapitest_suite_init(mt, "LZXPRESS", "lzxpress algorithm test suite", false);
-
-       mapitest_suite_add_test_flagged(suite, "VALIDATE-001", "Validate LZXPRESS implementation using sample file 001", mapitest_lzxpress_validate_test_001, ExpectedFail);
-
-       mapitest_suite_register(mt, suite);
-
-       return MAPITEST_SUCCESS;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/mapitest.doxy b/branches/plugfest/utils/mapitest/modules/mapitest.doxy
deleted file mode 100644 (file)
index 7a705ef..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
-\mainpage %mapitest documentation
-
-%mapitest acts as stand-alone torture test of a range of MAPI function
-calls. It is intended to validate the implementation of various
-functions, and to ensure that existing functionality does not suffer
-regression between releases.
-
-As a general principle, %mapitest calls should leave the system in the
-same state at the end as at the start - it is meant to clean up after
-itself.
-
-*/
-
diff --git a/branches/plugfest/utils/mapitest/modules/module_errorchecks.c b/branches/plugfest/utils/mapitest/modules/module_errorchecks.c
deleted file mode 100644 (file)
index e22353c..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - Error / sanity-check path tests
-
-   Copyright (C) Brad Hards 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_errorchecks.c
-
-   \brief Error / sanity-check path tests
-
-   \note These tests do not show how to use libmapi properly, and should
-  not be used as a programming reference.
-*/
-
-
-/**
-   \details Verify simplemapi.c functions
-
-   This function:
-   -# Tests the sanity checks in GetDefaultPublicFolder
-   -# Tests the sanity checks in GetDefaultFolder
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/ 
-_PUBLIC_ bool mapitest_errorchecks_simplemapi_c(struct mapitest *mt)
-{
-       enum MAPISTATUS status;
-       mapi_object_t   *obj_store = 0;
-       mapi_object_t   *obj_folder = 0;
-       mapi_object_t   *obj_message = 0;
-       mapi_object_t   tmp;
-       uint64_t        *folder = 0;
-       uint32_t        id = 0x99;
-       uint32_t        arg;            // an all purpose argument...
-       TALLOC_CTX      *mem_ctx;
-
-       mem_ctx = talloc_autofree_context();
-
-       status = GetDefaultPublicFolder(obj_store, folder, id);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 1 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 1 - MAPI_E_INVALID_PARAMETER");
-       }
-       obj_store = &tmp;
-       status = GetDefaultPublicFolder(obj_store, folder, id);
-       if ( ( status != MAPI_E_NOT_FOUND ) || (GetLastError() != MAPI_E_NOT_FOUND) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 2 - MAPI_E_NOT_FOUND", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 2 - MAPI_E_NOT_FOUND");
-       }
-
-       obj_store = 0;
-
-       status = GetDefaultFolder(obj_store, folder, id);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 3 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 3 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_store = &tmp;
-       obj_store->private_data = 0;
-       status = GetDefaultFolder(obj_store, folder, id);
-       if ( (status != MAPI_E_INVALID_PARAMETER) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 4 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 4 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_store = 0;
-
-       status = GetFolderItemsCount(obj_folder, 0, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 5 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 5 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = &tmp;
-       status = GetFolderItemsCount(obj_folder, 0, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 6 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 6 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       status = GetFolderItemsCount(obj_folder, &arg, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 7 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 7 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = 0;
-
-       /**************************************************************************************
-          Testing AddUserPermission(mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)
-       */
-       status = AddUserPermission(obj_folder, 0, RightsNone);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 8 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 8 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = &tmp;
-       status = AddUserPermission(obj_folder, 0, RightsNone);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 9 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 9 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = 0;
-
-       /**************************************************************************************
-         Testing ModifyUserPermission(mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)
-       */
-       status = ModifyUserPermission(obj_folder, 0, RightsNone);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 10 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 10 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = &tmp;
-       status = ModifyUserPermission(obj_folder, 0, RightsNone);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 11 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 11 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = 0;
-
-       /**************************************************************************************
-         Testing RemoveUserPermission(mapi_object_t *obj_folder, const char *username)
-       */
-       status = RemoveUserPermission(obj_folder, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 12 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 12 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = &tmp;
-       status = RemoveUserPermission(obj_folder, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 13 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 13 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_folder = 0;
-
-       /**************************************************************************************
-         Testing GetBestBody(mapi_object_t *obj_message, uint8_t *format)
-       */
-       status = GetBestBody(obj_message, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 14 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 14 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_message = &tmp;
-       status = GetBestBody(obj_message, 0);
-       if ( ( status != MAPI_E_INVALID_PARAMETER ) || (GetLastError() != MAPI_E_INVALID_PARAMETER) ) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - 0x%x\n", "Step 15 - MAPI_E_INVALID_PARAMETER", status);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 15 - MAPI_E_INVALID_PARAMETER");
-       }
-
-       obj_message = 0;
-
-
-       return true;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_lcid.c b/branches/plugfest/utils/mapitest/modules/module_lcid.c
deleted file mode 100644 (file)
index f47c57a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - MS-LCID tests
-
-   Copyright (C) Brad Hards 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_lcid.c
-
-   \brief Language Code checks (MS-LCID)
-
-   \note This is low level (internal) checking, and application programmers
-   do not normally need to deal with the functions checked in this test suite.
-*/
-
-/**
-   \details Verify libmapi/util/lcid.c functions
-
-   This function:
-   -# exercises lcid_langcode2langtag()
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/ 
-_PUBLIC_ bool mapitest_lcid_langcode2langtag(struct mapitest *mt)
-{
-       const char      *locale;
-
-       locale = mapi_get_locale_from_lcid(0x0409);
-       if (strcmp(locale, "en_US") != 0) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - %s\n", "Step 1 - mismatch", locale);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 1");
-       }
-
-       locale = mapi_get_locale_from_lcid(0x0439);
-       if (strcmp(locale, "hi_IN") != 0) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - %s\n", "Step 2 - mismatch", locale);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 2");
-       }
-
-       locale = mapi_get_locale_from_lcid(0x1401);
-       if (strcmp(locale, "ar_DZ") != 0) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - %s\n", "Step 3 - mismatch", locale);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 3");
-       }
-
-       locale = mapi_get_locale_from_lcid(0x0);
-       if (locale != NULL) {
-               mapitest_print(mt, "* %-35s: [FAILURE] - %s\n", "Step 4 - expected NULL", locale);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 4");
-       }
-       return true;
-}
-
diff --git a/branches/plugfest/utils/mapitest/modules/module_lzxpress.c b/branches/plugfest/utils/mapitest/modules/module_lzxpress.c
deleted file mode 100644 (file)
index 34ffc61..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - LZXPRESS compression/decompression
-
-   Copyright (C) Julien Kerihuel 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-#include "gen_ndr/ndr_exchange.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \file module_lzxpress.c
-
-   \brief LZXPRESS compression and decompression test suite
- */
-
-/* temporary hack until linker problems with ndr_map_error2ntstatus() are worked out */
-NTSTATUS static mt_ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
-{
-        switch (ndr_err) {
-        case NDR_ERR_SUCCESS:
-                return NT_STATUS_OK;
-        case NDR_ERR_BUFSIZE:
-                return NT_STATUS_BUFFER_TOO_SMALL;
-        case NDR_ERR_TOKEN:
-                return NT_STATUS_INTERNAL_ERROR;
-        case NDR_ERR_ALLOC:
-                return NT_STATUS_NO_MEMORY;
-        case NDR_ERR_ARRAY_SIZE:
-                return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
-        case NDR_ERR_INVALID_POINTER:
-                return NT_STATUS_INVALID_PARAMETER_MIX;
-        case NDR_ERR_UNREAD_BYTES:
-                return NT_STATUS_PORT_MESSAGE_TOO_LONG;
-        default:
-                break;
-        }
-
-        /* we should map all error codes to different status codes */
-        return NT_STATUS_INVALID_PARAMETER;
-}
-
-_PUBLIC_ bool mapitest_lzxpress_validate_test_001(struct mapitest *mt)
-{
-       bool                    ret = false;
-       char                    *filename = NULL;
-       DATA_BLOB               blob;
-       uint8_t                 *data;
-       size_t                  size;
-       struct ndr_print        *ndr_print;
-       struct ndr_pull         *ndr_pull;
-       struct ndr_push         *ndr_push;
-       struct ndr_push         *ndr_comp;
-       struct ndr_push         *ndr_rgbIn;
-       struct RPC_HEADER_EXT   RPC_HEADER_EXT;
-       struct EcDoRpcExt2      r;
-       struct mapi2k7_request  request;
-       NTSTATUS                status;
-       enum ndr_err_code       ndr_err;
-
-       /* Step 1. Load Test File 001_Outlook_2007_in_ModifyRecipients_comp.dat */
-       filename = talloc_asprintf(mt->mem_ctx, "%s/001_Outlook_2007_in_ModifyRecipients_comp.dat", LZXPRESS_DATADIR);
-/*     filename = talloc_asprintf(mt->mem_ctx, "%s/002_Outlook_2007_in_Tables_operations_comp.dat", LZXPRESS_DATADIR); */
-       data = (uint8_t *)file_load(filename, &size, 0, mt->mem_ctx);
-       if (!data) {
-               perror(filename);
-               mapitest_print_retval_fmt(mt, "lzxpress_validate", "Error while loading %s", filename);
-               talloc_free(filename);
-               return false;
-       }
-       blob.data = data;
-       blob.length = size;
-       mapitest_print_retval_step(mt, "1", "Loading 001_Outlook_2007_in_ModifyRecipients_comp.dat", MAPI_E_SUCCESS);
-
-       ndr_print = talloc_zero(mt->mem_ctx, struct ndr_print);
-       ndr_print->print = ndr_print_debug_helper;
-       ndr_print->depth = 1;
-
-       /* Step 2. Pull 001_Outlook_2007_in_ModifyRecipients_comp.dat data */
-       ndr_pull = ndr_pull_init_blob(&blob, mt->mem_ctx);
-       ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
-
-       ndr_err = ndr_pull_EcDoRpcExt2(ndr_pull, NDR_IN, &r);
-       talloc_free(ndr_pull);
-       status = mt_ndr_map_error2ntstatus(ndr_err);
-       if (NT_STATUS_IS_OK(status)) {
-               mapitest_print_retval_step(mt, "2", "001_Outlook_2007_in_ModifyRecipients_comp.dat", 
-                                          MAPI_E_SUCCESS);
-       } else {
-               mapitest_print_retval_step(mt, "2", "Pulling 001_Outlook_2007_in_ModifyRecipients_comp.dat", 
-                                          MAPI_E_CALL_FAILED);
-               return false;
-       }
-
-       /* Step 4. Decompress data */
-       blob.data = talloc_memdup(mt->mem_ctx, r.in.rgbIn, r.in.cbIn);
-       blob.length = r.in.cbIn;
-       ndr_pull = ndr_pull_init_blob(&blob, mt->mem_ctx);
-       ndr_set_flags(&ndr_pull->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REF_ALLOC);
-       ndr_err = ndr_pull_mapi2k7_request(ndr_pull, NDR_SCALARS|NDR_BUFFERS, &request);
-       talloc_free(blob.data);
-       talloc_free(ndr_pull);
-       status = mt_ndr_map_error2ntstatus(ndr_err);
-       if (NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("Success\n"));
-       }
-
-       /* Step 5. Recompress data */
-       ndr_push = ndr_push_init_ctx(mt->mem_ctx);
-       ndr_set_flags(&ndr_push->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REF_ALLOC);
-       ndr_push_mapi_request(ndr_push, NDR_SCALARS|NDR_BUFFERS, request.mapi_request);
-       ndr_comp = ndr_push_init_ctx(mt->mem_ctx);
-       ndr_push_lzxpress_compress(ndr_comp, ndr_push);
-       
-       /* Recreate complete blob */
-       ndr_rgbIn = ndr_push_init_ctx(mt->mem_ctx);
-       ndr_set_flags(&ndr_rgbIn->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_REF_ALLOC);
-
-       RPC_HEADER_EXT.Version = 0x0000;
-       RPC_HEADER_EXT.Flags = RHEF_Compressed|RHEF_Last;
-       RPC_HEADER_EXT.Size = ndr_comp->offset;
-       RPC_HEADER_EXT.SizeActual = ndr_push->offset;
-       ndr_push_RPC_HEADER_EXT(ndr_rgbIn, NDR_SCALARS|NDR_BUFFERS, &RPC_HEADER_EXT);
-
-       ndr_push_bytes(ndr_rgbIn, ndr_comp->data, ndr_comp->offset);
-       talloc_free(ndr_comp);
-
-       /* Compare Outlook and openchange rgbIn compressed blob */
-       DEBUG(0, ("Outlook    compressed blob size = 0x%x\n", r.in.cbIn));
-       DEBUG(0, ("OpenChange compressed blob size = 0x%x\n", ndr_rgbIn->offset));
-       ret = true;
-       {
-               int i;
-               int min;
-
-               min = (ndr_rgbIn->offset >= r.in.cbIn) ? r.in.cbIn : ndr_rgbIn->offset;
-               DEBUG(0, ("Comparing Outlook and OpenChange blobs on 0x%x bytes\n", min));
-               for (i = 0; i < min; i++) {
-                       if (r.in.rgbIn[i] != ndr_rgbIn->data[i]) {
-                               DEBUG(0, ("Bytes differs at offset 0x%x: Outlook (0x%.2x) OpenChange (0x%.2x)\n", 
-                                         i, r.in.rgbIn[i], ndr_rgbIn->data[i]));
-                               ret = false;
-                       }
-               }
-               
-       }
-
-       mapitest_print(mt, "Compressed rgbIn by Outlook\n");
-       mapitest_print(mt, "==============================\n");
-       dump_data(0, r.in.rgbIn, r.in.cbIn);
-       mapitest_print(mt, "==============================\n");
-
-       mapitest_print(mt, "Compressed rgbIn by OpenChange\n");
-       mapitest_print(mt, "==============================\n");
-       dump_data(0, ndr_rgbIn->data, ndr_rgbIn->offset);
-       mapitest_print(mt, "==============================\n");
-
-       talloc_free(ndr_rgbIn);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_mapidump.c b/branches/plugfest/utils/mapitest/modules/module_mapidump.c
deleted file mode 100644 (file)
index 7d2ccc7..0000000
+++ /dev/null
@@ -1,1074 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - mapidump function tests
-
-   Copyright (C) Brad Hards 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_mapidump.c
-
-   \brief mapidump function tests
-
-   \note These tests do not show how to use libmapi properly, and should
-  not be used as a programming reference.
-*/
-
-/**
-   \details Test dump using mapidump_SPropValue
-
-   This function:
-   -# Tests the mapidump_SPropValue() function 
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_spropvalue(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       struct FILETIME ft;
-       struct Binary_r bin;
-       struct StringArray_r mvstr;
-       uint32_t i;
-
-       propvalue.ulPropTag = PR_GENDER; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.i = 3; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_SENSITIVITY; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.l = 68000; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_REPLY_REQUESTED; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.b = 1; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_FILE_SIZE_EXTENDED; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.d = 0x3DEADBEEFCAFE124LL; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_SENDER_NAME; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.lpszA = "Mr. The Sender"; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_REPORT_TAG; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       bin.cb = 12;
-       bin.lpb = talloc_array(mt->mem_ctx, uint8_t, bin.cb);
-       for (i = 0; i < bin.cb; ++i) {
-               bin.lpb[i] = 0xF0 + i;
-       }
-       propvalue.value.bin = bin; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_DELIVER_TIME ; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       ft.dwLowDateTime = 0x12345678;
-       ft.dwHighDateTime = 0x01CA6AE4;
-       propvalue.value.ft = ft; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_REPLY_TIME_ERROR; /* enum MAPITAGS */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.err = MAPI_E_UNKNOWN_CPID; /* union SPropValue_CTR */
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       propvalue.ulPropTag = PR_CONTACT_ADDRTYPES;
-       propvalue.dwAlignPad = 0;
-       mvstr.cValues = 3;
-       mvstr.lppszA = talloc_array(mt->mem_ctx, const char *, mvstr.cValues);
-       mvstr.lppszA[0] = talloc_strdup(mt->mem_ctx, "Foo");
-       mvstr.lppszA[1] = talloc_strdup(mt->mem_ctx, "A longer string");
-       mvstr.lppszA[2] = talloc_strdup(mt->mem_ctx, "All strung out on bugs");
-
-       propvalue.value.MVszA = mvstr;
-       mapidump_SPropValue(propvalue, "[sep]");
-
-#if 0
-       /* Types TODO */
-       // int64_t dbl;/* [case(0x0005)] */
-       // const char *lpszW;/* [unique,charset(UTF16),case(0x001f)] */
-       // struct FlatUID_r *lpguid;/* [unique,case(0x0048)] */
-       // struct ShortArray_r MVi;/* [case(0x1002)] */
-       // struct LongArray_r MVl;/* [case(0x1003)] */
-       // struct BinaryArray_r MVbin;/* [case(0x1102)] */
-       // struct FlatUIDArray_r MVguid;/* [case(0x1048)] */
-       // struct WStringArray_r MVszW;/* [case(0x101f)] */
-       // struct DateTimeArray_r MVft;/* [case(0x1040)] */
-       // uint32_t object;/* [case(0x000d)] */
-#endif
-
-       propvalue.ulPropTag = 0xDDDD << 16 | PT_LONG; /* This isn't a real tag, just a test case */
-       propvalue.dwAlignPad = 0;
-       propvalue.value.l = 68020;
-       mapidump_SPropValue(propvalue, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_SPropTagArray
-
-   This function:
-   -# Tests the mapidump_SPropTagArray() function 
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_sproptagarray(struct mapitest *mt)
-{
-       struct SPropTagArray *tagarray;
-
-       tagarray = set_SPropTagArray(mt->mem_ctx, 5, PR_SENDER_NAME,
-                                                    PR_BODY,
-                                                    PR_PERSONAL_HOME_PAGE,
-                                                    PR_OTHER_ADDRESS_CITY,
-                                                    (0xDDDD << 16 | PT_LONG));
-
-       mapidump_SPropTagArray(tagarray);
-
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_SRowSet
-
-   This function:
-   -# Tests the mapidump_SRowSet() function 
-   -# Indirectly tests the mapidump_SRow() function
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_srowset(struct mapitest *mt)
-{
-       struct SRowSet          srowset;
-
-       struct SPropValue       SPropValue;
-
-       srowset.cRows = 2;
-       srowset.aRow = talloc_array(mt->mem_ctx, struct SRow, srowset.cRows);
-
-       srowset.aRow[0].cValues = 0;
-       srowset.aRow[0].lpProps = talloc_zero(mt->mem_ctx, struct SPropValue);
-
-       SPropValue.ulPropTag = PR_OBJECT_TYPE;
-       SPropValue.value.l = MAPI_MAILUSER;
-       SRow_addprop(&(srowset.aRow[0]), SPropValue);
-
-       SPropValue.ulPropTag = PR_DISPLAY_TYPE;
-       SPropValue.value.l = 0;
-       SRow_addprop(&(srowset.aRow[0]), SPropValue);
-
-       SPropValue.ulPropTag = PR_GIVEN_NAME;
-       SPropValue.value.lpszA = "gname";
-       SRow_addprop(&(srowset.aRow[0]), SPropValue);
-
-       srowset.aRow[1].cValues = 0;
-       srowset.aRow[1].lpProps = talloc_zero(mt->mem_ctx, struct SPropValue);
-       SPropValue.ulPropTag = PR_GIVEN_NAME;
-       SPropValue.value.lpszA = "kname";
-       SRow_addprop(&(srowset.aRow[1]), SPropValue);
-
-       SPropValue.ulPropTag = PR_7BIT_DISPLAY_NAME;
-       SPropValue.value.lpszA = "lname";
-       SRow_addprop(&(srowset.aRow[1]), SPropValue);
-
-       mapidump_SRowSet(&srowset, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_pabentry
-
-   This function:
-   -# Tests the mapidump_PAB_entry() function 
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_pabentry(struct mapitest *mt)
-{
-       struct SRow             pabentry;
-       struct SPropValue       SPropValue;
-
-       pabentry.cValues = 0;
-       pabentry.lpProps = talloc_zero(mt->mem_ctx, struct SPropValue);
-
-       SPropValue.ulPropTag = PR_ADDRTYPE_UNICODE;
-       SPropValue.value.lpszA = "dummy addrtype";
-       SRow_addprop(&(pabentry), SPropValue);
-
-       SPropValue.ulPropTag = PR_DISPLAY_NAME_UNICODE;
-       SPropValue.value.lpszA = "dummy display name";
-       SRow_addprop(&(pabentry), SPropValue);
-
-       SPropValue.ulPropTag = PR_EMAIL_ADDRESS_UNICODE;
-       SPropValue.value.lpszA = "dummy@example.com";
-       SRow_addprop(&(pabentry), SPropValue);
-
-       SPropValue.ulPropTag = PR_ACCOUNT_UNICODE;
-       SPropValue.value.lpszA = "dummy account";
-       SRow_addprop(&(pabentry), SPropValue);
-
-       mapidump_PAB_entry(&pabentry);
-
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_note
-
-   This function:
-   -# Tests the mapidump_note() function on a plain text message
-   -# Tests the mapidump_note() function on a HTML message
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_note(struct mapitest *mt)
-{
-       struct mapi_SPropValue_array    props;
-
-       props.cValues = 3;
-       props.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, props.cValues);
-
-       props.lpProps[0].ulPropTag = PR_CONVERSATION_TOPIC;
-       props.lpProps[0].value.lpszA = "Topic of the Note";
-
-       props.lpProps[1].ulPropTag = PR_BODY;
-       props.lpProps[1].value.lpszA = "This is the body of the note. It has two sentences.";
-
-       props.lpProps[2].ulPropTag = PR_CLIENT_SUBMIT_TIME;
-       props.lpProps[2].value.ft.dwLowDateTime = 0x12345678;
-       props.lpProps[2].value.ft.dwHighDateTime = 0x01CA6BE4;
-
-       mapidump_note(&props, "[dummy ID]");
-
-       props.lpProps[1].ulPropTag = PR_BODY_HTML;
-       props.lpProps[1].value.lpszA = "<h1>Heading for the Note</h1>\n<p>This is the body of the note. It has two sentences.</p>";
-
-       mapidump_note(&props, "[dummy ID]");
-
-       
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_task
-
-   This function:
-   -# Tests the mapidump_task() function
-   -# modifies the task to be completed
-   -# Tests the associated get_importance() function
-   -# Tests the associated get_task_status() function
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_task(struct mapitest *mt)
-{
-       struct mapi_SPropValue_array    props;
-
-       props.cValues = 9;
-       props.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, props.cValues);
-
-       props.lpProps[0].ulPropTag = PR_CONVERSATION_TOPIC;
-       props.lpProps[0].value.lpszA = "Topic of the Task";
-
-       props.lpProps[1].ulPropTag = PR_BODY;
-       props.lpProps[1].value.lpszA = "This is the body of the task. It has two sentences.";
-
-       props.lpProps[2].ulPropTag = PidLidTaskDueDate;
-       props.lpProps[2].value.ft.dwLowDateTime = 0x12345678;
-       props.lpProps[2].value.ft.dwHighDateTime = 0x01CA6CE4;
-
-       props.lpProps[3].ulPropTag = PidLidPrivate;
-       props.lpProps[3].value.b = 0;
-
-       props.lpProps[4].ulPropTag = PR_IMPORTANCE;
-       props.lpProps[4].value.l = IMPORTANCE_HIGH;
-
-       props.lpProps[5].ulPropTag = PidLidPercentComplete;
-       props.lpProps[5].value.dbl = 0.78;
-
-       props.lpProps[6].ulPropTag = PidLidTaskStartDate;
-       props.lpProps[6].value.ft.dwLowDateTime = 0x09876543;
-       props.lpProps[6].value.ft.dwHighDateTime = 0x01CA6AE4;
-
-       props.lpProps[7].ulPropTag = PidLidTaskStatus;
-       props.lpProps[7].value.l = olTaskWaiting;
-
-       props.lpProps[8].ulPropTag = PidLidContacts;
-       props.lpProps[8].value.MVszA.cValues = 2;
-       props.lpProps[8].value.MVszA.strings = talloc_array(mt->mem_ctx, struct mapi_LPSTR, 2);
-       props.lpProps[8].value.MVszA.strings[0].lppszA = "Contact One";
-       props.lpProps[8].value.MVszA.strings[1].lppszA = "Contact Two Jr.";
-
-       mapidump_task(&props, "[dummy ID]");
-
-       props.lpProps[7].ulPropTag = PidLidTaskStatus;
-       props.lpProps[7].value.l = olTaskComplete;
-
-       props.lpProps[3].ulPropTag = PidLidTaskDateCompleted;
-       props.lpProps[3].value.ft.dwLowDateTime = 0x22345678;
-       props.lpProps[3].value.ft.dwHighDateTime = 0x01CA6CB4;
-
-       mapidump_task(&props, "[dummy ID]");
-
-       if (strcmp("Low", get_importance(IMPORTANCE_LOW)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result IMPORTANCE_LOW\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("Normal", get_importance(IMPORTANCE_NORMAL)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result IMPORTANCE_NORMAL\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("High", get_importance(IMPORTANCE_HIGH)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result IMPORTANCE_HIGH\n", "mapidump_task");
-               return false;
-       }
-       if (get_importance(IMPORTANCE_HIGH+1) != 0) {
-               mapitest_print(mt, "* %-40s: bad result OUT_OF_RANGE\n", "mapidump_task");
-               return false;
-       }
-
-       if (strcmp("Not Started", get_task_status(olTaskNotStarted)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result olTaskNotStarted\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("In Progress", get_task_status(olTaskInProgress)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result olTaskInProgress\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("Completed", get_task_status(olTaskComplete)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result olTaskCompleted\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("Waiting on someone else", get_task_status(olTaskWaiting)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result olTaskWaiting\n", "mapidump_task");
-               return false;
-       }
-       if (strcmp("Deferred", get_task_status(olTaskDeferred)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result olTaskDeferred\n", "mapidump_task");
-               return false;
-       }
-       if (get_task_status(olTaskDeferred+1) != 0) {
-               mapitest_print(mt, "* %-40s: bad result OUT_OF_RANGE\n", "mapidump_task");
-               return false;
-       }
-       return true;
-}
-
-/**
-   \details Test dump using mapidump_contact
-
-   This function:
-   -# Tests the mapidump_contact() function
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_contact(struct mapitest *mt)
-{
-       struct mapi_SPropValue_array    props;
-
-       props.cValues = 8;
-       props.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, props.cValues);
-
-       props.lpProps[0].ulPropTag = PR_POSTAL_ADDRESS;
-       props.lpProps[0].value.lpszA = "P.O. Box 543, KTown";
-
-       props.lpProps[1].ulPropTag = PR_STREET_ADDRESS;
-       props.lpProps[1].value.lpszA = "1 My Street, KTown";
-
-       props.lpProps[2].ulPropTag = PR_COMPANY_NAME;
-       props.lpProps[2].value.lpszA = "Dummy Company Pty Ltd";
-
-       props.lpProps[3].ulPropTag = PR_TITLE;
-       props.lpProps[3].value.lpszA = "Ms.";
-
-       props.lpProps[4].ulPropTag = PR_COUNTRY;
-       props.lpProps[4].value.lpszA = "Australia";
-
-       props.lpProps[5].ulPropTag = PR_GIVEN_NAME;
-       props.lpProps[5].value.lpszA = "Konq.";
-
-       props.lpProps[6].ulPropTag = PR_SURNAME;
-       props.lpProps[6].value.lpszA = "Dragoon";
-
-       props.lpProps[7].ulPropTag = PR_DEPARTMENT_NAME;
-       props.lpProps[7].value.lpszA = "Research and Marketing";
-
-       mapidump_contact(&props, "[dummy ID]");
-
-       props.lpProps[1].ulPropTag = PR_CONVERSATION_TOPIC;
-       props.lpProps[1].value.lpszA = "Contact Topic";
-
-       mapidump_contact(&props, "[dummy ID]");
-
-       props.lpProps[0].ulPropTag = PidLidFileUnder;
-       props.lpProps[0].value.lpszA = "Card Label";
-
-       props.lpProps[4].ulPropTag = PR_DISPLAY_NAME;
-       props.lpProps[4].value.lpszA = "Konqi Dragon";
-
-       mapidump_contact(&props, "[dummy ID]");
-
-       return true;
-}
-
-/**
-   \details Test message dump using mapidump_appointment
-
-   This function:
-   -# Tests the mapidump_appointment() function
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_appointment(struct mapitest *mt)
-{
-       struct mapi_SPropValue_array    props;
-
-       props.cValues = 8;
-       props.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, props.cValues);
-
-       props.lpProps[0].ulPropTag = PidLidContacts;
-       props.lpProps[0].value.MVszA.cValues = 2;
-       props.lpProps[0].value.MVszA.strings = talloc_array(mt->mem_ctx, struct mapi_LPSTR, 2);
-       props.lpProps[0].value.MVszA.strings[0].lppszA = "Contact One";
-       props.lpProps[0].value.MVszA.strings[1].lppszA = "Contact Two Jr.";
-
-       props.lpProps[1].ulPropTag = PR_CONVERSATION_TOPIC;
-       props.lpProps[1].value.lpszA = "Dummy Appointment topic";
-
-       props.lpProps[2].ulPropTag = PidLidTimeZoneDescription;
-       props.lpProps[2].value.lpszA = "AEDT";
-
-       props.lpProps[3].ulPropTag = PidLidLocation;
-       props.lpProps[3].value.lpszA = "OpenChange Conference Room #3";
-
-       props.lpProps[4].ulPropTag = PidLidBusyStatus;
-       props.lpProps[4].value.l = olTaskNotStarted;
-
-       props.lpProps[5].ulPropTag = PidLidPrivate;
-       props.lpProps[5].ulPropTag = true;
-
-       props.lpProps[6].ulPropTag = PR_END_DATE;
-       props.lpProps[6].value.ft.dwLowDateTime = 0x12345678;
-       props.lpProps[6].value.ft.dwHighDateTime = 0x01CA6CE4;
-
-       props.lpProps[7].ulPropTag = PR_START_DATE;
-       props.lpProps[7].value.ft.dwLowDateTime = 0x09876543;
-       props.lpProps[7].value.ft.dwHighDateTime = 0x01CA6AE4;
-
-       mapidump_appointment(&props, "[dummy ID]");
-
-       return true;
-}
-
-/**
-   \details Test dump of an email message using mapidump_message
-
-   This function:
-   -# Builds an indicative email using mapi_SPropValues (sets no codepage)
-   -# Calls the mapidump_appointment() function
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_message(struct mapitest *mt)
-{
-       struct mapi_SPropValue_array    props;
-
-       props.cValues = 9;
-       props.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, props.cValues);
-
-       props.lpProps[0].ulPropTag = PR_INTERNET_MESSAGE_ID;
-       props.lpProps[0].value.lpszA = "dummy-3535395fds@example.com";
-       
-       props.lpProps[1].ulPropTag = PR_CONVERSATION_TOPIC;
-       props.lpProps[1].value.lpszA = "Dummy Email Subject";
-
-       props.lpProps[2].ulPropTag = PR_BODY;
-       props.lpProps[2].value.lpszA = "This is the body of the email. It has two sentences.\n";
-
-       props.lpProps[3].ulPropTag = PR_SENT_REPRESENTING_NAME;
-       props.lpProps[3].value.lpszA = "The Sender <sender@example.com>";
-
-       props.lpProps[4].ulPropTag = PR_DISPLAY_TO;
-       props.lpProps[4].value.lpszA = "The Recipient <to@example.com>";
-
-       props.lpProps[5].ulPropTag = PR_DISPLAY_CC;
-       props.lpProps[5].value.lpszA = "Other Recipient <cc@example.com>";
-
-       props.lpProps[6].ulPropTag = PR_DISPLAY_BCC;
-       props.lpProps[6].value.lpszA = "Ms. Anonymous <bcc@example.com>";
-
-       props.lpProps[7].ulPropTag = PR_STATUS;
-       props.lpProps[7].value.l = 0;
-
-       props.lpProps[8].ulPropTag = PR_HASATTACH;
-       props.lpProps[8].value.b = false;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_USASCII;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_UNICODE;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_JAUTODETECT;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_KAUTODETECT;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_ISO2022JPESC;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       props.lpProps[7].ulPropTag = PR_MESSAGE_CODEPAGE;
-       props.lpProps[7].value.l = CP_ISO2022JPSIO;
-
-       mapidump_message(&props, "[dummy ID]", NULL);
-
-       return true;
-}
-
-/**
-   \details Test dump of an new mail notification
-
-   This function:
-   -# Tests the mapidump_msgflags function with no bits set
-   -# Tests the mapidump_msgflags function with one bit set
-   -# Tests the mapidump_msgflags function with all bits set
-   -# Builds an indicative new mail notification
-   -# Calls the mapidump_newmail function to test dumping of that new mail notification
-  
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_newmail(struct mapitest *mt)
-{
-       struct NewMailNotification notif;
-
-       mapidump_msgflags(0x0, "[sep]");
-
-       mapidump_msgflags(0x100, "[sep]");
-
-       mapidump_msgflags(0x1|0x2|0x4|0x8|0x10|0x20|0x40|0x80|0x100|0x200, "[sep]");
-
-       notif.FID = 0xFEDCBA9876543210LL;
-       notif.MID = 0xBADCAFEBEEF87625LL;
-       notif.MessageFlags = 0x20|0x2;
-       notif.UnicodeFlag = false;
-       notif.MessageClass.lpszA = "Dummy class";
-
-       mapidump_newmail(&notif, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a free/busy event
-
-   This function:
-   -# builds a freebusy binary event
-   -# tests dumping it using mapidump_freebusy_event()
-   -# modifies the event, and dumps it again
-   -# modifies the event, and dumps it again
-   -# tests dumping a date using mapidump_freebusy_date()
-   -# tests each months for mapidump_freebusy_month()
-   
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_freebusy(struct mapitest *mt)
-{
-       struct Binary_r bin;
-       
-       bin.cb = 4;
-       bin.lpb = talloc_array(mt->mem_ctx, uint8_t, bin.cb);
-       /* this example from MS-OXOPFFB Section 4.4.3 */
-       bin.lpb[0] = 0x50;
-       bin.lpb[1] = 0x0A;
-       bin.lpb[2] = 0xC8;
-       bin.lpb[3] = 0x0A;
-       
-       mapidump_freebusy_event(&bin, 2009*16+11, 2008, "[sep]");
-
-       /* this example adapted from MS-OXOPFFB Section 4.4.3 */
-       bin.lpb[0] = 0x50;
-       bin.lpb[1] = 0x0A;
-       bin.lpb[2] = 0xCA;
-       bin.lpb[3] = 0x0A;
-       
-       mapidump_freebusy_event(&bin, 2009*16+11, 2009, "[sep]");
-
-       /* this example adapted from MS-OXOPFFB Section 4.4.3 */
-       bin.lpb[0] = 0x50;
-       bin.lpb[1] = 0x0A;
-       bin.lpb[2] = 0x80;
-       bin.lpb[3] = 0x0A;
-
-       mapidump_freebusy_event(&bin, 2009*16+11, 2009, "[sep]");
-
-       mapidump_freebusy_date(0x0CD18345, "[sep]");
-
-       if (strcmp("January", mapidump_freebusy_month(2009*16+1, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result January\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("February", mapidump_freebusy_month(2009*16+2, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result February\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("March", mapidump_freebusy_month(2009*16+3, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result March\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("April", mapidump_freebusy_month(2009*16+4, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result April\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("May", mapidump_freebusy_month(2009*16+5, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result May\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("June", mapidump_freebusy_month(2009*16+6, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result June\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("July", mapidump_freebusy_month(2009*16+7, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result July\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("August", mapidump_freebusy_month(2009*16+8, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result August\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("September", mapidump_freebusy_month(2009*16+9, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result September\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("October", mapidump_freebusy_month(2009*16+10, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result October\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("November", mapidump_freebusy_month(2009*16+11, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result November\n", "mapidump_freebusy");
-               return false;
-       }
-       if (strcmp("December", mapidump_freebusy_month(2009*16+12, 2009)) != 0) {
-               mapitest_print(mt, "* %-40s: bad result December\n", "mapidump_freebusy");
-               return false;
-       }
-       if (mapidump_freebusy_month(2009*16+0, 2009) != 0) {
-               mapitest_print(mt, "* %-40s: bad result underrange\n", "mapidump_freebusy");
-               return false;
-       }
-       if (mapidump_freebusy_month(2009*16+13, 2009) != 0) {
-               mapitest_print(mt, "* %-40s: bad result overrange\n", "mapidump_freebusy");
-               return false;
-       }
-       return true;
-}
-
-/**
-   \details Test dump of a set of recipients
-
-   This function:
-   -# builds a recipient list
-   -# dumps out the recipient list using mapidump_Recipients()
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_recipients(struct mapitest *mt)
-{
-       const char              **userlist;
-       struct SRowSet          resolved;
-       struct SPropTagArray    *flaglist;
-       struct SPropValue       SPropValue;
-
-       userlist = talloc_array(mt->mem_ctx, const char*, 3);
-       userlist[0] = "Mr. Unresolved";
-       userlist[1] = "Mr/Ms. Ambiguous";
-       userlist[2] = "Mrs. Resolved";
-
-       resolved.cRows = 1;
-       resolved.aRow = talloc_array(mt->mem_ctx, struct SRow, resolved.cRows);
-       resolved.aRow[0].cValues = 0;
-       resolved.aRow[0].lpProps = talloc_zero(mt->mem_ctx, struct SPropValue);
-       SPropValue.ulPropTag = PR_OBJECT_TYPE;
-       SPropValue.value.l = MAPI_MAILUSER;
-       SRow_addprop(&(resolved.aRow[0]), SPropValue);
-
-       SPropValue.ulPropTag = PR_GIVEN_NAME;
-       SPropValue.value.lpszA = "gname";
-       SRow_addprop(&(resolved.aRow[0]), SPropValue);
-
-       flaglist = set_SPropTagArray(mt->mem_ctx, 3, MAPI_UNRESOLVED, MAPI_AMBIGUOUS, MAPI_RESOLVED);
-       
-       mapidump_Recipients(userlist, &resolved, flaglist);
-
-       return true;
-}
-
-/**
-   \details Test dump of a Folder deletion notification
-
-   This function:
-   -# Creates a FolderDeletedNotification structure
-   -# Dumps that structure out using mapidump_folderdeleted()
-   -# Tests mapidump_folderdeleted() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_folderdeleted(struct mapitest *mt)
-{
-       struct FolderDeletedNotification folderdeletednotification;
-
-       folderdeletednotification.ParentFID = 0x9876CAFE432LL;
-       folderdeletednotification.FID = 0x1234ABCDLL;
-       mapidump_folderdeleted(&folderdeletednotification, "[sep]");
-       
-       mapidump_folderdeleted(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a folder move notification
-
-   This function:
-   -# Creates a FolderMoveCopyNotification structure
-   -# Dumps that structure out using mapidump_foldermoved()
-   -# Tests mapidump_foldermoved() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_foldermoved(struct mapitest *mt)
-{
-       struct FolderMoveCopyNotification foldermovecopynotification;
-
-       foldermovecopynotification.ParentFID = 0x9876CAFE432LL;
-       foldermovecopynotification.FID = 0x1234ABCDLL;
-       foldermovecopynotification.OldParentFID = 0x9876CAFE43201DLL;
-       foldermovecopynotification.OldFID = 0x1234ABCD01DLL;
-       mapidump_foldermoved(&foldermovecopynotification, "[sep]");
-       
-       mapidump_foldermoved(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a folder copy notification
-
-   This function:
-   -# Creates a FolderMoveCopyNotification structure
-   -# Dumps that structure out using mapidump_foldercopy()
-   -# Tests mapidump_foldercopy() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_foldercopied(struct mapitest *mt)
-{
-       struct FolderMoveCopyNotification foldermovecopynotification;
-
-       foldermovecopynotification.ParentFID = 0x9876CAFE432LL;
-       foldermovecopynotification.FID = 0x1234ABCDLL;
-       foldermovecopynotification.OldParentFID = 0x9876CAFE43201DLL;
-       foldermovecopynotification.OldFID = 0x1234ABCD01DLL;
-       mapidump_foldercopied(&foldermovecopynotification, "[sep]");
-       
-       mapidump_foldercopied(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a Folder creation notification
-
-   This function:
-   -# Creates a FolderCreatedNotification structure with a null tag set
-   -# Dumps that structure out using mapidump_foldercreated()
-   -# Adds a set of tags to the FolderCreatedNotification
-   -# Dumps the modified FolderCreatedNotification structure using mapidump_foldercreated()
-   -# Tests mapidump_foldercreated() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_foldercreated(struct mapitest *mt)
-{
-       struct FolderCreatedNotification foldercreatednotification;
-
-       foldercreatednotification.ParentFID = 0x9876CAFE432LL;
-       foldercreatednotification.FID = 0x1234ABCDLL;
-       foldercreatednotification.Tags = 0;
-       foldercreatednotification.TagCount = 0;
-       mapidump_foldercreated(&foldercreatednotification, "[sep]");
-
-       foldercreatednotification.TagCount = 3;
-       foldercreatednotification.Tags = talloc_array(mt->mem_ctx, enum MAPITAGS,
-                                                     foldercreatednotification.TagCount);
-       foldercreatednotification.Tags[0] = PR_RECIPIENT_CERTIFICATE;
-       foldercreatednotification.Tags[1] = PR_URL_COMP_NAME;
-       foldercreatednotification.Tags[2] = PR_END_ATTACH;
-
-       mapidump_foldercreated(&foldercreatednotification, "[sep]");
-
-       mapidump_foldercreated(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a Message deletion notification
-
-   This function:
-   -# Creates a MessageDeletedNotification structure
-   -# Dumps that structure out using mapidump_messagedeleted()
-   -# Tests mapidump_messagedeleted() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_messagedeleted(struct mapitest *mt)
-{
-       struct MessageDeletedNotification messagedeletednotification;
-
-       messagedeletednotification.FID = 0x1234ABCDLL;
-       messagedeletednotification.MID = 0x9876FEALL;
-       mapidump_messagedeleted(&messagedeletednotification, "[sep]");
-       
-       mapidump_messagedeleted(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a Message creation notification
-
-   This function:
-   -# Creates a MessageCreatedNotification structure
-   -# Dumps that structure out using mapidump_messagecreated()
-   -# Adds tags to the MessageCreatedNotification structure
-   -# Dumps the structure again.
-   -# Tests mapidump_messagecreated() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_messagecreated(struct mapitest *mt)
-{
-       struct MessageCreatedNotification messagecreatednotification;
-
-       messagecreatednotification.FID = 0x1234ABCDLL;
-       messagecreatednotification.MID = 0x9876FEALL;
-       messagecreatednotification.Tags = 0;
-       messagecreatednotification.TagCount = 0;
-       mapidump_messagecreated(&messagecreatednotification, "[sep]");
-
-       messagecreatednotification.TagCount = 3;
-       messagecreatednotification.Tags = talloc_array(mt->mem_ctx, enum MAPITAGS,
-                                                      messagecreatednotification.TagCount);
-       messagecreatednotification.Tags[0] = PR_DISPLAY_NAME;
-       messagecreatednotification.Tags[1] = PR_DISPLAY_NAME_UNICODE;
-       messagecreatednotification.Tags[2] = PR_COMPANY_NAME;
-
-       mapidump_messagecreated(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a Message moved notification
-
-   This function:
-   -# Creates a MessageMovedNotification structure
-   -# Dumps that structure out using mapidump_messagemoved()
-   -# Tests mapidump_messagemoved() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_messagemoved(struct mapitest *mt)
-{
-       struct MessageMoveCopyNotification messagemovednotification;
-
-       messagemovednotification.FID = 0x1234ABCDLL;
-       messagemovednotification.MID = 0x9876FEALL;
-       messagemovednotification.OldFID = 0x1234ABCD01dLL;
-       messagemovednotification.OldMID = 0x9876FEA01dLL;
-       mapidump_messagemoved(&messagemovednotification, "[sep]");
-       
-       mapidump_messagemoved(0, "[sep]");
-
-       return true;
-}
-
-
-/**
-   \details Test dump of a Message copied notification
-
-   This function:
-   -# Creates a MessageCopiedNotification structure
-   -# Dumps that structure out using mapidump_messagecopied()
-   -# Tests mapidump_messagecopied() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_messagecopied(struct mapitest *mt)
-{
-       struct MessageMoveCopyNotification messagecopiednotification;
-
-       messagecopiednotification.FID = 0x1234ABCDLL;
-       messagecopiednotification.MID = 0x9876FEALL;
-       messagecopiednotification.OldFID = 0x1234ABCD01dLL;
-       messagecopiednotification.OldMID = 0x9876FEA01dLL;
-       mapidump_messagecopied(&messagecopiednotification, "[sep]");
-       
-       mapidump_messagecopied(0, "[sep]");
-
-       return true;
-}
-
-/**
-   \details Test dump of a Message modification notification
-
-   This function:
-   -# Creates a MessageModifiedNotification structure
-   -# Dumps that structure out using mapidump_messagemodified()
-   -# Adds tags to the MessageModifiedNotification structure
-   -# Dumps the structure again.
-   -# Tests mapidump_messagemodified() with a null argument
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-   
-   \note This currently doesn't check the results are sane, so manual inspection is required
-*/ 
-_PUBLIC_ bool mapitest_mapidump_messagemodified(struct mapitest *mt)
-{
-       struct MessageModifiedNotification messagemodifiednotification;
-
-       messagemodifiednotification.FID = 0x1234ABCDLL;
-       messagemodifiednotification.MID = 0x9876FEALL;
-       messagemodifiednotification.Tags = 0;
-       messagemodifiednotification.TagCount = 0;
-       mapidump_messagemodified(&messagemodifiednotification, "[sep]");
-
-       messagemodifiednotification.TagCount = 3;
-       messagemodifiednotification.Tags = talloc_array(mt->mem_ctx, enum MAPITAGS,
-                                                       messagemodifiednotification.TagCount);
-       messagemodifiednotification.Tags[0] = PR_DISPLAY_NAME;
-       messagemodifiednotification.Tags[1] = PR_DISPLAY_NAME_UNICODE;
-       messagemodifiednotification.Tags[2] = PR_COMPANY_NAME;
-
-       mapidump_messagemodified(0, "[sep]");
-
-       return true;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_noserver.c b/branches/plugfest/utils/mapitest/modules/module_noserver.c
deleted file mode 100644 (file)
index fd2fc88..0000000
+++ /dev/null
@@ -1,1258 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - Non connection oriented tests
-
-   Copyright (C) Brad Hards 2008-2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_noserver.c
-
-   \brief Non connection oriented tests
-*/
-
-/* From MS-OXRTFCP, Section 4.1.1 */
-#define RTF_COMPRESSED1_HEX "2d0000002b0000004c5a4675f1c5c7a703000a007263706731323542320af32068656c090020627705b06c647d0a800fa0"
-#define RTF_UNCOMPRESSED1 "{\\rtf1\\ansi\\ansicpg1252\\pard hello world}\r\n"
-
-/* From MS-OXRTFCP, Section 4.1.2 */
-#define RTF_COMPRESSED2_HEX "1a0000001c0000004c5a4675e2d44b51410004205758595a0d6e7d010eb0"
-#define RTF_UNCOMPRESSED2 "{\\rtf1 WXYZWXYZWXYZWXYZWXYZ}"
-
-
-/**
-     \details Test the Compressed RTF decompression routine.
-
-   This function:
-   -# Loads some test data and checks it
-   -# Decompresses the test data
-   -# Checks that the decompressed data matches the expected result
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/ 
-_PUBLIC_ bool mapitest_noserver_lzfu(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       DATA_BLOB               uncompressed1;
-       DATA_BLOB               uncompressed2;
-       uint8_t                 compressed_hex[1024];
-       uint8_t                 *compressed;
-       uint32_t                compressed_length;
-
-       compressed = talloc_array(mt->mem_ctx, uint8_t, 1024);
-
-       memcpy(compressed_hex, RTF_COMPRESSED1_HEX, 98);
-       compressed_length = strhex_to_str((char*)compressed, 1024, (char*)compressed_hex, 98);
-       if (compressed_length != 49) {
-               mapitest_print(mt, "* %-40s: uncompress RTF - Bad length\n", "LZFU");
-               return false;
-       }
-
-       uint32_t crc = calculateCRC(compressed, 0x10, (49-0x10));
-       if (crc == 0xA7C7C5F1) {
-                 mapitest_print(mt, "* CRC pass\n");
-       } else {
-                 mapitest_print(mt, "* CRC failure, expected 0xA7C7C5F1, but got 0x%08X\n", crc);
-       }
-
-       retval = uncompress_rtf(mt->mem_ctx, compressed, compressed_length, &uncompressed1);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "uncompress_rtf - step 1 (bad retval)");
-               return false;
-       }          
-
-       if (sizeof(RTF_UNCOMPRESSED1) != uncompressed1.length) {
-               mapitest_print(mt, "* %-40s: FAILED (bad length: %i vs %i)\n", "uncompress_rtf - step 1",
-                              sizeof(RTF_UNCOMPRESSED1), uncompressed1.length);
-               return false;
-       }
-       if (!strncmp((char*)uncompressed1.data, RTF_UNCOMPRESSED1, uncompressed1.length)) {
-               mapitest_print(mt, "* %-40s: PASSED\n", "uncompress_rtf - step 1");
-       } else {
-               mapitest_print(mt, "* %-40s: FAILED - %s\n", "uncompress_rtf - step 1", (char*)uncompressed1.data);
-               return false;
-       }
-
-       memcpy(compressed_hex, RTF_COMPRESSED2_HEX, 60);
-       compressed_length = strhex_to_str((char*)compressed, 1024, (char*)compressed_hex, 60);
-       if (compressed_length != 30) {
-               mapitest_print(mt, "* %-40s: uncompress RTF - Bad length\n", "LZFU");
-               return false;
-       }
-       retval = uncompress_rtf(mt->mem_ctx, compressed, compressed_length, &uncompressed2);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "uncompress_rtf - step 2 (bad retval)");
-               return false;
-       }          
-
-       if (!strncmp((char*)uncompressed2.data, RTF_UNCOMPRESSED2, uncompressed2.length)) {
-               mapitest_print(mt, "* %-40s: PASSED\n", "uncompress_rtf - step 2");
-       } else {
-               mapitest_print(mt, "* %-40s: FAILED - %s\n", "uncompress_rtf - step 2", (char*)uncompressed2.data);
-               return false;
-       }
-       
-       /* TODO: add an uncompressed test here */
-
-       return true;
-}
-
-/**
-     \details Test the Compressed RTF compression routine.
-
-   This function:
-   -# Loads some test data and checks it
-   -# Compresses the test data
-   -# Checks that the compressed data matches the expected result
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/ 
-_PUBLIC_ bool mapitest_noserver_rtfcp(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       uint8_t                 *compressed;
-       size_t                  compressed_length;
-       char                    *compressed_hex;
-
-       /* compress the test data */
-       retval = compress_rtf(mt->mem_ctx, RTF_UNCOMPRESSED1, sizeof(RTF_UNCOMPRESSED1) - 1, &compressed, &compressed_length);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "compress_rtf - step 1 (bad retval)");
-               return false;
-       }
-
-       /* Check the compressed result matches the compressed array */
-       compressed_hex = hex_encode_talloc(mt->mem_ctx, compressed, compressed_length);
-       if (strncasecmp(compressed_hex, RTF_COMPRESSED1_HEX, (size_t)98) != 0) {
-               mapitest_print(mt, "* %-40s: compare results RTF_COMPRESSED1 - mismatch\n", "RTFCP");
-               mapitest_print(mt, "- %s\n", RTF_COMPRESSED1_HEX);
-               mapitest_print(mt, "- %s\n", compressed_hex);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-40s: compare results RTF_COMPRESSED1 - match\n", "RTFCP");
-               mapitest_print(mt, "- %s\n", RTF_COMPRESSED1_HEX);
-               mapitest_print(mt, "- %s\n", compressed_hex);
-       }
-       talloc_free(compressed_hex);
-       talloc_free(compressed);
-
-       /* compress the test data */
-       retval = compress_rtf(mt->mem_ctx, RTF_UNCOMPRESSED2, sizeof(RTF_UNCOMPRESSED2) - 1, &compressed, &compressed_length);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "compress_rtf - step 2 (bad retval)");
-               return false;
-       }
-
-       // Check the compressed result matches the compressed array.
-       compressed_hex = hex_encode_talloc(mt->mem_ctx, compressed, compressed_length);
-       if (strncasecmp(compressed_hex, RTF_COMPRESSED2_HEX, sizeof(RTF_COMPRESSED2_HEX)) != 0) {
-               mapitest_print(mt, "* %-40s: compare results RTF_COMPRESSED2 - mismatch\n", "RTFCP");
-               mapitest_print(mt, "- %s\n", RTF_COMPRESSED2_HEX);
-               mapitest_print(mt, "- %s\n", compressed_hex);
-               return false;
-       } else {
-               mapitest_print(mt, "* %-40s: compare results RTF_COMPRESSED2 - match\n", "RTFCP");
-               mapitest_print(mt, "- %s\n", RTF_COMPRESSED2_HEX);
-               mapitest_print(mt, "- %s\n", compressed_hex);
-       }
-       talloc_free(compressed_hex);
-       talloc_free(compressed);
-       return true;
-}
-
-/**
-     \details Test the Compressed RTF compression / decompression routines on a larger file
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/ 
-_PUBLIC_ bool mapitest_noserver_rtfcp_large(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-
-       char                    *filename = NULL;
-       char                    *original_uncompressed_data;
-       size_t                  original_uncompressed_length;
-       char                    *original_uncompressed_hex;
-
-       uint8_t                 *compressed;
-       size_t                  compressed_length;
-
-       DATA_BLOB               decompressed;
-       char                    *decompressed_hex;
-
-       /* load the test file */
-       filename = talloc_asprintf(mt->mem_ctx, "%s/testcase.rtf", LZFU_DATADIR);
-       original_uncompressed_data = file_load(filename, &original_uncompressed_length, 0, mt->mem_ctx);
-       if (!original_uncompressed_data) {
-               perror(filename);
-               mapitest_print(mt, "%s: Error while loading %s\n", __FUNCTION__, filename);
-               talloc_free(filename);
-               return false;
-       }
-       talloc_free(filename);
-       original_uncompressed_hex = hex_encode_talloc(mt->mem_ctx, (const unsigned char*)original_uncompressed_data, original_uncompressed_length);
-
-       /* compress it */
-       retval = compress_rtf(mt->mem_ctx, original_uncompressed_data, original_uncompressed_length, &compressed, &compressed_length);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval_clean(mt, "mapitest_noserver_rtfcp_large - step 1 (bad retval)", retval);
-               return false;
-       }
-
-       /* decompress it */
-       retval = uncompress_rtf(mt->mem_ctx, compressed, compressed_length, &decompressed);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval_clean(mt, "mapitest_noserver_rtfcp_large - step 2 (bad retval)", retval);
-               return false;
-       }
-
-       mapitest_print(mt, "Original data size = 0x%zx\n", original_uncompressed_length);
-       mapitest_print(mt, "Decompressed size  = 0x%zx\n", decompressed.length);
-       {
-               int i;
-               int min;
-
-               min = (original_uncompressed_length >= decompressed.length) ? decompressed.length : original_uncompressed_length;
-               mapitest_print(mt, "Comparing data over 0x%x bytes\n", min);
-               for (i = 0; i < min; i++) {
-                       if (decompressed.data[i] != original_uncompressed_data[i]) {
-                               mapitest_print(mt, "Bytes differ at offset 0x%x: original (0x%.2x) decompressed (0x%.2x)\n", 
-                                               i, original_uncompressed_data[i], decompressed.data[i]);
-                       }
-               }
-               
-       }
-
-       /* check the uncompressed version (less trailing null) matches the original test file contents */
-       decompressed_hex = hex_encode_talloc(mt->mem_ctx, decompressed.data, decompressed.length -1);
-       if (strncasecmp(original_uncompressed_hex, decompressed_hex, original_uncompressed_length) != 0) {
-               mapitest_print(mt, "* %-40s: compare results - mismatch\n", "RTFCP_LARGE");
-               return false;
-       } else {
-               mapitest_print(mt, "* %-40s: compare results - match\n", "RTFCP_LARGE");
-               // mapitest_print(mt, "- %s\n", original_uncompressed_hex);
-               // mapitest_print(mt, "- %s\n", decompressed_hex);
-       }
-       
-       /* clean up */
-       talloc_free(decompressed_hex);
-       talloc_free(compressed);
-       talloc_free(original_uncompressed_hex);
-
-       return true;
-}
-
-#define SROWSET_UNTAGGED "005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203800005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203900005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203700005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203600005b4d545d2044756d6d793400426f6479206f66206d657373616765203400005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203500005b4d545d2044756d6d793300426f6479206f66206d657373616765203300005b4d545d2044756d6d793100426f6479206f66206d657373616765203100005b4d545d2044756d6d793200426f6479206f66206d657373616765203200005b4d545d2044756d6d793000426f6479206f66206d657373616765203000"
-#define SROWSET_UNTAGGED_LEN 330
-
-static bool mapitest_noserver_srowset_untagged(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct loadparm_context *lp_ctx = NULL;
-       DATA_BLOB               rawData;
-       uint8_t                 rawDataHex[1024];
-       struct SRowSet          rowSet;
-       struct SRowSet          referenceRowSet;
-       struct SPropTagArray    *proptags;
-       uint32_t                rowNum;
-
-       retval = GetLoadparmContext(mt->mapi_ctx, &lp_ctx);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       rawData.data = talloc_array(mt->mem_ctx, uint8_t, 1024);
-       memcpy(rawDataHex, SROWSET_UNTAGGED, 2*SROWSET_UNTAGGED_LEN);
-       rawData.length = strhex_to_str((char*)rawData.data, 1024, (char*)rawDataHex, 2*SROWSET_UNTAGGED_LEN);
-       if (rawData.length != SROWSET_UNTAGGED_LEN) {
-               mapitest_print(mt, "* %-40s: untagged - Bad length\n", "SRowSet");
-               return false;
-       }
-
-       proptags = set_SPropTagArray(mt->mem_ctx, 2, PR_SENDER_NAME,  PR_BODY);
-       rowSet.cRows = 10;
-       rowSet.aRow = talloc_array(mt->mem_ctx, struct SRow, 10);
-       emsmdb_get_SRowSet(mt->mem_ctx, lp_ctx, &rowSet, proptags, &rawData);
-
-       /* Check the resulting SRowSet */
-       if (rowSet.cRows != 10) {
-               mapitest_print(mt, "* %-40s: unexpected row count: %i\n", "SRowSet", rowSet.cRows);
-               return false;
-       }
-
-       /* Build reference RowSet */
-       referenceRowSet.cRows = rowSet.cRows;
-       referenceRowSet.aRow = talloc_array(mt->mem_ctx, struct SRow, rowSet.cRows);
-       for (rowNum = 0; rowNum < rowSet.cRows; ++rowNum) {
-               referenceRowSet.aRow[rowNum].ulAdrEntryPad = 0;
-               referenceRowSet.aRow[rowNum].cValues = 2;
-               referenceRowSet.aRow[rowNum].lpProps = talloc_array(mt->mem_ctx, struct SPropValue, 2);
-               referenceRowSet.aRow[rowNum].lpProps[0].ulPropTag = PR_SENDER_NAME;
-               referenceRowSet.aRow[rowNum].lpProps[0].dwAlignPad = 0;
-               referenceRowSet.aRow[rowNum].lpProps[1].ulPropTag = PR_BODY;
-               referenceRowSet.aRow[rowNum].lpProps[1].dwAlignPad = 0;
-       }
-       referenceRowSet.aRow[0].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[0].lpProps[1].value.lpszA = "Body of message 8";
-       referenceRowSet.aRow[1].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[1].lpProps[1].value.lpszA = "Body of message 9";
-       referenceRowSet.aRow[2].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[2].lpProps[1].value.lpszA = "Body of message 7";
-       referenceRowSet.aRow[3].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[3].lpProps[1].value.lpszA = "Body of message 6";
-       referenceRowSet.aRow[4].lpProps[0].value.lpszA = "[MT] Dummy4";
-       referenceRowSet.aRow[4].lpProps[1].value.lpszA = "Body of message 4";
-       referenceRowSet.aRow[5].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[5].lpProps[1].value.lpszA = "Body of message 5";
-       referenceRowSet.aRow[6].lpProps[0].value.lpszA = "[MT] Dummy3";
-       referenceRowSet.aRow[6].lpProps[1].value.lpszA = "Body of message 3";
-       referenceRowSet.aRow[7].lpProps[0].value.lpszA = "[MT] Dummy1";
-       referenceRowSet.aRow[7].lpProps[1].value.lpszA = "Body of message 1";
-       referenceRowSet.aRow[8].lpProps[0].value.lpszA = "[MT] Dummy2";
-       referenceRowSet.aRow[8].lpProps[1].value.lpszA = "Body of message 2";
-       referenceRowSet.aRow[9].lpProps[0].value.lpszA = "[MT] Dummy0";
-       referenceRowSet.aRow[9].lpProps[1].value.lpszA = "Body of message 0";
-
-
-       /* compare result with reference rowset */
-       for (rowNum = 0; rowNum < rowSet.cRows; ++rowNum) {
-               uint32_t        i;
-               /* check each row has expected number of properties */
-               if (rowSet.aRow[rowNum].cValues != referenceRowSet.aRow[rowNum].cValues) {
-                       mapitest_print(mt, "* %-40s: unexpected props count, row %i: %i\n", "SRowSet", rowSet.aRow[rowNum].cValues, rowNum);
-                       return false;
-               }
-               for (i=0; i < rowSet.aRow[rowNum].cValues; ++i) {
-                       /* check property tags are as expected */
-                       if (rowSet.aRow[rowNum].lpProps[i].ulPropTag != referenceRowSet.aRow[rowNum].lpProps[i].ulPropTag) {
-                               mapitest_print(mt, "* %-40s: unexpected proptag (%i/%i): 0x%08x\n", "SRowSet", rowNum, i, rowSet.aRow[rowNum].lpProps[i].ulPropTag);
-                               return false;
-                       }
-                       /* check property values are as expected */
-                       if (strcmp(rowSet.aRow[rowNum].lpProps[i].value.lpszA, referenceRowSet.aRow[rowNum].lpProps[i].value.lpszA) != 0) {
-                               mapitest_print(mt, "* %-40s: unexpected property value (%i/%i): %s\n", "SRowSet", rowNum, i, rowSet.aRow[rowNum].lpProps[i].value.lpszA);
-                               return false;
-                       }
-               }
-       }
-       return true;
-}
-
-#define SROWSET_TAGGED "01005b4d545d2044756d6d792046726f6d000a0f010480005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203500005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203600005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203700005b4d545d2044756d6d792046726f6d00426f6479206f66206d657373616765203800005b4d545d2044756d6d792046726f6d00426f6479206f66206d65737361676520390001005b4d545d2044756d6d7930000a0f010480005b4d545d2044756d6d793000426f6479206f66206d65737361676520300001005b4d545d2044756d6d7931000a0f010480005b4d545d2044756d6d793100426f6479206f66206d65737361676520310001005b4d545d2044756d6d7932000a0f010480005b4d545d2044756d6d793200426f6479206f66206d65737361676520320001005b4d545d2044756d6d7933000a0f010480005b4d545d2044756d6d793300426f6479206f66206d65737361676520330001005b4d545d2044756d6d7934000a0f010480005b4d545d2044756d6d793400426f6479206f66206d657373616765203400"
-#define SROWSET_TAGGED_LEN 448
-
-
-static bool mapitest_noserver_srowset_tagged(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct loadparm_context *lp_ctx = NULL;
-       DATA_BLOB               rawData;
-       uint8_t                 rawDataHex[1024];
-       struct SRowSet          rowSet;
-       struct SRowSet          referenceRowSet;
-       struct SPropTagArray    *proptags;
-       uint32_t                rowNum;
-
-       retval = GetLoadparmContext(mt->mapi_ctx, &lp_ctx);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       rawData.data = talloc_array(mt->mem_ctx, uint8_t, 1024);
-       memcpy(rawDataHex, SROWSET_TAGGED, 2*SROWSET_TAGGED_LEN);
-       rawData.length = strhex_to_str((char*)rawData.data, 1024, (char*)rawDataHex, 2*SROWSET_TAGGED_LEN);
-       if (rawData.length != SROWSET_TAGGED_LEN) {
-               mapitest_print(mt, "* %-40s: tagged - Bad length\n", "SRowSet");
-               return false;
-       }
-
-       proptags = set_SPropTagArray(mt->mem_ctx, 2, PR_SENDER_NAME,  PR_BODY);
-       rowSet.cRows = 16;
-       rowSet.aRow = talloc_array(mt->mem_ctx, struct SRow, 16);
-       emsmdb_get_SRowSet(mt->mem_ctx, lp_ctx, &rowSet, proptags, &rawData);
-
-       /* Check the resulting SRowSet */
-       if (rowSet.cRows != 16) {
-               mapitest_print(mt, "* %-40s: unexpected row count: %i\n", "SRowSet", rowSet.cRows);
-               return false;
-       }
-
-       /* Build reference RowSet */
-       referenceRowSet.cRows = rowSet.cRows;
-       referenceRowSet.aRow = talloc_array(mt->mem_ctx, struct SRow, rowSet.cRows);
-       for (rowNum = 0; rowNum < rowSet.cRows; ++rowNum) {
-               referenceRowSet.aRow[rowNum].ulAdrEntryPad = 0;
-               referenceRowSet.aRow[rowNum].cValues = 2;
-               referenceRowSet.aRow[rowNum].lpProps = talloc_array(mt->mem_ctx, struct SPropValue, 2);
-               referenceRowSet.aRow[rowNum].lpProps[0].ulPropTag = PR_SENDER_NAME;
-               referenceRowSet.aRow[rowNum].lpProps[0].dwAlignPad = 0;
-               referenceRowSet.aRow[rowNum].lpProps[1].ulPropTag = PR_BODY;
-               referenceRowSet.aRow[rowNum].lpProps[1].dwAlignPad = 0;
-       }
-       referenceRowSet.aRow[0].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[0].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[0].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[1].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[1].lpProps[1].value.lpszA = "Body of message 5";
-       referenceRowSet.aRow[2].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[2].lpProps[1].value.lpszA = "Body of message 6";
-       referenceRowSet.aRow[3].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[3].lpProps[1].value.lpszA = "Body of message 7";
-       referenceRowSet.aRow[4].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[4].lpProps[1].value.lpszA = "Body of message 8";
-       referenceRowSet.aRow[5].lpProps[0].value.lpszA = "[MT] Dummy From";
-       referenceRowSet.aRow[5].lpProps[1].value.lpszA = "Body of message 9";
-       referenceRowSet.aRow[6].lpProps[0].value.lpszA = "[MT] Dummy0";
-       referenceRowSet.aRow[6].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[6].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[7].lpProps[0].value.lpszA = "[MT] Dummy0";
-       referenceRowSet.aRow[7].lpProps[1].value.lpszA = "Body of message 0";
-       referenceRowSet.aRow[8].lpProps[0].value.lpszA = "[MT] Dummy1";
-       referenceRowSet.aRow[8].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[8].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[9].lpProps[0].value.lpszA = "[MT] Dummy1";
-       referenceRowSet.aRow[9].lpProps[1].value.lpszA = "Body of message 1";
-       referenceRowSet.aRow[10].lpProps[0].value.lpszA = "[MT] Dummy2";
-       referenceRowSet.aRow[10].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[10].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[11].lpProps[0].value.lpszA = "[MT] Dummy2";
-       referenceRowSet.aRow[11].lpProps[1].value.lpszA = "Body of message 2";
-       referenceRowSet.aRow[12].lpProps[0].value.lpszA = "[MT] Dummy3";
-       referenceRowSet.aRow[12].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[12].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[13].lpProps[0].value.lpszA = "[MT] Dummy3";
-       referenceRowSet.aRow[13].lpProps[1].value.lpszA = "Body of message 3";
-       referenceRowSet.aRow[14].lpProps[0].value.lpszA = "[MT] Dummy4";
-       referenceRowSet.aRow[14].lpProps[1].ulPropTag = PR_BODY_ERROR;
-       referenceRowSet.aRow[14].lpProps[1].value.err = MAPI_E_NOT_FOUND;
-       referenceRowSet.aRow[15].lpProps[0].value.lpszA = "[MT] Dummy4";
-       referenceRowSet.aRow[15].lpProps[1].value.lpszA = "Body of message 4";
-
-       /* compare result with reference rowset */
-       for (rowNum = 0; rowNum < rowSet.cRows; ++rowNum) {
-               uint32_t        i;
-               /* check each row has expected number of properties */
-               if (rowSet.aRow[rowNum].cValues != referenceRowSet.aRow[rowNum].cValues) {
-                       mapitest_print(mt, "* %-40s: unexpected props count, row %i: %i\n", "SRowSet", rowSet.aRow[rowNum].cValues, rowNum);
-                       return false;
-               }
-               for (i=0; i < rowSet.aRow[rowNum].cValues; ++i) {
-                       /* check property tags are as expected */
-                       if (rowSet.aRow[rowNum].lpProps[i].ulPropTag != referenceRowSet.aRow[rowNum].lpProps[i].ulPropTag) {
-                               mapitest_print(mt, "* %-40s: unexpected proptag (%i/%i): 0x%08x\n", "SRowSet", rowNum, i, rowSet.aRow[rowNum].lpProps[i].ulPropTag);
-                               return false;
-                       }
-                       /* check property values are as expected */
-                       if ((rowSet.aRow[rowNum].lpProps[i].ulPropTag & 0xFFFF) == PT_ERROR) {
-                               if (rowSet.aRow[rowNum].lpProps[i].value.err != referenceRowSet.aRow[rowNum].lpProps[i].value.err) {
-                                       mapitest_print(mt, "* %-40s: unexpected property error value (%i/%i): 0x%04x\n", "SRowSet", rowNum, i, rowSet.aRow[rowNum].lpProps[i].value.err);
-                                       return false;
-                               }
-                       } else {
-                               if (strcmp(rowSet.aRow[rowNum].lpProps[i].value.lpszA, referenceRowSet.aRow[rowNum].lpProps[i].value.lpszA) != 0) {
-                                       mapitest_print(mt, "* %-40s: unexpected property value (%i/%i): %s\n", "SRowSet", rowNum, i, rowSet.aRow[rowNum].lpProps[i].value.lpszA);
-                                       return false;
-                               }
-                       }
-               }
-       }
-       return true;
-}
-
-/**
-     \details Test the SRowSet parsing / assembly code
-
-   This function:
-   -# Loads some test data and checks it
-   -# Parses the test data 
-   -# Checks that the parsed data matches the expected result
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_noserver_srowset(struct mapitest *mt) 
-{
-       bool result;
-
-       result = mapitest_noserver_srowset_untagged(mt);
-       if (result == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SRowSet Untagged");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SRowSet Untagged");
-
-       result = mapitest_noserver_srowset_tagged(mt);
-       if (result == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SRowSet Tagged");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SRowSet Tagged");
-
-       return true;
-}
-
-static bool mapitest_no_server_props_i2(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       uint16_t i2 = 0x5693; /* just a random, not zero value */
-       const uint16_t *i2get;
-
-       set_SPropValue_proptag(&propvalue, PT_SHORT, &i2);
-       i2get = (const uint16_t*)get_SPropValue_data(&propvalue);
-       if (!i2get || (*i2get != i2)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_SHORT");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_SHORT");
-       return true;
-}
-
-static bool mapitest_no_server_props_i4(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       uint32_t i4 = 0x33870911;
-       const uint32_t *i4get;
-
-       set_SPropValue_proptag(&propvalue, PT_LONG, &i4);
-       i4get = (const uint32_t*)get_SPropValue_data(&propvalue);
-       if (!i4get || (*i4get != i4)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_LONG");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_LONG");
-
-       return true;
-}
-
-static bool mapitest_no_server_props_i8(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       uint64_t i8 = 0x098763aa;
-       const uint64_t *i8get;
-
-       set_SPropValue_proptag(&propvalue, PT_I8, &i8);
-       i8get = (const uint64_t*)get_SPropValue_data(&propvalue);
-       if (!i8get || (*i8get != i8)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_I8");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_I8");
-
-       return true;
-}
-
-
-static bool mapitest_no_server_props_bool(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       bool b = false;
-       const bool *boolget;
-
-       set_SPropValue_proptag(&propvalue, PT_BOOLEAN, &b);
-       boolget = (const bool*)get_SPropValue_data(&propvalue);
-       if (!boolget || (*boolget != b)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_BOOLEAN");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_BOOLEAN");
-
-       return true;
-}
-
-static bool mapitest_no_server_props_err(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       enum MAPISTATUS err = MAPI_E_NOT_ME;
-       enum MAPISTATUS *errget;
-
-       set_SPropValue_proptag(&propvalue, PT_ERROR, &err);
-       errget = (enum MAPISTATUS*)get_SPropValue_data(&propvalue);
-       if (!errget || (*errget != err)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_ERROR");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_ERROR");
-
-       return true;
-}
-
-/* this seems strange... */
-static bool mapitest_no_server_props_null(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       uint32_t nullval = 0;
-       const uint32_t *nullget;
-
-       set_SPropValue_proptag(&propvalue, PT_NULL, &nullval);
-       nullget = (const uint32_t*)get_SPropValue_data(&propvalue);
-       if (!nullget) {
-               printf("null nullget\n");
-       }
-       if (!nullget || (*nullget != nullval)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_NULL");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_NULL");
-
-       return true;
-}
-
-
-static bool mapitest_no_server_props_string8(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       char *string = "OpenChange Project";
-       const char **stringget;
-
-       set_SPropValue_proptag(&propvalue, PT_STRING8, &string);
-       stringget = (const char**)get_SPropValue_data(&propvalue);
-       if (!stringget || (strncmp(*stringget, string, sizeof(*stringget)) != 0)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_STRING8");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_STRING8");
-
-       return true;
-}
-
-static bool mapitest_no_server_props_unicode(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       char *string = "OpenChange Project"; /* OK, so it probably isn't valid UTF16.. */
-       const char **stringget;
-
-       set_SPropValue_proptag(&propvalue, PT_UNICODE, &string);
-       stringget = (const char**)get_SPropValue_data(&propvalue);
-       if (!stringget || (strncmp(*stringget, string, sizeof(*stringget)) != 0)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_UNICODE");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_UNICODE");
-
-       return true;
-}
-
-static bool mapitest_no_server_props_filetime(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       struct FILETIME ft;
-       const struct FILETIME *ftget;
-
-       ft.dwLowDateTime = 0x12345678;
-       ft.dwHighDateTime = 0x87653491;
-       set_SPropValue_proptag(&propvalue, PT_SYSTIME, &ft);
-       ftget = (const struct FILETIME *)get_SPropValue_data(&propvalue);
-       if (!ftget || (ft.dwLowDateTime != ftget->dwLowDateTime) || (ft.dwHighDateTime != ftget->dwHighDateTime)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_SYSTIME");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_SYSTIME");
-
-       return true;
-}
-#if 0
-static bool mapitest_no_server_props_flatuid(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct FlatUID_r uid;
-       const struct FlatUID_r *uidget;
-       int i;
-
-       // initialise uid
-       for (i = 0; i < 16; ++i) {
-               uid.ab[i] = 0x40 + i;
-       }
-       printf("uid:");
-       for (i = 0; i < 16; ++i) {
-               printf("%c", uid.ab[i]);
-       }
-       printf("\n");
-
-       res = set_SPropValue_proptag(&propvalue, PT_CLSID, &uid);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_CLSID");
-               return false;
-       }
-       uidget = (const struct FlatUID_r*)get_SPropValue_data(&propvalue);
-       if (!uidget) {
-               printf("null uidget\n");
-               return false;
-       }
-       printf("uidget:");
-       for (i = 0; i < 16; ++i) {
-               printf("%c", uidget->ab[i]);
-       }
-       printf("\n");
-       if (!uidget || (memcmp(uid.ab, uidget->ab, 16))) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_CLSID");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_CLSID");
-
-       return true;
-}
-#endif
-
-static bool mapitest_no_server_props_bin(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-
-       struct Binary_r bin;
-       const struct Binary_r *binget;
-       uint32_t        i;
-
-       // initialise bin
-       bin.cb = 8;
-       bin.lpb = talloc_array(mt->mem_ctx, uint8_t, bin.cb);
-       for (i = 0; i < bin.cb; ++i) {
-               bin.lpb[i] = 0xF0 + i;
-       }
-
-       res = set_SPropValue_proptag(&propvalue, PT_BINARY, &bin);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_BINARY");
-               return false;
-       }
-       binget = (const struct Binary_r *)get_SPropValue_data(&propvalue);
-       if (!binget || (bin.cb != binget->cb) || (bin.lpb != binget->lpb)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_BINARY");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_BINARY");
-
-       talloc_free(bin.lpb);
-
-       return true;
-}
-
-
-static bool mapitest_no_server_props_mv_i2(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct ShortArray_r shortarray;
-       const struct ShortArray_r *shortarrayget;
-
-       // create and initialise shortarray
-       shortarray.cValues = 3;
-       shortarray.lpi = talloc_array(mt->mem_ctx, uint16_t, shortarray.cValues);
-       shortarray.lpi[0] = 0x1245;
-       shortarray.lpi[1] = 0x3498;
-       shortarray.lpi[2] = 0x5675;
-       res = set_SPropValue_proptag(&propvalue, PT_MV_SHORT, &shortarray);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_SHORT");
-               return false;
-       }
-       shortarrayget = (const struct ShortArray_r *)get_SPropValue_data(&propvalue);
-       if (!shortarrayget || (shortarray.cValues != shortarrayget->cValues) || (shortarray.lpi != shortarrayget->lpi)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_SHORT");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_SHORT");
-
-       talloc_free(shortarray.lpi);
-
-       return true;
-}
-
-static bool mapitest_no_server_props_mv_i4(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct LongArray_r longarray;
-       const struct LongArray_r *longarrayget;
-
-       // create and initialise longarray
-       longarray.cValues = 2;
-       longarray.lpl = talloc_array(mt->mem_ctx, uint32_t, longarray.cValues);
-       longarray.lpl[0] = 0x34124543;
-       longarray.lpl[1] = 0x88567576;
-       res = set_SPropValue_proptag(&propvalue, PT_MV_LONG, &longarray);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_LONG");
-               return false;
-       }
-       longarrayget = (const struct LongArray_r *)get_SPropValue_data(&propvalue);
-       if (!longarrayget || (longarray.cValues != longarrayget->cValues) || (longarray.lpl != longarrayget->lpl)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_LONG");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_LONG");
-
-       talloc_free(longarray.lpl);
-
-       return true;
-}
-
-static bool mapitest_no_server_props_mv_bin(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct BinaryArray_r binarray;
-       const struct BinaryArray_r *binarrayget;
-
-       // create and initialise binarray
-       struct Binary_r bin1, bin2;
-       uint32_t i;
-
-       // initialise bin
-       bin1.cb = 8;
-       bin1.lpb = talloc_array(mt->mem_ctx, uint8_t, bin1.cb);
-       for (i = 0; i < bin1.cb; ++i) {
-               bin1.lpb[i] = 0xC0 + i;
-       }
-       bin2.cb = 12;
-       bin2.lpb = talloc_array(mt->mem_ctx, uint8_t, bin2.cb);
-       for (i = 0; i < bin2.cb; ++i) {
-               bin2.lpb[i] = 0xA0 + i;
-       }
-
-       binarray.cValues = 2;
-       binarray.lpbin = talloc_array(mt->mem_ctx, struct Binary_r, binarray.cValues);
-       binarray.lpbin[0] = bin1;
-       binarray.lpbin[1] = bin2;
-
-       res = set_SPropValue_proptag(&propvalue, PT_MV_BINARY, &binarray);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_BINARY");
-               return false;
-       }
-       binarrayget = (const struct BinaryArray_r *)get_SPropValue_data(&propvalue);
-       if (!binarrayget || (binarray.cValues != binarrayget->cValues) || (binarray.lpbin != binarrayget->lpbin)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_BINARY");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_BINARY");
-
-       talloc_free(binarray.lpbin);
-       talloc_free(bin1.lpb);
-       talloc_free(bin2.lpb);
-
-       return true;
-}
-
-static bool mapitest_no_server_props_mv_string8(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct StringArray_r stringarray;
-       const struct StringArray_r *stringarrayget;
-
-       // create and initialise stringarray
-       stringarray.cValues = 4;
-       stringarray.lppszA = talloc_array(mt->mem_ctx, const char*, stringarray.cValues);
-       stringarray.lppszA[0] = "Fedora";
-       stringarray.lppszA[1] = "FreeBSD";
-       stringarray.lppszA[2] = "OpenSolaris";
-       stringarray.lppszA[3] = "Debian";
-
-       res = set_SPropValue_proptag(&propvalue, PT_MV_STRING8, &stringarray);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_STRING8");
-               return false;
-       }
-       stringarrayget = (const struct StringArray_r *)get_SPropValue_data(&propvalue);
-       if (!stringarrayget || (stringarray.cValues != stringarrayget->cValues) || (stringarray.lppszA != stringarrayget->lppszA)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_STRING8");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_STRING8");
-
-       talloc_free(stringarray.lppszA);
-
-       return true;
-}
-
-static bool mapitest_no_server_props_mv_unicode(struct mapitest *mt)
-{
-       bool res;
-       struct SPropValue propvalue;
-       struct WStringArray_r unicodearray;
-       const struct WStringArray_r *unicodearrayget;
-
-       // create and initialise unicodearray
-       unicodearray.cValues = 4;
-       unicodearray.lppszW = talloc_array(mt->mem_ctx, const char*, unicodearray.cValues);
-       unicodearray.lppszW[0] = "Fedora";  /* not valid UTF16, but should still be OK */
-       unicodearray.lppszW[1] = "FreeBSD";
-       unicodearray.lppszW[2] = "OpenSolaris";
-       unicodearray.lppszW[3] = "Debian";
-
-       res = set_SPropValue_proptag(&propvalue, PT_MV_UNICODE, &unicodearray);
-       if (res == false) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_UNICODE");
-               return false;
-       }
-       unicodearrayget = (const struct WStringArray_r *)get_SPropValue_data(&propvalue);
-       if (!unicodearrayget || (unicodearray.cValues != unicodearrayget->cValues) || (unicodearray.lppszW != unicodearrayget->lppszW)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_UNICODE");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_UNICODE");
-
-       talloc_free(unicodearray.lppszW);
-
-       return true;
-}
-
-
-static bool mapitest_no_server_props_mv_filetime(struct mapitest *mt)
-{
-       struct SPropValue propvalue;
-       struct FILETIME ft1, ft2, ft3;
-       struct DateTimeArray_r ftarray;
-       const struct DateTimeArray_r *ftarrayget;
-
-       ft1.dwLowDateTime = 0x12345678;
-       ft1.dwHighDateTime = 0x87653491;
-       ft2.dwLowDateTime = 0x10234324;
-       ft2.dwHighDateTime = 0x98748756;
-       ft3.dwLowDateTime = 0x53245324;
-       ft3.dwHighDateTime = 0x54324633;
-
-       ftarray.cValues = 3;
-       ftarray.lpft = talloc_array(mt->mem_ctx, struct FILETIME, ftarray.cValues);
-       ftarray.lpft[0] = ft1;
-       ftarray.lpft[1] = ft2;
-       ftarray.lpft[2] = ft3;
-
-       set_SPropValue_proptag(&propvalue, PT_MV_SYSTIME, &ftarray);
-       ftarrayget = (const struct DateTimeArray_r *)get_SPropValue_data(&propvalue);
-       if (!ftarrayget || (ftarray.cValues != ftarrayget->cValues) || (ftarray.lpft != ftarrayget->lpft)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_SYSTIME");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with PT_MV_SYSTIME");
-
-       talloc_free(ftarray.lpft);
-
-       return true;
-}
-
-/**
-     \details Test the property setter / getter code
-
-   This function:
-   -# Checks setting / getting on an SPropValue
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_noserver_properties(struct mapitest *mt) 
-{
-       if (! mapitest_no_server_props_i2(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_i4(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_i8(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_bool(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_err(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_null(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_string8(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_unicode(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_filetime(mt)) {
-               return false;
-       }
-
-#if 0
-       if (! mapitest_no_server_props_flatuid(mt)) {
-               return false;
-       }
-#endif
-
-       if (! mapitest_no_server_props_bin(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_i2(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_i4(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_string8(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_unicode(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_filetime(mt)) {
-               return false;
-       }
-
-       if (! mapitest_no_server_props_mv_bin(mt)) {
-               return false;
-       }
-
-       /*
-           Types we don't test yet:
-        */
-       // should this be a double_t?
-       // int64_t dbl;/* [case(0x0005)] */
-
-       // struct FlatUID_r *lpguid;/* [unique,case(0x0048)] */
-       // struct FlatUIDArray_r MVguid;/* [case(0x1048)] */
-       // uint32_t object;/* [case(0x000d)] */
-
-
-       return true;
-}
-
-/**
-     \details Test the mapi_SPropValue_array handling
-
-   This function:
-   -# Builds a mapi_SPropValue_array
-   -# Checks that appropriate values can be retrieved
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_noserver_mapi_properties(struct mapitest *mt) 
-{
-       struct mapi_SPropValue_array valarray;
-       const uint16_t *i2get;
-       const uint32_t *i4get;
-       const uint32_t *i8get;
-       const uint8_t *boolget;
-       const char *stringget;
-       const struct FILETIME *ftget;
-       const struct SBinary_short *binget;
-       const struct mapi_MV_LONG_STRUCT *mvi4get;
-
-       valarray.cValues = 8;
-       valarray.lpProps = talloc_array(mt->mem_ctx, struct mapi_SPropValue, valarray.cValues);
-
-       valarray.lpProps[0].ulPropTag = PR_GENDER;
-       valarray.lpProps[0].value.i = 0x0001;  /* Female */
-       valarray.lpProps[1].ulPropTag = PR_ORIGINAL_SENSITIVITY;
-       valarray.lpProps[1].value.l = 0x00000002; /* Private */
-       valarray.lpProps[2].ulPropTag = PR_ALTERNATE_RECIPIENT_ALLOWED;
-       valarray.lpProps[2].value.b = false; 
-       valarray.lpProps[3].ulPropTag = PR_CONVERSATION_TOPIC;
-       valarray.lpProps[3].value.lpszA = "Elizabeth's Birthday"; 
-       valarray.lpProps[4].ulPropTag = PR_MESSAGE_SIZE_EXTENDED;
-       valarray.lpProps[4].value.d = 43857;
-       valarray.lpProps[5].ulPropTag = PR_RECORD_KEY;
-       valarray.lpProps[5].value.bin.cb = 4;
-       valarray.lpProps[5].value.bin.lpb = talloc_array(mt->mem_ctx, uint8_t, 4);
-       valarray.lpProps[5].value.bin.lpb[0] = 0x44;
-       valarray.lpProps[5].value.bin.lpb[1] = 0x00;
-       valarray.lpProps[5].value.bin.lpb[2] = 0x20;
-       valarray.lpProps[5].value.bin.lpb[3] = 0x00;
-       valarray.lpProps[6].ulPropTag = PR_FREEBUSY_BUSY_MONTHS;
-       valarray.lpProps[6].value.MVl.cValues = 2;
-       valarray.lpProps[6].value.MVl.lpl = talloc_array(mt->mem_ctx, uint32_t, 2);
-       valarray.lpProps[6].value.MVl.lpl[0] = 32130;
-       valarray.lpProps[6].value.MVl.lpl[1] = 32131;
-       valarray.lpProps[7].ulPropTag = PidLidAppointmentEndWhole;
-       valarray.lpProps[7].value.ft.dwLowDateTime  = 0x12975909;
-       valarray.lpProps[7].value.ft.dwHighDateTime  = 0x98989204;
-
-       /* now start pulling the values back out */
-       i2get = find_mapi_SPropValue_data(&valarray, PR_GENDER);
-       if (!i2get || (*i2get != 0x0001)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_SHORT");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_SHORT");
-
-
-       i4get = find_mapi_SPropValue_data(&valarray, PR_ORIGINAL_SENSITIVITY);
-       if (!i4get || (*i4get != 0x00000002)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_LONG");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_LONG");
-
-
-       i8get = find_mapi_SPropValue_data(&valarray, PR_MESSAGE_SIZE_EXTENDED);
-       if (!i8get || (*i8get != 43857)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_I8");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_I8");
-
-
-       boolget = find_mapi_SPropValue_data(&valarray, PR_ALTERNATE_RECIPIENT_ALLOWED);
-       if (!boolget || (*boolget != false)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_BOOLEAN");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_BOOLEAN");
-
-
-       stringget = find_mapi_SPropValue_data(&valarray, PR_CONVERSATION_TOPIC);
-       if (!stringget || (strcmp(stringget, "Elizabeth's Birthday") !=0 )) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_STRING");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_STRING");
-
-       ftget = find_mapi_SPropValue_data(&valarray, PidLidAppointmentEndWhole);
-       if (!ftget || (ftget->dwLowDateTime != 0x12975909) || (ftget->dwHighDateTime != 0x98989204)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_FILETIME");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_FILETIME");
-
-       binget = find_mapi_SPropValue_data(&valarray, PR_RECORD_KEY);
-       if (!binget || (binget->cb != 4 ) || (binget->lpb[0] != 0x44) || (binget->lpb[1] != 0x00)
-           || (binget->lpb[2] != 0x20) || (binget->lpb[3] != 0x00)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_BINARY");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_BINARY");
-
-
-       mvi4get = find_mapi_SPropValue_data(&valarray, PR_FREEBUSY_BUSY_MONTHS);
-       if (!mvi4get || (mvi4get->cValues != 2 ) || (mvi4get->lpl[0] != 32130) || (mvi4get->lpl[1] != 32131)) {
-               /* failure */
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "mapi_SPropValue find with PT_MV_LONG");
-               return false;
-       }
-       mapitest_print(mt, "* %-40s: [SUCCESS]\n", "mapi_SPropValue find with PT_MV_LONG");
-
-#if 0
-       // Types to still to test:
-        int64_t dbl;/* [case(0x0005)] */
-        uint32_t err;/* [case(0x000a)] */
-        const char * lpszW;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(0x001f)] */
-        struct GUID lpguid;/* [case(0x0048)] */
-        struct mapi_SRestriction_wrap Restrictions;/* [case(0x00fd)] */
-        struct RuleAction RuleAction;/* [case(0x00fe)] */
-        struct mapi_SLPSTRArray MVszA;/* [case(0x101e)] */
-        struct mapi_SPLSTRArrayW MVszW;/* [case(0x101f)] */
-        struct mapi_SGuidArray MVguid;/* [case(0x1048)] */
-        struct mapi_SBinaryArray MVbin;/* [case(0x1102)] */
-#endif
-       return true;
-}
-
-/**
-     \details Test the get_proptag_value() function
-
-   This function:
-   -# Checks the first value in the list
-   -# Checks a random value from the list
-   -# Checks the last value in the list
-   -# Checks a value that doesn't exist
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_noserver_proptagvalue(struct mapitest *mt) 
-{
-       uint32_t proptag;
-       
-       proptag = get_proptag_value("PR_ACKNOWLEDGEMENT_MODE");
-       if (proptag != PR_ACKNOWLEDGEMENT_MODE) {
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "get_proptag_value with PR_ACKNOWLEDGEMENT_MODE");
-               return false;
-       }
-
-       proptag = get_proptag_value("PR_PROFILE_OPEN_FLAGS");
-       if (proptag != PR_PROFILE_OPEN_FLAGS) {
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "get_proptag_value with PR_PROFILE_OPEN_FLAGS");
-               return false;
-       }
-
-       proptag = get_proptag_value("PR_EMS_AB_SERVER");
-       if (proptag != PR_EMS_AB_SERVER) {
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "get_proptag_value with PR_EMS_AB_SERVER_ERROR");
-               return false;
-       }
-
-       proptag = get_proptag_value("No such tag, ok?");
-       if (proptag != 0) {
-               mapitest_print(mt, "* %-40s: [FAILURE]\n", "get_proptag_value with non-existent tag");
-               return false;
-       }
-
-       return true;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_nspi.c b/branches/plugfest/utils/mapitest/modules/module_nspi.c
deleted file mode 100644 (file)
index b50d25b..0000000
+++ /dev/null
@@ -1,1104 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - NSPI tests
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_nspi.c
-
-   \brief NSPI tests
- */
-
-
-/**
-   \details Test the NspiUpdateStat RPC operation (0x02)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_UpdateStat(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       uint32_t                plDelta = 1;
-       struct SRowSet          *SRowSet;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_UpdateStat");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_GetSpecialTable(nspi_ctx, mem_ctx, 0x2, &SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       retval = nspi_UpdateStat(nspi_ctx, mem_ctx, &plDelta);
-       mapitest_print_retval(mt, "NspiUpdateStat");
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(mem_ctx);
-               return false;
-       }
-       mapitest_print(mt, "* %-35s: %d\n", "plDelta", plDelta);
-       talloc_free(mem_ctx);
-
-       return true;
-}
-
-
-/**
-   \details Test the NspiQueryRows RPC operation (0x3)
-   
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_QueryRows(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_QueryRows");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the array of columns we want to retrieve */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_DISPLAY_NAME,
-                                         PR_DISPLAY_TYPE);
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_ACCOUNT;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.lpszA = mt->mapi_ctx->session->profile->username;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_ACCOUNT;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_clean(mt, "NspiGetMatches", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       /* Query the rows */
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi_ctx, mem_ctx, NULL, MIds, 1, &SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       mapitest_print_retval_clean(mt, "NspiQueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       talloc_free(mem_ctx);
-
-       return true;
-}
-
-
-/**
-   \details Test the NspiSeekEntries RPC operation (0x04)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_SeekEntries(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropValue       pTarget;
-       struct SPropTagArray    *pPropTags;
-       struct SRowSet          *SRowSet;
-       struct emsmdb_context   *emsmdb;
-       bool                    ret = true;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_SeekEntries");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       emsmdb = (struct emsmdb_context *) mt->session->emsmdb->ctx;
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       
-       pTarget.ulPropTag = PR_DISPLAY_NAME;
-       pTarget.dwAlignPad = 0x0;
-       pTarget.value.lpszA = emsmdb->info.szDisplayName;
-
-       pPropTags = set_SPropTagArray(mem_ctx, 0x1, PR_ACCOUNT);
-       retval = nspi_SeekEntries(nspi_ctx, mem_ctx, SortTypeDisplayName, &pTarget, pPropTags, NULL, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       mapitest_print_retval_clean(mt, "NspiSeekEntries", retval);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(pPropTags);
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-
-       pTarget.ulPropTag = PR_DISPLAY_NAME_UNICODE;
-       pTarget.dwAlignPad = 0x0;
-       pTarget.value.lpszA = emsmdb->info.szDisplayName;
-
-       pPropTags = set_SPropTagArray(mem_ctx, 0x1, PR_ACCOUNT);
-       retval = nspi_SeekEntries(nspi_ctx, mem_ctx, SortTypeDisplayName, &pTarget, pPropTags, NULL, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       mapitest_print_retval_clean(mt, "NspiSeekEntries", retval);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(pPropTags);
-
-       talloc_free(mem_ctx);
-
-       return ret;
-}
-
-
-/**
-   \details Test the NspiGetMatches RPC operation (0x5)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetMatches(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       bool                    ret = true;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetMatches");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the array of columns we want to retrieve */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_DISPLAY_NAME,
-                                         PR_DISPLAY_TYPE);
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_ACCOUNT;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.lpszA = mt->mapi_ctx->session->profile->username;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_ACCOUNT;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(MIds);
-       mapitest_print_retval_clean(mt, "NspiGetMatches", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       talloc_free(mem_ctx);
-       return ret;
-}
-
-
-/**
-   \details Test the NspiResortRestriction RPC operation (0x6)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_ResortRestriction(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct Restriction_r    Filter;
-       struct SRowSet          *SRowSet = NULL;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SPropValue       *lpProp = NULL;
-       struct SPropTagArray    *MIds = NULL;
-       struct SPropTagArray    *ppMIds = NULL;
-       bool                    ret = true;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_ResortRestriction");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the array of columns we want to retrieve */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xb,
-                                         PR_DISPLAY_NAME,
-                                         PR_OFFICE_TELEPHONE_NUMBER,
-                                         PR_OFFICE_LOCATION,
-                                         PR_TITLE,
-                                         PR_COMPANY_NAME,
-                                         PR_ACCOUNT,
-                                         PR_ADDRTYPE,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_TYPE,
-                                         PR_INSTANCE_KEY,
-                                         PR_EMAIL_ADDRESS
-                                         );
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_OBJECT_TYPE;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.l = 6;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_OBJECT_TYPE;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(SRowSet);
-       mapitest_print_retval_clean(mt, "NspiGetMatches", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       ppMIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_ResortRestriction(nspi_ctx, mem_ctx, SortTypeDisplayName, MIds, &ppMIds);
-       mapitest_print_retval_clean(mt, "NspiResortRestriction", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       MAPIFreeBuffer(MIds);
-       MAPIFreeBuffer(ppMIds);
-       talloc_free(mem_ctx);
-
-       return ret;
-}
-
-
-/**
-   \details Test the NspiDNToMId RPC operation (0x7)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_DNToMId(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct StringsArray_r   pNames;
-       struct SPropTagArray    *MId;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_DNToMId");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       pNames.Count = 0x1;
-       pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-       pNames.Strings[0] = mt->mapi_ctx->session->profile->homemdb;
-
-       MId = talloc_zero(mem_ctx, struct SPropTagArray);
-
-       retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &MId);
-       MAPIFreeBuffer((char **)pNames.Strings);
-       MAPIFreeBuffer(MId);
-       talloc_free(mem_ctx);
-
-       mapitest_print_retval_clean(mt, "NspiDNToMId", retval);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiGetPropList RPC operation (0x08)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetPropList(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *pPropTags = 0;
-       struct SPropTagArray    *MIds;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetPropList");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Step 1. Query for current profile username */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_DISPLAY_NAME);
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_ANR_UNICODE;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.lpszW = mt->mapi_ctx->session->profile->username;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_ANR_UNICODE;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return retval;
-       }
-
-
-       /* Step 2. Call NspiGetPropList using the MId returned by NspiGetMatches */
-       pPropTags = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = nspi_GetPropList(nspi_ctx, mem_ctx, 0, MIds->aulPropTag[0], &pPropTags);
-       MAPIFreeBuffer(MIds);
-       mapitest_print_retval(mt, "NspiGetPropList");
-
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(pPropTags);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       if (pPropTags) {
-               mapitest_print(mt, "* %-35s: %d\n", "Properties number", pPropTags->cValues);
-               MAPIFreeBuffer(pPropTags);
-       }
-       talloc_free(mem_ctx);
-
-       return true;
-}
-
-
-/**
-   \details Test the NspiGetProps RPC operation (0x09)
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetProps(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct StringsArray_r   pNames;
-       struct SPropTagArray    *MId;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetProps");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       pNames.Count = 0x1;
-       pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
-       pNames.Strings[0] = mt->mapi_ctx->session->profile->homemdb;
-
-       MId = talloc_zero(mem_ctx, struct SPropTagArray);
-
-       retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &MId);
-       MAPIFreeBuffer((char **)pNames.Strings);
-       mapitest_print_retval(mt, "NspiDNToMId");
-
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MId);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_EMS_AB_NETWORK_ADDRESS);
-       retval = nspi_GetProps(nspi_ctx, mem_ctx, SPropTagArray, MId, &SRowSet);
-       mapitest_print_retval_clean(mt, "NspiGetProps", retval);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(MId);
-       MAPIFreeBuffer(SRowSet);
-
-       talloc_free(mem_ctx);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiCompareMIds RPC operation (0x0a)
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_CompareMIds(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       uint32_t                plResult;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_CompareMIds");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the array of columns we want to retrieve */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_DISPLAY_NAME);
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_OBJECT_TYPE;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.l = 6;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_OBJECT_TYPE;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(SRowSet);
-       mapitest_print_retval_clean(mt, "NspiGetMatches", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       /* Ensure we have at least two result to compare */
-       if (MIds->cValues < 2) {
-               mapitest_print(mt, "* Only one result found, can't compare\n");
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       retval = nspi_CompareMIds(nspi_ctx, mem_ctx, MIds->aulPropTag[0], MIds->aulPropTag[1], &plResult);
-       mapitest_print_retval_clean(mt, "NspiCompareMIds", retval);
-       MAPIFreeBuffer(MIds);
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       mapitest_print(mt, "* %-35s: %d\n", "value of the comparison", plResult);
-       talloc_free(mem_ctx);
-
-       return true;
-}
-
-
-/**
-   \details Test the NspiModProps RPC operation (0xb)
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_nspi_ModProps(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SRow             *pRow;
-       struct SPropTagArray    *pPropTags;
-       struct SPropValue       modProp;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       const char              *original_office_location;
-       bool                    ret = true;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_ModProps");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the array of columns we want to retrieve */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_DISPLAY_NAME,
-                                         PR_DISPLAY_TYPE);
-
-       /* Build the restriction we want for NspiGetMatches */
-       lpProp = talloc_zero(mem_ctx, struct SPropValue);
-       lpProp->ulPropTag = PR_ACCOUNT;
-       lpProp->dwAlignPad = 0;
-       lpProp->value.lpszA = mt->mapi_ctx->session->profile->username;
-
-       Filter.rt = RES_PROPERTY;
-       Filter.res.resProperty.relop = RES_PROPERTY;
-       Filter.res.resProperty.ulPropTag = PR_ACCOUNT;
-       Filter.res.resProperty.lpProp = lpProp;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
-       MAPIFreeBuffer(lpProp);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_clean(mt, "nspi_GetMatches", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       /* Query the rows */
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi_ctx, mem_ctx, NULL, MIds, 1, &SRowSet);
-       mapitest_print_retval_clean(mt, "nspi_QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(SRowSet);
-               talloc_free(mem_ctx);
-               return false;
-       }
-       if (SRowSet->cRows != 1) {
-               mapitest_print(mem_ctx, "unexpected number of rows: %i\n", SRowSet->cRows);
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(SRowSet);
-               talloc_free(mem_ctx);
-               return false;
-       }
-       original_office_location = (const char *)find_SPropValue_data(&(SRowSet->aRow[0]), PR_OFFICE_LOCATION);
-       mapitest_print(mt, "original PR_OFFICE_LOCATION value: %s\n", original_office_location);
-
-       /* Build the SRow and SPropTagArray for NspiModProps */
-       pRow = talloc_zero(mem_ctx, struct SRow);
-       modProp.ulPropTag = PR_OFFICE_LOCATION;
-       modProp.value.lpszA = "[MT] office location";
-       SRow_addprop(pRow, modProp);
-
-       pPropTags = set_SPropTagArray(mem_ctx, 0x1, PR_OFFICE_LOCATION);
-       retval = nspi_ModProps(nspi_ctx, mem_ctx, MIds->aulPropTag[0], pPropTags, pRow);
-       mapitest_print_retval_clean(mt, "nspi_ModProps", retval);
-       MAPIFreeBuffer(pRow);
-
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(pPropTags);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       /* Check that the property was set correctly */
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_QueryRows(nspi_ctx, mem_ctx, NULL, MIds, 1, &SRowSet);
-       mapitest_print_retval_clean(mt, "nspi_QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(SRowSet);
-               talloc_free(mem_ctx);
-               return false;
-       }
-       if (SRowSet->cRows != 1) {
-               mapitest_print(mem_ctx, "unexpected number of rows: %i\n", SRowSet->cRows);
-               MAPIFreeBuffer(MIds);
-               MAPIFreeBuffer(SRowSet);
-               talloc_free(mem_ctx);
-               return false;
-       }
-       if (strcmp((const char *)find_SPropValue_data(&(SRowSet->aRow[0]), PR_OFFICE_LOCATION), "[MT] office location") != 0) {
-               mapitest_print(mt, "PR_OFFICE_LOCATION string value mismatch: %s", (const char *)find_SPropValue_data(&(SRowSet->aRow[0]), PR_OFFICE_LOCATION));
-               ret = false;
-       } else {
-               mapitest_print(mt, "correctly set PR_OFFICE_LOCATION\n");
-       }
-
-       /* try to reset the office location back to the original value */
-       pRow = talloc_zero(mem_ctx, struct SRow);
-       modProp.ulPropTag = PR_OFFICE_LOCATION;
-       modProp.value.lpszA = original_office_location;
-       SRow_addprop(pRow, modProp);
-
-       retval = nspi_ModProps(nspi_ctx, mem_ctx, MIds->aulPropTag[0], pPropTags, pRow);
-       mapitest_print_retval_clean(mt, "nspi_ModProps (reset original value)", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       MAPIFreeBuffer(MIds);
-       MAPIFreeBuffer(pPropTags);
-       MAPIFreeBuffer(pRow);
-
-       talloc_free(mem_ctx);
-       
-       return ret;
-}
-
-
-/**
-   \details Test the NspiGetSpecialTable RPC operation (0x0c)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetSpecialTable(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SRowSet          *SRowSet;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetSpecialTable");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       retval = nspi_GetSpecialTable(nspi_ctx, mem_ctx, 0x0, &SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       mapitest_print_retval_clean(mt, "NspiGetSpecialTable (Hierarchy Table)", retval);
-
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       SRowSet = talloc_zero(mt->mem_ctx, struct SRowSet);
-       retval = nspi_GetSpecialTable(nspi_ctx, mem_ctx, 0x2, &SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       mapitest_print_retval_clean(mt, "NspiGetSpecialTable (Address Creation Template)", retval);
-       talloc_free(mem_ctx);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiGetTemplateInfo RPC operation (0x0d)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetTemplateInfo(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SRow             *ppData = NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetTemplateInfo");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       ppData = talloc_zero(mem_ctx, struct SRow);
-       retval = nspi_GetTemplateInfo(nspi_ctx, mem_ctx,
-                                     TI_TEMPLATE|TI_SCRIPT|TI_EMT|TI_HELPFILE_NAME|TI_HELPFILE_CONTENTS,
-                                     0, NULL, &ppData);
-       mapitest_print_retval_clean(mt, "NspiGetTemplateInfo", retval);
-       MAPIFreeBuffer(ppData);
-       talloc_free(mem_ctx);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiModLinkAtt RPC operation (0x0e)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_ModLinkAtt(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-/*     struct SPropTagArray    *MIds; */
-       struct BinaryArray_r    *lpEntryIds;
-
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       lpEntryIds = talloc_zero(mt->mem_ctx, struct BinaryArray_r);
-       lpEntryIds->cValues = 0;
-       lpEntryIds->lpbin = NULL;
-
-       retval = nspi_ModLinkAtt(nspi_ctx, false, PR_EMS_AB_REPORTS, 0x0, lpEntryIds);
-       mapitest_print_retval_clean(mt, "NspiModLinkAtt", retval);
-       MAPIFreeBuffer(lpEntryIds);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-
-/**
-   \details Test the NspiQueryColumns RPC operation (0x10)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_QueryColumns(struct mapitest *mt)
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_QueryColumns");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-       
-       SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-
-       retval = nspi_QueryColumns(nspi_ctx, mem_ctx, true, &SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval_clean(mt, "NspiQueryColumns", retval);
-               MAPIFreeBuffer(SPropTagArray);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       if (SPropTagArray) {
-               mapitest_print(mt, "* %d columns returned\n", SPropTagArray->cValues);
-               mapitest_print_retval_clean(mt, "NspiQueryColumns", retval);
-               MAPIFreeBuffer(SPropTagArray);
-       }
-       talloc_free(mem_ctx);
-
-       return true;
-}
-
-
-/**
-   \details Test the NspiGetNamesFromIDs RPC operation (0x11)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetNamesFromIDs(struct mapitest *mt)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct nspi_context             *nspi_ctx;
-       struct SPropTagArray            *ppReturnedPropTags;
-       struct PropertyNameSet_r        *ppNames;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetNamesFromIDs");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-
-       ppReturnedPropTags = talloc_zero(mem_ctx, struct SPropTagArray);
-       ppNames = talloc_zero(mem_ctx, struct PropertyNameSet_r);
-       retval = nspi_GetNamesFromIDs(nspi_ctx, mem_ctx, NULL, NULL, &ppReturnedPropTags, &ppNames);
-       mapitest_print_retval_clean(mt, "NspiGetNamesFromIDs", retval);
-       MAPIFreeBuffer(ppReturnedPropTags);
-       MAPIFreeBuffer(ppNames);
-       talloc_free(mem_ctx);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiGetIDsFromNames RPC operation (0x12)
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetIDsFromNames(struct mapitest *mt)
-{
-       TALLOC_CTX                      *mem_ctx;
-       enum MAPISTATUS                 retval;
-       struct nspi_context             *nspi_ctx;
-       struct SPropTagArray            *ppReturnedPropTags;
-       struct PropertyNameSet_r        *ppNames;
-
-       mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetIDsFromNames");
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-
-       ppReturnedPropTags = talloc_zero(mem_ctx, struct SPropTagArray);
-       ppNames = talloc_zero(mem_ctx, struct PropertyNameSet_r);
-       retval = nspi_GetNamesFromIDs(nspi_ctx, mem_ctx, NULL, NULL, &ppReturnedPropTags, &ppNames);
-       mapitest_print_retval_clean(mt, "NspiGetNamesFromIDs", retval);
-       MAPIFreeBuffer(ppReturnedPropTags);
-
-       if ( (retval != MAPI_E_SUCCESS) || !ppNames ) {
-               MAPIFreeBuffer(ppNames);
-               talloc_free(mem_ctx);
-               return false;
-       }
-
-       ppReturnedPropTags = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = nspi_GetIDsFromNames(nspi_ctx, mem_ctx, true, ppNames->cNames, ppNames->aNames, &ppReturnedPropTags);
-       mapitest_print_retval_clean(mt, "NspiGetIDsFromNames", retval);
-       MAPIFreeBuffer(ppReturnedPropTags);
-       MAPIFreeBuffer(ppNames);
-       talloc_free(mem_ctx);
-
-       if (retval == MAPI_E_SUCCESS) {
-             return true;
-       } else {
-             return false;
-       }
-}
-
-
-/**
-   \details Test the NspiResolveNames and NspiResolveNamesW RPC
-   operations (0x13 and 0x14)
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_ResolveNames(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       struct nspi_context             *nspi_ctx;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       const char                      *username[2];
-       const char                      *username_err[2];
-
-       nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
-
-       /* Build the username array */
-       username[0] = (const char *)mt->profile->mailbox;
-       username[1] = NULL;
-       /* Build the err username array */
-       username_err[0] = talloc_asprintf(mt->mem_ctx, "%s%s", mt->info.szDNPrefix, "nspi_resolve_testcase");
-       username_err[1] = NULL;
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xd,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME,
-                                         PR_ADDRTYPE,
-                                         PR_GIVEN_NAME,
-                                         PR_SMTP_ADDRESS,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_EMAIL_ADDRESS,
-                                         PR_SEND_INTERNET_ENCODING,
-                                         PR_SEND_RICH_INFO,
-                                         PR_SEARCH_KEY,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME,
-                                         PR_7BIT_DISPLAY_NAME);
-
-       /* Test with existing username */
-       /* NspiResolveNames (0x13) */
-       retval = ResolveNames(mt->session, (const char **)username, SPropTagArray, &SRowSet, &flaglist, 0);
-       mapitest_print_retval_clean(mt, "NspiResolveNames - existing", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-       if ( ! flaglist) {
-               mapitest_print(mt, "\tNULL flaglist, which wasn't expected\n");
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-       if (flaglist->aulPropTag[0] != MAPI_RESOLVED) {
-               mapitest_print(mt, "Expected 2 (MAPI_RESOLVED), but NspiResolveNames returned: %i\n", flaglist->aulPropTag[0]);
-       } else {
-               mapitest_print(mt, "\tGot expected resolution flag\n");
-       }
-       talloc_free(flaglist);
-       talloc_free(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-
-       /* NspiResolveNamesW (0x14) */
-       retval = ResolveNames(mt->session, (const char **)username, SPropTagArray, &SRowSet, &flaglist, MAPI_UNICODE);
-       mapitest_print_retval_clean(mt, "NspiResolveNamesW - existing", retval);
-       if (flaglist->aulPropTag[0] != MAPI_RESOLVED) {
-               mapitest_print(mt, "Expected 2 (MAPI_RESOLVED), but NspiResolveNamesW returned: %i\n", flaglist->aulPropTag[0]);
-       } else {
-               mapitest_print(mt, "\tGot expected resolution flag\n");
-       }
-       talloc_free(flaglist);
-       talloc_free(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-
-       /* Test with non-existant username */
-       /* NspiResolveNames (0x13) */
-       retval = ResolveNames(mt->session, (const char **)username_err, SPropTagArray, &SRowSet, &flaglist, 0);
-       mapitest_print_retval_clean(mt, "NspiResolveNames - non existant user name", retval);
-       if (flaglist->aulPropTag[0] != MAPI_UNRESOLVED) {
-               mapitest_print(mt, "Expected 0 (MAPI_UNRESOLVED), but NspiResolveNames returned: %i\n", flaglist->aulPropTag[0]);
-       } else {
-               mapitest_print(mt, "\tGot expected resolution flag\n");
-       }
-       talloc_free(flaglist);
-       talloc_free(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-
-       /* NspiResolveNamesW (0x14) */
-       retval = ResolveNames(mt->session, (const char **)username_err, SPropTagArray, &SRowSet, &flaglist, MAPI_UNICODE);
-       mapitest_print_retval_clean(mt, "NspiResolveNamesW - non existant user name", retval);
-       if (flaglist->aulPropTag[0] != MAPI_UNRESOLVED) {
-               mapitest_print(mt, "Expected 0 (MAPI_UNRESOLVED), but NspiResolveNamesW returned: %i\n", flaglist->aulPropTag[0]);
-       } else {
-               mapitest_print(mt, "\tGot expected resolution flag\n");
-       }
-       talloc_free(flaglist);
-       talloc_free(SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-       return true;
-}
-
-/**
-   \details Test the GetGALTable function
-
-   \param mt pointer to the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_nspi_GetGALTable(struct mapitest *mt)
-{
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
-       enum MAPISTATUS         retval;
-       uint32_t                i;
-       uint32_t                count;
-       uint8_t                 ulFlags;
-       uint32_t                rowsFetched = 0;
-       uint32_t                totalRowsFetched = 0;
-       bool                    ret = true;
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xc,
-                                         PR_INSTANCE_KEY,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_OBJECT_TYPE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_OFFICE_TELEPHONE_NUMBER_UNICODE,
-                                         PR_OFFICE_LOCATION_UNICODE,
-                                         PR_TITLE_UNICODE,
-                                         PR_COMPANY_NAME_UNICODE,
-                                         PR_ACCOUNT_UNICODE);
-
-       count = 0x20;
-       ulFlags = TABLE_START;
-       do {
-               retval = GetGALTable(mt->session, SPropTagArray, &SRowSet, count, ulFlags);
-               mapitest_print_retval_clean(mt, "GetGALTable", retval);
-               if ((!SRowSet) || (!(SRowSet->aRow))) {
-                       ret = false;
-                       goto cleanup;
-               }
-               rowsFetched = SRowSet->cRows;
-               totalRowsFetched += rowsFetched;
-               if (rowsFetched) {
-                       for (i = 0; i < rowsFetched; i++) {
-                               mapitest_print_PAB_entry(mt, &SRowSet->aRow[i]);
-                       }
-               }
-               ulFlags = TABLE_CUR;
-               MAPIFreeBuffer(SRowSet);
-       } while (rowsFetched == count);
-
-       if (totalRowsFetched < 1) {
-               /* We should always have at least ourselves in the list */
-               /* So if we got no rows at all, there is a problem */
-               ret = false;
-       }
-cleanup:
-       MAPIFreeBuffer(SPropTagArray);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcfold.c b/branches/plugfest/utils/mapitest/modules/module_oxcfold.c
deleted file mode 100644 (file)
index 4a66e77..0000000
+++ /dev/null
@@ -1,1649 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - FOLDER OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-   Copyright (C) Brad Hards 2009-2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcfold.c
-
-   \brief Folder Object Protocol test suite
-*/
-
-struct folders {
-       uint32_t        id;
-       uint64_t        fid;
-       const char      *name;
-};
-
-static struct folders top_folders[] = {
-       { 0x0, 0x0, "Mailbox Root Folder" },
-       { 0x1, 0x0, "Deferred Actions" },
-       { 0x2, 0x0, "Spooler Queue" },
-       { 0x3, 0x0, "Top of Information Store" },
-       { 0x4, 0x0, "Inbox" },
-       { 0x5, 0x0, "Outbox" },
-       { 0x6, 0x0, "Sent Items" },
-       { 0x7, 0x0, "Deleted Items" },
-       { 0x8, 0x0, "Common Views" },
-       { 0x9, 0x0, "Schedule" },
-       { 0xa, 0x0, "Search" },
-       { 0xb, 0x0, "Views" },
-       { 0xc, 0x0, "Shortcuts" },
-       { 0xd, 0x0, NULL }
-};
-
-static struct folders inbox_folders[] = {
-       { olFolderCalendar,             0x0, "Calendar"         },
-       { olFolderContacts,             0x0, "Contacts"         },
-       { olFolderJournal,              0x0, "Journal"          },
-       { olFolderNotes,                0x0, "Notes"            },
-       { olFolderTasks,                0x0, "Tasks"            },
-       { olFolderDrafts,               0x0, "Drafts"           },
-       { 0x0,                          0x0, NULL }
-};
-
-struct test_folders {
-       const char      *name;
-       const char      *class;
-};
-
-
-static struct test_folders subfolders[] = {
-       { MT_DIRNAME_APPOINTMENT,       IPF_APPOINTMENT },
-       { MT_DIRNAME_CONTACT,           IPF_CONTACT     },
-       { MT_DIRNAME_JOURNAL,           IPF_JOURNAL     },
-       { MT_DIRNAME_POST,              IPF_POST        },
-       { MT_DIRNAME_NOTE,              IPF_NOTE        },
-       { MT_DIRNAME_STICKYNOTE,        IPF_STICKYNOTE  },
-       { MT_DIRNAME_TASK,              IPF_TASK        },
-       { NULL,                         NULL            }
-};
-
-
-/**
-   \details Test the OpenFolder (0x2) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open folders located within the top information store folder
-       -# Open folders located within the Inbox folder
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_OpenFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_store_t     *store;
-       mapi_id_t               id_folder;
-       int                     i;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Prepare the top folder check */
-       store = (mapi_object_store_t *) obj_store.private_data;
-       top_folders[0].fid = store->fid_mailbox_root;
-       top_folders[1].fid = store->fid_deferred_actions;
-       top_folders[2].fid = store->fid_spooler_queue;
-       top_folders[3].fid = store->fid_top_information_store;
-       top_folders[4].fid = store->fid_inbox;
-       top_folders[5].fid = store->fid_outbox;
-       top_folders[6].fid = store->fid_sent_items;
-       top_folders[7].fid = store->fid_deleted_items;
-       top_folders[8].fid = store->fid_common_views;
-       top_folders[9].fid = store->fid_schedule;
-       top_folders[10].fid = store->fid_search;
-       top_folders[11].fid = store->fid_views;
-       top_folders[12].fid = store->fid_shortcuts;
-
-       /* Step2. Check top folders (Private mailbox) */
-       mapitest_print(mt, "* Private Mailbox - Message Store (Owner)\n");
-       mapitest_indent();
-       for (i = 0; top_folders[i].name; i++) {
-               mapi_object_init(&obj_folder);
-               retval = OpenFolder(&obj_store, top_folders[i].fid, &obj_folder);
-               mapitest_print_retval_fmt(mt, "OpenFolder", "(%s)", top_folders[i].name);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-               mapi_object_release(&obj_folder);
-       }
-       mapitest_deindent();
-
-       /* Step3. Check for Inbox folders */
-       mapitest_print(mt, "* Private Mailbox - Mailbox (Owner)\n");
-       mapitest_indent();
-       for (i = 0; inbox_folders[i].name; i++) {
-               mapi_object_init(&obj_folder);
-               retval = GetDefaultFolder(&obj_store, &id_folder, inbox_folders[i].id);
-               mapitest_print_retval_fmt(mt, "GetDefaultFolder", "(%s)", inbox_folders[i].name);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-               retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-               mapitest_print_retval_fmt(mt, "OpenFolder", "(%s)", inbox_folders[i].name);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-               mapi_object_release(&obj_folder);
-       }
-       mapitest_deindent();
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-/**
-   \details Test the CreateFolder (0x1c) and DeleteFolder (0x1d) operations
-
-   This is a simpler version of the CreateFolder test below.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the top information folder
-        -# Create a test directory
-       -# Delete the folder
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_CreateDeleteFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_top;
-       mapi_object_t           obj_child;
-       mapi_object_t           obj_grandchild;
-       mapi_id_t               id_folder;
-       bool                    ret = true;
-
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_top);
-       mapi_object_init(&obj_child);
-       mapi_object_init(&obj_grandchild);
-
-       /* Step 1. Logon */
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the top test folder */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_top);
-       mapitest_print_retval(mt, "CreateFolder - top");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Create child folder */
-       mapitest_print(mt, "* Create GENERIC child folder\n");
-       retval = CreateFolder(&obj_top, FOLDER_GENERIC, "[MT] Child folder", NULL,
-                             OPEN_IF_EXISTS, &obj_child);
-       mapitest_print_retval(mt, "CreateFolder - child");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Create child of the child (grandchild) folder */
-       mapitest_print(mt, "* Create GENERIC grandchild folder\n");
-       retval = CreateFolder(&obj_child, FOLDER_GENERIC, "[MT] grandchild folder", NULL,
-                             OPEN_IF_EXISTS, &obj_grandchild);
-       mapitest_print_retval(mt, "CreateFolder - grandchild");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6. DeleteFolder on the child (and recurse to grandchild) */
-       retval = DeleteFolder(&obj_top, mapi_object_get_id(&obj_child),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder - child");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. DeleteFolder on the top folder */
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_top),
-                             DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder - top");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_grandchild);
-       mapi_object_release(&obj_child);
-       mapi_object_release(&obj_top);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the CreateFolder (0x1c) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the top information folder
-        -# Create a test directory
-       -# Create sub directories with different container classes
-       -# Empty the folder
-       -# Delete the folder
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_CreateFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       lpProp[1];
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_top;
-       mapi_object_t           obj_child;
-       mapi_id_t               id_folder;
-       int                     i;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_top);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the top test folder */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_top);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Create sub directories */
-       mapitest_print(mt, "* Creating sub directories\n");
-       mapitest_indent();
-       for (i = 0; subfolders[i].name; i++) {
-               /* Step 4.1. Create the sub folder */
-               mapi_object_init(&obj_child);
-               retval = CreateFolder(&obj_top, FOLDER_GENERIC, subfolders[i].name, NULL,
-                                     OPEN_IF_EXISTS, &obj_child);
-               mapitest_print_retval_fmt(mt, "CreateFolder", "(%s)", subfolders[i].name);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_deindent();
-                       mapi_object_release(&obj_child);
-                       ret = false;
-                       goto cleanup;
-               }
-               /* Step 4.2. Set its container class */
-               set_SPropValue_proptag(&lpProp[0], PR_CONTAINER_CLASS, (const void *) subfolders[i].class);
-               retval = SetProps(&obj_child, lpProp, 1);
-               mapitest_print_retval_fmt(mt, "SetProps", "(%s)", subfolders[i].name);          
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_deindent();
-                       mapi_object_release(&obj_child);
-                       ret = false;
-                       goto cleanup;
-               }
-               mapi_object_release(&obj_child);
-       }
-       mapitest_deindent();
-
-       /* Step 5. Empty Folder */
-       retval = EmptyFolder(&obj_top);
-       mapitest_print_retval(mt, "EmptyFolder");
-       if (retval != MAPI_E_SUCCESS) {
-             ret = false;
-             goto cleanup;
-       }
-
-       /* Step 6. DeleteFolder */
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_top),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       if (retval != MAPI_E_SUCCESS) {
-             ret = false;
-             goto cleanup;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_top);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-/**
-   \details Test the CreateFolder (0x1c) operations
-
-   This tests different combinations of folder creation.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the top information folder
-       -# Create a test directory (or open the directory if it already exists)
-       -# Delete the test directory
-       -# Create the test directory again (it should not exist)
-       -# Try to create another directory with the same name (should error out)
-       -# Try to create another directory with the same name, but use open if exists
-       -# Create a generic subfolder
-       -# Try to create another generic subfolder with the same name (should error out)
-       -# Try to create another generic subfolder with the same name, but use open if exists
-       -# Delete the generic subfolder
-       -# Delete the test directory
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_CreateFolderVariants(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_top1, obj_top2, obj_top3;
-       mapi_object_t           obj_child1, obj_child2, obj_child3;
-       mapi_id_t               id_folder;
-       bool                    ret = true;
-
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_top1);
-       mapi_object_init(&obj_top2);
-       mapi_object_init(&obj_top3);
-       mapi_object_init(&obj_child1);
-       mapi_object_init(&obj_child2);
-       mapi_object_init(&obj_child3);
-
-       /* Step 1. Logon */
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       mapitest_print_retval_clean(mt, "GetDefaultFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval_clean(mt, "OpenFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the top test folder */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_top1);
-       mapitest_print_retval_clean(mt, "CreateFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. DeleteFolder on the top folder */
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_top1),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_clean(mt, "DeleteFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Create the top test folder (again) */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             0, &obj_top1);
-       mapitest_print_retval_clean(mt, "CreateFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6. Create the top test folder (again) - should error out*/
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder (duplicate name - expect collision)\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             0, &obj_top2);
-       mapitest_print_retval_clean(mt, "CreateFolder - top", retval);
-       if (retval != MAPI_E_COLLISION) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 7. Create the top test folder (again), using OPEN_IF_EXISTS */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder (open if exists)\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_top3);
-       mapitest_print_retval_clean(mt, "CreateFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 8. Create child folder */
-       mapitest_print(mt, "* Create GENERIC child folder\n");
-       retval = CreateFolder(&obj_top3, FOLDER_GENERIC, "[MT] Child folder", NULL,
-                             0, &obj_child1);
-       mapitest_print_retval_clean(mt, "CreateFolder - child", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 9. Create the child test folder (again) - should error out*/
-       mapitest_print(mt, "* Create GENERIC child folder (duplicate name - expect collision)\n");
-       retval = CreateFolder(&obj_top3, FOLDER_GENERIC, "[MT] Child folder", NULL,
-                             0, &obj_child2);
-       mapitest_print_retval_clean(mt, "CreateFolder - child", retval);
-       if (retval != MAPI_E_COLLISION) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 10. Create the child test folder (again), using OPEN_IF_EXISTS */
-       mapitest_print(mt, "* Create GENERIC child folder (open if exists)\n");
-       retval = CreateFolder(&obj_top3, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_child3);
-       mapitest_print_retval_clean(mt, "CreateFolder - child", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       
-       /* Step 11. DeleteFolder on the child */
-       retval = DeleteFolder(&obj_top3, mapi_object_get_id(&obj_child3),
-                             DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_clean(mt, "DeleteFolder - child", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               /* we want to fall through on the off-chance this fails */
-       }
-
-       /* Step 12. DeleteFolder on the top folder */
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_top3),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_clean(mt, "DeleteFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_child3);
-       mapi_object_release(&obj_child2);
-       mapi_object_release(&obj_child1);
-       mapi_object_release(&obj_top3);
-       mapi_object_release(&obj_top2);
-       mapi_object_release(&obj_top1);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the GetHierarchyTable (0x4) operation
-
-  This function:
-       -# Log on the user private mailbox
-       -# Open the top information folder
-       -# Call the GetHierarchyTable operation
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_GetHierarchyTable(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       mapi_id_t               id_folder;
-       uint32_t                RowCount;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       mapi_object_init(&obj_folder);
-
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Get the Hierarchy Table */
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, &RowCount);
-       mapitest_print_retval_fmt(mt, "GetHierarchyTable", "(%d rows)", RowCount);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetContentsTable (0x5) operation
-
-  This function:
-       -# Log on the user private mailbox
-       -# Open the top information folder
-       -# Call the GetContentsTable operation
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_GetContentsTable(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_ctable;
-       mapi_id_t               id_folder;
-       uint32_t                RowCount;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       mapi_object_init(&obj_folder);
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Get the Contents Table */
-       mapi_object_init(&obj_ctable);
-       retval = GetContentsTable(&obj_folder, &obj_ctable, 0, &RowCount);
-       mapitest_print_retval_fmt(mt, "GetContentsTable", "(%d rows)", RowCount);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_ctable);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the SetSearchCriteria (0x30) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Retrieve the inbox folder ID
-       -# Open the default search folder
-       -# Create a search folder within this folder
-       -# Set the message class property on this container
-       -# Set a restriction criteria
-       -# Call SetSearchCriteria
-       -# Delete the test search folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_SetSearchCriteria(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       bool                            ret = true;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_search;
-       mapi_object_t                   obj_searchdir;
-       mapi_id_t                       id_inbox;
-       mapi_id_t                       id_search;
-       mapi_id_array_t                 id;
-       struct SPropValue               lpProps[1];
-       struct mapi_SRestriction        res;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Open Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_inbox, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Open Search folder */
-       retval = GetDefaultFolder(&obj_store, &id_search, olFolderFinder);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_search);
-       retval = OpenFolder(&obj_store, id_search, &obj_search);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Create a search folder */
-       mapi_object_init(&obj_searchdir);
-       retval = CreateFolder(&obj_search, FOLDER_SEARCH, "mapitest", 
-                             "mapitest search folder", OPEN_IF_EXISTS,
-                             &obj_searchdir);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Set properties on this search folder */
-       lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
-       lpProps[0].value.lpszA = IPF_NOTE;
-       retval = SetProps(&obj_searchdir, lpProps, 1);
-       mapitest_print_retval(mt, "SetProps");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto error;
-       }
-
-       /* Step 6. Search criteria on this folder */
-       mapi_id_array_init(mt->mapi_ctx, &id);
-       mapi_id_array_add_id(&id, id_inbox);
-
-       res.rt = RES_CONTENT;
-       res.res.resContent.fuzzy = FL_SUBSTRING;
-       res.res.resContent.ulPropTag = PR_SUBJECT;
-       res.res.resContent.lpProp.ulPropTag = PR_SUBJECT;
-       res.res.resContent.lpProp.value.lpszA = "[MT]";
-
-       retval = SetSearchCriteria(&obj_searchdir, &res,
-                                  BACKGROUND_SEARCH|RECURSIVE_SEARCH, &id);
-       mapitest_print_retval(mt, "SetSearchCriteria");
-       mapi_id_array_release(&id);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-error:
-       retval = DeleteFolder(&obj_search, mapi_object_get_id(&obj_searchdir),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       mapi_object_release(&obj_searchdir);
-       mapi_object_release(&obj_search);
-       mapi_object_release(&obj_store);
-       return ret;
-}
-
-
-/**
-   \details Test the GetSearchCriteria (0x31) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Retrieve the inbox folder ID
-       -# Open the default search folder
-       -# Create a search folder within this folder
-       -# Set the message class property on this container
-       -# Set a restriction criteria
-       -# Call SetSearchCriteria
-       -# Call GetSearchCriteria
-       -# Delete the test search folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_GetSearchCriteria(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       bool                            ret = true;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_search;
-       mapi_object_t                   obj_searchdir;
-       mapi_id_t                       id_inbox;
-       mapi_id_t                       id_search;
-       mapi_id_array_t                 id;
-       struct SPropValue               lpProps[1];
-       struct mapi_SRestriction        res;
-       uint32_t                        ulSearchFlags;
-       uint16_t                        count;
-       mapi_id_t                       *fid;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Open Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_inbox, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Open Search folder */
-       retval = GetDefaultFolder(&obj_store, &id_search, olFolderFinder);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_search);
-       retval = OpenFolder(&obj_store, id_search, &obj_search);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Create a search folder */
-       mapi_object_init(&obj_searchdir);
-       retval = CreateFolder(&obj_search, FOLDER_SEARCH, "mapitest", 
-                             "mapitest search folder", OPEN_IF_EXISTS,
-                             &obj_searchdir);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Set properties on this search folder */
-       lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
-       lpProps[0].value.lpszA = IPF_NOTE;
-       retval = SetProps(&obj_searchdir, lpProps, 1);
-       mapitest_print_retval(mt, "SetProps");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto error;
-       }
-
-       /* Step 6. Search criteria on this folder */
-       mapi_id_array_init(mt->mapi_ctx, &id);
-       mapi_id_array_add_id(&id, id_inbox);
-
-       res.rt = RES_CONTENT;
-       res.res.resContent.fuzzy = FL_SUBSTRING;
-       res.res.resContent.ulPropTag = PR_SUBJECT;
-       res.res.resContent.lpProp.ulPropTag = PR_SUBJECT;
-       res.res.resContent.lpProp.value.lpszA = "[MT]";
-
-       retval = SetSearchCriteria(&obj_searchdir, &res,
-                                  BACKGROUND_SEARCH|RECURSIVE_SEARCH, &id);
-       mapitest_print_retval(mt, "SetSearchCriteria");
-       mapi_id_array_release(&id);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto error;
-       }
-
-       /* Step 7. Call GetSearchCriteria */
-       retval = GetSearchCriteria(&obj_searchdir, &res, &ulSearchFlags, &count, &fid);
-       mapitest_print_retval(mt, "GetSearchCriteria");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto error;
-       }
-
-
-error:
-       retval = DeleteFolder(&obj_search, mapi_object_get_id(&obj_searchdir),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       mapi_object_release(&obj_searchdir);
-       mapi_object_release(&obj_search);
-       mapi_object_release(&obj_store);
-       return ret;
-}
-
-
-/**
-   \details Test the MoveCopyMessages (0x33) operation.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Inbox folder (source)
-       -# Open the Deleted Items folder (destination)
-       -# Creates 3 sample messages
-       -# Move messages from source to destination
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_MoveCopyMessages(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    common_result;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder_src;
-       mapi_object_t           obj_folder_dst;
-       mapi_object_t           obj_message;
-       mapi_object_t           dst_contents;
-       uint32_t                dst_count;
-       struct mapi_SRestriction res;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       mapi_id_array_t         msg_id_array;
-       mapi_id_t               msgid[20];
-       mapi_id_t               id_folder;
-       uint32_t                i;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Source Inbox folder */
-       mapi_object_init(&obj_folder_src);
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder_src);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-               
-       /* Step 3. Open Destination Deleted Items folder */
-       mapi_object_init(&obj_folder_dst);
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderDeletedItems);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder_dst);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapi_object_init(&(dst_contents));
-       retval = GetContentsTable(&(obj_folder_dst), &(dst_contents), 0, &dst_count);
-       mapitest_print_retval(mt, "GetContentsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 4. Create sample messages */
-       mapi_id_array_init(mt->mapi_ctx, &msg_id_array);
-       for (i = 0; i < 3; i++) {
-               mapi_object_init(&obj_message);
-               common_result = mapitest_common_message_create(mt, &obj_folder_src, &obj_message, MT_MAIL_SUBJECT);
-               if (!common_result) {
-                       mapitest_print(mt, "* mapitest_common_message_create() failed\n");
-                       ret = false;
-                       goto release;
-               }
-               
-               retval = SaveChangesMessage(&obj_folder_src, &obj_message, KeepOpenReadOnly);
-               mapitest_print_retval(mt, "SaveChangesMessage");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       goto release;
-               }
-               mapi_id_array_add_obj(&msg_id_array, &obj_message);
-               mapi_object_release(&obj_message);
-       }
-
-       /* Step 5. Move messages from source to destination */
-       retval = MoveCopyMessages(&obj_folder_src, &obj_folder_dst, &msg_id_array, 0);
-       mapitest_print_retval(mt, "MoveCopyMessages");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-       mapi_id_array_release(&msg_id_array);
-
-       /* Step 6. Apply a filter */
-       res.rt = RES_PROPERTY;
-       res.res.resProperty.relop = RES_PROPERTY;
-       res.res.resProperty.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.value.lpszA = MT_MAIL_SUBJECT;
-
-       retval = Restrict(&(dst_contents), &res, NULL);
-       mapitest_print_retval(mt, "Restrict");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 7. Get the filtered row */
-        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_MID);
-        retval = SetColumns(&(dst_contents), SPropTagArray);
-       mapitest_print_retval(mt, "SetColumns");
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       retval = QueryRows(&(dst_contents), 20, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval(mt, "QueryRows");
-       if ( (retval == MAPI_E_SUCCESS) && (SRowSet.cRows > 0) ) {
-               for (i = 0; i < SRowSet.cRows; ++i) {
-                       msgid[i] = SRowSet.aRow[i].lpProps[0].value.d;
-               }
-       }
-
-       /* Step 8. Delete Messages */
-       retval = DeleteMessage(&obj_folder_dst, msgid, i); 
-       mapitest_print_retval(mt, "DeleteMessage");
-
-release:
-       /* Release */
-       mapi_object_release(&dst_contents);
-       mapi_object_release(&obj_folder_src);
-       mapi_object_release(&obj_folder_dst);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the MoveFolder (0x35) operation.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Inbox folder (source)
-       -# Create a temporary folder
-       -# Create 1 message in this new folder
-       -# Open the Deleted Items folder (destination)
-       -# Move the temporary folder from Inbox to DeletedItems
-       -# Empty and delete the moved temporary folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_MoveFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_src;
-       mapi_object_t           obj_dst;
-       mapi_object_t           obj_message;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open the inbox folder */
-       mapi_object_init(&obj_src);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_src, olFolderInbox);
-       if (ret == false) return ret;
-
-       /* Step 3. Create temporary folder */
-       mapi_object_init(&obj_folder);
-       retval = CreateFolder(&obj_src, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_folder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Create message within this temporary folder */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "mapitest_common_message_create");
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       mapi_object_release(&obj_message);
-
-       /* Step 5. Open the Deleted items folder */
-       mapi_object_init(&obj_dst);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_dst, olFolderDeletedItems);
-
-       /* Step 6. MoveFolder */
-       retval = MoveFolder(&obj_folder, &obj_src, &obj_dst, MT_DIRNAME_TOP, false);
-       mapitest_print_retval(mt, "MoveFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       mapi_object_release(&obj_folder);
-
-       /* Step 7. Delete the moved folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_find_folder(mt, &obj_dst, &obj_folder, MT_DIRNAME_TOP);
-       mapitest_print(mt, "* %-35s: %s\n", "mapitest_common_find_folder", (ret == true) ? "true" : "false");
-
-       if (ret == true) {
-               retval = EmptyFolder(&obj_folder);
-               mapitest_print_retval(mt, "EmptyFolder");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       
-               retval = DeleteFolder(&obj_dst, mapi_object_get_id(&obj_folder),
-                                     DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-               mapitest_print_retval(mt, "DeleteFolder");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       }
-       
-
-       /* Release */
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_src);
-       mapi_object_release(&obj_dst);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the CopyFolder (0x36) operation.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Inbox folder (source)
-       -# Create a temporary folder
-       -# Create a subdirectory
-       -# Open the Deleted Items folder (destination)
-       -# Copy the temporary folder from Inbox to DeletedItems
-       -# Empty and delete the original and copied folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_CopyFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;     
-       mapi_object_t           obj_subfolder;
-       mapi_object_t           obj_src;
-       mapi_object_t           obj_dst;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open the inbox folder */
-       mapi_object_init(&obj_src);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_src, olFolderInbox);
-       if (ret == false) return ret;
-
-       /* Step 3. Create temporary folder */
-       mapi_object_init(&obj_folder);
-       retval = CreateFolder(&obj_src, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_folder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Create the sub folder */
-       mapi_object_init(&obj_subfolder);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_NOTE, NULL,
-                             OPEN_IF_EXISTS, &obj_subfolder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       mapi_object_release(&obj_subfolder);
-
-       /* Step 5. Open the Deleted items folder */
-       mapi_object_init(&obj_dst);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_dst, olFolderDeletedItems);
-
-       /* Step 6. CopyFolder */
-       retval = CopyFolder(&obj_folder, &obj_src, &obj_dst, MT_DIRNAME_TOP, false, false);
-       mapitest_print_retval(mt, "CopyFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. Delete the original and copied folder */
-       retval = EmptyFolder(&obj_folder);
-       mapitest_print_retval(mt, "EmptyFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       
-       retval = DeleteFolder(&obj_src, mapi_object_get_id(&obj_folder),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       mapi_object_release(&obj_folder);
-
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_find_folder(mt, &obj_dst, &obj_folder, MT_DIRNAME_TOP);
-       mapitest_print(mt, "* %-35s: %s\n", "mapitest_common_find_folder", (ret == true) ? "true" : "false");
-
-       if (ret == true) {
-               retval = EmptyFolder(&obj_folder);
-               mapitest_print_retval(mt, "EmptyFolder");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       
-               retval = DeleteFolder(&obj_dst, mapi_object_get_id(&obj_folder),
-                                     DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-               mapitest_print_retval(mt, "DeleteFolder");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       }
-       
-       /* Release */
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_src);
-       mapi_object_release(&obj_dst);
-       mapi_object_release(&obj_store);
-
-
-       return ret;
-}
-
-/**
-   \details Test the HardDeleteMessages (0x91) operation.
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Inbox folder (source)
-       -# Creates 3 sample messages
-       -# Hard delete the sample messages
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_HardDeleteMessages(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           contents;
-       struct mapi_SRestriction res;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       mapi_id_array_t         msg_id_array;
-       mapi_id_t               msgid[50];
-       mapi_id_t               id_folder;
-       uint32_t                i;
-       uint32_t                count = 0;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&contents);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Source Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetContentsTable(&(obj_folder), &(contents), 0, &count);
-       mapitest_print_retval(mt, "GetContentsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create sample messages */
-       mapi_id_array_init(mt->mapi_ctx, &msg_id_array);
-       for (i = 0; i < 3; i++) {
-               mapi_object_init(&obj_message);
-               ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-               if (!ret) {
-                       mapitest_print(mt, "failed to create message %i\n", i);
-                       ret = false;
-                       goto cleanup;
-               }
-               
-               retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-               mapitest_print_retval(mt, "SaveChangesMessage");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       goto cleanup;
-               }
-               mapi_id_array_add_obj(&msg_id_array, &obj_message);
-               mapi_object_release(&obj_message);
-       }
-
-
-       /* Step 4. Apply a filter */
-       res.rt = RES_PROPERTY;
-       res.res.resProperty.relop = RES_PROPERTY;
-       res.res.resProperty.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.value.lpszA = MT_MAIL_SUBJECT;
-
-       retval = Restrict(&(contents), &res, NULL);
-       mapitest_print_retval(mt, "Restrict");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Get the filtered rows */
-        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_MID);
-        SetColumns(&(contents), SPropTagArray);
-       mapitest_print_retval(mt, "SetColumns");
-       MAPIFreeBuffer(SPropTagArray);
-
-       retval = QueryRows(&(contents), 50, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval(mt, "QueryRows");
-       if (retval == MAPI_E_SUCCESS) {
-               for (i = 0; i < SRowSet.cRows; ++i) {
-                       msgid[i] = SRowSet.aRow[i].lpProps[0].value.d;
-               }
-               mapitest_print(mt, "%i Messages created successfully\n", SRowSet.cRows);
-       }
-
-       /* Step 6. Delete Messages */
-       retval = HardDeleteMessage(&obj_folder, msgid, i); 
-       mapitest_print_retval(mt, "HardDeleteMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 7. Check the restriction again */
-       retval = QueryRows(&(contents), 50, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval(mt, "QueryRows");
-       if ( retval != MAPI_E_SUCCESS ) {
-               ret = false;
-               goto cleanup;
-       }
-
-       if (SRowSet.cRows == 0) {
-               mapitest_print(mt, "successfully deleted messages\n");
-       } else {
-               mapitest_print(mt, "failed to delete messages\n");
-               ret = false;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&contents);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the HardDeleteMessagesAndSubfolder (0x92) operation.
-
-   This function:
-       -# Creates a filled test folder
-       -# Creates 2 subdirectories in the test folder
-       -# Hard deletes the sample messages and subdirectories
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_HardDeleteMessagesAndSubfolders(struct mapitest *mt)
-{
-       struct mt_common_tf_ctx *context;
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_htable;
-       mapi_object_t           subfolder1;
-       mapi_object_t           subfolder2;
-       uint32_t                unread = 0;
-       uint32_t                total = 0;
-
-        /* Step 1. Logon and create a filled test folder */
-        if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-                return false;
-        }
-
-       context = mt->priv;
-
-       /* Step 2. Create two subfolders */
-       mapi_object_init(&subfolder1);
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SubFolder1", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &subfolder1);
-       mapi_object_release(&subfolder1);
-       mapitest_print_retval(mt, "Create Subfolder1");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       mapi_object_init(&subfolder2);
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SubFolder2", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &subfolder2);
-       mapi_object_release(&subfolder2);
-       mapitest_print_retval(mt, "Create Subfolder2");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetFolderItemsCount(&(context->obj_test_folder), &unread, &total);
-       mapitest_print_retval(mt, "GetFolderItemsCount");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_print(mt, "* Folder count: %i (%i unread)\n", total, unread);
-
-       /* Step 3. Hard delete contents */
-       retval = HardDeleteMessagesAndSubfolders(&(context->obj_test_folder));
-       mapitest_print_retval(mt, "HardDeleteMessagesAndSubfolders");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Check successful deletion */
-       retval = GetFolderItemsCount(&(context->obj_test_folder), &unread, &total);
-       mapitest_print_retval(mt, "GetFolderItemsCount");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_print(mt, "* Folder count: %i (%i unread)\n", total, unread);
-
-       if (total != 0 || unread != 0) {
-               ret = false;
-       }
-
- cleanup:
-        /* Cleanup and release */
-        mapi_object_release(&obj_htable);
-        mapitest_common_cleanup(mt);
-
-        return ret;
-}
-
-/**
-   \details Test the DeleteMessages (0x1e) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the top of information store
-   -# Create a test folder
-   -# Create and save three messages
-   -# Save the messages
-   -# Delete the messages
-   -# Delete the test folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcfold_DeleteMessages(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_id_t               id_folder;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_top;
-       mapi_object_t           obj_message1;
-       mapi_object_t           obj_message2;
-       mapi_object_t           obj_message3;
-       mapi_id_t               id_msgs[3];
-       bool                    ret = true; /* success */
-
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_top);
-       mapi_object_init(&obj_message1);
-       mapi_object_init(&obj_message2);
-       mapi_object_init(&obj_message3);
-
-       /* Step 1. Logon */ 
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the top test folder */
-       mapitest_print(mt, "* Create GENERIC \"%s\" folder\n", MT_DIRNAME_TOP);
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                             OPEN_IF_EXISTS, &obj_top);
-       mapitest_print_retval_clean(mt, "CreateFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Create the messages */
-       retval = CreateMessage(&obj_top, &obj_message1);
-       mapitest_print_retval_clean(mt, "CreateMessage - 1", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = CreateMessage(&obj_top, &obj_message2);
-       mapitest_print_retval_clean(mt, "CreateMessage - 2", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = CreateMessage(&obj_top, &obj_message3);
-       mapitest_print_retval_clean(mt, "CreateMessage - 3", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Save the messages */
-       retval = SaveChangesMessage(&obj_top, &obj_message1, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage - 1", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesMessage(&obj_top, &obj_message2, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage - 2", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesMessage(&obj_top, &obj_message3, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage - 3", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6. Delete the saved messages */
-       id_msgs[0] = mapi_object_get_id(&obj_message1);
-       id_msgs[1] = mapi_object_get_id(&obj_message2);
-       id_msgs[2] = mapi_object_get_id(&obj_message3);
-       retval = DeleteMessage(&obj_top, id_msgs, 3);
-       mapitest_print_retval_clean(mt, "DeleteMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 7. DeleteFolder on the top folder */
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_top),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_clean(mt, "DeleteFolder - top", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Release */
-cleanup:
-       mapi_object_release(&obj_message3);
-       mapi_object_release(&obj_message2);
-       mapi_object_release(&obj_message1);
-       mapi_object_release(&obj_top);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcfxics.c b/branches/plugfest/utils/mapitest/modules/module_oxcfxics.c
deleted file mode 100644 (file)
index 319b705..0000000
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - BULK DATA TRANSFER PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-   Copyright (C) Brad Hards 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcfxics.c
-
-   \brief Bulk Data Transfer Protocol test suite
-*/
-
-/**
-   \details Test the GetLocalReplicaIds (0x7f) operation
-
-   This function:
-   -# Log on private message store
-   -# Reserve a range of Ids
- */
-_PUBLIC_ bool mapitest_oxcfxics_GetLocalReplicaIds(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct GUID             ReplGuid;
-       uint8_t                 GlobalCount[6];
-       char                    *guid;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Reserve a range of IDs */
-       retval = GetLocalReplicaIds(&obj_store, 0x1000, &ReplGuid, GlobalCount);
-       mapitest_print_retval(mt, "GetLocalReplicaIds");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       guid = GUID_string(mt->mem_ctx, &ReplGuid);
-       mapitest_print(mt, "* %-35s: %s\n", "ReplGuid", guid);
-       mapitest_print(mt, "* %-35s: %x %x %x %x %x %x\n", "GlobalCount", GlobalCount[0],
-                      GlobalCount[1], GlobalCount[2], GlobalCount[3], GlobalCount[4],
-                      GlobalCount[5]);
-       talloc_free(guid);
-
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the FastTransferDestinationConfigure (0x53), TellVersion (0x86) and
-   FastTransferDestinationPutBuffer (0x54) operations
-
-   This function:
-   -# Log on private message store
-   -# Creates a test folder
-   -# Setup destination
-   -# Sends the "server version"
- */
-_PUBLIC_ bool mapitest_oxcfxics_DestConfigure(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct mt_common_tf_ctx *context;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_context;
-       mapi_object_t           destfolder;
-       DATA_BLOB               put_buffer_data;
-       uint16_t                usedSize;
-       bool                    ret = true;
-
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create destfolder */
-       mapi_object_init(&destfolder);
-       mapi_object_init(&obj_context);
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "DestFolder", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &destfolder);
-       mapitest_print_retval_clean(mt, "Create DestFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = FXDestConfigure(&(context->obj_test_folder), FastTransferDest_CopyTo, &obj_context);
-       mapitest_print_retval_clean(mt, "FXDestConfigure", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Send server version */
-       retval = TellVersion(&obj_context, mt->info.rgwServerVersion);
-       mapitest_print_retval_clean(mt, "TellVersion", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* start top folder, followed by end folder */
-       put_buffer_data = data_blob_named("\x03\x00\x09\x40\x03\x00\x0b\x40", 8, "putbuffer");
-       /* printf("data_blob: %s\n", data_blob_hex_string_lower(mt->mem_ctx, &put_buffer_data)); */
-       retval = FXPutBuffer(&obj_context, &put_buffer_data, &usedSize);
-       mapitest_print_retval_clean(mt, "FXPutBuffer", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       if (usedSize != 8) {
-               mapitest_print(mt, "unexpected used count 0x%04x\n", usedSize);
-               ret = false;
-               goto cleanup;
-       }
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_context);
-       mapi_object_release(&destfolder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the FastTransferCopyFolder (0x4C), FastTransferGetBuffer (0x4E) and TellVersion (0x86) operations
-
-   This function:
-   -# Log on private message store
-   -# Creates a test folder
-   -# Setup source
-   -# Sends the "server version"
- */
-_PUBLIC_ bool mapitest_oxcfxics_CopyFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       struct mt_common_tf_ctx         *context;
-       mapi_object_t                   obj_htable;
-       mapi_object_t                   obj_context;
-       mapi_object_t                   sourcefolder;
-       bool                            ret = true;
-       enum TransferStatus             transferStatus;
-       uint16_t                        progress;
-       uint16_t                        totalSteps;
-       DATA_BLOB                       transferdata;
-       struct fx_parser_context        *parser;
-
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create source folder */
-       mapi_object_init(&sourcefolder);
-       mapi_object_init(&obj_context);
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SourceCopyFolder", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &sourcefolder);
-       mapitest_print_retval_clean(mt, "Create SourceCopyFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = FXCopyFolder(&(context->obj_test_folder), FastTransferCopyFolder_CopySubfolders, FastTransfer_Unicode, &obj_context);
-       mapitest_print_retval_clean(mt, "FXCopyFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Send server version */
-       retval = TellVersion(&obj_context, mt->info.rgwServerVersion);
-       mapitest_print_retval_clean(mt, "TellVersion", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = FXGetBuffer(&obj_context, 0, &transferStatus, &progress, &totalSteps, &transferdata);
-       mapitest_print_retval_clean(mt, "FXGetBuffer", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       if (transferStatus != TransferStatus_Done) {
-               mapitest_print(mt, "unexpected transferStatus 0x%04x\n", transferStatus);
-               ret = false;
-               goto cleanup;
-       }
-       if (progress != totalSteps) {
-               mapitest_print(mt, "unexpected final step count, progress 0x%04x, total 0x%04x\n", progress, totalSteps);
-               ret = false;
-               goto cleanup;
-       }
-       parser = fxparser_init(mt->mem_ctx, NULL);
-       fxparser_parse(parser, &transferdata);
-       talloc_free(parser);
-       // TODO: verify that the buffer is as expected
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_context);
-       mapi_object_release(&sourcefolder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the FastTransferCopyMessages (0x4B) and FastTransferGetBuffer (0x4E) operations
-
-   This function:
-   -# Log on private message store
-   -# Cremapidump_fx_bufferates a test folder
-   -# Setup source
-   -# Get data
- */
-_PUBLIC_ bool mapitest_oxcfxics_CopyMessages(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       struct mt_common_tf_ctx         *context;
-       mapi_object_t                   obj_htable;
-       mapi_object_t                   obj_context;
-       mapi_object_t                   sourcefolder;
-       mapi_id_array_t                 mids;
-       int                             i;
-       bool                            ret = true;
-       enum TransferStatus             transferStatus;
-       uint16_t                        progress;
-       uint16_t                        totalSteps;
-       DATA_BLOB                       transferdata;
-       struct fx_parser_context        *parser;
-
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create source folder */
-       mapi_object_init(&sourcefolder);
-       mapi_object_init(&obj_context);
-
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SourceCopyMessages", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &sourcefolder);
-       mapitest_print_retval_clean(mt, "Create SourceCopyMessages", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = mapi_id_array_init(mt->mapi_ctx, &mids);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval_clean(mt, "mapi_id_array_init", retval);
-               ret = false;
-               goto cleanup;
-       }
-       for (i = 0; i < 5; ++i) {
-               retval = mapi_id_array_add_obj(&mids, &(context->obj_test_msg[i]));
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print_retval_clean(mt, "mapi_id_array_add_obj", retval);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       retval = FXCopyMessages(&(context->obj_test_folder), &mids, FastTransferCopyMessage_BestBody, FastTransfer_Unicode, &obj_context);
-       mapitest_print_retval_clean(mt, "FXCopyMessages", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = FXGetBuffer(&obj_context, 0, &transferStatus, &progress, &totalSteps, &transferdata);
-       mapitest_print_retval_clean(mt, "FXGetBuffer", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       if (transferStatus != TransferStatus_Done) {
-               mapitest_print(mt, "unexpected transferStatus 0x%04x\n", transferStatus);
-               ret = false;
-               goto cleanup;
-       }
-       if (progress != totalSteps) {
-               mapitest_print(mt, "unexpected final step count, progress 0x%04x, total 0x%04x\n", progress, totalSteps);
-               ret = false;
-               goto cleanup;
-       }
-       parser = fxparser_init(mt->mem_ctx, NULL);
-       fxparser_parse(parser, &transferdata);
-       talloc_free(parser);
-       // TODO: verify that the buffer is as expected
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_context);
-       mapi_object_release(&sourcefolder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the FastTransferCopyTo (0x4D) and FastTransferGetBuffer (0x4E) operations
-
-   This function:
-   -# Log on private message store
-   -# Creates a test folder
-   -# Setup source
-   -# Get data
- */
-_PUBLIC_ bool mapitest_oxcfxics_CopyTo(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       struct mt_common_tf_ctx         *context;
-       mapi_object_t                   obj_htable;
-       mapi_object_t                   obj_context;
-       mapi_object_t                   sourcefolder;
-       mapi_id_array_t                 mids;
-       struct SPropTagArray            *propsToExclude;
-       int                             i;
-       bool                            ret = true;
-       enum TransferStatus             transferStatus;
-       uint16_t                        progress;
-       uint16_t                        totalSteps;
-       DATA_BLOB                       transferdata;
-       struct fx_parser_context        *parser;
-
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create source folder */
-       mapi_object_init(&sourcefolder);
-       mapi_object_init(&obj_context);
-
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SourceCopyTo", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &sourcefolder);
-       mapitest_print_retval_clean(mt, "Create SourceCopyTo", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = mapi_id_array_init(mt->mapi_ctx, &mids);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval_clean(mt, "mapi_id_array_init", retval);
-               ret = false;
-               goto cleanup;
-       }
-       for (i = 0; i < 5; ++i) {
-               retval = mapi_id_array_add_obj(&mids, &(context->obj_test_msg[i]));
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print_retval_clean(mt, "mapi_id_array_add_obj", retval);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       propsToExclude = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = FXCopyTo(&(context->obj_test_folder), 0, FastTransferCopyTo_BestBody, FastTransfer_Unicode, propsToExclude, &obj_context);
-       mapitest_print_retval_clean(mt, "FXCopyTo", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = FXGetBuffer(&obj_context, 0, &transferStatus, &progress, &totalSteps, &transferdata);
-       mapitest_print_retval_clean(mt, "FXGetBuffer", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       if (transferStatus != TransferStatus_Done) {
-               mapitest_print(mt, "unexpected transferStatus 0x%04x\n", transferStatus);
-               ret = false;
-               goto cleanup;
-       }
-       if (progress != totalSteps) {
-               mapitest_print(mt, "unexpected final step count, progress 0x%04x, total 0x%04x\n", progress, totalSteps);
-               ret = false;
-               goto cleanup;
-       }
-       parser = fxparser_init(mt->mem_ctx, NULL);
-       fxparser_parse(parser, &transferdata);
-       talloc_free(parser);
-       // TODO: verify that the buffer is as expected
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_context);
-       mapi_object_release(&sourcefolder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the FastTransferCopyProperties (0x69) and FastTransferSourceGetBuffer (0x4e) operations
-
-   This function:
-   -# Log on private message store
-   -# Creates a test folder
-   -# Setup source
-   -# Get data
- */
-_PUBLIC_ bool mapitest_oxcfxics_CopyProperties(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       struct mt_common_tf_ctx         *context;
-       mapi_object_t                   obj_htable;
-       mapi_object_t                   obj_context;
-       mapi_object_t                   sourcefolder;
-       struct SPropTagArray            *props;
-       bool                            ret = true;
-       enum TransferStatus             transferStatus;
-       uint16_t                        progress;
-       uint16_t                        totalSteps;
-       DATA_BLOB                       transferdata;
-       struct fx_parser_context        *parser;
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create source folder */
-       mapi_object_init(&sourcefolder);
-       mapi_object_init(&obj_context);
-
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "SourceCopyProperties", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &sourcefolder);
-       mapitest_print_retval_clean(mt, "Create SourceCopyProperties", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       props = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_FOLDER_TYPE, PR_NTSD_MODIFICATION_TIME);
-       retval = FXCopyProperties(&(context->obj_test_folder), 0 /* level */, 0 /*copyflags */, FastTransfer_Unicode, props, &obj_context);
-       mapitest_print_retval_clean(mt, "FXCopyProperties", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       
-       retval = FXGetBuffer(&obj_context, 0, &transferStatus, &progress, &totalSteps, &transferdata);
-       mapitest_print_retval_clean(mt, "FXGetBuffer", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       if (transferStatus != TransferStatus_Done) {
-               mapitest_print(mt, "unexpected transferStatus 0x%04x\n", transferStatus);
-               ret = false;
-               goto cleanup;
-       }
-       if (progress != totalSteps) {
-               mapitest_print(mt, "unexpected final step count, progress 0x%04x, total 0x%04x\n", progress, totalSteps);
-               ret = false;
-               goto cleanup;
-       }
-       parser = fxparser_init(mt->mem_ctx, NULL);
-       fxparser_parse(parser, &transferdata);
-       talloc_free(parser);
-       // TODO: verify that the buffer is as expected
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_context);
-       mapi_object_release(&sourcefolder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-
-/**
-   \details Test the RopSynchronizationConfigure (0x70),
-   RopSynchronizationUploadStateStreamBegin (0x75),
-   RopSynchronizationUploadStateStreamContinue (0x76) and
-   RopSynchronizationUploadStateStreamEnd (0x77) operations
-
-   This function:
-   -# Log on private message store
-   -# Creates a test folder
-   -# Sets up sync configure context
-   -# Uploads an empty ICS state
-   -# cleans up.
- */
-_PUBLIC_ bool mapitest_oxcfxics_SyncConfigure(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       struct mt_common_tf_ctx *context;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_sync_context;
-       mapi_object_t           download_folder;
-       DATA_BLOB               restriction;
-       DATA_BLOB               ics_state;
-       struct SPropTagArray    *property_tags;
-       bool                    ret = true;
-
-       /* Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       /* Create destfolder */
-       mapi_object_init(&download_folder);
-       mapi_object_init(&obj_sync_context);
-       retval = CreateFolder(&(context->obj_test_folder), FOLDER_GENERIC,
-                             "ICSDownloadFolder", NULL /*folder comment*/,
-                             OPEN_IF_EXISTS, &download_folder);
-       mapitest_print_retval_clean(mt, "Create ICS Download Folder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       property_tags = set_SPropTagArray(mt->mem_ctx, 0x0);
-       restriction.length = 0;
-       restriction.data = NULL;
-       retval = ICSSyncConfigure(&download_folder, SynchronizationType_Hierarchy,
-                                 FastTransfer_Unicode, SynchronizationFlag_Unicode,
-                                 SynchronizationExtraFlag_Eid | SynchronizationExtraFlag_Cn,
-                                 restriction, property_tags, &obj_sync_context);
-       mapitest_print_retval_clean(mt, "ICSSyncConfigure", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       ics_state.length = 0;
-       ics_state.data = NULL;
-
-       retval = ICSSyncUploadStateBegin(&obj_sync_context, PidTagIdsetGiven, ics_state.length);
-       mapitest_print_retval_clean(mt, "ICSSyncUploadStateBegin", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = ICSSyncUploadStateContinue(&obj_sync_context, ics_state);
-       mapitest_print_retval_clean(mt, "ICSSyncUploadStateContinue", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = ICSSyncUploadStateEnd(&obj_sync_context);
-       mapitest_print_retval_clean(mt, "ICSSyncUploadStateEnd", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-             
-cleanup:
-       /* Cleanup and release */
-       mapi_object_release(&obj_sync_context);
-       mapi_object_release(&download_folder);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcmsg.c b/branches/plugfest/utils/mapitest/modules/module_oxcmsg.c
deleted file mode 100644 (file)
index a447767..0000000
+++ /dev/null
@@ -1,1679 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - E-MAIL OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-   Copyright (C) Brad Hards <bradh@openchange.org> 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcmsg.c
-
-   \brief Message and Attachment Object Protocol test suite
-*/
-
-
-/**
-   \details Test the CreateMessage (0x6) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Outbox folder
-       -# Create the message
-       -# Delete the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_CreateMessage(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderOutbox);
-       if (ret == false) return ret;
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Delete the message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-#define        OXCMSG_SETREADFLAGS     "[OXCMSG] SetMessageReadFlag"
-
-/**
-   \details Test the SetMessageReadFlag (0x11) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the Inbox folder
-       -# Create a tmp message
-       -# Play with SetMessageReadFlag
-       -# Delete the message
-       
-   Note: We can test either SetMessageReadFlag was effective by checking its
-   old/new value with GetProps on PR_MESSAGE_FLAGS property.
-
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_SetMessageReadFlag(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       mapi_id_t               id_msgs[1];
-       uint32_t                status= 0;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       /* Step 2. Open Outbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderOutbox);
-       if (ret == false) return ret;
-
-       /* Step 3. Create the tmp message and save it */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, OXCMSG_SETREADFLAGS);
-       if (ret == false) return ret;
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Play with SetMessageReadFlag */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_MID, PR_MESSAGE_FLAGS);
-       ret = true;
-
-       /* 1. Retrieve and Save the original PR_MESSAGE_FLAGS value */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       if (cValues > 1) {
-               status = lpProps[1].value.l;
-       }
-       MAPIFreeBuffer(lpProps);
-       
-       /* Set message flags as read */
-       retval = SetMessageReadFlag(&obj_folder, &obj_message, MSGFLAG_READ);
-       mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_READ");
-
-       /* Check if the operation was successful */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       if (cValues > 1 && status != lpProps[1].value.l) {
-               mapitest_print(mt, "* %-35s: PR_MESSAGE_FLAGS changed\n", "SetMessageReadFlag");
-               status = lpProps[1].value.l;
-       } else {
-               mapitest_print(mt, "* %-35s: PR_MESSAGE_FLAGS failed\n", "SetMessageReadFlag");
-               return false;
-       }
-       MAPIFreeBuffer(lpProps);
-               
-       /* Set the message flags as submitted */
-       retval = SetMessageReadFlag(&obj_folder, &obj_message, MSGFLAG_SUBMIT);
-       mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_SUBMIT");
-       
-       /* Check if the operation was successful */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       if (cValues > 1 && status != lpProps[1].value.l) {
-               mapitest_print(mt, "* %-35s: PR_MESSAGE_FLAGS changed\n", "SetMessageReadFlag");
-               status = lpProps[1].value.l;
-       } else {
-               mapitest_print(mt, "* %-35s: PR_MESSAGE_FLAGS failed\n", "SetMessageReadFlag");
-               return false;
-       }
-
-       /* Step 5. Delete the message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       MAPIFreeBuffer(SPropTagArray);
-
-       return true;
-}
-
-/**
-   \details Test the ModifyRecipients (0xe) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the Outbox folder
-   -# Create the message
-   -# Resolve recipients names
-   -# Call ModifyRecipients operation for MAPI_TO, MAPI_CC, MAPI_BCC
-   -# Delete the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_ModifyRecipients(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       id_folder;
-       char                            **username = NULL;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropValue               SPropValue;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       mapi_id_t                       id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-
-       /* Step 4. Resolve the recipients and call ModifyRecipients */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xA,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_SEND_RICH_INFO,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-
-       username = talloc_array(mt->mem_ctx, char *, 2);
-       username[0] = (char *)mt->profile->mailbox;
-       username[1] = NULL;
-
-       retval = ResolveNames(mapi_object_get_session(&obj_message), 
-                             (const char **)username, SPropTagArray, 
-                             &SRowSet, &flaglist, MAPI_UNICODE);
-       mapitest_print_retval(mt, "ResolveNames");
-
-       if (!SRowSet) {
-               mapitest_print(mt, "Null SRowSet\n");
-               return false;
-       }
-       if (!SRowSet->cRows) {
-               mapitest_print(mt, "No values in SRowSet\n");
-               MAPIFreeBuffer(SRowSet);
-               return false;
-       }
-
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       SRowSet_propcpy(mt->mem_ctx, SRowSet, SPropValue);
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_TO);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_TO");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_CC);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_CC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_BCC);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_BCC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       /* Step 5. Delete the message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-       /* Release */
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the RemoveAllRecipients (0xd) operation
-
-   This function:
-   -# Log on the use private mailbox
-   -# Open the Outbox folder
-   -# Create the message, set recipients
-   -# Save the message
-   -# Remove all recipients
-   -# Delete the message
-
-   \param mt point on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_RemoveAllRecipients(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       bool                            ret = false;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       id_folder;
-       char                            **username = NULL;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropValue               SPropValue;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       mapi_id_t                       id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xA,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_SEND_RICH_INFO,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-
-       username = talloc_array(mt->mem_ctx, char *, 2);
-       username[0] = (char *)mt->profile->mailbox;
-       username[1] = NULL;
-
-       retval = ResolveNames(mapi_object_get_session(&obj_message),
-                             (const char **)username, SPropTagArray, 
-                             &SRowSet, &flaglist, MAPI_UNICODE);
-       mapitest_print_retval(mt, "ResolveNames");
-
-       if (!SRowSet) {
-               mapitest_print(mt, "Null SRowSet\n");
-               return false;
-       }
-       if (!SRowSet->cRows) {
-               mapitest_print(mt, "No values in SRowSet\n");
-               MAPIFreeBuffer(SRowSet);
-               return false;
-       }
-
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       SRowSet_propcpy(mt->mem_ctx, SRowSet, SPropValue);
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_TO);
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_TO");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_CC);
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_CC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_BCC);
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_BCC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       ret = true;
-
-       /* Step 4. Remove all recipients */
-       retval = RemoveAllRecipients(&obj_message);
-       mapitest_print_retval(mt, "RemoveAllRecipients");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               ret = false;
-       }
-
-       /* Step 5. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       /* Step 6. Delete the message */
-       errno = 0;
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               ret = false;
-       }
-
-       /* Release */
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the ReadRecipients (0xf) operation
-
-      This function:
-      -# Log on the use private mailbox
-      -# Open the Outbox folder
-      -# Create the message, set recipients
-      -# Save the message
-      -# Read message recipients
-      -# Delete the message
-
-   \param mt point on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_ReadRecipients(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       bool                            ret = false;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       id_folder;
-       char                            **username = NULL;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropValue               SPropValue;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       struct ReadRecipientRow         *RecipientRows;
-       uint8_t                         count;
-       mapi_id_t                       id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0xA,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_SEND_RICH_INFO,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-
-       username = talloc_array(mt->mem_ctx, char *, 2);
-       username[0] = (char *)mt->profile->mailbox;
-       username[1] = NULL;
-
-       retval = ResolveNames(mapi_object_get_session(&obj_message),
-                             (const char **)username, SPropTagArray, 
-                             &SRowSet, &flaglist, MAPI_UNICODE);
-       mapitest_print_retval(mt, "ResolveNames");
-
-       if (!SRowSet) {
-               mapitest_print(mt, "Null SRowSet\n");
-               return false;
-       }
-       if (!SRowSet->cRows) {
-               mapitest_print(mt, "No values in SRowSet\n");
-               MAPIFreeBuffer(SRowSet);
-               return false;
-       }
-
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       SRowSet_propcpy(mt->mem_ctx, SRowSet, SPropValue);
-
-       retval = SetRecipientType(&(SRowSet->aRow[0]), MAPI_TO);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_TO");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_CC);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_CC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-
-       SetRecipientType(&(SRowSet->aRow[0]), MAPI_BCC);
-       mapitest_print_retval(mt, "SetRecipientType");
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       mapitest_print_retval_fmt(mt, "ModifyRecipients", "(%s)", "MAPI_BCC");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       ret = true;
-
-       /* Step 4. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               return false;
-       }
-
-       /* Step 5. Read recipients */
-       RecipientRows = talloc_zero(mt->mem_ctx, struct ReadRecipientRow);
-       retval = ReadRecipients(&obj_message, 0, &count, &RecipientRows);
-       mapitest_print_retval(mt, "ReadRecipients");
-       MAPIFreeBuffer(RecipientRows);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               ret = false;
-       }
-
-       /* Step 6. Delete the message */
-       errno = 0;
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SRowSet);
-               MAPIFreeBuffer(flaglist);
-               ret = false;
-       }
-
-       /* Release */
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the SaveChangesMessage (0xc) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the Outbox folder
-   -# Create the message
-   -# Save the message
-   -# Delete the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_SaveChangesMessage(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Delete the saved message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetMessageStatus (0x1f) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the outbox folder
-   -# Create the message
-   -# Save the message
-   -# Get outbox contents table
-   -# Get messages status
-   -# Delete the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_GetMessageStatus(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_ctable;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                count;
-       uint32_t                status;
-       uint32_t                i;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_message);
-       mapi_object_init(&obj_ctable);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       mapitest_print_retval_clean(mt, "GetDefaultFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval_clean(mt, "OpenFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval_clean(mt, "CreateMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Get outbox contents table */
-       retval = GetContentsTable(&obj_folder, &obj_ctable, 0, &count);
-       mapitest_print_retval_clean(mt, "GetContentsTable", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2,
-                                         PR_MID, PR_MSG_STATUS);
-       retval = SetColumns(&obj_ctable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_clean(mt, "GetMessageStatus", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 6. Get Message Status */
-       while (((retval = QueryRows(&obj_ctable, count, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND) &&
-              SRowSet.cRows) {
-               count -= SRowSet.cRows;
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       retval = GetMessageStatus(&obj_folder, SRowSet.aRow[i].lpProps[0].value.d, &status);
-                       mapitest_print_retval_clean(mt, "GetMessageStatus", retval);
-                       if (retval != MAPI_E_SUCCESS) {
-                               return false;
-                       }
-               }
-       }
-
-       /* Step 7. Delete the saved message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval_clean(mt, "DeleteMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_ctable);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-struct msgstatus {
-       uint32_t        status;
-       const char      *name;
-};
-
-static struct msgstatus msgstatus[] = {
-       {MSGSTATUS_HIDDEN,              "MSGSTATUS_HIDDEN"},
-       {MSGSTATUS_HIGHLIGHTED,         "MSGSTATUS_HIGHLIGHTED"},
-       {MSGSTATUS_TAGGED,              "MSGSTATUS_TAGGED"},
-       {MSGSTATUS_REMOTE_DOWNLOAD,     "MSGSTATUS_REMOTE_DOWNLOAD"},
-       {MSGSTATUS_REMOTE_DELETE,       "MSGSTATUS_REMOTE_DELETE"},
-       {MSGSTATUS_DELMARKED,           "MSGSTATUS_DELMARKED"},
-       {0,                             NULL}
-};
-
-/**
-   \details Test the GetMessageStatus (0x1f) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the outbox folder
-   -# Create the message
-   -# Save the message
-   -# Get outbox contents table
-   -# Set different messages status, then get them and compare values
-   -# Delete the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_SetMessageStatus(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_ctable;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                count;
-       uint32_t                i;
-       uint32_t                ulOldStatus = 0;
-       uint32_t                ulOldStatus2 = 0;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_message);
-       mapi_object_init(&obj_ctable);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       mapitest_print_retval_clean(mt, "GetDefaultFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval_clean(mt, "OpenFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 3. Create the message */
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval_clean(mt, "CreateMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 4. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 5. Get outbox contents table */
-       retval = GetContentsTable(&obj_folder, &obj_ctable, 0, &count);
-       mapitest_print_retval_clean(mt, "GetContentsTable", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2,
-                                         PR_MID, PR_MSG_STATUS);
-       retval = SetColumns(&obj_ctable, SPropTagArray);
-       mapitest_print_retval_clean(mt, "SetColumns", retval);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Fetch the first email */
-       retval = QueryRows(&obj_ctable, 1, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval_clean(mt, "QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 6. SetMessageStatus + GetMessageStatus + Comparison */
-       for (i = 0; msgstatus[i].name; i++) {
-               retval = SetMessageStatus(&obj_folder, SRowSet.aRow[0].lpProps[0].value.d,
-                                         msgstatus[i].status, msgstatus[i].status, &ulOldStatus2);
-               mapitest_print_retval_clean(mt, "SetMessageStatus", retval);
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       goto release;
-               }
-
-               retval = GetMessageStatus(&obj_folder, SRowSet.aRow[0].lpProps[0].value.d, &ulOldStatus);
-               mapitest_print_retval_clean(mt, "GetMessageStatus", retval);
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       goto release;
-               }
-
-               if ((ulOldStatus != ulOldStatus2) && (ulOldStatus & msgstatus[i].status)) {
-                       errno = 0;
-                       mapitest_print(mt, "* %-35s: %s 0x%.8x\n", "Comparison", msgstatus[i].name, GetLastError());
-               }
-       }
-
-       /* Step 7. Delete the saved message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-release:
-       /* Release */
-       mapi_object_release(&obj_ctable);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-/**
-   \details Test the SetReadFlags (0x66) operation
-
-   This function:
-   -# Opens the Inbox folder and creates some test content
-   -# Checks that the PR_MESSAGE_FLAGS property on each message is 0x0
-   -# Apply SetReadFlags() on every second messages
-   -# Check the results are as expected
-   -# Apply SetReadFlags() again
-   -# Check the results are as expected
-   -# Cleanup
-       
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_SetReadFlags(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_test_folder;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       struct mt_common_tf_ctx *context;
-       int                     i;
-       uint64_t                messageIds[5];
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Fetch the contents table for the test folder */
-       context = mt->priv;
-       mapi_object_init(&(obj_test_folder));
-       retval = GetContentsTable(&(context->obj_test_folder), &(obj_test_folder), 0, NULL);
-       mapitest_print_retval_clean(mt, "GetContentsTable", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_MID, PR_MESSAGE_FLAGS);
-       retval = SetColumns(&obj_test_folder, SPropTagArray);
-       mapitest_print_retval_clean(mt, "SetColumns", retval);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_test_folder, 10, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval_clean(mt, "QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       /* 0x0400 is mfEverRead - the message has been read at least once. We see this on Exchange 2010 */
-       for (i = 0; i < 10; ++i) {
-               if ((*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1])) & ~0x0400) != 0x0) {
-                       mapitest_print(mt, "* %-35s: unexpected flag at %i 0x%x\n", "QueryRows", i,
-                                      (*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1]))));
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-
-       for (i = 0; i < 5; ++i) {
-               messageIds[i] = (*(const uint64_t *)get_SPropValue_data(&(SRowSet.aRow[i*2].lpProps[0])));
-       }
-
-       retval = SetReadFlags(&(context->obj_test_folder), 0x0, 5, messageIds);
-       mapitest_print_retval_clean(mt, "SetReadFlags", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_test_folder, 10, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval_clean(mt, "QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       for (i = 0; i < 10; i+=2) {
-               if ((*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1])) & ~0x0400) != MSGFLAG_READ) {
-                       mapitest_print(mt, "* %-35s: unexpected flag (0) at %i 0x%x\n", "QueryRows", i,
-                                      (*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1]))));
-                       ret = false;
-                       goto cleanup;
-               }
-               if ((*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i+1].lpProps[1])) & ~0x0400) != 0x0) {
-                       mapitest_print(mt, "* %-35s: unexpected flag (1) at %i 0x%x\n", "QueryRows", i,
-                                      (*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i+1].lpProps[1]))));
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-
-       SetReadFlags(&(context->obj_test_folder), CLEAR_READ_FLAG, 5, messageIds);
-
-       retval = QueryRows(&obj_test_folder, 10, TBL_NOADVANCE, &SRowSet);
-       mapitest_print_retval_clean(mt, "QueryRows", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       for (i = 0; i < 10; ++i) {
-               if ((*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1])) & ~0x0400) != 0x0) {
-                       mapitest_print(mt, "* %-35s: unexpected flag (3) at %i 0x%x\n", "QueryRows", i,
-                                      (*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[i].lpProps[1]))));
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
- cleanup:
-       /* Cleanup and release */
-       talloc_free(SRowSet.aRow);
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the OpenEmbeddedMessage (0x46) and CreateAttach (0x23) operations
-
-   This function:
-        -# Logs on the user private mailbox
-        -# Open the Inbox folder         
-        -# Create a test message          
-        -# Embed a message in the test message
-        -# Delete the test message                  
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */                                        
-_PUBLIC_ bool mapitest_oxcmsg_OpenEmbeddedMessage(struct mapitest *mt)
-{                                                                     
-       enum MAPISTATUS         retval;                               
-       bool                    ret;                                  
-       mapi_object_t           obj_store;                            
-       mapi_object_t           obj_folder;                           
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_attach;
-       mapi_object_t           obj_embeddedmsg;
-       mapi_id_t               id_msgs[1];                           
-       struct SPropValue       attach[2];
-       struct SRowSet          SRowSet;
-       struct SPropTagArray    SPropTagArray;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_store);
-               return false;                          
-       }
-
-       /* Step 2. Open Inbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderInbox);
-       if (ret == false) {
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 3. Create the tmp message and save it */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, OXCMSG_SETREADFLAGS);
-       if (ret == false) return ret;
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 4. Embed another message in the message */
-       mapi_object_init(&obj_attach);
-       retval = CreateAttach(&obj_message, &obj_attach);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "CreateAttach", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* use SetProps() to set the attachment up */
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_EMBEDDED_MSG;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       retval = SetProps(&obj_attach, attach, 2);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetProps", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       mapi_object_init(&obj_embeddedmsg);
-       retval = OpenEmbeddedMessage(&obj_attach, &obj_embeddedmsg, MAPI_CREATE);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "OpenEmbeddedMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       ret = mapitest_common_message_fill(mt, &obj_embeddedmsg, "[MT] EmbeddedMessage");
-       if (ret == false) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       // Save the changes to the embedded message
-       retval = SaveChangesMessage(&obj_message, &obj_embeddedmsg, KeepOpenReadOnly);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-       // Save the changes to the attachment and then the message
-       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "SaveChangesAttachment", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 5. Open the embedded message */
-       mapi_object_init(&obj_attach);
-       retval = OpenAttach(&obj_message, 0, &obj_attach);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "OpenAttach", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-       retval = OpenEmbeddedMessage(&obj_attach, &obj_embeddedmsg, MAPI_READONLY);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "OpenEmbeddedMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_embeddedmsg);
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 6. Get the recipient table */
-       retval = GetRecipientTable(&obj_embeddedmsg, &SRowSet, &SPropTagArray);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "GetRecipientTable", retval);
-
-       mapitest_print_SRowSet(mt, &SRowSet, "\t * ");
-       mapi_object_release(&obj_embeddedmsg);
-
-       /* Step 7. Delete the message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print(mt, "* %-35s: 0x%.8x\n", "DeleteMessage", GetLastError());
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_attach);
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_attach);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetValidAttachments (0x52) and CreateAttach (0x23) operations
-
-   This function:
-       -# Logs on the user private mailbox
-       -# Open the Inbox folder         
-       -# Create a test message          
-       -# Check the number of valid attachments is zero
-       -# Create two attachments
-       -# Check the number of valid attachments is two (numbered 0 and 1)
-       -# Delete the first attachment
-       -# Check the number of valid attachments is one (numbered 1)
-       -# Delete the test message                  
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */                                        
-_PUBLIC_ bool mapitest_oxcmsg_GetValidAttachments(struct mapitest *mt)
-{                                                                     
-       enum MAPISTATUS         retval;                               
-       bool                    ret;                                  
-       mapi_object_t           obj_store;                            
-       mapi_object_t           obj_folder;                           
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_attach0;
-       mapi_object_t           obj_attach1;
-       mapi_id_t               id_msgs[1];                           
-       struct SPropValue       attach[3];
-       uint16_t                numAttach;
-       uint32_t                *attachmentIds;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_store);
-               return false;                          
-       }
-
-       /* Step 2. Open Inbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderInbox);
-       if (ret == false) {
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 3. Create the test message and save it */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, OXCMSG_SETREADFLAGS);
-       if (ret == false) return ret;
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_message);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       ret = true;
-
-       /* Step 4. Check the number of valid attachments */
-       numAttach = 99;
-       retval = GetValidAttach(&obj_message, &numAttach, &attachmentIds);
-       mapitest_print_retval_fmt_clean(mt, "GetValidAttach", retval, "%i", numAttach);
-       if (numAttach != 0) {
-               ret = false;
-               goto cleanup_wo_attach;
-       }
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup_wo_attach;
-       }
-
-       /* Step 5. Create two attachments to the message */
-       mapi_object_init(&obj_attach0);
-       mapi_object_init(&obj_attach1);
-       retval = CreateAttach(&obj_message, &obj_attach0);
-       mapitest_print_retval_clean(mt, "CreateAttach", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* use SetProps() to set the attachment up */
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = "Attachment 0";
-       retval = SetProps(&obj_attach0, attach, 3);
-       mapitest_print_retval_clean(mt, "SetProps", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Save the changes to the attachment and then the message */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach0, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesAttachment", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = CreateAttach(&obj_message, &obj_attach1);
-       mapitest_print_retval_clean(mt, "CreateAttach", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* use SetProps() to set the attachment up */
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = "Attachment 1";
-       retval = SetProps(&obj_attach1, attach, 3);
-       mapitest_print_retval_clean(mt, "SetProps", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Save the changes to the attachment and then the message */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach1, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesAttachment", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6. Check the number of valid attachments */
-       numAttach = 99;
-       retval = GetValidAttach(&obj_message, &numAttach, &attachmentIds);
-       mapitest_print_retval_fmt_clean(mt, "GetValidAttach", retval, "%i", numAttach);
-       if (numAttach != 2) {
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_print(mt, "IDs: %d, %d\n", attachmentIds[0], attachmentIds[1]);
-       if ( (attachmentIds[0] != 0) || (attachmentIds[1] != 1) ) {
-               ret = false;
-               goto cleanup;
-       }
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 7. Delete the first attachment */
-       retval = DeleteAttach(&obj_message, attachmentIds[0]);
-       mapitest_print_retval_clean(mt, "DeleteAttach", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 8. Check the number of valid attachments */
-       numAttach = 99;
-       retval = GetValidAttach(&obj_message, &numAttach, &attachmentIds);
-       mapitest_print_retval_fmt_clean(mt, "GetValidAttach", retval, "%i", numAttach);
-       if (numAttach != 1) {
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_print(mt, "IDs: %d\n", attachmentIds[0]);
-       if ( (attachmentIds[0] != 1) ) {
-               ret = false;
-               goto cleanup;
-       }
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 9. Delete the message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval_clean(mt, "DeleteMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_attach0);
-       mapi_object_release(&obj_attach1);
-cleanup_wo_attach:
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the ReloadCachedInformation (0x10) operation
-
-   This function:
-   -# Logs on to the user private mailbox
-   -# Open the outbox folder
-   -# Create the message
-   -# Save the message
-   -# Reloads the cached message information
-   -# Delete the message
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcmsg_ReloadCachedInformation(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       bool                    ret;
-
-       ret = true;
-
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_message);
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the message */
-       retval = CreateMessage(&obj_folder, &obj_message);
-       mapitest_print_retval(mt, "CreateMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Reload cached information */
-       retval = ReloadCachedInformation(&obj_message);
-       mapitest_print_retval(mt, "ReloadCachedInformation");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6. Delete the saved message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcnotif.c b/branches/plugfest/utils/mapitest/modules/module_oxcnotif.c
deleted file mode 100644 (file)
index 202fede..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - Core Notifications Protocol operation tests
-
-   Copyright (C) Brad Hards 2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcnotif.c
-
-   \brief Core Notifications Protocol test suite
-*/
-
-/* Internal callback functions */
-int cb(uint16_t, void*, void*);
-
-int cb(uint16_t type, void* data, void* priv)
-{
-       return 0;
-}
-
-/**
-   \details Test the RegisterNotification (0x29) operation
-
-   This function:
-   -# 
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcnotif_RegisterNotification(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       struct mapi_session     *session;
-       uint32_t tcon;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       /* Step 2. Open Inbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderInbox);
-       if (!ret) {
-               return ret;
-       }
-
-       /* Step 3. Register notification */
-       session = mapi_object_get_session(&obj_store);
-       retval = RegisterNotification(session, fnevObjectCopied);
-       mapitest_print_retval(mt, "RegisterNotification");
-       if ( retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4. Subscribe for notifications */
-       retval = Subscribe(&obj_store, &tcon, fnevObjectCopied, true, cb, NULL);
-       mapitest_print_retval(mt, "Subscribe");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Unsubscribe for notifications */
-       retval = Unsubscribe(mt->session, tcon);
-       mapitest_print_retval(mt, "Unsubscribe");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 6. Cleanup */
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcperm.c b/branches/plugfest/utils/mapitest/modules/module_oxcperm.c
deleted file mode 100644 (file)
index 319d394..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - Permissions operations
-
-   Copyright (C) Brad Hards <bradh@openchange.org> 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcperm.c
-
-   \brief Permissions Protocol test suite
-*/
-
-/*
- Utility function to dump out the permissions
- This depends on PR_ENTRYID being the first property returned
- */
-static void mapitest_dump_permissions_SRowSet(struct mapitest *mt, struct SRowSet *SRowSet, const char *sep)
-{
-       uint32_t                i, j;
-
-       /* Sanity checks */
-       if (!SRowSet) return;
-       if (!SRowSet->cRows) return;
-
-       for (i = 0; i < SRowSet->cRows; i++) {
-               struct SRow *thisRow = &(SRowSet->aRow[i]);
-               if ((thisRow->lpProps[0].value.d) == 0x0) {
-                       /* this is the "default" user id - ignore this */
-                       continue;
-               }
-               for (j = 0; j < thisRow->cValues; j++) {
-                       mapitest_print_SPropValue(mt, thisRow->lpProps[j], sep);
-               }
-       }
-}
-
-/**
-   \details Test the GetPermissionsTable (0x3e) operation
-
-   This function:
-   -# Log on private message store
-   -# Open the top store folder
-   -# Gets the permissions table handle
-   -# Fetches properties from the permissions table
- */
-_PUBLIC_ bool mapitest_oxcperm_GetPermissionsTable(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_permtable;
-       mapi_object_t                   obj_folder;
-       mapi_id_t                       id_folder;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  SRowSet;
-       bool                            ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_permtable);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Get the permissions table handle */
-        retval = GetPermissionsTable(&obj_folder, 0x00, &obj_permtable);
-        mapitest_print_retval(mt, "GetPermissionsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       
-       /* Step 4. Fetch some properties from the permissions and dump them out */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME_UNICODE,
-                                         PR_MEMBER_RIGHTS);
-       retval = SetColumns(&obj_permtable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_permtable, 0x20, TBL_ADVANCE, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryRows");
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_dump_permissions_SRowSet(mt, &SRowSet, "\t");
-       
-cleanup:
-       mapi_object_release(&obj_permtable);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-       return ret;
-}
-
-/**
-   \details Test the ModifyPermissions (0x40) operation
-
-   This function:
-   -# Log on private message store
-   -# Open the top store folder
-   -# Creates a temporary folder
-   -# Adds permissions for the admin user, and checks them
-   -# Modifies permissions for the admin user, and checks them
-   -# Removes permissions for the admin user, and checks them
-   -# Deletes the folder
- */
-_PUBLIC_ bool mapitest_oxcperm_ModifyPermissions(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_permtable;
-       mapi_object_t                   obj_top_folder;
-       mapi_object_t                   obj_temp_folder;
-       mapi_id_t                       id_top_folder;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  SRowSet;
-       bool                            ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_top_folder);
-       mapi_object_init(&obj_temp_folder);
-       mapi_object_init(&obj_permtable);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       
-       /* Step 3. Create a temporary folder */
-       retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, "MAPITEST_TEST_FOLDER", NULL,
-                             OPEN_IF_EXISTS, &obj_temp_folder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Add user permissions on the folder, and check it */
-       retval = AddUserPermission(&obj_temp_folder, "Administrator", RightsReadItems);
-       mapitest_print_retval(mt, "AddUserPermission");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetPermissionsTable(&obj_temp_folder, 0x00, &obj_permtable);
-       mapitest_print_retval(mt, "GetPermissionsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME_UNICODE,
-                                         PR_MEMBER_RIGHTS);
-       retval = SetColumns(&obj_permtable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_permtable, 0x20, TBL_ADVANCE, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryRows");
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_dump_permissions_SRowSet(mt, &SRowSet, "\t");
-
-       /* Step 5. Modify user permissions on the folder, and check it */
-       retval = ModifyUserPermission(&obj_temp_folder, "Administrator", RightsAll);
-       mapitest_print_retval(mt, "ModifyUserPermission");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetPermissionsTable(&obj_temp_folder, 0x00, &obj_permtable);
-       mapitest_print_retval(mt, "GetPermissionsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME_UNICODE,
-                                         PR_MEMBER_RIGHTS);
-       retval = SetColumns(&obj_permtable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_permtable, 0x20, TBL_ADVANCE, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryRows");
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_dump_permissions_SRowSet(mt, &SRowSet, "\t");
-
-       /* Step 6. Remove user permissions on the folder, and check it */
-       retval = RemoveUserPermission(&obj_temp_folder, "Administrator");
-       mapitest_print_retval(mt, "RemoveUserPermission");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetPermissionsTable(&obj_temp_folder, 0x00, &obj_permtable);
-       mapitest_print_retval(mt, "GetPermissionsTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_MEMBER_ID,
-                                         PR_MEMBER_NAME_UNICODE,
-                                         PR_MEMBER_RIGHTS);
-       retval = SetColumns(&obj_permtable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = QueryRows(&obj_permtable, 0x20, TBL_ADVANCE, &SRowSet);
-       if (retval != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryRows");
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_dump_permissions_SRowSet(mt, &SRowSet, "\t");
-
-       /* Step 7. Delete the folder */
-       retval = EmptyFolder(&obj_temp_folder);
-       mapitest_print_retval(mt, "EmptyFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_temp_folder),
-                             DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-cleanup:
-       mapi_object_release(&obj_permtable);
-       mapi_object_release(&obj_temp_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcprpt.c b/branches/plugfest/utils/mapitest/modules/module_oxcprpt.c
deleted file mode 100644 (file)
index 5d220ce..0000000
+++ /dev/null
@@ -1,2723 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - PROPERTY AND STREAM OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-   Copyright (C) Brad Hards 2008-2009
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxcprpt.c
-
-   \brief Property and Stream Object Protocol test suite
-*/
-
-/**
-   \details Test the GetProps (0x7) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Retrieve the properties list using GetPropList
-   -# Retrieve their associated values using the GetProps operation
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_GetProps(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }       
-       
-       /* Step 2. Retrieve the properties list using GetPropList */
-       SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = GetPropList(&obj_store, SPropTagArray);
-       mapitest_print_retval(mt, "GetPropList");
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-
-       /* Step 3. Call the GetProps operation */
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(SPropTagArray);
-               return false;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetPropsAll (0x8) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Retrieve the whole set of properties and values associated to the store object
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_GetPropsAll(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_store;
-       struct mapi_SPropValue_array    properties_array;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. GetPropsAll operation */
-       retval = GetPropsAll(&obj_store, &properties_array);
-       mapitest_print_retval(mt, "GetPropsAll");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       MAPIFreeBuffer(properties_array.lpProps);
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetPropList (0x9) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Retrieve the list of properties associated to the store object object
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_GetPropList(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct SPropTagArray    *SPropTagArray;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. GetPropList operation */
-       SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = GetPropList(&obj_store, SPropTagArray);
-       mapitest_print_retval(mt, "GetPropList");
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the SetProps (0xa) operation
-
-   This function:
-   -# Logon Private mailbox
-   -# Use GetProps to retrieve the mailbox name
-   -# Change it using SetProps
-   -# Reset the mailbox name to its original value
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_SetProps(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct SPropValue       *lpProps;
-       struct SPropValue       lpProp[1];
-       struct SPropTagArray    *SPropTagArray;
-       const char              *mailbox = NULL;
-       const char              *new_mailbox = NULL;
-       uint32_t                cValues;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_step_fmt(mt, "1.", "OpenMsgStore", "(%s)", "Logon Private Mailbox");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2: GetProps, retrieve mailbox name */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval_step_fmt(mt, "2.", "GetProps", "(%s)", "Retrieve the mailbox name");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-
-       if (cValues && lpProps[0].value.lpszA) {
-               mailbox = lpProps[0].value.lpszA;
-               mapitest_print(mt, "* Step 2. Mailbox name = %s\n", mailbox);
-       } else {
-               mapitest_print(mt, MT_ERROR, "* Step 2 - GetProps: No mailbox name\n");
-               return false;
-       }
-
-       /* Step 2.1: SetProps with new value */
-       cValues = 1;
-       new_mailbox = talloc_asprintf(mt->mem_ctx, "%s [MAPITEST]", mailbox);
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, 
-                              (const void *) new_mailbox);
-       retval = SetProps(&obj_store, lpProp, cValues);
-       mapitest_print_retval_step_fmt(mt, "2.1.", "SetProps", "(%s)", "NEW mailbox name");
-
-       /* Step 2.2: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(new_mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 2.2 - Check: NEW mailbox name - [SUCCESS] (%s)\n", lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 2.2 - Check: NEW mailbox name [FAILURE]\n");
-               }
-       }
-       MAPIFreeBuffer((void *)new_mailbox);
-
-       /* Step 3.1: Reset mailbox to its original value */
-       cValues = 1;
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)mailbox);
-       retval = SetProps(&obj_store, lpProp, cValues);
-       mapitest_print_retval_step_fmt(mt, "3.1.", "SetProps", "(%s)", "OLD mailbox name");
-       
-       /* Step 3.2: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 3.2 - Check: OLD mailbox name [SUCCESS]\n");
-               } else {
-                       mapitest_print(mt, "* Step 3.2 - Check: OLD mailbox name, [FAILURE]\n");
-               }
-       }
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the DeleteProps (0xb) operation)
-
-   This function:
-   -# Opens the mailbox
-   -# Create a test folder
-   -# Creates a reference email, and sets some properties on it
-   -# Delete properties from this message
-   -# Checks that properties got deleted
-   -# Deletes both email and the test folder
-
-   \todo It would be useful to test the problem return values
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_DeleteProps(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_top_folder;
-       mapi_id_t               id_top_folder;
-       mapi_object_t           obj_ref_folder;
-       mapi_object_t           obj_ref_message;
-       const char              *name = NULL;
-       const char              *subject = NULL;
-       struct SPropValue       lpProp[3];
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       bool                    result;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_step_fmt(mt, "1.", "OpenMsgStore", "(%s)", "Logon Private Mailbox");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapi_object_init(&obj_top_folder);
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2: Create reference folder */
-       mapi_object_init(&obj_ref_folder);
-       retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                              OPEN_IF_EXISTS, &obj_ref_folder);
-       mapitest_print_retval_step_fmt(mt, "2.", "CreateFolder", "(%s)", "Create the test folder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3: Create reference message */
-       mapi_object_init(&obj_ref_message);
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_ref_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval_step_fmt(mt, "3.1.", "mapitest_common_message_create", "(%s)", "Create a reference email");
-       if (result != true) {
-               return false;
-       }
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_ref_message, KeepOpenReadWrite);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-        name = talloc_asprintf(mt->mem_ctx, "Reference: %s", "display name");
-       subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
-       set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-       retval = SetProps(&obj_ref_message, lpProp, 2);
-       mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       MAPIFreeBuffer(lpProps);
-
-       /* Step 5. Delete Properties */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_CONVERSATION_TOPIC);
-       retval = DeleteProps(&obj_ref_message, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_step_fmt(mt, "5.", "DeleteProps", "PR_CONVERSATION_TOPIC");
-
-       /* Step 6. Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (get_SPropValue(lpProps, PR_CONVERSATION_TOPIC) == NULL) {
-               mapitest_print(mt, "* Step 5.1. - GetProps verifier [SUCCESS]\n");
-       } else {
-               mapitest_print(mt, "* Step 5.1. - GetProps verifier [FAILURE]:\n");
-       }
-       MAPIFreeBuffer(lpProps);
-
-       /* Step 7: cleanup folders */
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_ref_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_step(mt, "6.", "DeleteFolder", retval);
-
-       /* Release */
-       mapi_object_release(&obj_ref_message);
-       mapi_object_release(&obj_ref_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-
-
-       return true;
-}
-
-
-/**
-   \details Test the CopyProps (0x67) operation
-
-   This function:
-   -# Opens the mailbox
-   -# Creates a test folder
-   -# Creates a reference email, and sets some properties on it
-   -# Checks those properties are set correctly
-   -# Creates a second email, and sets some (different) properties on it
-   -# Checks those properties on the second folder are set correctly
-   -# Copies properties from the reference email to the second email (no overwrite)
-   -# Checks that properties on both emails are correct
-   -# Copies properties again, but with overwrite
-   -# Checks that properties on both emails are correct
-   -# Moves properties from the original email to the second email (no overwrite)
-   -# Checks that properties on both emails are correct
-   -# Deletes both emails and the test folder
-
-   \todo It would be useful to test the problem return values
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_top_folder;
-       mapi_id_t               id_top_folder;
-       mapi_object_t           obj_ref_folder;
-       mapi_object_t           obj_ref_message;
-       const char              *name = NULL;
-       const char              *subject = NULL;
-       struct SPropValue       lpProp[3];
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       mapi_object_t           obj_target_message;
-       const char              *targ_name = NULL;
-       const char              *targ_dept = NULL;
-       uint16_t                problem_count = 999;
-       struct PropertyProblem  *problems = NULL;
-       bool                    result;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_step_fmt(mt, "1.", "OpenMsgStore", "(%s)", "Logon Private Mailbox");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapi_object_init(&obj_top_folder);
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2: Create reference folder */
-       mapi_object_init(&obj_ref_folder);
-        retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                              OPEN_IF_EXISTS, &obj_ref_folder);
-       mapitest_print_retval_step_fmt(mt, "2.", "CreateFolder", "(%s)", "Create the test folder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3: Create reference message */
-       mapi_object_init(&obj_ref_message);
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_ref_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval_step_fmt(mt, "3.1.", "mapitest_common_message_create", "(%s)", "Create a reference email");
-       if (result != true) {
-               return false;
-       }
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_ref_message, KeepOpenReadWrite);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-        name = talloc_asprintf(mt->mem_ctx, "Reference: %s", "display name");
-       subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
-       set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-       retval = SetProps(&obj_ref_message, lpProp, 2);
-       mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 4: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-
-       /* Step 5: Create target message */
-       mapi_object_init(&obj_target_message);
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_target_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval_step_fmt(mt, "5.1.", "mapitest_common_message_create", "(%s)", "Create target email");
-       if (result != true) {
-               return false;
-       }
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_target_message, KeepOpenReadWrite);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-        targ_name = talloc_asprintf(mt->mem_ctx, "Target: %s", "display name");
-       targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
-       set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-       retval = SetProps(&obj_target_message, lpProp, 2);
-       mapitest_print_retval_step_fmt(mt, "5.2.", "SetProps", "(%s)", "set properties on target email");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 6: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 6A - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 6A - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 6B - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 6B - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-
-
-
-       /* Step 7: Copy properties, no overwrite */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = CopyProps(&obj_ref_message, &obj_target_message, SPropTagArray, CopyFlagsNoOverwrite,
-                          &problem_count, &problems);
-       mapitest_print_retval_step_fmt(mt, "7.", "CopyProps", "(%s)", "no overwrite");
-       MAPIFreeBuffer(problems);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-
-       /* Step 8: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8A - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8A - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8B - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8B - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       /* this one shouldn't be overwritten */
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8C - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8C - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       /* this one should be copied */
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8D - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8D - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       /* this one should be unchanged */
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8E - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8E - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               }
-       }
-
-       /* Step 9: Copy properties, with overwrite */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = CopyProps(&obj_ref_message, &obj_target_message, SPropTagArray, 0x0,
-                          &problem_count, &problems);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_step_fmt(mt, "9.", "CopyProps", "(%s)", "with overwrite");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 10: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10A - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10A - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10B - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10B - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       /* this one should now be overwritten */
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10C - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10C - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       /* this one should be copied */
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10D - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10D - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       /* this one should be unchanged */
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10E - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10E - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               }
-       }
-
-       if ( mt->info.rgwServerVersion[0] >= Exchange2010SP0Version ) {
-               /* the combination of CopyFlagsNoOverwrite|CopyFlagsMove isn't support in Exchange2010 */
-               goto cleanup;
-       }
-           
-       /* Step 11: Move properties, no overwrite */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = CopyProps(&obj_ref_message, &obj_target_message, SPropTagArray, CopyFlagsNoOverwrite|CopyFlagsMove,
-                          &problem_count, &problems);
-       MAPIFreeBuffer(SPropTagArray);
-       if (problem_count) {
-               MAPIFreeBuffer(problems);
-       }
-       mapitest_print_retval_step_fmt(mt, "11.", "CopyProps", "(%s)", "move");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 12: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (cValues == 2) {
-               mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
-       } else {
-               mapitest_print(mt, "* Step 12A - Properties removed [FAILURE]\n");
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12B - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12B - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12C - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12C - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               }
-       }
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12D - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12D - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               }
-       }
-
-       cleanup:
-
-       /* Cleanup reference strings */
-       MAPIFreeBuffer((void *)subject);
-       MAPIFreeBuffer((void *)name);
-       MAPIFreeBuffer((void *)targ_name);
-       MAPIFreeBuffer((void *)targ_dept);
-
-       /* Step 13: cleanup folders */
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_ref_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_step(mt, "13.1.", "DeleteFolder", retval);
-
-       /* Release */
-       mapi_object_release(&obj_ref_message);
-       mapi_object_release(&obj_ref_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-
-
-       return true;
-}
-
-
-
-/**
-   \details Test Stream operations. This test uses related stream
-   operations: OpenStream (0x2b), SetStreamSize (0x2f), WriteStream
-   (0x2d), CommitStream (0x5d), ReadStream (0x2c), SeekStream (0x2e),
-   LockRegionStream (0x5b), UnlockRegionStream (0x5c), CloneStream (0x3b)
-   
-   This function:
-   -# Logon 
-   -# Open Outbox folder
-   -# Create message
-   -# Create attachment and set properties
-   -# Open the stream
-   -# Set the stream size
-   -# Write into the stream
-   -# Commit the stream
-   -# Save the message
-   -# Get stream size and compare values
-   -# Open the stream again with different permissions
-   -# Read the stream and compare buffers
-   -# SeekStream at 0x1000 from the end of the stream
-   -# Read the 0x1000 last bytes and check if it matches
-   -# Lock a range of the stream
-   -# TODO: test if the locking works
-   -# Unlock a range of the stream
-   -# Clone the stream
-   -# Delete the message;
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise -1
- */
-_PUBLIC_ bool mapitest_oxcprpt_Stream(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_attach;
-       mapi_object_t           obj_stream;
-       mapi_object_t           obj_stream_clone;
-       mapi_id_t               id_folder;
-       DATA_BLOB               data;
-       struct SPropValue       attach[3];
-       char                    *stream = NULL;
-       char                    *out_stream = NULL;
-       uint32_t                stream_len = 0x32146;
-       unsigned char           buf[MT_STREAM_MAX_SIZE];
-       uint32_t                StreamSize = 0;
-       uint16_t                read_size = 0;
-       uint16_t                write_len = 0;
-       uint32_t                len = 0;
-       uint32_t                offset = 0;
-       mapi_id_t               id_msgs[1];
-       uint32_t                i;
-       uint64_t                NewPosition;
-
-       stream = mapitest_common_genblob(mt->mem_ctx, stream_len);
-       if (stream == NULL) {
-               return false;
-       }
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "Message Creation");
-       if (ret != true) {
-               return false;
-       }
-
-       /* Step 4. Create the attachment */
-       mapi_object_init(&obj_attach);
-       retval = CreateAttach(&obj_message, &obj_attach);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = MT_MAIL_ATTACH;
-
-       retval = SetProps(&obj_attach, attach, 3);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 5. Open the stream */
-       mapi_object_init(&obj_stream);
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 2, &obj_stream);
-       mapitest_print_retval(mt, "OpenStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 6. Set the stream size */
-       retval = SetStreamSize(&obj_stream, (uint64_t) stream_len);
-       mapitest_print_retval(mt, "SetStreamSize");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. Write the stream */
-       write_len = 0;
-
-       StreamSize = stream_len;
-
-       for (offset = 0, len = MT_STREAM_MAX_SIZE, i = 0; StreamSize; i++) {
-               data.length = len;
-               data.data = (uint8_t *)stream + offset;
-               retval = WriteStream(&obj_stream, &data, &write_len);
-               mapitest_print_retval_fmt(mt, "WriteStream", "[%d] (0x%x bytes written)", i, write_len);
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       break;
-               }
-
-               StreamSize -= write_len;
-               if (StreamSize > MT_STREAM_MAX_SIZE) {
-                       offset += MT_STREAM_MAX_SIZE;
-               } else {
-                       offset += write_len;
-                       len = StreamSize;
-               }
-       }
-
-       /* Step 8. Commit the stream */
-       retval = CommitStream(&obj_stream);
-       mapitest_print_retval(mt, "CommitStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 9. Save the attachment */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesAttachment");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 10. Get stream size */
-       retval = GetStreamSize(&obj_stream, &StreamSize);
-       mapitest_print_retval(mt, "GetStreamSize");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       mapitest_print(mt, "* %-35s: %s\n", "StreamSize comparison", 
-                      (StreamSize == stream_len) ? "[PASSED]" : "[FAILURE]");
-
-       /* Step 11. Read the stream */
-       mapi_object_release(&obj_stream);
-       mapi_object_init(&obj_stream);
-
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 0, &obj_stream);
-       mapitest_print_retval(mt, "OpenStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       offset = 0;
-       out_stream = talloc_size(mt->mem_ctx, StreamSize + 1);
-       do {
-               retval = ReadStream(&obj_stream, buf, MT_STREAM_MAX_SIZE, &read_size);
-               mapitest_print_retval_fmt(mt, "ReadStream", "(0x%x bytes read)", read_size);
-               memcpy(out_stream + offset, buf, read_size);
-               offset += read_size;
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       break;
-               }
-       } while (read_size && (offset != StreamSize));
-       out_stream[offset] = '\0';
-
-       if (offset) {
-               if (!strcmp(stream, out_stream)) {
-                       mapitest_print(mt, "* %-35s: [IN,OUT] stream [PASSED]\n", "Comparison");
-               } else {
-                       mapitest_print(mt, "* %-35s: [IN,OUT] stream [FAILURE]\n", "Comparison");
-
-               }
-       }
-
-       /* Step 12. SeekStream from the end of the stream */
-       retval = SeekStream(&obj_stream, 0x2, (uint64_t) -0x1000, &NewPosition);
-       mapitest_print_retval(mt, "SeekStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-
-       talloc_free(out_stream);
-       out_stream = talloc_size(mt->mem_ctx, 0x1001);
-       retval = ReadStream(&obj_stream, (uint8_t *)out_stream, 0x1000, &read_size);
-       out_stream[read_size] = '\0';
-       mapitest_print_retval_fmt(mt, "ReadStream", "(0x%x bytes read)", read_size);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       if (read_size && !strcmp(out_stream, stream + StreamSize - read_size)) {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Comparison");
-       } else {
-               mapitest_print(mt, "* %-35s: [FAILURE]\n", "Comparison");
-       }
-
-       mapi_object_init(&obj_stream_clone);
-       if (mt->info.rgwServerVersion[0] >= Exchange2010SP0Version) {
-               mapitest_print(mt, "* SKIPPING test for LockRegionStream, UnlockRegionStream and CloneStream\n");
-       } else {
-               /* Step 13. Lock a region */
-               retval = LockRegionStream(&obj_stream, 0x2000, 0x1000, 0x0);
-               mapitest_print_retval(mt, "LockRegionStream");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-
-               /* TODO: Step 14. Test the locking */
-
-
-               /* Step 15. Unlock the region */
-               retval = UnlockRegionStream(&obj_stream, 0x2000, 0x1000, 0x0);
-               mapitest_print_retval(mt, "UnlockRegionStream");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-
-               /* Step 16. Clone the stream */
-               retval = CloneStream(&obj_stream, &obj_stream_clone);
-               mapitest_print_retval(mt, "CloneStream");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-
-               /* Step 17. Test the clone */
-               retval = SeekStream(&obj_stream_clone, 0x0, 0, &NewPosition);
-               mapitest_print_retval(mt, "SeekStream");
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-               retval = ReadStream(&obj_stream_clone, buf, MT_STREAM_MAX_SIZE, &read_size);
-               mapitest_print_retval_fmt(mt, "ReadStream", "(0x%x bytes read)", read_size);
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       }
-
-       /* Delete the message */
-       errno = 0;
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_stream_clone);
-       mapi_object_release(&obj_stream);
-       mapi_object_release(&obj_attach);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       talloc_free(stream);
-       talloc_free(out_stream);
-
-       return ret;
-}
-
-
-/**
-   \details Test the CopyToStream (0x3a) operation
-
-   This function:
-   -# Logon the mailbox
-   -# Open the inbox folder
-   -# Create a sample messages with an attachment
-   -# Create 2 streams
-   -# Fill the first stream with random data
-   -# Seek stream positions to the beginning
-   -# CopyToStream data from first stream to the second stream
-   -# Read dst stream and compare with src stream
-   -# Delete the message
-   
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_CopyToStream(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_attach;
-       mapi_object_t           obj_attach2;
-       mapi_object_t           obj_stream;
-       mapi_object_t           obj_stream2;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       struct SPropValue       attach[3];
-       DATA_BLOB               data;
-       char                    *stream = NULL;
-       char                    *dst_stream = NULL;
-       uint32_t                stream_len = 0x32146;
-       unsigned char           buf[MT_STREAM_MAX_SIZE];
-       uint32_t                StreamSize = 0;
-       uint16_t                write_len = 0;
-       uint16_t                read_size = 0;
-       uint32_t                len = 0;
-       uint32_t                offset = 0;
-       uint32_t                i;
-       uint64_t                ReadByteCount = 0;
-       uint64_t                WrittenByteCount = 0;
-       uint64_t                NewPosition = 0;
-
-       stream = mapitest_common_genblob(mt->mem_ctx, stream_len);
-       if (stream == NULL) {
-               return false;
-       }
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "Message Creation");
-       if (ret != true) {
-               return false;
-       }
-
-       /* Step 4. Create the first attachment */
-       mapi_object_init(&obj_attach);
-       retval = CreateAttach(&obj_message, &obj_attach);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = MT_MAIL_ATTACH;
-
-       retval = SetProps(&obj_attach, attach, 3);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 5. Open the stream */
-       mapi_object_init(&obj_stream);
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 2, &obj_stream);
-       mapitest_print_retval(mt, "OpenStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 6. Set the stream size */
-       retval = SetStreamSize(&obj_stream, (uint64_t) stream_len);
-       mapitest_print_retval(mt, "SetStreamSize");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. Write the stream */
-       write_len = 0;
-
-       StreamSize = stream_len;
-
-       for (offset = 0, len = MT_STREAM_MAX_SIZE, i = 0; StreamSize; i++) {
-               data.length = len;
-               data.data = (uint8_t *)stream + offset;
-               retval = WriteStream(&obj_stream, &data, &write_len);
-               mapitest_print_retval_fmt(mt, "WriteStream", "[%d] (0x%x bytes written)", i, write_len);
-
-               StreamSize -= write_len;
-               if (StreamSize > MT_STREAM_MAX_SIZE) {
-                       offset += MT_STREAM_MAX_SIZE;
-               } else {
-                       offset += write_len;
-                       len = StreamSize;
-               }
-       }
-
-       /* Step 8. Commit the stream */
-       retval = CommitStream(&obj_stream);
-       mapitest_print_retval(mt, "CommitStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 9. Save the attachment */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesAttachment");
-
-       /* Step 10. Create the second attachment */
-       mapi_object_init(&obj_attach2);
-       retval = CreateAttach(&obj_message, &obj_attach2);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = MT_MAIL_ATTACH2;
-
-       retval = SetProps(&obj_attach2, attach, 3);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 11. Open the dst stream */
-       mapi_object_init(&obj_stream2);
-       retval = OpenStream(&obj_attach2, PR_ATTACH_DATA_BIN, 2, &obj_stream2);
-       mapitest_print_retval(mt, "OpenStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 12. Get src stream size */
-       retval = GetStreamSize(&obj_stream, &StreamSize);
-       mapitest_print_retval_fmt(mt, "GetStreamSize", "(%s: 0x%x)", "Src", StreamSize);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 13. Reset streams positions to the beginning */
-       retval = SeekStream(&obj_stream, 0, 0, &NewPosition);
-       mapitest_print_retval_fmt(mt, "SeekStream", "(%s)", "Src");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       retval = SeekStream(&obj_stream2, 0, 0, &NewPosition);
-       mapitest_print_retval_fmt(mt, "SeekStream", "(%s)", "Dst");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 14. Copy src to dst stream */
-       retval = CopyToStream(&obj_stream, &obj_stream2, StreamSize, &ReadByteCount, &WrittenByteCount);
-       mapitest_print_retval(mt, "CopyToStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 14. Save the attachment */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach2, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesAttachment");
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 15. Compare values */
-       mapitest_print(mt, "* %-35s: 0x%llx - 0x%llx %s\n", "Read/Write bytes comparison",
-                      ReadByteCount, WrittenByteCount, 
-                      (ReadByteCount == WrittenByteCount) ? "[SUCCESS]" : "[FAILURE]");
-
-
-       /* Step 16. Get dst stream size */
-       retval = GetStreamSize(&obj_stream2, &StreamSize);
-       mapitest_print_retval_fmt(mt, "GetStreamSize", "(%s: 0x%x)", "Dst", StreamSize);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       retval = SeekStream(&obj_stream2, 0, 0, &NewPosition);
-       mapitest_print_retval_fmt(mt, "SeekStream", "(%s)", "Dst");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 17. Read the dst stream */
-       offset = 0;
-       dst_stream = talloc_size(mt->mem_ctx, StreamSize + 1);
-       do {
-               retval = ReadStream(&obj_stream2, buf, MT_STREAM_MAX_SIZE, &read_size);
-               mapitest_print_retval_fmt(mt, "ReadStream", "(0x%x bytes read)", read_size);
-               memcpy(dst_stream + offset, buf, read_size);
-               offset += read_size;
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       break;
-               }
-       } while (read_size || offset != StreamSize);
-       dst_stream[offset] = '\0';
-
-       /* Step 18. Compare streams */
-       if (!strcmp(stream, dst_stream)) {
-               mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Comparison");
-       } else {
-               mapitest_print(mt, "* %-35s: [FAILURE]\n", "Comparison");
-       }
-       
-
-       /* Step 19. Delete Message */
-       errno = 0;
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_stream2);
-       mapi_object_release(&obj_stream);
-       mapi_object_release(&obj_attach2);
-       mapi_object_release(&obj_attach);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       talloc_free(stream);
-       talloc_free(dst_stream);
-
-       return ret;
-}
-
-
-/**
-   \details Test the CopyTo (0x39) operation
-
-   This function:
-   -# Opens the mailbox
-   -# Creates a test folder
-   -# Creates a reference email, and sets some properties on it
-   -# Checks those properties are set correctly
-   -# Creates a second email, and sets some (different) properties on it
-   -# Checks those properties on the second folder are set correctly
-   -# Copies properties from the reference email to the second email (no overwrite)
-   -# Checks that properties on both emails are correct
-   -# Copies properties again, but with overwrite
-   -# Checks that properties on both emails are correct
-   -# Moves properties from the original email to the second email (no overwrite)
-   -# Checks that properties on both emails are correct
-   -# Creates an attachment (with properties) on the reference email
-   -# Creates an attachment (with different properties) on the target email
-   -# Copies the properties on the reference email to the target
-   -# Checks the properties on both attachments are correct
-   -# Creates another folder
-   -# Copies properties from the test folder to the new folder
-   -# Checks that the properties on both folders are correct
-   -# Deletes both emails and the test folders
-
-   \todo It would be useful to test the problem return values
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_top_folder;
-       mapi_id_t               id_top_folder;
-       mapi_object_t           obj_ref_folder;
-       mapi_object_t           obj_targ_folder;
-       mapi_object_t           obj_ref_message;
-       mapi_object_t           obj_target_message;
-       mapi_object_t           obj_ref_attach;
-       mapi_object_t           obj_targ_attach;
-       const char              *name = NULL;
-       const char              *subject = NULL;
-       const char              *dept = NULL;
-       struct SPropValue       lpProp[3];
-       struct SPropTagArray    *exclude;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       const char              *targ_name = NULL;
-       const char              *targ_dept = NULL;
-       uint16_t                problem_count = 999;
-       struct PropertyProblem  *problems = NULL;
-       bool                    result;
-       bool                    ret = true;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_top_folder);
-       mapi_object_init(&obj_ref_folder);
-       mapi_object_init(&obj_targ_folder);
-       mapi_object_init(&obj_ref_message);
-       mapi_object_init(&obj_target_message);
-       mapi_object_init(&obj_ref_attach);
-       mapi_object_init(&obj_targ_attach);
-       
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2: Create reference folder */
-        retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                              OPEN_IF_EXISTS, &obj_ref_folder);
-       mapitest_print_retval_fmt(mt, "CreateFolder", "(Create test folder)");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
-       lpProp[0].value.lpszA = "IPF.Note";
-       retval = SetProps(&obj_ref_folder, lpProp, 1);
-       mapitest_print_retval(mt, "SetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3: Create reference message */
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_ref_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "mapitest_common_message_create");
-       if (result != true) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_ref_message, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-        name = talloc_asprintf(mt->mem_ctx, "Reference: %s", "display name");
-       subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
-       dept = talloc_asprintf(mt->mem_ctx, "Reference: %s", "dept");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
-       set_SPropValue_proptag(&lpProp[1], PR_SUBJECT, (const void *)subject);
-       set_SPropValue_proptag(&lpProp[2], PR_DEPARTMENT_NAME, (const void *)dept);
-       retval = SetProps(&obj_ref_message, lpProp, 3);
-       mapitest_print_retval(mt, "SetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT,
-                                         PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4A - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4A - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4B - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4B - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4C - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4C - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* Step 5: Create target message */
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_target_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "mapitest_common_message_create");
-       if (result != true) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_target_message, KeepOpenReadWrite);
-       mapitest_print_retval_clean(mt, "5A. SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_SUBJECT);
-       retval = DeleteProps(&obj_target_message, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_clean(mt, "5B. DeleteProps - PR_SUBJECT", retval);
-       
-        targ_name = talloc_asprintf(mt->mem_ctx, "Target: %s", "display name");
-       targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
-       set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-       retval = SetProps(&obj_target_message, lpProp, 2);
-       mapitest_print_retval_clean(mt, "SetProps", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 6: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 6A - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 6A - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 6B - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 6B - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-
-               }
-       }
-
-
-       /* Step 7: Copy properties, no overwrite */
-       exclude = set_SPropTagArray(mt->mem_ctx, 0x0);
-       retval = CopyTo(&obj_ref_message, &obj_target_message, exclude, CopyFlagsNoOverwrite,
-                          &problem_count, &problems);
-       MAPIFreeBuffer(exclude);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_fmt(mt, "CopyTo", "(no overwrite)");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 8: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8A - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8A - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8B - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8B - Check: Reference props still good [FAILURE] (%s, %s)\n",
-                                      subject, lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       /* this one shouldn't be overwritten */
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8C - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8C - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       /* this one should be copied */
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8D - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8D - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       /* this one should be unchanged */
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 8E - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 8E - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* Step 9: Copy properties, with overwrite */
-       exclude = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DEPARTMENT_NAME);
-       retval = CopyTo(&obj_ref_message, &obj_target_message, exclude, 0x0,
-                       &problem_count, &problems);
-       MAPIFreeBuffer(exclude);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_fmt(mt, "CopyTo", "(with overwrite)");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 10: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10A - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10A - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10B - Check: Reference props still good - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10B - Check: Reference props still good [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       /* this one should now be overwritten */
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10C - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10C - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       /* this one should be copied */
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10D - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10D - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       /* this one should be unchanged */
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(targ_dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 10E - Check: Reference props copy - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 10E - Check: Reference props copy [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* Step 11: Move properties, with overwrite */
-       exclude = set_SPropTagArray(mt->mem_ctx, 0x0);
-       retval = CopyTo(&obj_ref_message, &obj_target_message, exclude, CopyFlagsMove,
-                          &problem_count, &problems);
-       MAPIFreeBuffer(exclude);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_clean(mt, "* Step 11 - CopyTo (move)", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 12: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (cValues == 2) {
-               mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
-       } else {
-               mapitest_print(mt, "* Step 12A - Properties removed [FAILURE]\n");
-               ret = false;
-               goto cleanup;
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12B - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12B - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(subject, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12C - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12C - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[2].value.lpszA) {
-               if (!strncmp(dept, lpProps[2].value.lpszA, strlen(lpProps[2].value.lpszA))) {
-                       mapitest_print(mt, "* Step 12D - Check: Reference props move - [SUCCESS] (%s)\n",
-                                      lpProps[2].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 12D - Check: Reference props move [FAILURE] (%s)\n",
-                                      lpProps[2].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* Step 13: Create attachment on reference email, and set properties */
-       retval = CreateAttach(&obj_ref_message, &obj_ref_attach);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       lpProp[0].ulPropTag = PR_ATTACH_METHOD;
-       lpProp[0].value.l = ATTACH_BY_VALUE;
-       lpProp[1].ulPropTag = PR_RENDERING_POSITION;
-       lpProp[1].value.l = 0;
-       lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
-       lpProp[2].value.lpszA = MT_MAIL_ATTACH;
-       retval = SetProps(&obj_ref_attach, lpProp, 3);
-       mapitest_print_retval(mt, "SetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       SaveChangesAttachment(&obj_ref_message, &obj_ref_attach, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesAttachment");
-
-       /* Step 14: Create attachment on target email */
-       retval = CreateAttach(&obj_target_message, &obj_targ_attach);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       lpProp[0].ulPropTag = PR_ATTACH_METHOD;
-       lpProp[0].value.l = ATTACH_BY_VALUE;
-       lpProp[1].ulPropTag = PR_RENDERING_POSITION;
-       lpProp[1].value.l = 0;
-       lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
-       lpProp[2].value.lpszA = MT_MAIL_ATTACH2;
-       retval = SetProps(&obj_targ_attach, lpProp, 3);
-       mapitest_print_retval(mt, "SetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesAttachment(&obj_target_message, &obj_targ_attach, KeepOpenReadWrite);
-       mapitest_print_retval_clean(mt, "SaveChangesAttachment", retval);
-
-       /* Step 15: Copy props from reference email attachment to target email attachment */
-       exclude = set_SPropTagArray(mt->mem_ctx, 0x0);
-       retval = CopyTo(&obj_ref_attach, &obj_targ_attach, exclude, 0x0, &problem_count, &problems);
-       MAPIFreeBuffer(exclude);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_fmt(mt, "CopyTo", "(attachments)");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesAttachment(&obj_target_message, &obj_targ_attach, KeepOpenReadWrite);
-       mapitest_print_retval_clean(mt, "SaveChangesAttachment 2", retval);
-
-       /* Step 16: Check properties on both attachments are correct */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-       retval = GetProps(&obj_ref_attach, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(MT_MAIL_ATTACH, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 16B - Check: Reference attachment props - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 16B - Check: Reference attachment props [FAILURE] (%s, %s)\n",
-                                      lpProps[0].value.lpszA, MT_MAIL_ATTACH);
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-       retval = GetProps(&obj_targ_attach, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(MT_MAIL_ATTACH, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 16D - Check: Target attachment props - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 16D - Check: Target attachment props [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-
-       /* Create another folder */
-        retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, "[MT] Target Folder", NULL,
-                              OPEN_IF_EXISTS, &obj_targ_folder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
-       lpProp[0].value.lpszA = "IPF.Journal";
-       retval = SetProps(&obj_targ_folder, lpProp, 1);
-       mapitest_print_retval(mt, "SetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Copy properties from the test folder to the new folder */
-       exclude = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = CopyTo(&obj_ref_folder, &obj_targ_folder, exclude, 0x0, &problem_count, &problems);
-       MAPIFreeBuffer(exclude);
-       MAPIFreeBuffer(problems);
-       mapitest_print_retval_fmt(mt, "CopyTo", "(folder)");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }       
-
-       /* Check that the properties on both folders are correct */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(MT_DIRNAME_TOP, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 19B - Check: Reference folder props - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 19B - Check: Reference folder props [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp("IPF.Note", lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 19C - Check: Reference folder props - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 19C - Check: Reference folder props [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_targ_folder, SPropTagArray, &lpProps, &cValues);
-       mapitest_print_retval(mt, "GetProps");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp("[MT] Target Folder", lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 19E - Check: Target folder props - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 19E - Check: Target folder props [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp("IPF.Note", lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 19F - Check: Target folder props - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 19F - Check: Target folder props [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }       
-
-
- cleanup:
-       /* Cleanup reference strings */
-       MAPIFreeBuffer((void *)subject);
-       MAPIFreeBuffer((void *)name);
-       MAPIFreeBuffer((void *)targ_name);
-       MAPIFreeBuffer((void *)targ_dept);
-
-       /* Cleanup folders */
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_targ_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_ref_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-
-       /* Release */
-       mapi_object_release(&obj_targ_attach);
-       mapi_object_release(&obj_ref_attach);
-       mapi_object_release(&obj_ref_message);
-       mapi_object_release(&obj_ref_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-#define NAMEDPROP_NAME "mapitest_namedprop"
-#define NAMEDPROP_IDNUM 0xDB
-
-/**
-   \details Test the GetPropertyIdsFromNames (0x56),
-   GetNamesFromPropertyIds (0x55) and QueryNamesFromIDs (0x5f) 
-   operations
-
-   This function:
-   -# Logs into the server
-   -# Create a test folder and test message
-   -# Creates one MNID_ID property
-   -# Creates one MNID_STRING property
-   -# Builds a table of Name, ID pairs using QueryNamesFromIDs()
-   -# Iterates over names, and calls GetIDsFromNames() on each name
-   -# Iterates over IDs, and calls GetNamesFromIDs() on each ID
-   -# Cleans up
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_NameId(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_top_folder;
-       mapi_id_t               id_top_folder;
-       mapi_object_t           obj_ref_folder;
-       mapi_object_t           obj_ref_message;
-       struct mapi_nameid      *nameid;
-       struct mapi_nameid      *nameid2;
-       struct MAPINAMEID       checknameid;
-       struct SPropTagArray    *SPropTagArray;
-       uint32_t                propID;
-       uint16_t                *propIDs;
-       bool                    ret = true;
-       int                     i;
-       bool                    result;
-
-       /* Log into the server */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_top_folder);
-       mapi_object_init(&obj_ref_folder);
-       mapi_object_init(&obj_ref_message);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2: Create test folder */
-        retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                    OPEN_IF_EXISTS, &obj_ref_folder);
-       mapitest_print_retval(mt, "CreateFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       result = mapitest_common_message_create(mt, &obj_ref_folder, &obj_ref_message, MT_MAIL_SUBJECT);
-       if (result != true) {
-               mapitest_print_retval(mt, "mapitest_common_message_create failed");
-               ret = false;
-               goto cleanup;
-       }
-       retval = SaveChangesMessage(&obj_ref_folder, &obj_ref_message, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3: Create and Retrieve one MNID_ID property */
-
-       /* Build the list of named properties we want to create */
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       mapi_nameid_custom_lid_add(nameid, NAMEDPROP_IDNUM, PT_STRING8, PS_PUBLIC_STRINGS);
-
-       /* GetIDsFromNames and map property types */
-       SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = GetIDsFromNames(&obj_ref_message, nameid->count, 
-                                nameid->nameid, MAPI_CREATE, &SPropTagArray);
-       mapitest_print_retval(mt, "GetIDsFromNames");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               MAPIFreeBuffer(nameid);
-               goto cleanup;
-       }
-
-       mapi_nameid_SPropTagArray(nameid, SPropTagArray);
-       MAPIFreeBuffer(nameid);
-       
-       propID = SPropTagArray->aulPropTag[0];
-       MAPIFreeBuffer(SPropTagArray);
-
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       retval = GetNamesFromIDs(&obj_ref_message, propID, &nameid->count, &nameid->nameid);
-       mapitest_print_retval(mt, "GetNamesFromIDs");
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(nameid);
-               ret = false;
-               goto cleanup;
-       }
-
-       if ((nameid->nameid[0].ulKind != MNID_ID) || (nameid->nameid[0].kind.lid != NAMEDPROP_IDNUM)) {
-               errno = MAPI_E_RESERVED;
-               mapitest_print_retval_fmt(mt, "GetNamesFromIDs", 
-                                         "Unexpected result: ulKind: %x mapped to 0x%.4x", 
-                                         nameid->nameid[0].ulKind, nameid->nameid[0].kind.lid);
-               ret = false;
-               goto cleanup;
-       }
-
-       MAPIFreeBuffer(nameid);
-
-       /* Step 4: Create one MNID_STRING property */
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-
-       mapi_nameid_custom_string_add(nameid, NAMEDPROP_NAME, PT_STRING8, PS_PUBLIC_STRINGS);
-       retval = GetIDsFromNames(&obj_ref_folder, nameid->count, nameid->nameid, MAPI_CREATE, &SPropTagArray);
-       mapitest_print_retval(mt, "GetIDsFromNames");
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(nameid);
-               ret = false;
-               goto cleanup;
-       }
-
-       mapi_nameid_SPropTagArray(nameid, SPropTagArray);
-       MAPIFreeBuffer(nameid);
-
-       propID = SPropTagArray->aulPropTag[0];
-       MAPIFreeBuffer(SPropTagArray);
-
-       /* Builds an array of Name,ID pairs using QueryNamesFromIDs() */
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       retval = QueryNamedProperties(&obj_ref_message, 0x1, NULL, &nameid->count, &propIDs, &nameid->nameid);
-       nameid->nameid = talloc_steal((TALLOC_CTX *)nameid, nameid->nameid);
-       mapitest_print_retval(mt, "QueryNamedProperties");
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(nameid);
-               talloc_free(propIDs);
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Iterate over names and call GetIDsFromNames() on each name */
-       for (i = 0; i < nameid->count; i++) {
-               checknameid.lpguid = nameid->nameid[i].lpguid;
-               checknameid.ulKind = nameid->nameid[i].ulKind;
-
-               switch (nameid->nameid[i].ulKind) {
-               case MNID_ID:
-                       checknameid.kind.lid = nameid->nameid[i].kind.lid;
-                       break;
-               case MNID_STRING:
-                       checknameid.kind.lpwstr.Name = nameid->nameid[i].kind.lpwstr.Name;
-                       checknameid.kind.lpwstr.NameSize = nameid->nameid[i].kind.lpwstr.NameSize;
-                       break;
-               }
-
-               SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(&obj_ref_folder, 1, &checknameid, 0, &SPropTagArray);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print_retval(mt, "GetIDsFromNames");
-                       MAPIFreeBuffer(nameid);
-                       MAPIFreeBuffer(SPropTagArray);
-                       ret = false;
-                       goto cleanup;
-               }
-
-               /* check we got the right number of IDs */
-               if (SPropTagArray->cValues != 1) {
-                       errno = MAPI_E_RESERVED;
-                       mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected ID count (%i)", SPropTagArray->cValues);
-                       MAPIFreeBuffer(nameid);
-                       MAPIFreeBuffer(SPropTagArray);
-                       ret = false;
-                       goto cleanup;
-               }
-
-               /* check if the ID is the one we expected */
-               if (SPropTagArray->aulPropTag[0] != (propIDs[i] << 16)) {
-                       errno = MAPI_E_RESERVED;
-                       mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected ID (0x%x, expected 0x%x)",
-                                                 SPropTagArray->aulPropTag[0], (propIDs[i] << 16));
-                       MAPIFreeBuffer(nameid);
-                       MAPIFreeBuffer(SPropTagArray);
-                       ret = false;
-                       goto cleanup;
-               }
-               MAPIFreeBuffer(SPropTagArray);
-       }
-       mapitest_print(mt, "* Step 6: All IDs matched [SUCCESS]\n");
-
-       /* Iterates over IDs, and call GetNamesFromIDs() on each ID */
-        for (i = 0; i < nameid->count; i++) {
-               nameid2 = mapi_nameid_new(mt->mem_ctx);
-               retval = GetNamesFromIDs(&obj_ref_folder, (propIDs[i] << 16), &nameid2->count, &nameid2->nameid);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapitest_print_retval(mt, "GetNamesFromIDs");
-                       MAPIFreeBuffer(nameid2);
-                       ret = false;
-                       goto cleanup;
-               }
-
-               /* Check we got the right number of names */
-               if (nameid2->count != 1) {
-                       mapitest_print_retval_fmt(mt, "GetNamesFromIDs", "Unexpected name count (%i)", nameid2->count);
-                       MAPIFreeBuffer(nameid);
-                       MAPIFreeBuffer(nameid2);
-                       ret = false;
-                       goto cleanup;
-               }
-
-               /* Check we got the right kind of name */
-               if (nameid2->nameid[0].ulKind != nameid->nameid[i].ulKind) {
-                       mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected kind (0x%x, expected 0x%x)",
-                                                 nameid2->nameid[0].ulKind, nameid->nameid[i].ulKind);
-                       MAPIFreeBuffer(nameid);
-                       MAPIFreeBuffer(nameid2);
-                       ret = false;
-                       goto cleanup;
-               }
-
-               switch (nameid->nameid[i].ulKind) {
-               case MNID_ID:
-                       if (nameid2->nameid[0].kind.lid != nameid->nameid[i].kind.lid) {
-                               mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected hex name (0x%x, expected 0x%x)",
-                                                         nameid2->nameid[0].kind.lid, nameid->nameid[i].kind.lid);
-                               MAPIFreeBuffer(nameid);
-                               MAPIFreeBuffer(nameid2);
-                               ret = false;
-                               goto cleanup;
-                       }
-                       break;
-               case MNID_STRING:
-                       if (nameid2->nameid[0].kind.lpwstr.NameSize != nameid->nameid[i].kind.lpwstr.NameSize) {
-                               mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected name length (0x%x, expected 0x%x)",
-                                                         nameid2->nameid[0].kind.lpwstr.NameSize, 
-                                                         nameid->nameid[i].kind.lpwstr.NameSize);
-                               MAPIFreeBuffer(nameid);
-                               MAPIFreeBuffer(nameid2);
-                               ret = false;
-                               goto cleanup;
-                       }
-                       if (strncmp(nameid2->nameid[0].kind.lpwstr.Name, nameid->nameid[i].kind.lpwstr.Name, nameid->nameid[i].kind.lpwstr.NameSize) != 0) {
-                               mapitest_print_retval_fmt(mt, "GetIDsFromNames", "Unexpected name (%s, expected %s)",
-                                                         nameid2->nameid[0].kind.lpwstr.Name, 
-                                                         nameid->nameid[i].kind.lpwstr.Name);
-                               MAPIFreeBuffer(nameid);
-                               MAPIFreeBuffer(nameid2);
-                               ret = false;
-                               goto cleanup;                           
-                       }
-                       break;
-               }
-
-               MAPIFreeBuffer(nameid2);
-       }               
-       
-       MAPIFreeBuffer(nameid);
-       MAPIFreeBuffer(propIDs);
-
- cleanup:
-       errno = 0;
-       /* Clean up */
-       DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_ref_folder),
-                    DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval(mt, "DeleteFolder");
-
-       /* Release */
-       mapi_object_release(&obj_ref_message);
-       mapi_object_release(&obj_ref_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the GetPropertyIdsFromNames (0x56) and
-   GetNamesFromPropertyIds (0x55) operations for the special
-   case of the PS_MAPI namespace
-
-   This function:
-   -# Logs into the server
-   -# Gets a property ID for a known property name
-   -# Gets a property name for a known property ID
-   -# Cleans up
-
-   Refer to MS-OXPROPS for the list of properties
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_NameId_PSMAPI(struct mapitest *mt)
-{      enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct mapi_nameid      *nameid;
-       struct SPropTagArray    *SPropTagArray;
-       bool                    ret = true;
-
-       /* Log into the server */
-       mapi_object_init(&obj_store);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Build the list of named properties we want to get */
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       mapi_nameid_custom_lid_add(nameid, (PR_ACCESS>>16), PT_LONG, PS_MAPI); // 0x0FF4
-       mapi_nameid_custom_lid_add(nameid, (PR_ATTACHMENT_HIDDEN>>16), PT_BOOLEAN, PS_MAPI);
-
-       /* GetIDsFromNames and map property types */
-       SPropTagArray = talloc_zero(mt->mem_ctx, struct SPropTagArray);
-       retval = GetIDsFromNames(&obj_store, nameid->count, 
-                                nameid->nameid, 0, &SPropTagArray);
-       mapitest_print_retval_clean(mt, "GetIDsFromNames", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               MAPIFreeBuffer(nameid);
-               goto cleanup;
-       }
-
-       mapi_nameid_SPropTagArray(nameid, SPropTagArray);
-       MAPIFreeBuffer(nameid);
-       
-       if (SPropTagArray->aulPropTag[0] == PR_ACCESS) {
-               mapitest_print(mt, "Comparison [0] matched\n");
-       } else {
-               mapitest_print(mt, "Comparison [0] failed : 0x%08x\n", SPropTagArray->aulPropTag[0]);
-       }
-       if (SPropTagArray->aulPropTag[1] == PR_ATTACHMENT_HIDDEN) {
-               mapitest_print(mt, "Comparison [1] matched\n");
-       } else {
-               mapitest_print(mt, "Comparison [1] failed : 0x%08x\n", SPropTagArray->aulPropTag[1]);
-       }
-       MAPIFreeBuffer(SPropTagArray);
-
-       nameid = mapi_nameid_new(mt->mem_ctx);
-       retval = GetNamesFromIDs(&obj_store, PR_ATTACHMENT_HIDDEN, &nameid->count, &nameid->nameid);
-       mapitest_print_retval_clean(mt, "GetNamesFromIDs", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               MAPIFreeBuffer(nameid);
-               ret = false;
-               goto cleanup;
-       }
-       
-       if (nameid->count != 1) {
-               mapitest_print(mt, "Unexpected count from GetNamesFromIDs: %i", nameid->count);
-               MAPIFreeBuffer(nameid);
-               ret = false;
-               goto cleanup;
-       }
-       if (nameid->nameid[0].ulKind != MNID_ID) {
-               mapitest_print(mt, "Unexpected kind from GetNamesFromIDs: %i", nameid->nameid[0].ulKind);
-               MAPIFreeBuffer(nameid);
-               ret = false;
-               goto cleanup;
-       }
-       if (nameid->nameid[0].kind.lid == (PR_ATTACHMENT_HIDDEN >> 16)) {
-               mapitest_print(mt, "Comparision of values matches\n");
-       } else {
-               mapitest_print(mt, "Comparison of values mismatch (nameid->lid: 0x%04x)\n", nameid->nameid[0].kind.lid); 
-       }
-
-cleanup:
-       mapi_object_release(&obj_store);
-       return ret;
-}
-/**
-   \details Test the SetPropertiesNoReplicate (0x79) and
-    DeletePropertiesNoReplicate (0x7a) operations
-
-   This function:
-   -# Opens the mailbox
-   -# Create a test folder
-   -# Sets some properties on the test folder
-   -# Delete properties from the test folder
-   -# Deletes the test folder
-
-   \todo It would be useful to test the problem return values
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcprpt_NoReplicate(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_top_folder;
-       mapi_id_t               id_top_folder;
-       mapi_object_t           obj_ref_folder;
-       const char              *name = NULL;
-       const char              *comment = NULL;
-       struct SPropValue       lpProp[3];
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues;
-       bool                    ret = true;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_top_folder);
-       mapi_object_init(&obj_ref_folder);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_step_fmt(mt, "1.", "OpenMsgStore", "(%s)", "Logon Private Mailbox");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = GetDefaultFolder(&obj_store, &id_top_folder, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       retval = OpenFolder(&obj_store, id_top_folder, &obj_top_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2: Create test folder */
-        retval = CreateFolder(&obj_top_folder, FOLDER_GENERIC, MT_DIRNAME_TOP, NULL,
-                              OPEN_IF_EXISTS, &obj_ref_folder);
-       mapitest_print_retval_step_fmt(mt, "2.", "CreateFolder", "(%s)", "Create the test folder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3: Set properties on the test folder */
-       name = talloc_asprintf(mt->mem_ctx, "Reference: %s", "new name");
-       comment = talloc_asprintf(mt->mem_ctx, "Reference: %s", "the folder comment");
-       set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
-       set_SPropValue_proptag(&lpProp[1], PR_COMMENT, (const void *)comment);
-       retval = SetPropertiesNoReplicate(&obj_ref_folder, lpProp, 2);
-       mapitest_print_retval_step_fmt(mt, "3.", "SetProps", "(%s)", "Set folder properties");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4: Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_COMMENT);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (lpProps[0].value.lpszA) {
-               if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[0].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.1. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[0].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-       if (lpProps[1].value.lpszA) {
-               if (!strncmp(comment, lpProps[1].value.lpszA, strlen(lpProps[1].value.lpszA))) {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set - [SUCCESS] (%s)\n",
-                                      lpProps[1].value.lpszA);
-               } else {
-                       mapitest_print(mt, "* Step 4.2. - Check: Reference props set [FAILURE] (%s)\n",
-                                      lpProps[1].value.lpszA);
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* Step 5. Delete Properties */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_COMMENT);
-       retval = DeletePropertiesNoReplicate(&obj_ref_folder, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval_step_fmt(mt, "5.", "DeletePropertiesNoReplicate", "PR_COMMENT");
-
-       /* Step 6. Double check with GetProps */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_COMMENT);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (get_SPropValue(lpProps, PR_COMMENT) == NULL) {
-               mapitest_print(mt, "* Step 6.1. - GetProps verifier [SUCCESS]\n");
-       } else {
-               mapitest_print(mt, "* Step 6.1. - GetProps verifier [FAILURE]:\n");
-       }
-
-       /* Cleanup and release */
-cleanup:
-       retval = DeleteFolder(&obj_top_folder, mapi_object_get_id(&obj_ref_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_step(mt, "7.", "DeleteFolder", retval);
-       mapi_object_release(&obj_ref_folder);
-       mapi_object_release(&obj_top_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test WriteAndCommitStream (0x90) operation.
-
-   This function:
-   -# Logs in 
-   -# Opens the Outbox folder
-   -# Creates a test message
-   -# Creates an attachment on the test messages and set properties on the attachment
-   -# Opens a stream on the attachment
-   -# Sets the stream size
-   -# Write and commits into the stream
-   -# Saves the message
-   -# Gets stream size and compare values
-   -# Opens the stream again with different permissions
-   -# Reads the stream and compares buffers
-   -# Deletes the test message
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise -1
- */
-_PUBLIC_ bool mapitest_oxcprpt_WriteAndCommitStream(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_object_t           obj_attach;
-       mapi_object_t           obj_stream;
-       mapi_id_t               id_folder;
-       DATA_BLOB               data;
-       struct SPropValue       attach[3];
-       char                    *stream = NULL;
-       char                    *out_stream = NULL;
-       const uint32_t          stream_len = 0x1000;
-       unsigned char           buf[0x1000];
-       uint32_t                StreamSize = 0;
-       uint16_t                read_size = 0;
-       uint16_t                write_len = 0;
-       uint32_t                offset = 0;
-
-
-       stream = mapitest_common_genblob(mt->mem_ctx, stream_len);
-       if (stream == NULL) {
-               return false;
-       }
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Inbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       mapitest_print_retval(mt, "GetDefaultFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print_retval(mt, "Message Creation");
-       if (ret != true) {
-               return false;
-       }
-
-       /* Step 4. Create the attachment */
-       mapi_object_init(&obj_attach);
-       retval = CreateAttach(&obj_message, &obj_attach);
-       mapitest_print_retval(mt, "CreateAttach");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       attach[0].ulPropTag = PR_ATTACH_METHOD;
-       attach[0].value.l = ATTACH_BY_VALUE;
-       attach[1].ulPropTag = PR_RENDERING_POSITION;
-       attach[1].value.l = 0;
-       attach[2].ulPropTag = PR_ATTACH_FILENAME;
-       attach[2].value.lpszA = MT_MAIL_ATTACH;
-
-       retval = SetProps(&obj_attach, attach, 3);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 5. Open the stream */
-       mapi_object_init(&obj_stream);
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 2, &obj_stream);
-       mapitest_print_retval(mt, "OpenStream");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 6. Set the stream size */
-       retval = SetStreamSize(&obj_stream, (uint64_t) stream_len);
-       mapitest_print_retval(mt, "SetStreamSize");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. Write the stream */
-       write_len = 0;
-
-       data.length = stream_len;
-       data.data = (uint8_t *) stream;
-       retval = WriteAndCommitStream(&obj_stream, &data, &write_len);
-       mapitest_print_retval_fmt_clean(mt, "WriteAndCommitStream", retval, "(0x%x bytes written)", write_len);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 8. Save the attachment */
-       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesAttachment", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       mapitest_print_retval_clean(mt, "SaveChangesMessage", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 9. Get stream size */
-       retval = GetStreamSize(&obj_stream, &StreamSize);
-       mapitest_print_retval_clean(mt, "GetStreamSize", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-       mapitest_print(mt, "* %-35s: %s\n", "StreamSize comparison", 
-                      (StreamSize == stream_len) ? "[PASSED]" : "[FAILURE]");
-
-       /* Step 10. Read the stream */
-       mapi_object_release(&obj_stream);
-       mapi_object_init(&obj_stream);
-
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 0, &obj_stream);
-       mapitest_print_retval_clean(mt, "OpenStream", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       offset = 0;
-       out_stream = talloc_size(mt->mem_ctx, StreamSize + 1);
-       do {
-               retval = ReadStream(&obj_stream, buf, MT_STREAM_MAX_SIZE, &read_size);
-               mapitest_print_retval_fmt_clean(mt, "ReadStream", retval, "(0x%x bytes read)", read_size);
-               memcpy(out_stream + offset, buf, read_size);
-               offset += read_size;
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-                       break;
-               }
-       } while (read_size && (offset != StreamSize));
-       out_stream[offset] = '\0';
-
-       if (offset) {
-               if (!strcmp(stream, out_stream)) {
-                       mapitest_print(mt, "* %-35s: [IN,OUT] stream [PASSED]\n", "Comparison");
-               } else {
-                       mapitest_print(mt, "* %-35s: [IN,OUT] stream [FAILURE]\n", "Comparison");
-
-               }
-       }
-
-       /* Release */
-       mapi_object_release(&obj_stream);
-       mapi_object_release(&obj_attach);
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       talloc_free(stream);
-       talloc_free(out_stream);
-
-       return ret;
-}
-
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxcstor.c b/branches/plugfest/utils/mapitest/modules/module_oxcstor.c
deleted file mode 100644 (file)
index 2147eba..0000000
+++ /dev/null
@@ -1,910 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - STORE OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-#include "libmapi/libmapi_private.h"
-
-/**
-   \file module_oxcstor.c
-
-   \brief Store Object Protocol test suite
-*/
-
-
-/**
-   \details Test the Logon (0xFE) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Log on the public folder store
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_Logon(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapi_object_release(&obj_store);
-
-       /* Step 2. Logon Public Folder store */
-       mapi_object_init(&obj_store);
-       retval = OpenPublicFolder(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenPublicFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the GetReceiveFolder (0x27) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Call the GetReceiveFolder operation
-   -# Call the GetReceiveFolder with different explicit message class values
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_GetReceiveFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_id_t               receivefolder = 0;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_clean(mt, "OpenMsgStore", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-       
-       /* Step 2. Call the GetReceiveFolder operation */
-       retval = GetReceiveFolder(&obj_store, &receivefolder, NULL);
-       mapitest_print_retval_clean(mt, "GetReceiveFolder for All target", retval);
-       mapitest_print(mt, "FID: 0x%016"PRIx64"\n", receivefolder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 3. Call GetReceiveFolder again, with an explicit message class */
-       retval = GetReceiveFolder(&obj_store, &receivefolder, "IPC");
-       mapitest_print_retval_clean(mt, "GetReceiveFolder for IPC", retval);
-       mapitest_print(mt, "FID: 0x%016"PRIx64"\n", receivefolder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 4. Call GetReceiveFolder again, with an explicit message class */
-       retval = GetReceiveFolder(&obj_store, &receivefolder, "IPM.FooBarBaz");
-       mapitest_print_retval_clean(mt, "GetReceiveFolder for IPM.FooBarBaz", retval);
-       mapitest_print(mt, "FID: 0x%016"PRIx64"\n", receivefolder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-       /* Step 5. Call GetReceiveFolder again, with an explicit message class */
-       retval = GetReceiveFolder(&obj_store, &receivefolder, "MT.Mapitest.tc");
-       mapitest_print_retval_clean(mt, "GetReceiveFolder for MT.Mapitest.tc", retval);
-       mapitest_print(mt, "FID: 0x%016"PRIx64"\n", receivefolder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto release;
-       }
-
-release:
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the SetReceiveFolder (0x26) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Call the SetReceiveFolder operations
-   -# Clean up
-
-   \param mt the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_SetReceiveFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_id_t               id_inbox;
-       mapi_id_t               id_tis;
-       mapi_object_t           obj_tis;
-       mapi_object_t           obj_inbox;
-       mapi_object_t           obj_folder;
-       bool                    ret = true;
-
-
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_inbox);
-       mapi_object_init(&obj_tis);
-       mapi_object_init(&obj_folder);
-
-       /* Step 1. Logon */
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval_step(mt, "1.", "Logon", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Get the original ReceiveFolder */
-       retval = GetReceiveFolder(&obj_store, &id_inbox, NULL);
-       mapitest_print_retval_step(mt, "2.", "GetReceiveFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Open the ReceiveFolder */
-       retval = OpenFolder(&obj_store, id_inbox, &obj_inbox);
-       mapitest_print_retval_step(mt, "3.", "OpenFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Open the Top Information Store folder */
-       retval = GetDefaultFolder(&obj_store, &id_tis, olFolderTopInformationStore);
-       mapitest_print_retval_step(mt, "4.", "GetDefaultFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, id_tis, &obj_tis);
-       mapitest_print_retval_step(mt, "4.1.", "OpenFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Create the New Inbox folder under Top Information Store */
-       retval = CreateFolder(&obj_tis, FOLDER_GENERIC, "New Inbox", NULL,
-                             OPEN_IF_EXISTS, &obj_folder);
-       mapitest_print_retval_step(mt, "5.", "CreateFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Set IPM.Note receive folder to New Inbox */
-       retval = SetReceiveFolder(&obj_store, &obj_folder, "IPM.Note");
-       mapitest_print_retval_step_fmt(mt, "6.", "SetReceiveFolder", "%s", "(New Inbox)", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Reset receive folder to Inbox */
-       retval = SetReceiveFolder(&obj_store, &obj_inbox, "IPM.Note");
-       mapitest_print_retval_step_fmt(mt, "6.1.", "SetReceiveFolder", "%s", "(original folder)", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Set a test message class */
-       retval = SetReceiveFolder(&obj_store, &obj_folder, "MT.Mapitest.ta");
-       mapitest_print_retval_step_fmt(mt, "7.", "SetReceiveFolder", "%s", "(MT.Mapitest.ta)", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Delete New Inbox folder */
-       retval = EmptyFolder(&obj_folder);
-       mapitest_print_retval_step(mt, "8.", "EmptyFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = DeleteFolder(&obj_tis, mapi_object_get_id(&obj_folder),
-                             DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE, NULL);
-       mapitest_print_retval_step(mt, "9.", "DeleteFolder", retval);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-cleanup:
-       /* Release */
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_tis);
-       mapi_object_release(&obj_inbox);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the GetOwningServers (0x42) operation
-
-   This function:
-   -# Log on the public folders store
-   -# Open a public folder
-   -# Call the GetOwningServers operation
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_oxcstor_GetOwningServers(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       uint64_t                folderId;
-       uint16_t                OwningServersCount;
-       uint16_t                CheapServersCount;
-       char                    *OwningServers;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenPublicFolder(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenPublicFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       /* Step 2. Open IPM Subtree folder */
-       retval = GetDefaultPublicFolder(&obj_store, &folderId, olFolderPublicIPMSubtree);
-       mapitest_print_retval(mt, "GetDefaultPublicFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, folderId, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Call GetOwningServers */
-       retval = GetOwningServers(&obj_store, &obj_folder, &OwningServersCount, &CheapServersCount, &OwningServers);
-       mapitest_print_retval(mt, "GetOwningServers");
-       if (GetLastError() != MAPI_E_SUCCESS && GetLastError() != ecNoReplicaAvailable) {
-               ret = false;
-       } else if (GetLastError() == ecNoReplicaAvailable) {
-               mapitest_print(mt, "* %-35s: No active replica for the folder\n", "GetOwningServers");
-       } else {
-               mapitest_print(mt, "* %-35s: OwningServersCount: %d\n", "PublicFolderIsGhosted", OwningServersCount);
-               if (OwningServersCount) {
-                       uint16_t        i;
-                       
-                       for (i = 0; i < OwningServersCount; i++) {
-                               mapitest_print(mt, "* %-35s: OwningServers: %s\n", "GetOwningServers", &OwningServers[i]);
-                       }
-                       talloc_free(&OwningServers);
-               }
-       }
-
-       /* cleanup objects */
-       mapi_object_release(&obj_folder);
-
-cleanup:
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the PublicFolderIsGhosted (0x45) operation
-
-   This function:
-   -# Log on the public folders store
-   -# Open a public folder
-   -# Call the PublicFolderIsGhosted operation
-
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
-*/
-_PUBLIC_ bool mapitest_oxcstor_PublicFolderIsGhosted(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       uint64_t                folderId;
-       bool                    IsGhosted;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-
-       retval = OpenPublicFolder(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenPublicFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       /* Step 2. Open IPM Subtree folder */
-       retval = GetDefaultPublicFolder(&obj_store, &folderId, olFolderPublicIPMSubtree);
-       mapitest_print_retval(mt, "GetDefaultPublicFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, folderId, &obj_folder);
-       mapitest_print_retval(mt, "OpenFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Call PublicFolderIsGhosted */
-       retval = PublicFolderIsGhosted(&obj_store, &obj_folder, &IsGhosted);
-       mapitest_print_retval(mt, "PublicFolderIsGhosted");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       mapitest_print(mt, "* %-35s: IsGhosted is set to %s\n", "PublicFolderIsGhosted", ((IsGhosted) ? "true" : "false"));
-
-cleanup:
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the GetReceiveFolderTable (0x68) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Call the GetReceiveFolderTable operation
-   
-   \param mt the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_GetReceiveFolderTable(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct SRowSet          SRowSet;
-       
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Call the GetReceiveFolderTable operation */
-       retval = GetReceiveFolderTable(&obj_store, &SRowSet);
-       mapitest_print_retval(mt, "GetReceiveFolderTable");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapitest_print_SRowSet(mt, &SRowSet, "\t\t[*]");
-       MAPIFreeBuffer(SRowSet.aRow);
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-/**
-   \details Test the LongTermIdFromId (0x43) and IdFromLongTermId (0x44)
-   operations
-
-   This function:
-   -# Logs into the user private mailbox
-   -# Open the Receive Folder
-   -# Looks up the long term id for the receive folder FID
-   -# Looks up the short term id for the long term id
-   -# Checks the id matches the original FID
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_LongTermId(struct mapitest *mt)
-{
-       mapi_object_t           obj_store;
-       mapi_id_t               id_inbox;
-       struct LongTermId       long_term_id;
-       mapi_id_t               id_check;
-       bool                    ret = true;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Call the GetReceiveFolder operation */
-       GetReceiveFolder(&obj_store, &id_inbox, "IPF.Post");
-       mapitest_print_retval(mt, "GetReceiveFolder");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Call GetLongTermIdFromId on Folder ID */
-       GetLongTermIdFromId(&obj_store, id_inbox, &long_term_id);
-       mapitest_print_retval(mt, "GetLongTermIdFromId");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Call GetIdFromLongTermId on LongTermId from previous step*/
-       GetIdFromLongTermId(&obj_store, long_term_id, &id_check);
-       mapitest_print_retval(mt, "GetIdFromLongTermId");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 5. Check whether ids are the same */
-       if ( id_check == id_inbox ) {
-               mapitest_print(mt, "* Check: IDs match - [SUCCESS]\n" );
-       } else {
-               mapitest_print(mt, "* Check: IDs do not match - [SUCCESS] (0x%x, expected 0x%x)\n",
-                              id_check, id_inbox);
-               ret=false;
-               goto cleanup;
-       }
-
- cleanup:
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the GetStoreState (0x7b) operation 
-
-   This function:
-   -# Logs into the user private mailbox
-   -# Retrieve the store state
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_GetStoreState(struct mapitest *mt)
-{
-       mapi_object_t   obj_store;
-       uint32_t        StoreState = 0;
-       bool            ret = true;
-
-       /* Step 1. Logon Private Mailbox */
-       mapi_object_init(&obj_store);
-       OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Get the store state */
-       GetStoreState(&obj_store, &StoreState);
-       mapitest_print_retval(mt, "GetStoreState");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       mapi_object_release(&obj_store);
-       return ret;
-}
-
-/**
-   \details Test the IsMailboxFolder convenience function
-
-   This function:
-   -# Logs into the user private mailbox
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxcstor_IsMailboxFolder(struct mapitest *mt)
-{
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_pf_store;
-       bool                    ret = true;
-       mapi_object_store_t *   store;
-       mapi_object_store_t *   pf_store;
-       uint32_t                olFolderNumber;
-       bool                    callResult;
-       enum MAPISTATUS         retval;
-
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_pf_store);
-       
-       /* Step 1. Logon Private Mailbox */
-       retval = OpenMsgStore(mt->session, &obj_store);
-       mapitest_print_retval(mt, "OpenMsgStore");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       store = (mapi_object_store_t *) obj_store.private_data;
-       if (! store) {
-               mapitest_print(mt, "* FAILED to get store private_data\n" );
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_top_information_store, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for top_information_store\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderTopInformationStore) {
-               mapitest_print(mt, "* FAILED - wrong folder number for top_information_store\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_deleted_items, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for deleted_items\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderDeletedItems) {
-               mapitest_print(mt, "* FAILED - wrong folder number for deleted_items\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_outbox, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for outbox\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderOutbox) {
-               mapitest_print(mt, "* FAILED - wrong folder number for outbox\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_sent_items, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for sent items\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderSentMail) {
-               mapitest_print(mt, "* FAILED - wrong folder number for sent items\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_inbox, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for inbox\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderInbox) {
-               mapitest_print(mt, "* FAILED - wrong folder number for inbox\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_common_views, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for views\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderCommonView) {
-               mapitest_print(mt, "* FAILED - wrong folder number for views\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_calendar, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for calendar\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderCalendar) {
-               mapitest_print(mt, "* FAILED - wrong folder number for calendar\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_contact, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for contacts\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderContacts) {
-               mapitest_print(mt, "* FAILED - wrong folder number for contacts\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_journal, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for journal\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderJournal) {
-               mapitest_print(mt, "* FAILED - wrong folder number for journal\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_note, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for notes\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderNotes) {
-               mapitest_print(mt, "* FAILED - wrong folder number for note\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_task, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for tasks\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderTasks) {
-               mapitest_print(mt, "* FAILED - wrong folder number for tasks\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_drafts, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for drafts\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderDrafts) {
-               mapitest_print(mt, "* FAILED - wrong folder number for drafts\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_store, store->fid_search, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for search\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderFinder) {
-               mapitest_print(mt, "* FAILED - wrong folder number for search\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenPublicFolder(mt->session, &obj_pf_store);
-       mapitest_print_retval(mt, "OpenPublicFolder");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       pf_store = (mapi_object_store_t *) obj_pf_store.private_data;
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_OfflineAB, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for offline address book\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicOfflineAB) {
-               mapitest_print(mt, "* FAILED - wrong folder number for offline address book\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_FreeBusyRoot, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for free-busy root\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicFreeBusyRoot) {
-               mapitest_print(mt, "* FAILED - wrong folder number for free-busy root\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_EFormsRegistryRoot, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for EForms root\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicEFormsRoot) {
-               mapitest_print(mt, "* FAILED - wrong folder number for EForms root\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       /* this one is a bit sensitive. sometimes the EFormsRegistry is null */
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_EFormsRegistry, &olFolderNumber);
-       if (pf_store->fid_pf_EFormsRegistry != 0) {
-               if (! callResult) {
-                       mapitest_print(mt, "* FAILED to get folder number for EForms registry\n");
-                       ret = false;
-                       goto cleanup;
-               }
-               if (olFolderNumber != olFolderPublicEFormsRegistry) {
-                       mapitest_print(mt, "* FAILED - wrong folder number for EForms registry\n");
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_public_root, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for Public root\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicRoot) {
-               mapitest_print(mt, "* FAILED - wrong folder number for Public root\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_ipm_subtree, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for IPM subtree\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicIPMSubtree) {
-               mapitest_print(mt, "* FAILED - wrong folder number for IPM subtree\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_non_ipm_subtree, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for non-IPM subtree\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicNonIPMSubtree) {
-               mapitest_print(mt, "* FAILED - wrong folder number for non-IPM subtree\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_LocalSiteFreeBusy, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for local free busy folder\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicLocalFreeBusy) {
-               mapitest_print(mt, "* FAILED - wrong folder number for local free busy folder\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_LocalSiteOfflineAB, &olFolderNumber);
-       if (! callResult) {
-               mapitest_print(mt, "* FAILED to get folder number for local offline address book\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != olFolderPublicLocalOfflineAB) {
-               mapitest_print(mt, "* FAILED - wrong folder number for local offline address folder\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       /* this one is a bit sensitive. sometimes the NNTP Articles Folder ID is null */
-       callResult = IsMailboxFolder(&obj_pf_store, pf_store->fid_pf_NNTPArticle, &olFolderNumber);
-       if (pf_store->fid_pf_NNTPArticle != 0) {
-               if (! callResult) {
-                       mapitest_print(mt, "* FAILED to get folder number for NNTP Articles\n");
-                       ret = false;
-                       goto cleanup;
-               }
-               if (olFolderNumber != olFolderPublicNNTPArticle) {
-                       mapitest_print(mt, "* FAILED - wrong folder number for NNTP Articles\n");
-                       ret = false;
-                       goto cleanup;
-               }
-       }
-
-       /* this is meant to break */
-       callResult = IsMailboxFolder(&obj_store, 0xFFEEDDCC, &olFolderNumber);
-       if (callResult) {
-               mapitest_print(mt, "* FAILED - expected no folder number\n");
-               ret = false;
-               goto cleanup;
-       }
-       if (olFolderNumber != 0xFFFFFFFF) {
-               mapitest_print(mt, "* FAILED - wrong folder number for bad folder id\n");
-               ret = false;
-               goto cleanup;
-       }
-
-       mapitest_print(mt, "* All PASSED\n");
-
-cleanup:
-       mapi_object_release(&obj_store);
-       mapi_object_release(&obj_pf_store);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxctable.c b/branches/plugfest/utils/mapitest/modules/module_oxctable.c
deleted file mode 100644 (file)
index 71223a6..0000000
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - TABLE OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-   Copyright (C) Brad Hards 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxctable.c
-
-   \brief Table Object Protocol test suite
-*/
-
-/**
-   \details Test the SetColumns (0x12) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# Calls the SetColumns operation
-   -# Cleans up
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_SetColumns(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Step 2. SetColumns */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval(mt, "SetColumns");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return true;
-}
-
-
-/**
-   \details Test the QueryColumns (0x37) operation
-
-   This function:
-       -# Opens the Inbox folder and gets the hierarchy table
-       -# Calls the QueryColumn operation
-       -# Calls SetColumns on the test folder
-       -# Checks that QueryColumns on the test folder is correct
-       -# Cleans up
-
-   \param mt pointer to the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_QueryColumns(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_test_folder;
-       struct SPropTagArray    columns;
-       struct mt_common_tf_ctx *context;
-       uint32_t                count;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Step 2. QueryColumns */
-       retval = QueryColumns(&obj_htable, &columns);
-       mapitest_print_retval(mt, "QueryColumns");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Get the test folder */
-       context = mt->priv;
-       mapi_object_init(&(obj_test_folder));
-       GetContentsTable(&(context->obj_test_folder), &(obj_test_folder), 0, &count);
-       mapitest_print_retval(mt, "GetContentsTable");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       if (count != 10) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "GetContentsTable", count);
-               /* This isn't a hard error for this test though, because it might be from a 
-                  previous test failure. Clean up and try again */
-       }
-
-
-       /* Step 4. QueryColumns on a contents folder */
-       retval = QueryColumns(&(obj_test_folder), &columns);
-       mapitest_print_retval(mt, "QueryColumns");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       /* TODO: check the return count against something */
-       mapitest_print(mt, "column count: %i\n", columns.cValues);
-
-       /* Step 6. Release */
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&(obj_test_folder));
-       mapitest_common_cleanup(mt);
-
-       return true;
-}
-
-/**
-   \details Test the Restrict (0x14) operation
-
-   This function:
-   -# Opens the Inbox folder and creates some test content
-   -# Checks that the content is OK
-   -# Applies a filter
-   -# Checks the results are as expected.
-   -# Resets the table
-   -# Checks the results are as expected.
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_Restrict(struct mapitest *mt)
-{
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_test_folder;
-       struct mt_common_tf_ctx *context;
-       uint32_t                count = 0;
-       uint32_t                origcount = 0;
-       uint32_t                Numerator = 0;
-       uint32_t                Denominator = 0;
-       struct mapi_SRestriction res;
-       bool                    ret = true;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, &count)) {
-               return false;
-       }
-
-       /* Step 2. Get the test folder */
-       context = mt->priv;
-       mapi_object_init(&(obj_test_folder));
-       GetContentsTable(&(context->obj_test_folder), &(obj_test_folder), 0, &origcount);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "GetContentsTable");
-               ret = false;
-               goto cleanup;
-       }
-       if (origcount != 10) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "GetContentsTable", count);
-               /* This isn't a hard error for this test though, because it might be from a 
-                  previous test failure. Clean up and try again */
-       }
-
-       /* Apply a filter */
-       res.rt = RES_PROPERTY;
-       res.res.resProperty.relop = RES_PROPERTY;
-       res.res.resProperty.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.ulPropTag = PR_SUBJECT;
-       res.res.resProperty.lpProp.value.lpszA = MT_MAIL_SUBJECT;
-
-       Restrict(&(obj_test_folder), &res, NULL);
-       mapitest_print_retval(mt, "Restrict");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       context = mt->priv;
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryPosition");
-               ret = false;
-               goto cleanup;
-       }
-       if (Denominator != origcount/2) {
-               mapitest_print(mt, "* %-35s: unexpected filtered count (%i)\n", "QueryPosition", Denominator);
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Resets the table */
-       Reset(&(obj_test_folder));
-       mapitest_print_retval(mt, "Reset");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       context = mt->priv;
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "QueryPosition");
-               ret = false;
-               goto cleanup;
-       }
-       if (Denominator != origcount) {
-               mapitest_print(mt, "* %-35s: unexpected reset count (%i)\n", "QueryPosition", Denominator);
-               ret = false;
-               goto cleanup;
-       }
-
- cleanup:
-       /* Release */
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&(obj_test_folder));
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-/**
-   \details Test the QueryRows (0x15) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# Set the required columns
-   -# Calls QueryRows until the end of the table
-   -# Open the test folder, and get its contents
-   -# Calls QueryRows until the end of the test folder
-   -# Checks the results are as expected.
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_QueryRows(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_test_folder;
-       struct SRowSet          SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       lpProp;
-       struct mt_common_tf_ctx *context;
-       uint32_t                idx = 0;
-       uint32_t                count = 0;
-       const char*             data;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, &count)) {
-               return false;
-       }
-
-       /* Step 2. Set Table Columns */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               return false;
-       }
-
-       /* Step 3. QueryRows */
-       do {
-               retval = QueryRows(&obj_htable, 0x2, TBL_ADVANCE, &SRowSet);
-               if (SRowSet.cRows > 0) {
-                       idx += SRowSet.cRows;
-                       if (retval == MAPI_E_SUCCESS) {
-                               mapitest_print(mt, "* %-35s: %.2d/%.2d [PASSED]\n", 
-                                              "QueryRows", idx, count);
-                       } else {
-                               mapitest_print(mt, "* %-35s: %.2d/%.2d [FAILED]\n", 
-                                              "QueryRows", idx, count);
-                       }
-               }
-       } while (retval == MAPI_E_SUCCESS && SRowSet.cRows > 0);
-
-
-       /* Step 4. Get the test folder */
-       context = mt->priv;
-       mapi_object_init(&(obj_test_folder));
-       GetContentsTable(&(context->obj_test_folder), &(obj_test_folder), 0, &count);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "GetContentsTable");
-               return false;
-       }
-       if (count != 10) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "GetContentsTable", count);
-               /* This isn't a hard error for this test though, because it might be from a 
-                  previous test failure. Clean up and try again */
-       }
-
-       /* Step 5. Set Table Columns on the test folder */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_BODY, PR_BODY_HTML);
-       retval = SetColumns(&obj_test_folder, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "SetColumns");
-               return false;
-       }
-
-       /* Step 6. QueryRows on test folder contents */
-       idx = 0;
-       do {
-               retval = QueryRows(&(obj_test_folder), 0x2, TBL_ADVANCE, &SRowSet);
-               if (SRowSet.cRows > 0) {
-                       idx += SRowSet.cRows;
-                       if (retval == MAPI_E_SUCCESS) {
-                               uint32_t        i;
-                               mapitest_print(mt, "* %-35s: %.2d/%.2d [PASSED]\n", 
-                                              "QueryRows", idx, count);
-                               for (i = 0; i < SRowSet.cRows; ++i) {
-                                       lpProp = SRowSet.aRow[i].lpProps[0];
-                                       if (lpProp.ulPropTag != PR_BODY) {
-                                               mapitest_print(mt, "* %-35s: Bad proptag0 (0x%x)\n", 
-                                                              "QueryRows", lpProp.ulPropTag);
-                                               return false;
-                                       }
-                                       data = get_SPropValue_data(&lpProp);
-                                       if (0 != strncmp(data, "Body of message", 15)) {
-                                               mapitest_print(mt, "* %-35s: Bad propval0 (%s)\n", 
-                                                              "QueryRows", data);
-                                               return false;
-                                       }
-                                       lpProp = SRowSet.aRow[i].lpProps[1];
-                                       if (lpProp.ulPropTag != PR_BODY_HTML) {
-                                               mapitest_print(mt, "* %-35s: Bad proptag1 (0x%x)\n", 
-                                                              "QueryRows", lpProp.ulPropTag);
-                                               return false;
-                                       }
-                                       data = get_SPropValue_data(&lpProp);
-                                       if (0 != strncmp(data, "<!DOCTYPE HTML PUBLIC", 21)) {
-                                               mapitest_print(mt, "* %-35s: Bad propval1 (%s)\n", 
-                                                              "QueryRows", data);
-                                               return false;
-                                       }
-                               }
-                       } else {
-                               mapitest_print(mt, "* %-35s: %.2d/%.2d [FAILED]\n", 
-                                              "QueryRows", idx, count);
-                       }
-               }
-       } while (retval == MAPI_E_SUCCESS && SRowSet.cRows > 0);
-
-       /* Release */
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&(obj_test_folder));
-       mapitest_common_cleanup(mt);
-
-       return true;
-}
-
-/**
-   \details Test the GetStatus (0x16) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# Call GetStatus
-   -# Cleans up
- */
-_PUBLIC_ bool mapitest_oxctable_GetStatus(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_htable;
-       uint8_t                 TableStatus;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Step 2. GetStatus */
-       retval = GetStatus(&obj_htable, &TableStatus);
-       mapitest_print_retval(mt, "GetStatus");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       } else {
-               mapitest_print(mt, "* %-35s: TableStatus: %d\n", "GetStatus", TableStatus);
-       }
-
-       /* Step 3. Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-
-/**
-   \details Test the SeekRow (0x18) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# SeekRow with BOOKMARK_BEGINNING
-   -# SeekRow with BOOKMARK_END
-   -# SeekRow with BOOKMARK_CURRENT
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_SeekRow(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       uint32_t                count;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Step 2. SeekRow */
-       retval = SeekRow(&obj_htable, BOOKMARK_BEGINNING, 0, &count);
-       mapitest_print_retval_fmt(mt, "SeekRow", "(BOOKMARK_BEGINNING)");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = SeekRow(&obj_htable, BOOKMARK_END, 0, &count);
-       mapitest_print_retval_fmt(mt, "SeekRow", "(BOOKMARK_END)");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = SeekRow(&obj_htable, BOOKMARK_CURRENT, 0, &count);
-       mapitest_print_retval_fmt(mt, "SeekRow", "(BOOKMARK_CURRENT)");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return true;
-}
-
-
-/**
-   \details Test the SeekRowApprox (0x1a) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# SeekRowApprox with 0/1, 1/1 and 1/2 fractional values
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_SeekRowApprox(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       /* Step 2. SeekRowApprox */
-       retval = SeekRowApprox(&obj_htable, 0, 1);
-       mapitest_print_retval_fmt(mt, "SeekRowApprox", "0/1");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = SeekRowApprox(&obj_htable, 1, 1);
-       mapitest_print_retval_fmt(mt, "SeekRowApprox", "1/1");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       retval = SeekRowApprox(&obj_htable, 1, 2);
-       mapitest_print_retval_fmt(mt, "SeekRowApprox", "1/2");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return true;
-}
-
-
-
-/**
-   \details Test the CreateBookmark (0x1b) operation
-
-   This function:
-   -# Opens the Inbox folder and gets the hierarchy table
-   -# Customize the MAPI table view
-   -# CreateBookmark for each table's row
-   -# Free Bookmark for each created bookmark
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_CreateBookmark(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       uint32_t                *bkPosition;
-       uint32_t                count;
-       uint32_t                i;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, &count)) {
-               return false;
-       }
-
-       /* Step 2. Customize the table view */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create Bookmarks */
-       bkPosition = talloc_array(mt->mem_ctx, uint32_t, 1);
-       retval = QueryRows(&obj_htable, 100, TBL_ADVANCE, &SRowSet);
-       for (i = 0; i < SRowSet.cRows; i++) {
-               bkPosition = talloc_realloc(mt->mem_ctx, bkPosition, uint32_t, i + 2);
-               retval = CreateBookmark(&obj_htable, &(bkPosition[i]));
-               mapitest_print_retval_fmt_clean(mt, "CreateBookmark", retval, "(%.2d)", i);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-       }
-
-       retval = mapi_object_bookmark_get_count(&obj_htable, &count);
-
-       /* Step 4. Free Bookmarks */
-       for (i = 0; i < count; i++) {
-               retval = FreeBookmark(&obj_htable, bkPosition[i]);
-               mapitest_print_retval_fmt_clean(mt, "FreeBookmark", retval, "(%.2d)", i);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-       }
-
-       /* Step 5. Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-       talloc_free(bkPosition);
-
-       return true;
-}
-
-
-
-/**
-   \details Test the SeekRowBookmark (0x19) operation
-
-   This function:
-   -# Open the Inbox folder and retrieve the hierarchy table
-   -# Customize the MAPI table view
-   -# SeekBookmark for each table's row
-   -# Free Bookmark for each created bookmark
-
-   \param mt pointer on the top-level mapitest structure
-   
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_SeekRowBookmark(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       uint32_t                *bkPosition;
-       uint32_t                count;
-       uint32_t                row;
-       uint32_t                i;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, &count)) {
-               return false;
-       }
-
-       /* Step 2. Customize the table view */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create Bookmarks */
-       bkPosition = talloc_array(mt->mem_ctx, uint32_t, 1);
-       retval = QueryRows(&obj_htable, 100, TBL_ADVANCE, &SRowSet);
-       for (i = 0; i < SRowSet.cRows; i++) {
-               bkPosition = talloc_realloc(mt->mem_ctx, bkPosition, uint32_t, i + 2);
-               retval = CreateBookmark(&obj_htable, &(bkPosition[i]));
-               mapitest_print_retval_fmt_clean(mt, "CreateBookmark", retval, "(%.2d)", i);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-       }
-       mapitest_print_retval(mt, "CreateBookmark");
-
-       retval = mapi_object_bookmark_get_count(&obj_htable, &count);
-
-       /* Step 4. SeekRowBookmark */
-       for (i = 0; i < SRowSet.cRows; i++) {
-               retval = SeekRowBookmark(&obj_htable, bkPosition[i], 0, &row);
-               mapitest_print_retval_fmt_clean(mt, "SeekRowBookmark", retval, "(%.2d)", i);
-       }
-
-
-       /* Step 5. Free Bookmarks */
-       for (i = 0; i < SRowSet.cRows; i++) {
-               retval = FreeBookmark(&obj_htable, bkPosition[i]);
-               mapitest_print_retval_fmt_clean(mt, "FreeBookmark", retval, "(%.2d)", i);
-               if (retval != MAPI_E_SUCCESS) {
-                       return false;
-               }
-       }
-
-       /* Step 6. Release */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       talloc_free(bkPosition);
-
-       return true;
-}
-
-/**
-   \details Test the SortTable (0x13), ExpandRow (0x59), CollapseRow(0x5a),
-   GetCollapseState(0x6b) and SetCollapseState (0x6c) operations
-
-   This function:
-   -# Opens the Inbox folder and creates some test content
-   -# Checks that the content is OK
-   -# Applies a sort and categorisation
-   -# Checks the results are as expected.
-   -# Save away the Row ID and Insatnce Number for the first header
-   -# Collapse the first category
-   -# Checks the results are as expected.
-   -# Save the "collapse state"
-   -# Expand the first category again
-   -# Checks the results are as expected
-   -# Restore the saved "collapse state"
-   -# Checks the results are as expected
-   -# Cleans up
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxctable_Category(struct mapitest *mt)
-{
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_test_folder;
-       struct mt_common_tf_ctx *context;
-       uint32_t                count = 0;
-       uint32_t                origcount = 0;
-       bool                    ret = true;
-       struct SSortOrderSet    criteria;
-       uint64_t                inst_id = 0;
-       uint64_t                inst_num = 0;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                rowcount = 0;
-       uint32_t                Numerator = 0;
-       uint32_t                Denominator = 0;
-       struct SBinary_short    collapseState;
-
-       /* Step 1. Logon */
-       if (! mapitest_common_setup(mt, &obj_htable, &count)) {
-               return false;
-       }
-
-       /* Step 2. Get the test folder */
-       context = mt->priv;
-       mapi_object_init(&(obj_test_folder));
-       GetContentsTable(&(context->obj_test_folder), &(obj_test_folder), 0, &origcount);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               mapitest_print_retval(mt, "GetContentsTable");
-               ret = false;
-               goto cleanup;
-       }
-       if (origcount != 10) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "GetContentsTable", count);
-               /* This isn't a hard error for this test though, because it might be from a 
-                  previous test failure. Clean up and try again */
-       }
-
-       /* We need the header row InstanceId to fold/unfold the headers */
-       SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x6,
-                                         PR_SENDER_NAME,
-                                         PR_BODY,
-                                         PR_LAST_MODIFICATION_TIME,
-                                         PR_SUBJECT,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM);
-       SetColumns(&(obj_test_folder), SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       mapitest_print_retval(mt, "SetColumns");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Apply a categorised sort */
-       memset(&criteria, 0x0, sizeof (struct SSortOrderSet));
-       criteria.cSorts = 1;
-       criteria.cCategories = 1;
-       criteria.cExpanded = 1;
-       criteria.aSort = talloc_array(mt->mem_ctx, struct SSortOrder, criteria.cSorts);
-       criteria.aSort[0].ulPropTag = PR_SENDER_NAME;
-       criteria.aSort[0].ulOrder = TABLE_SORT_ASCEND;
-       SortTable(&(obj_test_folder), &criteria);
-       mapitest_print_retval(mt, "SortTable");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       rowcount =  2 * origcount;
-       QueryRows(&(obj_test_folder), rowcount, TBL_ADVANCE, &SRowSet);
-       mapitest_print_retval(mt, "QueryRows");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       mapitest_print_retval(mt, "QueryPosition");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       /* the categories are expanded, and there are six unique senders, so there are six
-          extra rows - one for each header row */
-       if (Denominator != origcount + 6) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "QueryPosition", Numerator);
-               ret = false;
-               goto cleanup;
-       }
-
-       /* save away ID/instance values for first row header */
-       inst_id = (*(const uint64_t *)get_SPropValue_data(&(SRowSet.aRow[0].lpProps[4])));
-       inst_num = (*(const uint32_t *)get_SPropValue_data(&(SRowSet.aRow[0].lpProps[5])));
-
-       /* Collapse a row header */
-       CollapseRow(&(obj_test_folder), inst_id, &rowcount);
-       mapitest_print_retval(mt, "CollapseRow");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       mapitest_print_retval(mt, "QueryPosition");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       /* there are still six unique headers, but half of the real entries are under the first
-          header (usually 10, unless we have some other rubbish hanging around), and when we
-          collapse the first header row, that half disappear */
-       if (Denominator != origcount/2 + 6) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "QueryPosition", Denominator);
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Save the table collapse state */
-       GetCollapseState(&(obj_test_folder), inst_id, inst_num, &collapseState);
-       mapitest_print_retval(mt, "GetCollapseState");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-
-       /* Expand a category */
-       ExpandRow(&(obj_test_folder), inst_id, 20, &SRowSet, &rowcount);
-       mapitest_print_retval(mt, "ExpandRow");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       mapitest_print_retval(mt, "QueryPosition");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       /* we've expanded the first header row, so we now get all the entries plus the 6 headers */
-       if (Denominator != origcount + 6) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "QueryPosition", Denominator);
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Restore the collapse state  */
-       SetCollapseState(&(obj_test_folder), &collapseState);
-       mapitest_print_retval(mt, "SetCollapseState");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Checks the results are as expected */
-       QueryPosition(&(obj_test_folder), &Numerator, &Denominator);
-       mapitest_print_retval(mt, "QueryPosition");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-       /* back to the situation with the first heading collapsed */
-       if (Denominator != origcount/2 + 6) {
-               mapitest_print(mt, "* %-35s: unexpected count (%i)\n", "QueryPosition", Denominator);
-               ret = false;
-               goto cleanup;
-       }
-
- cleanup:
-       /* Release */
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&(obj_test_folder));
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxomsg.c b/branches/plugfest/utils/mapitest/modules/module_oxomsg.c
deleted file mode 100644 (file)
index b82f81e..0000000
+++ /dev/null
@@ -1,624 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - E-MAIL OBJECT PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxomsg.c
-
-   \brief E-Mail Object Protocol test suite
-*/
-
-
-/**
-   \details Test the AddressTypes (0x49) and OptionsData (0x6f) operations
-
-   This function:
-   -# Log on the user private mailbox
-   -# Call the AddressTypes operation
-   -# Call the OptionsData operation on each address type
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_AddressTypes(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       uint16_t                cValues;
-       struct mapi_LPSTR       *transport = NULL;
-       uint32_t                i;
-       uint8_t                 *optData;
-       uint16_t                OptionsDataLength;
-       uint8_t                 *helpData;
-       uint16_t                HelpFileLength;
-       const char*             HelpFileName;
-       bool                    result = true;
-       /* 
-       uint8_t                 txt[1024];
-       uint32_t                j;
-       */
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step2. AddressTypes operation */
-       retval = AddressTypes(&obj_store, &cValues, &transport);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       
-       for (i = 0; i < cValues; i++) {
-               mapitest_print(mt, "* Recipient Type: %s\n", transport[i].lppszA);
-               retval = OptionsData(&obj_store, transport[i].lppszA, &optData, &OptionsDataLength,
-                                    &helpData, &HelpFileLength, &HelpFileName);
-               mapitest_print_retval(mt, "OptionsData");
-               if (retval != MAPI_E_SUCCESS) {
-                       result = false;
-               }
-
-               mapitest_print(mt, "** Size of Options Data: %i\n", OptionsDataLength);
-
-               /* Just noise to print this out */
-               /*
-               for (j = 0; j < OptionsDataLength; ++j) {
-                       printf("0x%02x ", optData[j]);
-                       if (isprint(optData[j])) {
-                               txt[j%16] = optData[j];
-                       } else {
-                               txt[j%16] = '.';
-                       }
-                       txt[16] = '\0';
-                       if (((j+1) % 16) == 0) { 
-                               printf("   %s\n", txt);
-                       }
-               }
-               txt[(j%16)+1] = '\0';
-               printf(" %s\n", txt);
-               */
-               mapitest_print(mt, "** Size of Help Data: %i\n", HelpFileLength);
-
-               mapitest_print(mt, "** Help Data file name: %s\n", HelpFileName);
-
-       }
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return result;
-}
-
-
-/**
-   \details Test the SubmitMessage (0x32) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the Outbox folder
-   -# Create a sample message
-   -# Submit the message
-   -# Delete the message
-   -# Clean up folders
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_SubmitMessage(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       bool                    ret;
-       
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Create the sample message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       if (ret == false) {
-               return ret;
-       }
-
-       /* Step 4. Submit Message */
-       retval = SubmitMessage(&obj_message);
-       mapitest_print_retval(mt, "SubmitMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 5. Delete Message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 6. Clean up anything else */
-       mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-       GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-       mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the AbortSubmit (0x34) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Open the Outbox folder
-   -# Create a sample message
-   -# Submit the message
-   -# Abort the submit operation
-   -# Delete the message
-   -# Clean up folders
-       
-   Note: This operation may fail since it depends on how busy the
-   server is when we submit the message. It is possible the message
-   gets already processed before we have time to abort the message.
-
-   From preliminary tests, AbortSubmit returns MAPI_E_SUCCESS when we
-   call SubmitMessage with SubmitFlags set to 0x2.
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_AbortSubmit(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_folder;
-       mapi_id_t               id_msgs[1];
-       bool                    ret = true;
-       
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_message);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open Outbox folder */
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderOutbox);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 3. Create the sample message */
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       if (ret == false) {
-               goto cleanup;
-       }
-
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 4. Submit Message */
-       retval = SubmitMessage(&obj_message);
-       retval = AbortSubmit(&obj_store, &obj_folder, &obj_message);
-       mapitest_print_retval(mt, "AbortSubmit");
-       if ((GetLastError() != MAPI_E_SUCCESS) && 
-           (GetLastError() != MAPI_E_UNABLE_TO_ABORT) &&
-           (GetLastError() != MAPI_E_NOT_IN_QUEUE)) {
-               ret = false;
-       }
-
-       /* Step 5. Delete Message */
-cleanup:
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-       if ((retval != MAPI_E_SUCCESS) && (retval != ecNoDelSubmitMsg)) {
-               ret = false;
-               goto mapitest_oxomsg_AbortSubmit_bailout;
-       }
-       /* Step 6. Clean up anything else */
-       mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto mapitest_oxomsg_AbortSubmit_bailout;
-       }
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       } else {
-               mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-       }
-
-mapitest_oxomsg_AbortSubmit_bailout:
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the SetSpooler (0x47) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Informs the server it will acts as an email spooler
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_SetSpooler(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. SetSpooler */
-       retval = SetSpooler(&obj_store);
-       mapitest_print_retval(mt, "SetSpooler");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Release */
-       mapi_object_release(&obj_store);
-
-       return true;
-}
-
-
-/**
-   \details Test the SpoolerLockMessage (0x48) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Informs the server it will acts as an email spooler
-   -# Create a message in the outbox folder
-   -# Save message changes and Submit the message
-   -# Lock the message
-   -# Unlock-Finish the message
-   -# Deletes the message
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_SpoolerLockMessage(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_msgs[1];
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. SetSpooler */
-       retval = SetSpooler(&obj_store);
-       mapitest_print_retval(mt, "SetSpooler");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 3. Open the outbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderOutbox);
-       if (ret == false) return ret;
-
-       /* Step 4. Create the message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print(mt, "* %-35s: %s\n", "mapitest_common_message_create", 
-                      ret == true ? "TRUE" : "FALSE");
-       if (ret == false) return ret;
-
-       /* Step 5. Save changes on message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 6. Submit the message */
-       retval = SubmitMessage(&obj_message);
-       mapitest_print_retval(mt, "SubmitMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 7. Lock the message */
-       retval = SpoolerLockMessage(&obj_store, &obj_message, LockState_1stLock);
-       mapitest_print_retval_fmt(mt, "SpoolerLockMessage", "1stLock");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 8. finish locking the message */
-       retval = SpoolerLockMessage(&obj_store, &obj_message, LockState_1stFinished);
-       mapitest_print_retval_fmt(mt, "SpoolerLockMessage", "1stFinished");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       }
-
-       /* Step 9. Delete Message */
-       id_msgs[0] = mapi_object_get_id(&obj_message);
-       retval = DeleteMessage(&obj_folder, id_msgs, 1);
-       mapitest_print_retval(mt, "DeleteMessage");
-
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-
-/**
-   \details Test the TransportSend (0x4a) operation
-
-   This function:
-   -# Logs on to the user private mailbox
-   -# Opens the outbox folder
-   -# Create the test message
-   -# Save changes to the message
-   -# Perform the TransportSend operation
-   -# Dump the properties
-   -# Clean up folders
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_TransportSend(struct mapitest *mt)
-{
-       enum MAPISTATUS                 retval;
-       bool                            ret = true;
-       mapi_object_t                   obj_store;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_message;
-       struct mapi_SPropValue_array    lpProps;
-       mapi_id_t                       id_folder;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               return false;
-       }
-
-       /* Step 2. Open the outbox folder */
-       mapi_object_init(&obj_folder);
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderOutbox);
-       if (ret == false) return ret;
-
-       /* Step 3. Create the message */
-       mapi_object_init(&obj_message);
-       ret = mapitest_common_message_create(mt, &obj_folder, &obj_message, MT_MAIL_SUBJECT);
-       mapitest_print(mt, "* %-35s: %s\n", "mapitest_common_message_create", 
-                      ret == true ? "TRUE" : "FALSE");
-       if (ret == false) return ret;
-
-       /* Step 4. Save changes on message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadWrite);
-       mapitest_print_retval(mt, "SaveChangesMessage");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto mapitest_oxomsg_TransportSend_bailout;
-       }
-
-       /* Step 5. TransportSend */
-       retval = TransportSend(&obj_message, &lpProps);
-       mapitest_print_retval(mt, "TransportSend");
-       if (GetLastError() != MAPI_E_SUCCESS) {
-               ret = false;
-               goto mapitest_oxomsg_TransportSend_bailout;
-       }
-
-       /* Step 6. Dump the properties */
-       if (&lpProps != NULL) {
-               uint32_t                i;
-               struct SPropValue       lpProp;
-
-               lpProp.dwAlignPad = 0;
-               for (i = 0; i < lpProps.cValues; i++) {
-                       cast_SPropValue(mt->mem_ctx, &lpProps.lpProps[i], &lpProp);
-                       mapitest_print_SPropValue(mt, lpProp, "\t* ");
-               }
-               MAPIFreeBuffer(lpProps.lpProps);
-       }
-
-       /* Step 6. Clean up anything else */
-       mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-       retval = GetDefaultFolder(&obj_store, &id_folder, olFolderInbox);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto mapitest_oxomsg_TransportSend_bailout;
-       }
-
-       retval = OpenFolder(&obj_store, id_folder, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-       } else {
-               mapitest_common_message_delete_by_subject(mt, &obj_folder, MT_MAIL_SUBJECT);
-       }
-
-mapitest_oxomsg_TransportSend_bailout:
-       /* Release */
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
-
-/**
-   \details Test the TransportNewMail (0x51) operation
-
-   This function:
-   -# Logs on to the user private mailbox
-   -# Create a filled test folder, and open it.
-   -# Perform the TransportNewMail operation
-   -# Clean up test environment
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_TransportNewMail(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       bool                    ret = true;
-       struct mt_common_tf_ctx *context;
-       int                     i;
-
-
-
-       /* Logon and create filled test folder*/
-       if (! mapitest_common_setup(mt, &obj_htable, NULL)) {
-               return false;
-       }
-
-       context = mt->priv;
-
-       retval = SetSpooler(&(context->obj_store));
-
-       /* Perform the TransportNewMail operation */
-       for (i = 0; i<10; ++i) {
-               retval = TransportNewMail(&(context->obj_store), &(context->obj_test_folder), &(context->obj_test_msg[i]),
-                                         "IPM.Note", 0x00000008);
-               mapitest_print_retval_clean(mt, "TransportNewMail", retval);
-               if (retval != MAPI_E_SUCCESS) {
-                       ret = false;
-               }
-       }
-
-       /* Clean up */
-       mapi_object_release(&obj_htable);
-       mapitest_common_cleanup(mt);
-
-       return ret;
-}
-
-
-/**
-   \details Test the GetTransportFolder (0x6d) operation
-
-   This function:
-   -# Log on the user private mailbox
-   -# Retrieves the folder ID of temporary transport folder
-
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxomsg_GetTransportFolder(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       mapi_id_t               folder_id = 0;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       /* Step 2. Get the transport folder */
-       retval = GetTransportFolder(&obj_store, &folder_id);
-       mapitest_print_retval_fmt(mt, "GetTransportFolder", "(0x%llx)", folder_id);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_object_release(&obj_store);
-               return false;
-       }
-
-       return true;
-}
diff --git a/branches/plugfest/utils/mapitest/modules/module_oxorule.c b/branches/plugfest/utils/mapitest/modules/module_oxorule.c
deleted file mode 100644 (file)
index a38ea50..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-   Stand-alone MAPI testsuite
-
-   OpenChange Project - E-MAIL RULES PROTOCOL operations
-
-   Copyright (C) Julien Kerihuel 2008
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "utils/mapitest/mapitest.h"
-#include "utils/mapitest/proto.h"
-
-/**
-   \file module_oxorule.c
-
-   \brief E-Mail Rules Protocol test suite
- */
-
-
-/**
-   \details Test the GetRulesTable (0x3f) operation
-
-   This function:
-       -# Log on the user private mailbox
-       -# Open the inbox folder
-       -# Retrieve the rules table
-   
-   \param mt pointer on the top-level mapitest structure
-
-   \return true on success, otherwise false
- */
-_PUBLIC_ bool mapitest_oxorule_GetRulesTable(struct mapitest *mt)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret = true;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_rtable;
-
-       /* Step 1. Logon */
-       mapi_object_init(&obj_store);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_rtable);
-
-       retval = OpenMsgStore(mt->session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
-       /* Step 2. Open the Inbox folder */
-       ret = mapitest_common_folder_open(mt, &obj_store, &obj_folder, olFolderInbox);
-       if (ret == false) {
-               goto cleanup;
-       }
-
-       /* Step 3. Retrieve the rules table */
-       retval = GetRulesTable(&obj_folder, &obj_rtable, RulesTableFlags_Unicode);
-       mapitest_print_retval(mt, "GetRulesTable");
-       if (retval != MAPI_E_SUCCESS) {
-               ret = false;
-               goto cleanup;
-       }
-
- cleanup:
-       /* Release */
-       mapi_object_release(&obj_rtable);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_store);
-
-       return ret;
-}
diff --git a/branches/plugfest/utils/mapitrace/Makefile.PL b/branches/plugfest/utils/mapitrace/Makefile.PL
deleted file mode 100644 (file)
index 903164d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-use ExtUtils::MakeMaker;
-WriteMakefile(
-             'NAME' => 'MAPI::Mapitrace',
-             'VERSION_FROM' => 'lib/MAPI/EcDoRpc.pm',
-             'EXE_FILES' => [ 'mapitrace' ],
-             );
diff --git a/branches/plugfest/utils/mapitrace/lib/MAPI/Dump_EcDoRpc.pm b/branches/plugfest/utils/mapitrace/lib/MAPI/Dump_EcDoRpc.pm
deleted file mode 100644 (file)
index bd2cd7e..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-#############################################
-# EcDoRpc Dump utility for mapitrace tool
-# Copyright Julien Kerihuel 2007
-# <j.kerihuel@openchange.org>
-#
-# released under the GNU GPL v3 or later
-#
-package MAPI::Dump_EcDoRpc;
-
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-use vars qw($AUTOLOAD $VERSION);
-$VERSION = '0.01';
-
-use strict;
-use Data::Dumper;
-
-#######################################################
-# convenient sort functions                           #
-#######################################################
-sub pkt_number 
-{
-    my ($aa) = $a =~ /(\d+)/;
-    my($bb) = $b =~ /(\d+)/;
-    ($aa) <=> ($bb);
-}
-
-sub asc_num {
-   hex($a) <=> hex($b);
-}
-#######################################################
-# BRACE DUMPING FUNCTIONS
-#######################################################
-
-sub dump_error_brace
-{
-    my $_self = shift;
-    my $self = shift;
-
-    foreach my $key (sort asc_num (keys(%{$self->{BRACES_ERROR}}))) {
-       my $inout = $self->{BRACES_ERROR}->{$key}->{error};
-       if ($inout) {
-           print "[mapitrace] error in [$inout]: ";
-           print $self->{BRACES_ERROR}->{$key}->{$inout}->{filename} . "\n";
-       }
-    }
-}
-
-sub dump_brace_start
-{
-    my $_self = shift;
-    my $in = shift;
-    my $out = shift;
-
-    print MAPI::EcDoRpc->get_filename($in->{filename});
-    print " / ";
-    print MAPI::EcDoRpc->get_filename($out->{filename});
-    print "\n";
-    print "----------------------------------------------\n";
-}
-
-sub dump_brace_end
-{
-    print "\n\n";
-}
-
-#######################################################
-# DUMP FUNCTIONS FOR THE ANALYZE PART
-#######################################################
-
-#
-# Dump the handles array from a request or response
-#
-sub dump_handles
-{
-    my $_self = shift;
-    my $self = shift;
-    my @handles = @_;
-
-    print $self->{filename} . " :\n";
-    print "handles array (" . ($#handles + 1) . "):\n";
-    print "\t$_\n" foreach (@handles);
-    print "\n";
-}
-
-#
-# Provides a dual dump view for the handle array
-# both in request and response
-#
-# MAPI Semantic tells that request and response have the same
-# number of handles elements
-#
-sub dump_brace_handles
-{
-    my $_self = shift;
-    my $mapi_call = shift;
-
-    my @handles_in = @{$mapi_call->{handles_in}};
-    my @handles_out = @{$mapi_call->{handles_out}};
-
-    print "handles array (" . ($#handles_in + 1) . "):\n";
-    for (my $i = 0; $handles_in[$i]; $i++) {
-       printf "\t[%.2x] %s -> %s\n", $i, $handles_in[$i], $handles_out[$i];
-    }
-}
-
-#
-# Print a call
-#
-#
-sub dump_call
-{
-    my $mapi_call = shift;
-    my $key = shift;
-    my $call_idx = shift;
-    my $space = shift;
-
-    my $in  = $mapi_call->{calls}->{REQ};
-    my $out = $mapi_call->{calls}->{REPL};
-
-    my $new_idx;
-    
-    if ($call_idx) {
-       $new_idx = MAPI::EcDoRpc->get_call_index($mapi_call, $call_idx);
-       printf "\t%s+-- [0x%.2x] [%s] (opnum = %s) %15s (handle_idx = %s) (child of %s)\n", 
-       $space, hex($call_idx), 
-       (exists $out->{$new_idx}->{retval}) ? $out->{$new_idx}->{retval}:'',
-       $in->{$call_idx}->{opnum}, $in->{$call_idx}->{opname}, 
-       $in->{$call_idx}->{handle_idx}, $in->{$key}->{opname};
-    } else {
-       $new_idx = MAPI::EcDoRpc->get_call_index($mapi_call, $key);
-       printf "\t[0x%.2x] [%s] (opnum = %s) %25s (handle_idx = %s) (self_handle_idx = %s)\n", 
-       hex($key), 
-       (exists $out->{$new_idx}->{retval}) ? $out->{$new_idx}->{retval} : '', 
-       $in->{$key}->{opnum}, $in->{$key}->{opname}, 
-       $in->{$key}->{handle_idx},
-       $in->{$key}->{self_handle_idx};
-    }
-}
-
-#
-# Dump mapi calls
-#
-# Since calls with self_handles have a smaller index than other calls relying on them
-# When a parent value is > than the current idx, we can skip display the call.
-# It should have normally been printing earlier when checking for call children
-# Return -1 if we have an error
-#
-
-sub dump_mapi_calls
-{
-    my $_self = shift;
-    my $mapi_call = shift;
-
-    my $in  = $mapi_call->{calls}->{REQ};
-    my $out = $mapi_call->{calls}->{REPL};
-
-    my $in_call_count = MAPI::EcDoRpc->get_mapi_calls_request_count($in);
-
-    if ($in_call_count != keys(%{$out})) {
-       print "[mapitrace] error: Oops seems like we have some trouble ...\n";
-       print "[mapitrace] error: Mismatch call count between request ($in_call_count) and response (". keys(%{$out})  .")\n";
-       return -1;
-    }
-    
-    printf "serialized mapi calls (count = %.2d):\n", $in_call_count;
-    foreach my $key (sort asc_num (keys(%{$in}))) {
-       if ($in->{$key}->{self_handle_idx}) {
-           # If this self_handle call has a child ;p
-           my $space = "  ";
-           if (exists $in->{$key}->{parent}) {
-               $space .= "       ";
-           } else {
-               dump_call($mapi_call, $key, 0, 0);
-           }
-           # Check if the call with self_handle_idx has children
-           # The dump will fail if we have Release call.
-           # In order to avoid this problem we use out instead
-           
-           if ($in->{$key}->{children}) {
-               foreach my $call_idx (sort asc_num @{$in->{$key}->{children}}) {
-                   dump_call($mapi_call, $key, $call_idx, $space);
-               }
-           }
-       }
-       else {
-           if (exists $in->{$key}->{parent} && hex($in->{$key}->{parent}) < hex($key)) {
-           } else {
-               printf "\t[0x%.2x] [%s] (opnum = %s) %25s (handle_idx = %s)\n", 
-               hex($key),
-               (exists $out->{$key}->{retval}) ? $out->{$key}->{retval}: '', 
-               $in->{$key}->{opnum}, $in->{$key}->{opname}, $in->{$key}->{handle_idx};     
-           }
-       }
-    }
-    print "\n";
-    return 0;
-}
-
-1;
diff --git a/branches/plugfest/utils/mapitrace/lib/MAPI/EcDoRpc.pm b/branches/plugfest/utils/mapitrace/lib/MAPI/EcDoRpc.pm
deleted file mode 100644 (file)
index c3f3226..0000000
+++ /dev/null
@@ -1,797 +0,0 @@
-#############################################
-# EcDoRpc package for mapitrace tool
-# Copyright Julien Kerihuel 2007
-# <j.kerihuel@openchange.org>
-#
-# released under the GNU GPL v3 or later
-#
-package MAPI::EcDoRpc;
-
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-use vars qw($AUTOLOAD $VERSION);
-$VERSION = '0.03';
-
-use strict;
-use File::Basename;
-use MAPI::Dump_EcDoRpc;
-use MAPI::Graph;
-use MAPI::Regression;
-use MAPI::Statistic;
-
-use Data::Dumper;
-
-#######################################################
-# CONVENIENT SORT FUNCTIONS
-#######################################################
-sub pkt_number 
-{
-    my ($aa) = $a =~ /(\d+)/;
-    my($bb) = $b =~ /(\d+)/;
-    ($aa) <=> ($bb);
-}
-
-sub asc_num {
-   hex($a) <=> hex($b);
-}
-
-sub sort_packets
-{
-    my $garbage = 0;
-
-    my @file1 = split(/\_/, get_filename($garbage, $a));
-    my @file2 = split(/\_/, get_filename($garbage, $b));
-
-    hex($file1[0]) <=> hex($file2[0]);
-}
-
-#######################################################
-# CONVENIENT GET FUNCTIONS
-#######################################################
-
-#
-# Dump the filename from a pathname
-#
-sub get_filename
-{
-    my $_self = shift;
-    my $pathname = shift;
-
-    my @parts = split(/\//, $pathname);
-    return $parts[$#parts];
-}
-
-
-
-#######################################################
-# INIT PART
-#######################################################
-
-#
-# index packets by ascending numeric order
-# brace packets {in,out}
-# ndrdump files in the output field
-#
-
-sub new
-{
-    my $_self = shift;
-    my $path = shift;
-    my $outputdir = shift;
-    my $verbose = shift;
-    my $counter = -1;
-
-    my $self = {};
-    $self->{CONF} = {};
-    $self->{CONF}->{stdout} = 1;
-    $self->{CONF}->{outputdir} = $outputdir;
-    $self->{CONF}->{path} = $path;
-    $self->{CONF}->{verbose} = $verbose;
-    $self->{CONF}->{name} = $_self->get_filename($path);
-
-    $self->{ECDORPC} = {};
-    $self->{ECDORPC}->{braces_count} = 0;
-    $self->{ECDORPC}->{braces} = {};
-    
-    $self->{ECDORPC_ERROR} = {};
-    $self->{ECDORPC_ERROR}->{in} = {};
-    $self->{ECDORPC_ERROR}->{out} = {};
-
-    ############# Should disappear ################
-    $self->{BRACES_ERROR} = {};
-    $self->{SKIPPED_FILES} = {};
-
-    $self->{SKIPPED_FILES}->{REQ} = {};
-    $self->{SKIPPED_FILES}->{REQ}->{count} = 0;
-    $self->{SKIPPED_FILES}->{REQ}->{files} = {};
-
-    $self->{SKIPPED_FILES}->{REPL} = {};
-    $self->{SKIPPED_FILES}->{REPL}->{count} = 0;
-    $self->{SKIPPED_FILES}->{REPL}->{files} = {};
-    ############# /Should disappear ################
-
-    my @files =  <$path/*_Mapi_EcDoRpc>;
-    my @ndrdump_files = sort sort_packets @files;
-
-    $self->{STATISTIC} = MAPI::Statistic->new($_self->get_filename($path), @ndrdump_files);
-
-    my $in_filename = 0;
-    my $out_filename = 0;
-    foreach(@ndrdump_files) {
-       chomp($_);
-       if ($_ =~ /in/) {
-           if ($in_filename) {
-               print "[1] Skipping $in_filename\n" if $self->{CONF}->{verbose};
-               $in_filename = $_;
-               add_skipped_file($self, $in_filename, "REQ");
-           } else {
-               $in_filename = $_ if (!$in_filename);
-           }
-       }
-       if ($_ =~ /out/) {
-           if (!$in_filename) {
-               print "[2] Skipping $_\n" if $self->{CONF}->{verbose};
-               add_skipped_file($self, $_, "REPL");
-           } else {
-               $out_filename = $_;
-               $counter++;
-               add_brace($self, $counter, $in_filename, $out_filename);
-               $out_filename = $in_filename = 0;
-           }
-       }
-       $self->{ECDORPC}->{braces_count} = $counter;
-    }
-
-    bless($self);
-
-    return $self;
-}
-
-#######################################################
-# ERROR RELATED FUNCTIONS
-#######################################################
-sub add_bad_packet
-{
-    my $self = shift;
-    my $inout = shift;
-    my $filename = shift;
-    my $output = shift;
-
-    $self->{STATISTIC}->failure_request_counter() if ($inout eq "in");
-    $self->{STATISTIC}->failure_response_counter() if ($inout eq "out");
-
-    $self->{ECDORPC_ERROR}->{$inout}->{$filename} = {};
-    my $packet = $self->{ECDORPC_ERROR}->{$inout}->{$filename};
-
-    $packet->{output} = $output;
-}
-
-sub error_report
-{
-    my $self = shift;
-    my $inout = shift;
-
-    if ($inout ne "in" && $inout ne "out") {
-       print "[mapitrace]: Wrong parameter, must be in or out\n";
-       return -1;
-    }
-
-    
-    print "\n[$inout" . "put error_report]:\n\n";
-    foreach my $key (sort sort_packets keys (%{$self->{ECDORPC_ERROR}->{$inout}})) {
-       print $key . "\n";
-    }
-}
-
-#######################################################
-# NDRDUMP + BRACES + STORAGE OPERATIONS
-#######################################################
-
-#
-# Initialize and add a brace to the hash
-#
-sub add_brace
-{
-    my $self = shift;
-    my $idx = shift;
-    my $in_filename = shift;
-    my $out_filename = shift;
-
-    $self->{ECDORPC}->{braces}->{$idx} = {};
-    $self->{ECDORPC}->{braces}->{$idx}->{in} = {};
-    $self->{ECDORPC}->{braces}->{$idx}->{out} = {};
-    
-    $self->{ECDORPC}->{braces}->{$idx}->{in}->{filename} = $in_filename;
-    $self->{ECDORPC}->{braces}->{$idx}->{in}->{output} = '';
-    
-    $self->{ECDORPC}->{braces}->{$idx}->{out}->{filename} = $out_filename;
-    $self->{ECDORPC}->{braces}->{$idx}->{out}->{output} = '';
-
-    $self->{STATISTIC}->increment_brace_counter();
-}
-
-#
-# Store the error brace in the BRACES_ERROR hash and
-# Delete the brace from the ECDORPC hash
-#
-sub delete_brace
-{
-    my $self = shift;
-    my $idx = shift;
-
-    $self->{BRACES_ERROR}->{$idx} = {};
-    $self->{BRACES_ERROR}->{$idx} = $self->{ECDORPC}->{braces}->{$idx};
-
-    $self->{ECDORPC}->{braces_count}--;
-    delete($self->{ECDORPC}->{braces}->{$idx});
-
-    $self->{STATISTIC}->increment_brace_error_counter();
-}
-
-#
-# ndrdump a brace and check in the output
-# if we have an error (segfault)
-#
-sub ndrdump_brace
-{
-    my $self = shift;
-    my $idx = shift;
-    my $inout = shift;
-
-    my $filename = $self->{ECDORPC}->{braces}->{$idx}->{$inout}->{filename};
-    my $output = `ndrdump -l libmapi.so exchange_emsmdb 0x2 $inout $filename`;
-
-    $self->{ECDORPC}->{braces}->{$idx}->{$inout}->{output} = $output;    
-    if ($output =~ /INTERNAL ERROR:/) {
-       $self->add_bad_packet($inout, $filename, $output);
-       $self->{ECDORPC}->{braces}->{$idx}->{error} = $inout;
-       return $idx;
-    }
-
-    $self->{STATISTIC}->success_request_counter() if ($inout eq "in");
-    $self->{STATISTIC}->success_response_counter() if ($inout eq "out");
-
-    return 0;
-}
-
-#
-# ndrdump the files in the list and clean the hash
-# if incorrect braces are found
-#
-sub ndrdump
-{
-    my $self = shift;
-    my @invalid_braces = ();
-    my $idx;
-
-    foreach my $key (sort asc_num (keys(%{$self->{ECDORPC}->{braces}}))) {
-       push(@invalid_braces, $idx) if ($idx = ndrdump_brace($self, $key, "in"));
-       push(@invalid_braces, $idx) if ($idx = ndrdump_brace($self, $key, "out"));
-    }
-
-#    $self->{STATISTIC}->{}
-
-    foreach(@invalid_braces) {
-       delete_brace($self, $_);
-    } 
-
-#    MAPI::Dump_EcDoRpc->dump_error_brace($self);
-}
-
-############################################################
-# ANALYZE PART
-############################################################
-
-#
-# Retrieve the handles array (in,out) from a given packet
-#
-sub get_pkt_handles
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $inout = shift;
-    my $output = shift;
-    my @lines = split(/\n/, $output);
-    my $count_marker = 0;
-
-    foreach(@lines) {
-       if ($count_marker) {
-           $_ =~ /: (\w+) \(/i;
-           push(@{$mapi_call->{handles_in}},  $1) if ($inout eq "REQ");
-           push(@{$mapi_call->{handles_out}}, $1) if ($inout eq "REPL");
-           $count_marker--;
-       }
-       
-       if (!$count_marker && $_ =~ /\(handles\)/) {
-           $_ =~/number=(\d+)/i;
-           $count_marker = $1;
-       }
-    }
-}
-
-#
-# Reset mapi_call markers
-#
-sub mapi_call_reset_markers
-{
-    my $mapi_call = shift;
-
-    $mapi_call->{marker}->{opnum} = 0;
-    $mapi_call->{marker}->{opname} = 0;
-    $mapi_call->{marker}->{handle_idx} = 0;
-    $mapi_call->{marker}->{sub_handles} = 0;
-    $mapi_call->{marker}->{store} = 0;
-}
-
-#
-# Initialize the mapi call parsing structure
-#
-
-sub init_mapi_call
-{
-    my $mapi_call = {};
-
-    # Initialize markers
-    $mapi_call->{marker} = {};
-    mapi_call_reset_markers($mapi_call);
-    $mapi_call->{marker}->{call_idx} = -1;
-
-    # Initialize the call serialization hash
-    $mapi_call->{calls} = {};
-
-    # Initialize handles
-    $mapi_call->{handles_in} = ();
-    $mapi_call->{handles_out} = ();
-
-    bless($mapi_call);
-    return ($mapi_call);
-}
-
-#
-# Get the start of a mapi call
-#
-
-sub get_mapi_call_start
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($line =~ /EcDoRpc_MAPI_$inout$/) {
-       mapi_call_reset_markers($mapi_call);
-       $mapi_call->{marker}->{opnum} = 1;
-       $mapi_call->{marker}->{call_idx}++;
-    }
-}
-
-#
-# Get mapi call opnum
-#
-sub get_mapi_call_opnum
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($mapi_call->{marker}->{opnum} && $line =~ /opnum\s+:/) {
-       $line =~ /(0x\w{2})/i;
-       
-       my $idx = $mapi_call->{marker}->{call_idx};
-       $mapi_call->{calls}->{$inout}->{$idx}->{opnum} = $1;
-
-       $mapi_call->{marker}->{opnum} = 0;
-       $mapi_call->{marker}->{handle_idx} = 1;
-       $mapi_call->{marker}->{retval} = 1;
-    }
-}
-
-#
-# Get mapi call opname
-#
-sub get_mapi_call_opname
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($mapi_call->{marker}->{opname} && $line =~ /mapi_\w+: struct/) {
-       $line =~ /mapi_(\w+):/i;
-
-       my $idx = $mapi_call->{marker}->{call_idx};
-       $mapi_call->{calls}->{$inout}->{$idx}->{opname} = $1;
-
-       $mapi_call->{marker}->{opname} = 0;
-       $mapi_call->{marker}->{sub_handles} = 1;
-    }
-}
-
-#
-# Get mapi call error code
-#
-sub get_mapi_call_retval
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($mapi_call->{marker}->{retval} && $line =~ /error_code/) {
-       $line =~ /error_code\s+:\s+(\w+)/i;
-       my $idx = $mapi_call->{marker}->{call_idx};
-       $mapi_call->{calls}->{$inout}->{$idx}->{retval} = $1;
-       $mapi_call->{marker}->{retval} = 0;
-    }
-}
-
-#
-# Get mapi call handle idx
-#
-sub get_mapi_call_handle_idx
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($mapi_call->{marker}->{handle_idx} && $line =~ /handle_idx\s+:/) {
-       $line =~ /(0x\w{2})/i;
-       
-       my $idx = $mapi_call->{marker}->{call_idx};
-       $mapi_call->{calls}->{$inout}->{$idx}->{handle_idx} = $1;
-
-       $mapi_call->{marker}->{handle_idx} = 0;
-       $mapi_call->{marker}->{opname} = 1;
-    }
-}
-
-#
-# Get sub handles idx within mapi_call specific dump
-#
-sub get_mapi_call_sub_handle_idx
-{
-    my $mapi_call = shift;
-    my $line = shift;
-    my $inout = shift;
-
-    if ($mapi_call->{marker}->{sub_handles} && $line =~ /handle_idx/) {
-       $line =~ /(0x\w{2})/i;
-       
-       my $idx = $mapi_call->{marker}->{call_idx};
-       $mapi_call->{calls}->{$inout}->{$idx}->{self_handle_idx} = $1;
-    }
-}
-
-#
-# Retrieve MAPI calls for a given packet:
-# - opnum
-# - handle_idx
-# - opname
-# - sub handles
-#
-sub get_mapi_calls
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $inout = shift;
-
-    # Reset the mapi call counter
-    $mapi_call->{marker}->{call_idx} = -1;
-
-    my @lines = split(/\n/, $self->{output});
-    foreach my $line (@lines) {
-       chomp($line);
-
-       get_mapi_call_start($mapi_call, $line, $inout);
-       get_mapi_call_opnum($mapi_call, $line, $inout);
-       get_mapi_call_handle_idx($mapi_call, $line, $inout);
-       get_mapi_call_retval($mapi_call, $line, $inout);
-       get_mapi_call_opname($mapi_call, $line, $inout);
-       get_mapi_call_sub_handle_idx($mapi_call, $line, $inout);
-    }    
-
-    # We do not need anymore the markers
-    delete($mapi_call->{marker});
-}
-
-#
-# When checking mapi calls number consistency between in and out,
-# we have to remove Release calls count from request cause Release
-# doesn't produce any call in out (until now).
-#
-sub get_mapi_calls_request_count
-{
-    my $_self = shift;
-    my $in = shift;
-
-    my $counter = keys(%{$in});
-
-    foreach my $key (keys(%{$in})) {
-       if (hex($in->{$key}->{opnum}) == 0x1) {
-           $counter--;
-       }
-    }
-    return $counter;
-}
-
-#
-# Get the call index for a given call in the response
-# This hack fixes the Release issue
-# Note: MAPI serialize calls in such way we can predict 
-# the response call index with reasonable confidence
-#
-sub get_call_index
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $call_idx = shift;
-
-    my $in = $mapi_call->{calls}->{REQ};
-    
-    return $call_idx if (keys(%{$in}) == $self->get_mapi_calls_request_count($in));
-
-    # If count mismatches case
-
-    return $call_idx if ($call_idx == 0);
-
-    for (my $idx = 0; $idx <= $call_idx; $idx++) {
-       $call_idx-- if (hex($in->{$idx}->{opnum}) == 0x1);
-    }
-    return $call_idx;
-}
-
-#
-# Analyze EcDoRpc braces output and extract the information
-# we need to create the object hierarchy
-#
-
-sub analyze
-{
-    my $self = shift;
-    my $trace_opt = shift;
-
-    foreach my $key (sort asc_num (keys(%{$self->{ECDORPC}->{braces}}))) {
-       my $in = $self->{ECDORPC}->{braces}->{$key}->{in};
-       my $out = $self->{ECDORPC}->{braces}->{$key}->{out};
-
-       MAPI::Dump_EcDoRpc->dump_brace_start($in, $out) if ($trace_opt);
-
-       $self->{ECDORPC}->{braces}->{$key}->{mapi_calls} = init_mapi_call();
-       my $mapi_call = $self->{ECDORPC}->{braces}->{$key}->{mapi_calls};
-
-       get_mapi_calls($in,  $mapi_call, "REQ");
-       get_mapi_calls($out, $mapi_call, "REPL");
-
-       # Add the request/response handle array in the element hash
-       $self->get_pkt_handles($mapi_call, "REQ", $in->{output});
-       $self->get_pkt_handles($mapi_call, "REPL", $out->{output});
-
-       $self->get_mapi_call_hierarchy($in, $out, $mapi_call, $key);
-       if ($trace_opt) {
-           if (MAPI::Dump_EcDoRpc->dump_mapi_calls($mapi_call)) {
-               $self->delete_brace($key);
-           } else {
-               MAPI::Dump_EcDoRpc->dump_brace_handles($mapi_call);
-               MAPI::Dump_EcDoRpc->dump_brace_end();
-             }
-       }
-    }
-}
-
-############################################################
-# ANALYZE PART FOR HANDLES
-############################################################
-
-#
-# Get mapi_call hierarchy within a serialized request
-# 
-# Explanations:
-# * If the call has a handle_idx set to 0xffffffff but this handle_idx is
-#   already referenced by a previous call in its self_handle_idx field, then
-#   the call is a child of the one with the set_handle_idx
-#
-# * In MAPI Semantic, a self handle is unique and can't be set twice
-#
-sub get_mapi_call_hierarchy
-{
-    my $self = shift;
-    my $request = shift;
-    my $response = shift;
-    my $mapi_call = shift;
-    my $key = shift;
-
-    ## WARNING: This is the nasty hack that should be removed 
-    if (!defined $mapi_call->{handles_in} || !defined $mapi_call->{handles_out}) {
-       $self->delete_brace($key);
-       return ;
-    }
-    
-    my @handles_in = @{$mapi_call->{handles_in}};
-    my @handles_out = @{$mapi_call->{handles_out}};
-
-    my $self_handles = {};
-    my $in = $mapi_call->{calls}->{REQ};
-
-     # If we don't have multi calls, no need to go further
-    return if (keys(%{$in}) == 1);
-
-    # Retrieve calls with self_handle
-    foreach my $key (sort pkt_number keys(%{$in})) {
-       if ($in->{$key}->{self_handle_idx}) {
-           my $self_handle_idx = $in->{$key}->{self_handle_idx};
-           $self_handles->{$self_handle_idx} = $key;
-           $in->{$key}->{children} = ();
-       }
-    }
-
-    # If we don't have any self handles, no need to go further
-    return if (keys(%{$in}) == 0);
-
-    # We now retrieve calls again
-    # check for handle_idx referring handles value 0xffffffff
-    # and check if their handle idx is already indexed in %self_handles
-    # which means it is a child of this call
-    foreach my $key (sort pkt_number keys(%{$in})) {
-       if ($handles_in[hex($in->{$key}->{handle_idx})] &&
-           $handles_in[hex($in->{$key}->{handle_idx})] eq "0xffffffff") {
-           my $call_handle_idx = $in->{$key}->{handle_idx};
-           if (exists $self_handles->{$call_handle_idx}) {
-               my $parent_call_idx = $self_handles->{$call_handle_idx};
-               $in->{$key}->{parent} = $self_handles->{$call_handle_idx};
-               push(@{$in->{$parent_call_idx}->{children}}, $key);
-           }
-       }
-    }
-}
-
-############################################################
-# WRAPPER FUNCTIONS ON THE GRAPHVIZ MODULE
-############################################################
-
-#
-# process the call hierarchy and prepare the nodes for graph output
-#
-sub graph_calls
-{
-    my $self = shift;
-    my $g = shift;
-    my $brace_key = shift;
-
-    my $brace = $self->{ECDORPC}->{braces}->{$brace_key};
-    my $mapi_call = $brace->{mapi_calls};
-
-    return if (!exists $mapi_call->{handles_out});
-
-    # Get the request and response handles
-    my @handles_out = @{$mapi_call->{handles_out}};
-
-    # Get the request mapi_call serialization hash
-    my $in = $mapi_call->{calls}->{REQ};
-
-    # Check if we are in a serialized call
-    #    if (@handles_out == 1) {
-    #  $g->add_node($mapi_call, 0);
-    #  return ;
-    #    }
-
-    # Process the serialized
-    # We first check for self_handle packets only
-    # Next we process self_handle packets with children
-    # Finally we check normal calls
-    foreach my $key (sort asc_num (keys(%{$in}))) {
-       if ($in->{$key}->{self_handle_idx}) {
-           $g->add_node($mapi_call, $key);
-           if (exists $in->{$key}->{children}) {
-               foreach my $call_idx (@{$in->{$key}->{children}}) {
-                   $g->add_node($mapi_call, $call_idx);
-               }
-           }
-       } else {
-           $g->add_node($mapi_call, $key);
-       }
-    }
-}
-
-sub graph
-{
-    my $self = shift;
-    my $dir = shift;
-    my $highlight = shift;
-    my $png  = $dir . "/" . $self->get_filename($self->{CONF}->{path}) . ".png";
-
-    # mkdir output directory if it doesn't exist
-    mkdir $dir;
-
-#    my $g = MAPI::Graph_EcDoRpc->new($png);
-    my $g = MAPI::Graph->new($png, $highlight);
-
-    # Dump the hierarchy
-    $self->graph_calls($g, $_) foreach (sort asc_num 
-                                       (keys(%{$self->{ECDORPC}->{braces}})));
-
-    $g->render();
-}
-
-############################################################
-# WRAPPER FUNCTIONS ON THE STATS MODULE
-############################################################
-
-#
-# Add skipped files
-#
-sub add_skipped_file
-{
-    my $self = shift;
-    my $filename = shift;
-    my $inout = shift;
-
-    my $count = $self->{SKIPPED_FILES}->{$inout}->{count};
-    my $files = $self->{SKIPPED_FILES}->{$inout}->{files};
-
-    # Initiate and add the new entry
-    $files->{$count} = {};
-    $files->{$count}->{filename} = $filename;
-
-    # Increment the counter
-    $self->{SKIPPED_FILES}->{$inout}->{count}++;
-}
-
-#
-#
-#
-sub stats
-{
-    my $self = shift;
-
-    $self->{STATISTIC}->scenario();
-
-#    print Dumper($self->{SKIPPED_FILES});
-}
-
-############################################################
-# SEARCH FUNCTIONS PART
-############################################################
-
-#
-# Trace a call through the scenario
-#
-sub search_call
-{
-    my $self = shift;
-    my $callname = shift;
-    my $dump_opt = shift;
-    my $inout = shift;
-
-    my $search = {};
-    my $count = 0;
-    my @results = ();
-
-    my $find_marker = 0;
-
-    # We loop through mapi calls REQ calls and search for the given call
-    foreach my $brace_key (sort pkt_number keys(%{$self->{ECDORPC}->{braces}})) {
-       my $brace = $self->{ECDORPC}->{braces}->{$brace_key};
-
-       foreach my $call_key (sort pkt_number keys(%{$brace->{mapi_calls}->{calls}->{REQ}})) {
-           my $call = $brace->{mapi_calls}->{calls}->{REQ}->{$call_key};
-
-           if ($call->{opname} && $call->{opname} eq $callname) {
-               $find_marker = 1;
-               $search->{$count}->{brace_key} = $brace_key;
-               $count++;
-               print $brace->{$inout}->{output} if ($dump_opt && $inout);
-               push(@results, $call->{opname} . ": " . $self->get_filename($brace->{in}->{filename}) . " / " . $self->get_filename($brace->{out}->{filename}) . "\n");
-           }
-       }
-    }
-
-    if ($#results >= 0) {
-       print "[X] Call found in [ " . $self->{CONF}->{name} . " ]:\n";
-       print "\t$_" foreach (@results);
-    } else {
-       print "[O] No call found in [ " . $self->{CONF}->{name} . " ]\n";
-    }
-    # We are now looking for the call in problematic packets
-    
-}
-
-1;
diff --git a/branches/plugfest/utils/mapitrace/lib/MAPI/Graph.pm b/branches/plugfest/utils/mapitrace/lib/MAPI/Graph.pm
deleted file mode 100644 (file)
index 9d14d92..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-##################################################
-# EcDoRpc GraphViz Dump package for mapitrace tool
-# Copyright Julien Kerihuel 2007
-# <j.kerihuel@openchange.org>
-#
-# released under the GNU GPL
-#
-
-package MAPI::Graph;
-
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-use vars qw($AUTOLOAD $VERSION);
-$VERSION = '0.01';
-
-use strict;
-use GraphViz;
-use Data::Dumper;
-
-#
-# Init the MAPI::Graph object
-#
-sub new
-{
-    my $_self = shift;
-    my $output_file = shift;
-    my $highlight = shift;
-
-    my $self = {};
-
-    $self->{graph} = GraphViz->new(node => {shape => 'box'});
-    $self->{nodelist} = {};
-    $self->{output_file} = $output_file;
-    $self->{highlight} = $highlight;
-
-    bless($self);
-    return $self;
-}
-
-#
-# Render the graph
-#
-sub render
-{
-    my $self = shift;
-
-    print "Dumping graph in ." . $self->{output_file} . "\n";
-    $self->{graph}->as_png($self->{output_file});
-}
-
-#
-# Init a new node in the general nodelist hash
-# A node is a set of queue each of them composed of children
-#
-sub node_init
-{
-    my $self = shift;
-    my $node_id = shift;
-
-    my $nodelist = $self->{nodelist};
-
-    print "[node_init]: Adding node: $node_id\n";
-    $nodelist->{$node_id} = {};
-    $nodelist->{$node_id}->{children} = {};
-    $nodelist->{$node_id}->{count} = 1;
-    @{$nodelist->{$node_id}->{children}->{1}} = ();
-}
-
-#
-# If a release occur on a node we need to increment
-# the depth so we can start a new hierarchy
-#
-sub add_depth
-{
-    my $self = shift;
-    my $node_id = shift;
-
-    my $node = $self->{nodelist}->{$node_id};
-
-    $node->{count} += 1;
-    my $count =  $node->{count};
-
-    $node->{children}->{$count} = ();
-    
-}
-
-#
-# Get the last child id for the given node_id
-#
-sub get_last_nodelist_child
-{
-    my $self = shift;
-    my $node_id = shift;
-
-    my $node = $self->{nodelist}->{$node_id};
-
-    return 0 if (!$node);
-
-    my $count = $node->{count};
-    my $child_id = @{$node->{children}->{$count}};
-
-    # If the node doesn't have children return the parent one
-    return $node_id if (!$child_id);
-
-    # Otherwise return the last child
-    my @hierarchy = @{$node->{children}->{$count}};
-    $child_id -= 1;
-    my $last_child = $hierarchy[$child_id];
-    return $last_child;
-}
-
-#
-# add a child to an existing node in the nodelist hash
-#
-sub nodelist_add_child
-{
-    my $self = shift;
-    my $node_id = shift;
-
-    # get the node in the hash
-    my $node = $self->{nodelist}->{$node_id};
-    # get the number of hierarchy array
-    my $count = $node->{count};
-    # get the number of children for the given hierarchy
-    my $child_count = @{$node->{children}->{$count}};
-    # we increment the child counter
-    $child_count += 1;
-    my $child_name = "$node_id:$count:$child_count";
-
-    print "Adding node: $child_name\n";
-    push(@{$node->{children}->{$count}}, $child_name);
-
-    return $child_name;
-}
-
-#
-# add a node in the general nodelist hash
-# it can be a node or the child of an existing node
-#
-sub nodelist_add
-{
-    my $self = shift;
-    my $node_id = shift;
-
-    my $nodelist = $self->{nodelist};
-
-    # Add the node directly if not referenced in the nodelist hash
-    if (!exists $nodelist->{$node_id}) {
-       $self->node_init($node_id);
-       return $node_id;
-    }
-
-    # If the node already exists, add a child for the correct one
-    my $last_child = $self->nodelist_add_child($node_id);
-    return $last_child;
-}
-
-#
-# Add edge between two nodes
-#
-sub add_edge
-{
-    my $self = shift;
-    my $parent_handle = shift;
-    my $self_handle = shift;
-
-    my $g = $self->{graph};
-
-    # If self_handle exists add an edge between 
-    # the last parent's child and the self_handle
-    my $last_child = $self->get_last_nodelist_child($parent_handle);
-
-    if ($self_handle) {
-       print "[add_edge] $last_child -> $self_handle\n";
-       $g->add_edge($last_child, $self_handle);
-    } else {
-       # if this is a root element we shouldn't add edge
-       if ($parent_handle ne $last_child) {
-           print "[add_edge] $parent_handle -> $last_child\n";
-           $g->add_edge($parent_handle, $last_child);
-       } else {
-           print "[add_edge]: no edge for $parent_handle\n";
-       }
-    }
-}
-
-#
-# Add a node to the graph
-#
-
-sub add_node
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $key = shift;
-
-    my $g = $self->{graph};
-
-    my $parent_handle = $self->get_parent_handle($mapi_call, $key);
-    my $self_handle = $self->get_self_handle($mapi_call, $key);
-
-    # If we do not have a self handle
-    if (!$self_handle) {
-       my $last_child = $self->get_last_nodelist_child($parent_handle);
-       my $node_id = $self->nodelist_add($parent_handle);
-       my $label = $self->get_node_label($mapi_call, $key);
-       
-       if ($self->{highlight} && !$self->node_highlight($label)) {
-           print "############ HERE ##############\n";
-           $g->add_node($node_id, label => $label,
-                        style => "filled",
-                        color => "green");         
-       } else {
-           $g->add_node($node_id, label => $label);
-       }
-
-       # If there is already a child, link against it
-       if ($last_child && $last_child ne $parent_handle) {
-           $g->add_edge($last_child => $node_id);
-           
-       } else {
-           # Otherwise, just link it to the parent node
-           $self->add_edge($parent_handle);
-       }
-
-    }
-
-    # If we do have a self handle
-    if ($self_handle) {
-       my $node_id = $self->nodelist_add($self_handle);
-       my $label = $self->get_node_label($mapi_call, $key);
-
-       if ($self->{highlight} && !$self->node_highlight($label)) {
-           print "############ HERE ##############\n";
-           $g->add_node($node_id, label => $label,
-                        style => "filled",
-                        color => "green");         
-       } else {
-           $g->add_node($node_id, label => $label);
-       }
-       $self->add_edge($parent_handle, $node_id);
-    }
-}
-
-sub get_node_label
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $key = shift;
-
-    my $in = $mapi_call->{calls}->{REQ}->{$key};
-    my $label = '';
-
-    $label = sprintf "%s (%s)", $in->{opname}, $in->{opnum};
-
-    return $label;
-}
-
-sub node_highlight
-{
-    my $self = shift;
-    my $label = shift;
-
-    return -1 if !$self->{highlight};
-
-    my $label2 = substr($label, 0, length($self->{highlight}));
-
-    if ($self->{highlight} eq $label2) {
-       print "WE CAN HIGHLIGHT THE CALL\n";
-       return 0;
-    }
-    return -1;
-}
-
-#########################################
-# HANDLE CONVENIENT FUNCTIONS
-#########################################
-
-#
-# get the parent handle (handle_idx field)
-#
-sub get_parent_handle
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $key = shift;
-
-    my $in = $mapi_call->{calls}->{REQ}->{$key};
-    my @handles = @{$mapi_call->{handles_out}};
-
-    my $parent_handle = $in->{handle_idx};
-    return $handles[hex($parent_handle)];
-}
-
-#
-# get the self handle (self_handle_idx field)
-#
-sub get_self_handle
-{
-    my $self = shift;
-    my $mapi_call = shift;
-    my $key = shift;
-
-    my $in = $mapi_call->{calls}->{REQ}->{$key};
-    my @handles = @{$mapi_call->{handles_out}};
-
-    return 0 if (!exists $in->{self_handle_idx});
-
-    my $self_handle = $in->{self_handle_idx};
-
-    return $handles[hex($self_handle)];
-}
diff --git a/branches/plugfest/utils/mapitrace/lib/MAPI/Regression.pm b/branches/plugfest/utils/mapitrace/lib/MAPI/Regression.pm
deleted file mode 100644 (file)
index 8746387..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#############################################
-# EcDoRpc package for mapitrace tool
-# Copyright Julien Kerihuel 2007
-# <j.kerihuel@openchange.org>
-#
-# released under the GNU GPL v3 or later
-#
-package MAPI::Regression;
-
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-use vars qw($AUTOLOAD $VERSION);
-$VERSION = '0.01';
-
-use strict;
-
-1;
diff --git a/branches/plugfest/utils/mapitrace/lib/MAPI/Statistic.pm b/branches/plugfest/utils/mapitrace/lib/MAPI/Statistic.pm
deleted file mode 100644 (file)
index aebd791..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-##############################################
-# EcDoRpc Statistic package for mapitrace tool
-# Copyright Julien Kerihuel 2007
-# <j.kerihuel@openchange.org>
-#
-# released under the GNU GPL v3 or later
-#
-package MAPI::Statistic;
-
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-use vars qw($AUTOLOAD $VERSION);
-$VERSION = '0.01';
-
-use strict;
-use Data::Dumper;
-
-#######################################################
-# INIT PART
-#######################################################
-
-#
-# Initiate the statistic object
-#
-sub new
-{
-    my $_self = shift;
-    my ($scenario) = shift;
-    my (@files) = @_;
-
-    my $self = {};
-
-    $self->{SCENARIO} = {};
-    $self->{SCENARIO}->{name} = $scenario;
-    $self->{SCENARIO}->{total} = $#files + 1;
-
-    $self->{SCENARIO}->{BRACES}->{total} = 0;
-    $self->{SCENARIO}->{BRACES}->{failure} = 0;
-
-    $self->{SCENARIO}->{REQUEST}->{total} = 0;
-    $self->{SCENARIO}->{REQUEST}->{success} = 0;
-    $self->{SCENARIO}->{REQUEST}->{failure} = 0;
-
-    $self->{SCENARIO}->{RESPONSE}->{total} = 0;
-    $self->{SCENARIO}->{RESPONSE}->{success} = 0;
-    $self->{SCENARIO}->{RESPONSE}->{failure} = 0;
-
-    count_total_packets_type($self, @files);
-
-    $self->{SCENARIO}->{CALLS} = {};
-
-    bless($self);
-
-    return $self;
-}
-
-#######################################################
-# COUNT FUNCTION PART
-#######################################################
-
-#
-# Count the full number of requests and replies
-#
-sub count_total_packets_type
-{
-    my $self = shift;
-    my (@files) = @_;
-
-    foreach (@files) {
-       $self->{SCENARIO}->{REQUEST}->{total}++ if ($_ =~ /in/);
-       $self->{SCENARIO}->{RESPONSE}->{total}++ if ($_ =~ /out/);
-    }
-}
-
-#
-#
-#
-sub increment_brace_counter
-{
-    my $self = shift;
-
-    $self->{SCENARIO}->{BRACES}->{total}++;
-}
-
-sub increment_brace_error_counter
-{
-    my $self = shift;
-
-    $self->{SCENARIO}->{BRACES}->{failure}++;
-}
-
-#
-# 
-#
-sub count_packet_inc
-{
-    my $self = shift;
-    my $inout = shift;
-    my $state = shift;
-
-    return -1 if (!$state || !$inout);
-    $self->{SCENARIO}->{REQUEST}->{$state}++ if ($inout eq "in");
-    $self->{SCENARIO}->{RESPONSE}->{$state}++ if ($inout eq "out");
-}
-
-#
-# Accessors
-#
-sub success_request_counter
-{
-    my $self = shift;
-    $self->increment_counter("REQUEST", "success");
-}
-
-sub failure_request_counter
-{
-    my $self = shift;
-    $self->increment_counter("REQUEST", "failure");
-}
-
-sub success_response_counter
-{
-    my $self = shift;
-    $self->increment_counter("RESPONSE", "success");
-}
-
-sub failure_response_counter
-{
-    my $self = shift;
-    $self->increment_counter("RESPONSE", "failure");
-}
-
-sub increment_counter
-{
-    my $self = shift;
-    my $type = shift;
-    my $case = shift;
-
-    $self->{SCENARIO}->{$type}->{$case}++;
-}
-
-#######################################################
-# DUMP PART
-#######################################################
-
-sub percent
-{
-    my $obj = shift;
-    my $type = shift;
-
-    return ($obj->{$type}->{total} / $obj->{total}) * 100;
-}
-
-sub scenario
-{
-    my $self = shift;
-
-    my $request_percent = percent($self->{SCENARIO}, "REQUEST");
-    my $response_percent = percent($self->{SCENARIO}, "RESPONSE");
-
-    print "+-----[ Scenario: " . $self->{SCENARIO}->{name} . " ]-----+\n";
-    print "[statistic]: We have " . $self->{SCENARIO}->{total} . " packets ";
-    print "(request: " . $request_percent . "%, ";
-    print "response: " . $response_percent . "%)\n";
-
-    my $success_req_rate = ($self->{SCENARIO}->{REQUEST}->{success} / $self->{SCENARIO}->{REQUEST}->{total}) * 100;
-    my $success_repl_rate = ($self->{SCENARIO}->{RESPONSE}->{success} / $self->{SCENARIO}->{RESPONSE}->{total}) * 100;
-    print "[statistic]: request success rate: " . $success_req_rate . "\n";
-    print "[statistic]: response success rate: " . $success_repl_rate . "\n";
-
-    my $braces_count = $self->{SCENARIO}->{BRACES}->{total};
-    my $braces_failure = $self->{SCENARIO}->{BRACES}->{failure};
-    if ($braces_failure) {
-       print "[statistic]: success brace analysis rate: " . ((1 - ($braces_failure/$braces_count)) * 100) . "\n";
-       print "[statistic]: braces skipped: " . $braces_failure . "/" . $braces_count . "\n";
-    } else {
-       print "[statistic]: success brace analysis rate: 100%\n";       
-       print "[statistic]: no braces skipped\n";
-    }
-    print "+--------------------------------------------------------------+\n";
-    
-}
-
-sub dump
-{
-    my $self = shift;
-}
-
-
-1;
diff --git a/branches/plugfest/utils/mapitrace/mapitrace b/branches/plugfest/utils/mapitrace/mapitrace
deleted file mode 100755 (executable)
index fadfdd7..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/perl -w
-
-##############################################
-# package to dump the mapi call hierarchy and
-# add IDL regression support
-#
-# Copyright Julien Kerihuel 2007.
-# <j.kerihuel@openchange.org>
-#
-# released under GNU GPL v3 or later
-
-use strict;
-
-use FindBin qw($RealBin $Script);
-use lib "$RealBin";
-use lib "$RealBin/lib";
-#use lib "lib";
-use MAPI::EcDoRpc;
-use Getopt::Long;
-
-my ($opt_help) = 0;
-my ($opt_outputdir) = '.';
-my ($opt_graph) = 0;
-my ($opt_highlight) = 0;
-my ($opt_trace) = 0;
-my ($opt_search_call) = 0;
-my ($opt_dump_call) = 0;
-my ($opt_inout) = 0;
-my ($opt_error) = 0;
-my ($opt_stats) = 0;
-my ($opt_verbose) = 0;
-############################################
-# display help text
-sub ShowHelp()
-{
-    print "mapi call hierarchy tracing tool and IDL regression support
-Copyright (C) Julien Kerihuel <j.kerihuel\@openchange.org>
-
-Usage: $Script [options]
-
-Generic Options:
---help                 this help page
---outputdir=OUTDIR     put output in OUTDIR/ []
---graph                create a png graph
---trace                dump the mapi call hierarchy on command line
---verbose             verbose output
-
-Tracing Options:
---search-call=CALL     trace a single call through a scenario
---dump-call            dump all the packets containing the call specified
---highlight=CALL       highlight a call in the generated graph
---inout=INOUT         filter either requests (in) or response (out)
-
-Regression Options:
---error_report=in,out  Investigate invalid packets
---stats                Display statistics for a given scenario
-
-\n";
-    exit (0);
-}
-
-# main program
-my $result = GetOptions (
-                        'help|h|?' => \$opt_help,
-                        'outputdir=s' => \$opt_outputdir,
-                        'graph|g' => \$opt_graph,
-                        'highlight=s'=> \$opt_highlight,
-                        'trace|t' => \$opt_trace,
-                        'search-call=s' => \$opt_search_call,
-                        'dump-call|d' => \$opt_dump_call,
-                        'inout=s' => \$opt_inout,
-                        'error_report=s' => \$opt_error,
-                        'stats|s' => \$opt_stats,
-                        'verbose|v' => \$opt_verbose
-                        );
-
-if (not $result) {
-    exit (1);
-}
-
-if ($opt_help) {
-    ShowHelp();
-    exit (0);
-}
-
-sub process_tracing($)
-{
-    my $directory = shift;
-    my $outputdir = $opt_outputdir;
-    
-
-    opendir(DIR,$directory) or die "Unable to process $directory";
-    closedir(DIR);
-
-    my $EcDoRpc = MAPI::EcDoRpc->new($directory, $outputdir, $opt_verbose);
-
-    $EcDoRpc->ndrdump();
-    $EcDoRpc->analyze($opt_trace);
-
-    if ($opt_error) {
-       my @inout = split(/,/, $opt_error);
-
-       foreach (sort @inout) {
-           $EcDoRpc->error_report($_);
-       }
-    }
-    
-    $EcDoRpc->stats() if ($opt_stats);
-    $EcDoRpc->search_call($opt_search_call, $opt_dump_call, $opt_inout) if ($opt_search_call);
-    $EcDoRpc->graph($outputdir, $opt_highlight) if ($opt_graph);
-}
-
-if (scalar(@ARGV) == 0) {
-    print "$Script: no input directory\n";
-    exit (1);
-}
-
-process_tracing($_) foreach (@ARGV);
diff --git a/branches/plugfest/utils/openchange-tools.c b/branches/plugfest/utils/openchange-tools.c
deleted file mode 100644 (file)
index 423cb1d..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
-   Convenient functions for openchange tools
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "openchange-tools.h"
-
-static void popt_openchange_version_callback(poptContext con,
-                                            enum poptCallbackReason reason,
-                                            const struct poptOption *opt,
-                                            const char *arg,
-                                            const void *data)
-{
-       switch (opt->val) {
-       case 'V':
-               printf("Version %s\n", OPENCHANGE_VERSION_STRING);
-               exit (0);
-       }
-}
-
-struct poptOption popt_openchange_version[] = {
-       { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_openchange_version_callback, '\0', NULL, NULL },
-       { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version ", NULL },
-       POPT_TABLEEND
-};
-
-
-/*
- * Retrieve the property value for a given SRow and property tag.  
- *
- * If the property type is a string: fetch PT_UNICODE then PT_STRING8
- * in case the desired property is not available in first choice.
- *
- * Fetch property normally for any others properties
- */
-_PUBLIC_ void *octool_get_propval(struct SRow *aRow, uint32_t proptag)
-{
-       const char      *str;
-
-       if (((proptag & 0xFFFF) == PT_STRING8) ||
-           ((proptag & 0xFFFF) == PT_UNICODE)) {
-               proptag = (proptag & 0xFFFF0000) | PT_UNICODE;
-               str = (const char *) find_SPropValue_data(aRow, proptag);
-               if (str) return (void *)str;
-
-               proptag = (proptag & 0xFFFF0000) | PT_STRING8;
-               str = (const char *) find_SPropValue_data(aRow, proptag);
-               return (void *)str;
-       } 
-
-       return (void *)find_SPropValue_data(aRow, proptag);
-}
-
-
-/*
- * Read a stream and store it in a DATA_BLOB
- */
-_PUBLIC_ enum MAPISTATUS octool_get_stream(TALLOC_CTX *mem_ctx,
-                                        mapi_object_t *obj_stream, 
-                                        DATA_BLOB *body)
-{
-       enum MAPISTATUS retval;
-       uint16_t        read_size;
-       uint8_t         buf[0x1000];
-
-       body->length = 0;
-       body->data = talloc_zero(mem_ctx, uint8_t);
-
-       do {
-               retval = ReadStream(obj_stream, buf, 0x1000, &read_size);
-               MAPI_RETVAL_IF(retval, GetLastError(), body->data);
-               if (read_size) {
-                       body->data = talloc_realloc(mem_ctx, body->data, uint8_t,
-                                                   body->length + read_size);
-                       memcpy(&(body->data[body->length]), buf, read_size);
-                       body->length += read_size;
-               }
-       } while (read_size);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-
-/*
- * Fetch the body given PR_MSG_EDITOR_FORMAT property value
- */
-_PUBLIC_ enum MAPISTATUS octool_get_body(TALLOC_CTX *mem_ctx,
-                                      mapi_object_t *obj_message,
-                                      struct SRow *aRow,
-                                      DATA_BLOB *body)
-{
-       enum MAPISTATUS                 retval;
-       const struct SBinary_short      *bin;
-       mapi_object_t                   obj_stream;
-       char                            *data;
-       uint8_t                         format;
-
-       /* Sanity checks */
-       MAPI_RETVAL_IF(!obj_message, MAPI_E_INVALID_PARAMETER, NULL);
-
-       /* initialize body DATA_BLOB */
-       body->data = NULL;
-       body->length = 0;
-
-       retval = GetBestBody(obj_message, &format);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       switch (format) {
-       case olEditorText:
-               data = octool_get_propval(aRow, PR_BODY_UNICODE);
-               if (data) {
-                       body->data = talloc_memdup(mem_ctx, data, strlen(data));
-                       body->length = strlen(data);
-               } else {
-                       mapi_object_init(&obj_stream);
-                       retval = OpenStream(obj_message, PR_BODY_UNICODE, 0, &obj_stream);
-                       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-                       
-                       retval = octool_get_stream(mem_ctx, &obj_stream, body);
-                       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-                       
-                       mapi_object_release(&obj_stream);
-               }
-               break;
-       case olEditorHTML:
-               bin = (const struct SBinary_short *) octool_get_propval(aRow, PR_HTML);
-               if (bin) {
-                       body->data = talloc_memdup(mem_ctx, bin->lpb, bin->cb);
-                       body->length = bin->cb;
-               } else {
-                       mapi_object_init(&obj_stream);
-                       retval = OpenStream(obj_message, PR_HTML, 0, &obj_stream);
-                       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-                       retval = octool_get_stream(mem_ctx, &obj_stream, body);
-                       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-                       mapi_object_release(&obj_stream);
-               }                       
-               break;
-       case olEditorRTF:
-               mapi_object_init(&obj_stream);
-
-               retval = OpenStream(obj_message, PR_RTF_COMPRESSED, 0, &obj_stream);
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-               retval = WrapCompressedRTFStream(&obj_stream, body);
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-               mapi_object_release(&obj_stream);
-               break;
-       default:
-               DEBUG(0, ("Undefined Body\n"));
-               break;
-       }
-
-       return MAPI_E_SUCCESS;
-}
-
-
-/*
- * Optimized dump message routine (use GetProps rather than GetPropsAll)
- */
-_PUBLIC_ enum MAPISTATUS octool_message(TALLOC_CTX *mem_ctx,
-                                       mapi_object_t *obj_message)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SPropValue               *lpProps;
-       struct SRow                     aRow;
-       uint32_t                        count;
-       ssize_t                         len;
-       /* common email fields */
-       const char                      *msgid;
-       const char                      *from, *to, *cc, *bcc;
-       const char                      *subject;
-       DATA_BLOB                       body;
-       const uint8_t                   *has_attach;
-       const uint32_t                  *cp;
-       const char                      *codepage;
-
-       /* Build the array of properties we want to fetch */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x13,
-                                         PR_INTERNET_MESSAGE_ID,
-                                         PR_INTERNET_MESSAGE_ID_UNICODE,
-                                         PR_CONVERSATION_TOPIC,
-                                         PR_CONVERSATION_TOPIC_UNICODE,
-                                         PR_MSG_EDITOR_FORMAT,
-                                         PR_BODY,
-                                         PR_BODY_UNICODE,
-                                         PR_HTML,
-                                         PR_RTF_COMPRESSED,
-                                         PR_SENT_REPRESENTING_NAME,
-                                         PR_SENT_REPRESENTING_NAME_UNICODE,
-                                         PR_DISPLAY_TO,
-                                         PR_DISPLAY_TO_UNICODE,
-                                         PR_DISPLAY_CC,
-                                         PR_DISPLAY_CC_UNICODE,
-                                         PR_DISPLAY_BCC,
-                                         PR_DISPLAY_BCC_UNICODE,
-                                         PR_HASATTACH,
-                                         PR_MESSAGE_CODEPAGE);
-       lpProps = talloc_zero(mem_ctx, struct SPropValue);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       /* Build a SRow structure */
-       aRow.ulAdrEntryPad = 0;
-       aRow.cValues = count;
-       aRow.lpProps = lpProps;
-
-       msgid = (const char *) octool_get_propval(&aRow, PR_INTERNET_MESSAGE_ID);
-       subject = (const char *) octool_get_propval(&aRow, PR_CONVERSATION_TOPIC);
-
-       retval = octool_get_body(mem_ctx, obj_message, &aRow, &body);
-
-       if (retval != MAPI_E_SUCCESS) {
-               printf("Invalid Message: %s\n", msgid ? msgid : "");
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-       }
-       
-       from = (const char *) octool_get_propval(&aRow, PR_SENT_REPRESENTING_NAME);
-       to = (const char *) octool_get_propval(&aRow, PR_DISPLAY_TO_UNICODE);
-       cc = (const char *) octool_get_propval(&aRow, PR_DISPLAY_CC_UNICODE);
-       bcc = (const char *) octool_get_propval(&aRow, PR_DISPLAY_BCC_UNICODE);
-
-       has_attach = (const uint8_t *) octool_get_propval(&aRow, PR_HASATTACH);
-       cp = (const uint32_t *) octool_get_propval(&aRow, PR_MESSAGE_CODEPAGE);
-       switch (cp ? *cp : 0) {
-       case CP_USASCII:
-               codepage = "CP_USASCII";
-               break;
-       case CP_UNICODE:
-               codepage = "CP_UNICODE";
-               break;
-       case CP_JAUTODETECT:
-               codepage = "CP_JAUTODETECT";
-               break;
-       case CP_KAUTODETECT:
-               codepage = "CP_KAUTODETECT";
-               break;
-       case CP_ISO2022JPESC:
-               codepage = "CP_ISO2022JPESC";
-               break;
-       case CP_ISO2022JPSIO:
-               codepage = "CP_ISO2022JPSIO";
-               break;
-       default:
-               codepage = "";
-               break;
-       }
-
-       printf("+-------------------------------------+\n");
-       printf("message id: %s\n", msgid ? msgid : "");
-       printf("subject: %s\n", subject ? subject : "");
-       printf("From: %s\n", from ? from : "");
-       printf("To:  %s\n", to ? to : "");
-       printf("Cc:  %s\n", cc ? cc : "");
-       printf("Bcc: %s\n", bcc ? bcc : "");
-       if (has_attach) {
-               printf("Attachment: %s\n", *has_attach ? "True" : "False");
-       }
-       printf("Codepage: %s\n", codepage);
-       printf("Body:\n");
-       fflush(0);
-       if (body.length) {
-               len = write(1, body.data, body.length);
-               len = write(1, "\n", 1);
-               fflush(0);
-               talloc_free(body.data);
-       } 
-       return MAPI_E_SUCCESS;
-}
-
-
-/*
- * OpenChange MAPI programs initialization routine
- */
-_PUBLIC_ struct mapi_session *octool_init_mapi(struct mapi_context *mapi_ctx,
-                                              const char *opt_profname,
-                                              const char *opt_password,
-                                              uint32_t provider)
-{
-       enum MAPISTATUS         retval;
-       char                    *profname = NULL;
-       struct mapi_session     *session = NULL;
-       TALLOC_CTX              *mem_ctx = NULL;
-
-       mem_ctx = talloc_named(NULL, 0, "octool_init_mapi");
-       if (opt_profname) {
-               profname = talloc_strdup(mem_ctx, (char *)opt_profname);
-       } else {
-               retval = GetDefaultProfile(mapi_ctx, &profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       talloc_free(mem_ctx);
-                       return NULL;
-               }
-       }
-
-       if (!provider) {
-               retval = MapiLogonEx(mapi_ctx, &session, profname, opt_password);
-       } else {
-               retval = MapiLogonProvider(mapi_ctx, &session, profname, opt_password, provider);
-       }
-       MAPIFreeBuffer((char *)profname);
-
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", GetLastError());
-               talloc_free(mem_ctx);
-               return NULL;
-       }
-
-       talloc_free(mem_ctx);
-       return session;
-}
diff --git a/branches/plugfest/utils/openchange-tools.h b/branches/plugfest/utils/openchange-tools.h
deleted file mode 100644 (file)
index 179fb21..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-   OpenChange Tools includes
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef        __OPENCHANGETOOLS_H__
-#define        __OPENCHANGETOOLS_H__
-
-#include <popt.h>
-
-#define        DEFAULT_PROFDB  "%s/.openchange/profiles.ldb"
-#define        DEFAULT_TDB     "%s/.openchange/index.tdb"
-#define        DEFAULT_MBOX    "%s/.openchange/mbox"
-#define        DEFAULT_ICAL    "%s/.openchange/ical"
-#define        DEFAULT_VCF     "%s/.openchange/vcf"
-#define        DEFAULT_DIR     "%s/.openchange"
-
-#ifndef __BEGIN_DECLS
-#ifdef __cplusplus
-#define __BEGIN_DECLS          extern "C" {
-#define __END_DECLS            }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#endif
-
-/* Common popt structures for tool */
-extern struct poptOption popt_openchange_version[];
-
-#define        POPT_OPENCHANGE_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_openchange_version, 0, "Common openchange options:", NULL },
-
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
-__BEGIN_DECLS
-_PUBLIC_ enum MAPISTATUS octool_message(TALLOC_CTX *, mapi_object_t *);
-_PUBLIC_ void *octool_get_propval(struct SRow *, uint32_t);
-_PUBLIC_ enum MAPISTATUS octool_get_body(TALLOC_CTX *, mapi_object_t *,
-                                        struct SRow *, DATA_BLOB *);
-_PUBLIC_ enum MAPISTATUS octool_get_stream(TALLOC_CTX *mem_ctx,
-                                        mapi_object_t *obj_stream, 
-                                        DATA_BLOB *body);
-_PUBLIC_ struct mapi_session *octool_init_mapi(struct mapi_context *, const char *, const char *, uint32_t);
-__END_DECLS
-
-#endif /*!__OPENCHANGETOOLS_H__ */
diff --git a/branches/plugfest/utils/openchangeclient.c b/branches/plugfest/utils/openchangeclient.c
deleted file mode 100644 (file)
index 3c66ef0..0000000
+++ /dev/null
@@ -1,3437 +0,0 @@
-/*
-   Stand-alone MAPI application
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007-2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "libmapi/libmapi_private.h"
-#include "libocpf/ocpf.h"
-#include <samba/popt.h>
-#include <param.h>
-
-#include "openchangeclient.h"
-#include "openchange-tools.h"
-
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <time.h>
-#include <ctype.h>
-
-/**
- * init sendmail struct
- */
-
-static void init_oclient(struct oclient *oclient)
-{
-       oclient->mapi_ctx = NULL;
-
-       /* update and delete parameter */
-       oclient->update = NULL;
-       oclient->delete = NULL;
-
-       /* properties list */
-       oclient->props = NULL;
-       
-       /* email related parameter */
-       oclient->subject = NULL;
-       oclient->pr_body = NULL;
-       oclient->pr_html_inline = NULL;
-       oclient->attach = NULL;
-       oclient->attach_num = 0;
-       oclient->store_folder = NULL;
-       
-       /* appointment related parameters */
-       oclient->location = NULL;
-       oclient->dtstart = NULL;
-       oclient->dtend = NULL;
-       oclient->busystatus = -1;
-       oclient->label = -1;
-       oclient->private = false;
-       oclient->freebusy = NULL;
-       oclient->force = false;
-       oclient->summary = false;
-
-       /* contact related parameters */
-       oclient->email = NULL;
-       oclient->full_name = NULL;
-       oclient->card_name = NULL;
-
-       /* task related parameters */
-       oclient->importance = -1;
-       oclient->taskstatus = -1;
-
-       /* note related parameters */
-       oclient->color = -1;
-       oclient->width = -1;
-       oclient->height = -1;
-
-       /* pf related parameters */
-       oclient->pf = false;
-
-       /* folder related parameters */
-       oclient->folder = NULL;
-       oclient->folder_name = NULL;
-       oclient->folder_comment = NULL;
-
-       /* ocpf related parameters */
-       oclient->ocpf_files = NULL;
-       oclient->ocpf_dump = NULL;
-}
-
-static enum MAPISTATUS openchangeclient_getdir(TALLOC_CTX *mem_ctx,
-                                              mapi_object_t *obj_container,
-                                              mapi_object_t *obj_child,
-                                              const char *path)
-{
-       enum MAPISTATUS         retval;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SRowSet          SRowSet;
-       mapi_object_t           obj_htable;
-       mapi_object_t           obj_folder;
-       char                    **folder  = NULL;
-       const char              *name;
-       const uint64_t          *fid;
-       bool                    found = false;
-       uint32_t                index;
-       uint32_t                i;
-
-       /* Step 1. Extract the folder list from full path */
-       folder = str_list_make(mem_ctx, path, "/");
-       mapi_object_copy(&obj_folder, obj_container);
-
-       for (i = 0; folder[i]; i++) {
-               found = false;
-
-               mapi_object_init(&obj_htable);
-               retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-               MAPI_RETVAL_IF(retval, GetLastError(), folder);
-
-               SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
-                                                 PR_DISPLAY_NAME_UNICODE,
-                                                 PR_FID);
-               retval = SetColumns(&obj_htable, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
-               MAPI_RETVAL_IF(retval, retval, folder);
-
-               while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND) && SRowSet.cRows) {
-                       for (index = 0; (index < SRowSet.cRows) && (found == false); index++) {
-                               fid = (const uint64_t *)find_SPropValue_data(&SRowSet.aRow[index], PR_FID);
-                               name = (const char *)find_SPropValue_data(&SRowSet.aRow[index], PR_DISPLAY_NAME_UNICODE);
-                               if (name && fid && !strcmp(name, folder[i])) {
-                                       retval = OpenFolder(&obj_folder, *fid, obj_child);
-                                       MAPI_RETVAL_IF(retval, retval, folder);
-
-                                       found = true;
-                                       mapi_object_copy(&obj_folder, obj_child);
-                               }
-                       }
-               }
-
-               mapi_object_release(&obj_htable);
-       }
-
-       talloc_free(folder);
-       MAPI_RETVAL_IF(found == false, MAPI_E_NOT_FOUND, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static enum MAPISTATUS openchangeclient_getpfdir(TALLOC_CTX *mem_ctx, 
-                                                mapi_object_t *obj_store,
-                                                mapi_object_t *obj_child,
-                                                const char *name)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_pf;
-       mapi_id_t               id_pf;
-
-       retval = GetDefaultPublicFolder(obj_store, &id_pf, olFolderPublicIPMSubtree);
-       if (retval != MAPI_E_SUCCESS) return retval;
-       
-       mapi_object_init(&obj_pf);
-       retval = OpenFolder(obj_store, id_pf, &obj_pf);
-       if (retval != MAPI_E_SUCCESS) return retval;
-       
-       retval = openchangeclient_getdir(mem_ctx, &obj_pf, obj_child, name);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * read a file and store it in the appropriate structure element
- */
-
-static bool oclient_read_file(TALLOC_CTX *mem_ctx, const char *filename, 
-                             struct oclient *oclient, uint32_t mapitag)
-{
-       struct stat     sb;
-       int             fd;
-
-       if ((fd = open(filename, O_RDONLY)) == -1) {
-               printf("Error while opening %s\n", filename);
-               return false;
-       }
-       /* stat the file */
-       if (fstat(fd, &sb) != 0) {
-               close(fd);
-               return false;
-       }
-
-       switch (mapitag) {
-       case PR_HTML:
-               oclient->pr_html.lpb = talloc_size(mem_ctx, sb.st_size);
-               oclient->pr_html.cb = read(fd, oclient->pr_html.lpb, sb.st_size);
-               close(fd);
-               break;
-       case PR_ATTACH_DATA_BIN:
-               oclient->attach[oclient->attach_num].filename = talloc_strdup(mem_ctx, filename);
-               oclient->attach[oclient->attach_num].bin.lpb = talloc_size(mem_ctx, sb.st_size);
-               oclient->attach[oclient->attach_num].bin.cb = sb.st_size;
-               if ((oclient->attach[oclient->attach_num].bin.lpb = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0)) == (void *) -1) {
-                       perror("mmap");
-                       close(fd);
-                       return false;
-               }
-               oclient->attach[oclient->attach_num].fd = fd;
-               printf("filename = %s (size = %u / %u)\n", filename, oclient->attach[oclient->attach_num].bin.cb, (uint32_t)sb.st_size);
-               close(fd);
-               break;
-       default:
-               printf("unsupported MAPITAG: %s\n", get_proptag_name(mapitag));
-               close(fd);
-               return false;
-               break;
-       }
-
-       return true;
-}
-
-/**
- * Parse attachments and load their content
- */
-static bool oclient_parse_attachments(TALLOC_CTX *mem_ctx, const char *filename,
-                                     struct oclient *oclient)
-{
-       char            **filenames;
-       char            *tmp = NULL;
-       uint32_t        j;
-
-       if ((tmp = strtok((char *)filename, ";")) == NULL) {
-               printf("Invalid string format [;]\n");
-               return false;
-       }
-
-       filenames = talloc_array(mem_ctx, char *, 2);
-       filenames[0] = strdup(tmp);
-
-       for (j = 1; (tmp = strtok(NULL, ";")) != NULL; j++) {
-               filenames = talloc_realloc(mem_ctx, filenames, char *, j+2);
-               filenames[j] = strdup(tmp);
-       }
-       filenames[j] = 0;
-       oclient->attach = talloc_array(mem_ctx, struct attach, j);
-
-       for (j = 0; filenames[j]; j++) {
-               oclient->attach_num = j;
-               if (oclient_read_file(mem_ctx, filenames[j], oclient, PR_ATTACH_DATA_BIN) == false) {
-                       return false;
-               }
-       }
-
-       return true;
-}
-
-
-static const char *get_filename(const char *filename)
-{
-       const char *substr;
-
-       if (!filename) return NULL;
-
-       substr = rindex(filename, '/');
-       if (substr) return substr + 1;
-
-       return filename;
-}
-
-
-/**
- * build unique ID from folder and message
- */
-static char *build_uniqueID(TALLOC_CTX *mem_ctx, mapi_object_t *obj_folder,
-                           mapi_object_t *obj_message)
-{
-       enum MAPISTATUS         retval;
-       char                    *id;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                count;
-       const uint64_t          *mid;
-       const uint64_t          *fid;
-
-       /* retrieve the folder ID */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_FID);
-       retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       if (GetLastError() != MAPI_E_SUCCESS) return NULL;
-       fid = (const uint64_t *)get_SPropValue_data(lpProps);
-
-       /* retrieve the message ID */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_MID);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       if (GetLastError() != MAPI_E_SUCCESS) return NULL;
-       mid = (const uint64_t *)get_SPropValue_data(lpProps);
-
-       if (!fid || !mid) return NULL;
-
-       id = talloc_asprintf(mem_ctx, "%"PRIX64"/%"PRIX64, *fid, *mid);
-       return id;
-}
-
-
-/**
- * fetch the user INBOX
- */
-
-#define        MAX_READ_SIZE   0x1000
-
-static bool store_attachment(mapi_object_t obj_attach, const char *filename, uint32_t size, struct oclient *oclient)
-{
-       TALLOC_CTX      *mem_ctx;
-       enum MAPISTATUS retval;
-       ssize_t         len;
-       char            *path;
-       mapi_object_t   obj_stream;
-       uint16_t        read_size;
-       int             fd;
-       DIR             *dir;
-       unsigned char   buf[MAX_READ_SIZE];
-
-       if (!filename || !size) return false;
-
-       mem_ctx = talloc_named(NULL, 0, "store_attachment");
-       mapi_object_init(&obj_stream);
-
-       if (!(dir = opendir(oclient->store_folder))) {
-               if (mkdir(oclient->store_folder, 0700) == -1) return false;
-       } else {
-               closedir(dir);
-       }
-
-       path = talloc_asprintf(mem_ctx, "%s/%s", oclient->store_folder, filename);
-       if ((fd = open(path, O_CREAT|O_WRONLY, S_IWUSR|S_IRUSR)) == -1) {
-               goto error;
-       }
-       talloc_free(path);
-
-       retval = OpenStream(&obj_attach, PR_ATTACH_DATA_BIN, 0, &obj_stream);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       read_size = 0;
-       do {
-               retval = ReadStream(&obj_stream, buf, MAX_READ_SIZE, &read_size);
-               if (retval != MAPI_E_SUCCESS) goto error;
-               len = write(fd, buf, read_size);
-       } while (read_size);
-       
-       close(fd);
-       mapi_object_release(&obj_stream);
-       talloc_free(mem_ctx);
-       return true;
-
-error:
-       mapi_object_release(&obj_stream);
-       close(fd);
-       talloc_free(mem_ctx);
-       return false;
-}
-
-static enum MAPISTATUS openchangeclient_fetchmail(mapi_object_t *obj_store, 
-                                                 struct oclient *oclient)
-{
-       enum MAPISTATUS                 retval;
-       bool                            status;
-       TALLOC_CTX                      *mem_ctx;
-       mapi_object_t                   obj_tis;
-       mapi_object_t                   obj_inbox;
-       mapi_object_t                   obj_message;
-       mapi_object_t                   obj_table;
-       mapi_object_t                   obj_tb_attach;
-       mapi_object_t                   obj_attach;
-       uint64_t                        id_inbox;
-       struct SPropTagArray            *SPropTagArray;
-       struct SRowSet                  rowset;
-       struct SRowSet                  rowset_attach;
-       uint32_t                        i, j;
-       uint32_t                        count;
-       const uint8_t                   *has_attach;
-       const uint32_t                  *attach_num;
-       const char                      *attach_filename;
-       const uint32_t                  *attach_size;
-       
-       mem_ctx = talloc_named(NULL, 0, "openchangeclient_fetchmail");
-
-       mapi_object_init(&obj_tis);
-       mapi_object_init(&obj_inbox);
-       mapi_object_init(&obj_table);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_inbox, oclient->folder);
-               MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);
-       } else {
-               if (oclient->folder) {
-                       retval = GetDefaultFolder(obj_store, &id_inbox, olFolderTopInformationStore);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-                       retval = OpenFolder(obj_store, id_inbox, &obj_tis);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-                       retval = openchangeclient_getdir(mem_ctx, &obj_tis, &obj_inbox, oclient->folder);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-               } else {
-                       retval = GetReceiveFolder(obj_store, &id_inbox, NULL);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-                       retval = OpenFolder(obj_store, id_inbox, &obj_inbox);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-               }
-       }
-
-       retval = GetContentsTable(&obj_inbox, &obj_table, 0, &count);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       printf("MAILBOX (%u messages)\n", count);
-       if (!count) goto end;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x5,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM,
-                                         PR_SUBJECT);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-       while ((retval = QueryRows(&obj_table, count, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND && rowset.cRows) {
-               count -= rowset.cRows;
-               for (i = 0; i < rowset.cRows; i++) {
-                       mapi_object_init(&obj_message);
-                       retval = OpenMessage(obj_store,
-                                            rowset.aRow[i].lpProps[0].value.d,
-                                            rowset.aRow[i].lpProps[1].value.d,
-                                            &obj_message, 0);
-                       if (GetLastError() == MAPI_E_SUCCESS) {
-                               if (oclient->summary) {
-                                       mapidump_message_summary(&obj_message);
-                               } else {
-                                       struct SPropValue       *lpProps;
-                                       struct SRow             aRow;
-                                       
-                                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_HASATTACH);
-                                       lpProps = talloc_zero(mem_ctx, struct SPropValue);
-                                       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
-                                       MAPIFreeBuffer(SPropTagArray);
-                                       if (retval != MAPI_E_SUCCESS) return retval;
-                                       
-                                       aRow.ulAdrEntryPad = 0;
-                                       aRow.cValues = count;
-                                       aRow.lpProps = lpProps;
-                                       
-                                       retval = octool_message(mem_ctx, &obj_message);
-                                       
-                                       has_attach = (const uint8_t *) get_SPropValue_SRow_data(&aRow, PR_HASATTACH);
-                                       
-                                       /* If we have attachments, retrieve them */
-                                       if (has_attach && *has_attach) {
-                                               mapi_object_init(&obj_tb_attach);
-                                               retval = GetAttachmentTable(&obj_message, &obj_tb_attach);
-                                               if (retval == MAPI_E_SUCCESS) {
-                                                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_ATTACH_NUM);
-                                                       retval = SetColumns(&obj_tb_attach, SPropTagArray);
-                                                       if (retval != MAPI_E_SUCCESS) return retval;
-                                                       MAPIFreeBuffer(SPropTagArray);
-                                                       
-                                                       retval = QueryRows(&obj_tb_attach, 0xa, TBL_ADVANCE, &rowset_attach);
-                                                       if (retval != MAPI_E_SUCCESS) return retval;
-                                                       
-                                                       for (j = 0; j < rowset_attach.cRows; j++) {
-                                                               attach_num = (const uint32_t *)find_SPropValue_data(&(rowset_attach.aRow[j]), PR_ATTACH_NUM);
-                                                               retval = OpenAttach(&obj_message, *attach_num, &obj_attach);
-                                                               if (retval == MAPI_E_SUCCESS) {
-                                                                       struct SPropValue       *lpProps2;
-                                                                       uint32_t                count2;
-                                                                       
-                                                                       SPropTagArray = set_SPropTagArray(mem_ctx, 0x4, 
-                                                                                                         PR_ATTACH_FILENAME,
-                                                                                                         PR_ATTACH_LONG_FILENAME,
-                                                                                                         PR_ATTACH_SIZE,
-                                                                                                         PR_ATTACH_CONTENT_ID);
-                                                                       lpProps2 = talloc_zero(mem_ctx, struct SPropValue);
-                                                                       retval = GetProps(&obj_attach, SPropTagArray, &lpProps2, &count2);
-                                                                       MAPIFreeBuffer(SPropTagArray);
-                                                                       if (retval != MAPI_E_SUCCESS) return retval;
-                                                                       
-                                                                       aRow.ulAdrEntryPad = 0;
-                                                                       aRow.cValues = count2;
-                                                                       aRow.lpProps = lpProps2;
-                                                                       
-                                                                       attach_filename = get_filename(octool_get_propval(&aRow, PR_ATTACH_LONG_FILENAME));
-                                                                       if (!attach_filename || (attach_filename && !strcmp(attach_filename, ""))) {
-                                                                               attach_filename = get_filename(octool_get_propval(&aRow, PR_ATTACH_FILENAME));
-                                                                       }
-                                                                       attach_size = (const uint32_t *) octool_get_propval(&aRow, PR_ATTACH_SIZE);
-                                                                       printf("[%u] %s (%u Bytes)\n", j, attach_filename, attach_size ? *attach_size : 0);
-                                                                       fflush(0);
-                                                                       if (oclient->store_folder) {
-                                                                               status = store_attachment(obj_attach, attach_filename, attach_size ? *attach_size : 0, oclient);
-                                                                               if (status == false) {
-                                                                                       printf("A Problem was encountered while storing attachments on the filesystem\n");
-                                                                                       MAPI_RETVAL_IF(status == false, MAPI_E_UNABLE_TO_COMPLETE, mem_ctx);
-                                                                                       
-                                                                               }
-                                                                       }
-                                                                       MAPIFreeBuffer(lpProps2);
-                                                               }
-                                                       }
-                                                       errno = 0;
-                                               }
-                                               MAPIFreeBuffer(lpProps);
-                                       }
-                               }
-                       }
-                       mapi_object_release(&obj_message);
-               }
-       }
- end:
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_inbox);
-       mapi_object_release(&obj_tis);
-
-       talloc_free(mem_ctx);
-
-       errno = 0;
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * send a mail to a user whom belongs to the Exchange organization
- */
-
-static char **get_cmdline_recipients(TALLOC_CTX *mem_ctx, const char *recipients)
-{
-       char            **usernames;
-       char            *tmp = NULL;
-       uint32_t        j = 0;
-
-       /* no recipients */
-       if (!recipients) {
-               return NULL;
-       }
-
-       if ((tmp = strtok((char *)recipients, ",")) == NULL) {
-               DEBUG(2, ("Invalid recipient string format\n"));
-               return NULL;
-       }
-       
-       usernames = talloc_array(mem_ctx, char *, 2);
-       usernames[0] = strdup(tmp);
-       
-       for (j = 1; (tmp = strtok(NULL, ",")) != NULL; j++) {
-               usernames = talloc_realloc(mem_ctx, usernames, char *, j+2);
-               usernames[j] = strdup(tmp);
-       }
-       usernames[j] = 0;
-
-       return (usernames);
-}
-
-/**
- * We set external recipients at the end of aRow
- */
-static bool set_external_recipients(TALLOC_CTX *mem_ctx, struct SRowSet *SRowSet, const char *username, enum ulRecipClass RecipClass)
-{
-       uint32_t                last;
-       struct SPropValue       SPropValue;
-
-       SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 1);
-       last = SRowSet->cRows;
-       SRowSet->aRow[last].cValues = 0;
-       SRowSet->aRow[last].lpProps = talloc_zero(mem_ctx, struct SPropValue);
-       
-       /* PR_OBJECT_TYPE */
-       SPropValue.ulPropTag = PR_OBJECT_TYPE;
-       SPropValue.value.l = MAPI_MAILUSER;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_DISPLAY_TYPE */
-       SPropValue.ulPropTag = PR_DISPLAY_TYPE;
-       SPropValue.value.l = 0;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_GIVEN_NAME */
-       SPropValue.ulPropTag = PR_GIVEN_NAME_UNICODE;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_DISPLAY_NAME */
-       SPropValue.ulPropTag = PR_DISPLAY_NAME_UNICODE;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_7BIT_DISPLAY_NAME */
-       SPropValue.ulPropTag = PR_7BIT_DISPLAY_NAME_UNICODE;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_SMTP_ADDRESS */
-       SPropValue.ulPropTag = PR_SMTP_ADDRESS_UNICODE;
-       SPropValue.value.lpszA = username;
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       /* PR_ADDRTYPE */
-       SPropValue.ulPropTag = PR_ADDRTYPE_UNICODE;
-       SPropValue.value.lpszA = "SMTP";
-       SRow_addprop(&(SRowSet->aRow[last]), SPropValue);
-
-       SetRecipientType(&(SRowSet->aRow[last]), RecipClass);
-
-       SRowSet->cRows += 1;
-       return true;
-}
-
-static bool set_usernames_RecipientType(TALLOC_CTX *mem_ctx, uint32_t *index, struct SRowSet *rowset, 
-                                       char **usernames, struct PropertyTagArray_r *flaglist,
-                                       enum ulRecipClass RecipClass)
-{
-       uint32_t        i;
-       uint32_t        count = *index;
-       static uint32_t counter = 0;
-
-       if (count == 0) counter = 0;
-       if (!usernames) return false;
-
-       for (i = 0; usernames[i]; i++) {
-               if (flaglist->aulPropTag[count] == MAPI_UNRESOLVED) {
-                       set_external_recipients(mem_ctx, rowset, usernames[i], RecipClass);
-               }
-               if (flaglist->aulPropTag[count] == MAPI_RESOLVED) {
-                       SetRecipientType(&(rowset->aRow[counter]), RecipClass);
-                       counter++;
-               }
-               count++;
-       }
-       
-       *index = count;
-       
-       return true;
-}
-
-static char **collapse_recipients(TALLOC_CTX *mem_ctx, struct oclient *oclient)
-{
-       uint32_t        count;
-       uint32_t        i;
-       char            **usernames;
-
-       if (!oclient->mapi_to && !oclient->mapi_cc && !oclient->mapi_bcc) return NULL;
-
-       count = 0;
-       for (i = 0; oclient->mapi_to && oclient->mapi_to[i]; i++,  count++);
-       for (i = 0; oclient->mapi_cc && oclient->mapi_cc[i]; i++,  count++);
-       for (i = 0; oclient->mapi_bcc && oclient->mapi_bcc[i]; i++, count++);
-
-       usernames = talloc_array(mem_ctx, char *, count + 1);
-       count = 0;
-
-       for (i = 0; oclient->mapi_to && oclient->mapi_to[i]; i++, count++) {
-               usernames[count] = talloc_strdup(mem_ctx, oclient->mapi_to[i]);
-       }
-
-       for (i = 0; oclient->mapi_cc && oclient->mapi_cc[i]; i++, count++) {
-               usernames[count] = talloc_strdup(mem_ctx, oclient->mapi_cc[i]);
-       }
-
-       for (i = 0; oclient->mapi_bcc && oclient->mapi_bcc[i]; i++, count++) {
-               usernames[count] = talloc_strdup(mem_ctx, oclient->mapi_bcc[i]);
-       }
-
-       usernames[count++] = 0;
-
-       return usernames;
-}
-
-/**
- * Write a stream with MAX_READ_SIZE chunks
- */
-
-#define        MAX_READ_SIZE   0x1000
-
-static bool openchangeclient_stream(TALLOC_CTX *mem_ctx, mapi_object_t obj_parent, 
-                                   mapi_object_t obj_stream, uint32_t mapitag, 
-                                   uint32_t access_flags, struct Binary_r bin)
-{
-       enum MAPISTATUS retval;
-       DATA_BLOB       stream;
-       uint32_t        size;
-       uint32_t        offset;
-       uint16_t        read_size;
-
-       /* Open a stream on the parent for the given property */
-       retval = OpenStream(&obj_parent, mapitag, access_flags, &obj_stream);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* WriteStream operation */
-       printf("We are about to write %u bytes in the stream\n", bin.cb);
-       size = MAX_READ_SIZE;
-       offset = 0;
-       while (offset <= bin.cb) {
-               stream.length = size;
-               stream.data = talloc_size(mem_ctx, size);
-               memcpy(stream.data, bin.lpb + offset, size);
-               
-               retval = WriteStream(&obj_stream, &stream, &read_size);
-               talloc_free(stream.data);
-               if (retval != MAPI_E_SUCCESS) return false;
-               printf(".");
-               fflush(0);
-
-               /* Exit when there is nothing left to write */
-               if (!read_size) return true;
-               
-               offset += read_size;
-
-               if ((offset + size) > bin.cb) {
-                       size = bin.cb - offset;
-               }
-       }
-
-       return true;
-}
-
-
-#define SETPROPS_COUNT 4
-
-/**
- * Send a mail
- */
-
-static enum MAPISTATUS openchangeclient_sendmail(TALLOC_CTX *mem_ctx, 
-                                                mapi_object_t *obj_store, 
-                                                struct oclient *oclient)
-{
-       enum MAPISTATUS                 retval;
-       struct SPropTagArray            *SPropTagArray;
-       struct SPropValue               SPropValue;
-       struct SRowSet                  *SRowSet = NULL;
-       struct PropertyTagArray_r       *flaglist = NULL;
-       mapi_id_t                       id_outbox;
-       mapi_object_t                   obj_outbox;
-       mapi_object_t                   obj_message;
-       mapi_object_t                   obj_stream;
-       uint32_t                        index = 0;
-       uint32_t                        msgflag;
-       struct SPropValue               props[SETPROPS_COUNT];
-       uint32_t                        prop_count = 0;
-       uint32_t                        editor = 0;
-
-       mapi_object_init(&obj_outbox);
-       mapi_object_init(&obj_message);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_outbox, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               /* Get Sent Items folder but should be using olFolderOutbox */
-               retval = GetDefaultFolder(obj_store, &id_outbox, olFolderSentMail);
-               if (retval != MAPI_E_SUCCESS) return retval;
-
-               /* Open outbox folder */
-               retval = OpenFolder(obj_store, id_outbox, &obj_outbox);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       }
-
-       /* Create the message */
-       retval = CreateMessage(&obj_outbox, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       /* Recipients operations */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xA,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_OBJECT_TYPE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_SEND_RICH_INFO,
-                                         PR_7BIT_DISPLAY_NAME_UNICODE,
-                                         PR_SMTP_ADDRESS_UNICODE);
-
-       oclient->usernames = collapse_recipients(mem_ctx, oclient);
-
-       /* ResolveNames */
-       retval = ResolveNames(mapi_object_get_session(&obj_message), (const char **)oclient->usernames, 
-                             SPropTagArray, &SRowSet, &flaglist, MAPI_UNICODE);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       if (!SRowSet) {
-               SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       }
-
-       set_usernames_RecipientType(mem_ctx, &index, SRowSet, oclient->mapi_to, flaglist, MAPI_TO);
-       set_usernames_RecipientType(mem_ctx, &index, SRowSet, oclient->mapi_cc, flaglist, MAPI_CC);
-       set_usernames_RecipientType(mem_ctx, &index, SRowSet, oclient->mapi_bcc, flaglist, MAPI_BCC);
-
-       SPropValue.ulPropTag = PR_SEND_INTERNET_ENCODING;
-       SPropValue.value.l = 0;
-       SRowSet_propcpy(mem_ctx, SRowSet, SPropValue);
-
-       /* ModifyRecipients operation */
-       retval = ModifyRecipients(&obj_message, SRowSet);
-       MAPIFreeBuffer(SRowSet);
-       MAPIFreeBuffer(flaglist);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       /* set message properties */
-       msgflag = MSGFLAG_UNSENT;
-       oclient->subject = (!oclient->subject) ? "" : oclient->subject;
-       set_SPropValue_proptag(&props[0], PR_SUBJECT_UNICODE, 
-                              (const void *)oclient->subject);
-       set_SPropValue_proptag(&props[1], PR_MESSAGE_FLAGS, 
-                              (const void *)&msgflag);
-       prop_count = 2;
-
-       /* Set PR_BODY or PR_HTML or inline PR_HTML */
-       if (oclient->pr_body) {
-               editor = EDITOR_FORMAT_PLAINTEXT;
-               set_SPropValue_proptag(&props[3], PR_MSG_EDITOR_FORMAT, (const void *)&editor);
-
-               if (strlen(oclient->pr_body) > MAX_READ_SIZE) {
-                       struct Binary_r bin;
-
-                       bin.lpb = (uint8_t *)oclient->pr_body;
-                       bin.cb = strlen(oclient->pr_body);
-                       openchangeclient_stream(mem_ctx, obj_message, obj_stream, PR_BODY, 2, bin);
-               } else {
-                       set_SPropValue_proptag(&props[2], PR_BODY_UNICODE, 
-                                                                  (const void *)oclient->pr_body);
-                       prop_count++;
-               }
-       } else if (oclient->pr_html_inline) {
-               editor = EDITOR_FORMAT_HTML;
-               set_SPropValue_proptag(&props[3], PR_MSG_EDITOR_FORMAT, (const void *)&editor);
-
-               if (strlen(oclient->pr_html_inline) > MAX_READ_SIZE) {
-                       struct Binary_r bin;
-                       
-                       bin.lpb = (uint8_t *)oclient->pr_html_inline;
-                       bin.cb = strlen(oclient->pr_html_inline);
-                       openchangeclient_stream(mem_ctx, obj_message, obj_stream, PR_HTML, 2, bin);
-               } else {
-                       struct SBinary_short bin;
-                       
-                       bin.cb = strlen(oclient->pr_html_inline);
-                       bin.lpb = (uint8_t *)oclient->pr_html_inline;
-                       set_SPropValue_proptag(&props[2], PR_HTML, (void *)&bin);
-                       prop_count++;
-               }
-               
-       } else if (&oclient->pr_html) {
-               editor = EDITOR_FORMAT_HTML;
-               set_SPropValue_proptag(&props[3], PR_MSG_EDITOR_FORMAT, (const void *)&editor);
-
-               if (oclient->pr_html.cb <= MAX_READ_SIZE) {
-                       struct SBinary_short bin;
-
-                       bin.cb = oclient->pr_html.cb;
-                       bin.lpb = oclient->pr_html.lpb;
-
-                       set_SPropValue_proptag(&props[2], PR_HTML, (void *)&bin);
-                       prop_count++;
-               } else {
-                       mapi_object_init(&obj_stream);
-                       openchangeclient_stream(mem_ctx, obj_message, obj_stream, PR_HTML, 2, oclient->pr_html);
-                       mapi_object_release(&obj_stream);
-               }
-       }
-
-       retval = SetProps(&obj_message, props, prop_count);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       /* attachment related code */
-       if (oclient->attach) {
-               uint32_t        i;
-
-               for (i = 0; oclient->attach[i].filename; i++) {
-                       mapi_object_t           obj_attach;
-                       mapi_object_t           obj_stream;
-                       struct SPropValue       props_attach[4];
-                       uint32_t                count_props_attach;
-
-                       mapi_object_init(&obj_attach);
-
-                       retval = CreateAttach(&obj_message, &obj_attach);
-                       if (retval != MAPI_E_SUCCESS) return retval;
-               
-                       props_attach[0].ulPropTag = PR_ATTACH_METHOD;
-                       props_attach[0].value.l = ATTACH_BY_VALUE;
-                       props_attach[1].ulPropTag = PR_RENDERING_POSITION;
-                       props_attach[1].value.l = 0;
-                       props_attach[2].ulPropTag = PR_ATTACH_FILENAME;
-                       printf("Sending %s:\n", oclient->attach[i].filename);
-                       props_attach[2].value.lpszA = get_filename(oclient->attach[i].filename);
-                       props_attach[3].ulPropTag = PR_ATTACH_CONTENT_ID;
-                       props_attach[3].value.lpszA = get_filename(oclient->attach[i].filename);
-                       count_props_attach = 4;
-
-                       /* SetProps */
-                       retval = SetProps(&obj_attach, props_attach, count_props_attach);
-                       if (retval != MAPI_E_SUCCESS) return retval;
-
-                       /* Stream operations */
-                       openchangeclient_stream(mem_ctx, obj_attach, obj_stream, PR_ATTACH_DATA_BIN, 2, oclient->attach[i].bin);
-
-                       /* Save changes on attachment */
-                       retval = SaveChangesAttachment(&obj_message, &obj_attach, KeepOpenReadWrite);
-                       if (retval != MAPI_E_SUCCESS) return retval;
-
-                       mapi_object_release(&obj_attach);
-               }
-       }
-
-       if (oclient->pf) {
-               retval = SaveChangesMessage(&obj_outbox, &obj_message, KeepOpenReadOnly);
-               if (retval != MAPI_E_SUCCESS) return retval;
-
-       } else {
-               /* Submit the message */
-               retval = SubmitMessage(&obj_message);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       }
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_outbox);
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * delete a mail from user INBOX
- */
-static bool openchangeclient_deletemail(TALLOC_CTX *mem_ctx,
-                                       mapi_object_t *obj_store, 
-                                       struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       mapi_id_t               id_inbox;
-       mapi_id_t               *id_messages;
-       uint32_t                count_messages;
-       uint32_t                count_rows;
-       mapi_object_t           obj_inbox;
-       mapi_object_t           obj_table;
-       uint32_t                len;
-       uint32_t                i;
-
-       if (!oclient->subject) {
-               printf("You need to specify at least a message subject pattern\n");
-               MAPI_RETVAL_IF(!oclient->subject, MAPI_E_INVALID_PARAMETER, NULL);
-       }
-
-       mapi_object_init(&obj_inbox);
-       mapi_object_init(&obj_table);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_inbox, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               retval = GetReceiveFolder(obj_store, &id_inbox, NULL);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_inbox, &obj_inbox);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       retval = GetContentsTable(&obj_inbox, &obj_table, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x5,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM,
-                                         PR_SUBJECT);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       while ((retval = QueryRows(&obj_table, 0x10, TBL_ADVANCE, &SRowSet)) == MAPI_E_SUCCESS) {
-               count_rows = SRowSet.cRows;
-               if (!count_rows) break;
-               id_messages = talloc_array(mem_ctx, uint64_t, count_rows);
-               count_messages = 0;
-               
-               len = strlen(oclient->subject);
-
-               for (i = 0; i < count_rows; i++) {
-                       if (!strncmp(SRowSet.aRow[i].lpProps[4].value.lpszA, oclient->subject, len)) {
-                               id_messages[count_messages] = SRowSet.aRow[i].lpProps[1].value.d;
-                               count_messages++;
-                       }
-               }
-               if (count_messages) {
-                       retval = DeleteMessage(&obj_inbox, id_messages, count_messages);
-                       if (retval != MAPI_E_SUCCESS) return false;
-               }
-       }
-
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_inbox);
-
-       return true;
-}
-
-
-static enum MAPISTATUS check_conflict_date(struct oclient *oclient,
-                                          mapi_object_t *obj,
-                                          struct FILETIME *ft)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_store;
-       struct mapi_session     *session;
-       struct mapi_session     *session2;
-       bool                    conflict;
-                       
-       session = mapi_object_get_session(obj);
-       retval = MapiLogonEx(oclient->mapi_ctx, &session2, session->profile->profname, session->profile->password);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       mapi_object_init(&obj_store);
-       retval = OpenPublicFolder(session2, &obj_store);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       retval = IsFreeBusyConflict(&obj_store, ft, &conflict);
-       Logoff(&obj_store);
-
-       if (conflict == true) {
-               printf("[WARNING]: This start date conflicts with another appointment\n");
-               return MAPI_E_INVALID_PARAMETER;
-       }       
-
-       return MAPI_E_SUCCESS;
-}
-
-/**
- * Send appointment
- */
-
-static enum MAPISTATUS appointment_SetProps(TALLOC_CTX *mem_ctx, 
-                                           mapi_object_t *obj_folder,
-                                           mapi_object_t *obj_message, 
-                                           struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       *lpProps;
-       struct FILETIME         *start_date;
-       struct FILETIME         *end_date;
-       uint32_t                cValues = 0;
-       NTTIME                  nt;
-       struct tm               tm;
-       uint32_t                flag;
-       uint8_t                 flag2;
-
-       cValues = 0;
-       lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       if (oclient->subject) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_CONVERSATION_TOPIC_UNICODE, 
-                              (const void *) oclient->subject);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_NORMALIZED_SUBJECT_UNICODE,
-                              (const void *) oclient->subject);
-       }
-       if (oclient->pr_body) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_BODY_UNICODE, (const void *)oclient->pr_body);
-       }
-       if (oclient->location) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidLocation, (const void *)oclient->location);
-       }
-       if (oclient->dtstart) {
-               if (!strptime(oclient->dtstart, DATE_FORMAT, &tm)) {
-                       printf("Invalid date format: yyyy-mm-dd hh:mm:ss (e.g.: 2007-09-17 10:00:00)\n");
-                       return MAPI_E_INVALID_PARAMETER;
-               }
-               unix_to_nt_time(&nt, mktime(&tm));
-               start_date = talloc(mem_ctx, struct FILETIME);
-               start_date->dwLowDateTime = (nt << 32) >> 32;
-               start_date->dwHighDateTime = (nt >> 32);
-
-               retval = check_conflict_date(oclient, obj_folder, start_date);
-               if (oclient->force == false) {
-                       MAPI_RETVAL_IF(retval, retval, NULL);
-               }
-
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_START_DATE, (const void *)start_date);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidCommonStart, (const void *)start_date);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidAppointmentStartWhole, (const void *) start_date);
-       }
-       if (oclient->dtend) {
-               if (!strptime(oclient->dtend, DATE_FORMAT, &tm)) {
-                       printf("Invalid date format: yyyy-mm-dd hh:mm:ss (e.g.:2007-09-17 18:30:00)\n");
-                       return MAPI_E_INVALID_PARAMETER;
-               }
-               unix_to_nt_time(&nt, mktime(&tm));
-               end_date = talloc(mem_ctx, struct FILETIME);
-               end_date->dwLowDateTime = (nt << 32) >> 32;
-               end_date->dwHighDateTime = (nt >> 32);
-
-               retval = check_conflict_date(oclient, obj_folder, end_date);
-               if (oclient->force == false) {
-                       MAPI_RETVAL_IF(retval, retval, NULL);
-               }
-
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_END_DATE, (const void *) end_date);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidCommonEnd, (const void *) end_date);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidAppointmentEndWhole, (const void *) end_date);
-       }
-
-       if (!oclient->update) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS, (const void *)"IPM.Appointment");
-
-               flag = 1;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_FLAGS, (const void *)&flag);
-
-               flag= MEETING_STATUS_NONMEETING;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidAppointmentStateFlags, (const void *) &flag);
-
-               flag = 30;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidReminderDelta, (const void *)&flag);
-               
-               /* WARNING needs to replace private */
-               flag2 = oclient->private;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidPrivate, (const void *)&flag2);
-
-               oclient->label = (oclient->label == -1) ? 0 : oclient->label;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidAppointmentColor, (const void *) &oclient->label);
-
-               oclient->busystatus = (oclient->busystatus == -1) ? 0 : oclient->busystatus;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidBusyStatus, (const void *) &oclient->busystatus);
-       } else {
-               if (oclient->busystatus != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidBusyStatus, (const void *) &oclient->busystatus);
-               }
-               if (oclient->label != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidAppointmentColor, (const void *) &oclient->label);
-               }
-       }
-
-       flag = (oclient->private == true) ? 2 : 0;
-       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_SENSITIVITY, (const void *)&flag);
-       
-       retval = SetProps(obj_message, lpProps, cValues);
-       MAPIFreeBuffer(lpProps);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-
-static bool openchangeclient_sendappointment(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_calendar;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_calendar;
-       char                    *uniq_id;
-
-       mapi_object_init(&obj_calendar);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_calendar, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return false;
-       } else {
-               /* Open Calendar default folder */
-               retval = GetDefaultFolder(obj_store, &id_calendar, olFolderCalendar);
-               if (retval != MAPI_E_SUCCESS) return false;
-               
-               retval = OpenFolder(obj_store, id_calendar, &obj_calendar);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       /* Create calendar message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_calendar, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Set calendar message properties */
-       retval = appointment_SetProps(mem_ctx, &obj_calendar, &obj_message, oclient);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = SaveChangesMessage(&obj_calendar, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Fetch and Display the message unique ID */
-       uniq_id = build_uniqueID(mem_ctx, &obj_calendar, &obj_message);
-       printf("    %-25s: %s\n", "Unique ID", uniq_id);
-       fflush(0);
-       talloc_free(uniq_id);
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_calendar);
-       
-       return true;
-}
-
-/**
- * Create a contact
- */
-static enum MAPISTATUS contact_SetProps(TALLOC_CTX *mem_ctx,
-                                       mapi_object_t *obj_folder,
-                                       mapi_object_t *obj_message,
-                                       struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       *lpProps;
-       struct mapi_nameid      *nameid;
-       struct SPropTagArray    *SPropTagArray;
-       uint32_t                cValues = 0;
-
-       /* Build the list of named properties we want to set */
-       nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_string_add(nameid, "urn:schemas:contacts:fileas", PS_PUBLIC_STRINGS);
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(nameid);
-               return retval;
-       }
-
-       /* GetIDsFromNames and map property types */
-       SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-       retval = GetIDsFromNames(obj_folder, nameid->count,
-                                nameid->nameid, 0, &SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) {
-               talloc_free(nameid);
-               return retval;
-       }
-       mapi_nameid_SPropTagArray(nameid, SPropTagArray);
-       MAPIFreeBuffer(nameid);
-
-       cValues = 0;
-       lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       if (oclient->card_name) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_NORMALIZED_SUBJECT_UNICODE, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidFileUnder, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, SPropTagArray->aulPropTag[0], (const void *)oclient->card_name);
-       }
-       if (oclient->full_name) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_DISPLAY_NAME_UNICODE, (const void *)oclient->full_name);
-       }
-       if (oclient->email) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidEmail1OriginalDisplayName, (const void *)oclient->email);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidEmail1EmailAddress, (const void *)oclient->email);
-       }
-       if (!oclient->update) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS, (const void *)"IPM.Contact");
-       }
-       retval = SetProps(obj_message, lpProps, cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPIFreeBuffer(lpProps);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-       
-       return MAPI_E_SUCCESS;
-}
-
-static bool openchangeclient_sendcontact(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_contact;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_contact;     
-       char                    *uniq_id;
-
-       mapi_object_init(&obj_contact);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_contact, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               /* Open Contact default folder */
-               retval = GetDefaultFolder(obj_store, &id_contact, olFolderContacts);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_contact, &obj_contact);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       /* Create contact message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_contact, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Set contact message properties */
-       retval = contact_SetProps(mem_ctx, &obj_contact, &obj_message, oclient);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = SaveChangesMessage(&obj_contact, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Fetch and Display the message unique ID */
-       uniq_id = build_uniqueID(mem_ctx, &obj_contact, &obj_message);
-       printf("    %-25s: %s\n", "Unique ID", uniq_id);
-       fflush(0);
-       talloc_free(uniq_id);
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_contact);
-
-       return true;
-}
-
-/**
- * Create task
- */
-static enum MAPISTATUS task_SetProps(TALLOC_CTX *mem_ctx,
-                                       mapi_object_t *obj_message,
-                                       struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       *lpProps;
-       struct FILETIME         *start_date;
-       struct FILETIME         *end_date;
-       uint32_t                cValues = 0;
-       NTTIME                  nt;
-       struct tm               tm;
-
-       cValues = 0;
-       lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       if (oclient->card_name) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_CONVERSATION_TOPIC_UNICODE, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_NORMALIZED_SUBJECT_UNICODE, (const void *)oclient->card_name);
-       }
-
-       if (oclient->dtstart) {
-               if (!strptime(oclient->dtstart, DATE_FORMAT, &tm)) {
-                       printf("Invalid date format (e.g.: 2007-06-01 22:30:00)\n");
-                       return MAPI_E_INVALID_PARAMETER;
-               }
-               unix_to_nt_time(&nt, mktime(&tm));
-               start_date = talloc(mem_ctx, struct FILETIME);
-               start_date->dwLowDateTime = (nt << 32) >> 32;
-               start_date->dwHighDateTime = (nt >> 32);                
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidTaskStartDate, (const void *)start_date);
-       }
-
-       if (oclient->dtend) {
-               if (!strptime(oclient->dtend, DATE_FORMAT, &tm)) {
-                       printf("Invalid date format (e.g.: 2007-06-01 22:30:00)\n");
-                       return MAPI_E_INVALID_PARAMETER;
-               }
-               unix_to_nt_time(&nt, mktime(&tm));
-               end_date = talloc(mem_ctx, struct FILETIME);
-               end_date->dwLowDateTime = (nt << 32) >> 32;
-               end_date->dwHighDateTime = (nt >> 32);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidTaskDueDate, (const void *)end_date);
-       }
-
-       if (oclient->pr_body) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_BODY_UNICODE, (const void *)oclient->pr_body);
-       }
-
-       if (!oclient->update) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS, (const void *)"IPM.Task");
-               oclient->importance = (oclient->importance == -1) ? 1 : oclient->importance;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_IMPORTANCE, (const void *)&oclient->importance);
-               oclient->taskstatus = (oclient->taskstatus == -1) ? 0 : oclient->taskstatus;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidTaskStatus, (const void *)&oclient->taskstatus);
-       } else {
-               if (oclient->importance != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_IMPORTANCE, (const void *)&oclient->importance);
-               }
-               if (oclient->taskstatus != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidTaskStatus, (const void *)&oclient->taskstatus);
-               }
-       }
-
-       retval = SetProps(obj_message, lpProps, cValues);
-       MAPIFreeBuffer(lpProps);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-
-       return MAPI_E_SUCCESS;
-}
-
-static bool openchangeclient_sendtask(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_task;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_task;        
-       char                    *uniq_id;
-
-       mapi_object_init(&obj_task);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_task, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               /* Open Contact default folder */
-               retval = GetDefaultFolder(obj_store, &id_task, olFolderTasks);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_task, &obj_task);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       /* Create contact message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_task, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Set contact properties */
-       retval = task_SetProps(mem_ctx, &obj_message, oclient);
-
-       retval = SaveChangesMessage(&obj_task, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Fetch and Display the message unique ID */
-       uniq_id = build_uniqueID(mem_ctx, &obj_task, &obj_message);
-       printf("    %-25s: %s\n", "Unique ID", uniq_id);
-       fflush(0);
-       talloc_free(uniq_id);
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_task);
-
-       return true;
-}
-
-
-/**
- * Send notes
- */
-static enum MAPISTATUS note_SetProps(TALLOC_CTX *mem_ctx,
-                                       mapi_object_t *obj_message,
-                                       struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       struct SPropValue       *lpProps;
-       uint32_t                cValues = 0;
-       uint32_t                value;
-
-       cValues = 0;
-       lpProps = talloc_array(mem_ctx, struct SPropValue, 2);
-
-       if (oclient->card_name) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_CONVERSATION_TOPIC_UNICODE, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_SUBJECT_UNICODE, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_NORMALIZED_SUBJECT_UNICODE, (const void *)oclient->card_name);
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_BODY_UNICODE, (const void *)oclient->card_name);
-       }
-
-       if (!oclient->update) {
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS, (const void *)"IPM.StickyNote");
-
-               value = 1;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_FLAGS, (const void *)&value);
-
-               value = 768;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_ICON_INDEX, (const void *)&value);
-               
-               value = 272;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidSideEffects, (const void *)&value);
-
-               oclient->color = (oclient->color == -1) ? olYellow : oclient->color;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteColor, (const void *)&oclient->color);
-
-               oclient->width = (oclient->width == -1) ? 166 : oclient->width;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteWidth, (const void *)&oclient->width);
-
-               oclient->height = (oclient->height == -1) ? 200 : oclient->height;
-               lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteHeight, (const void *)&oclient->height);
-
-       } else {
-               if (oclient->color != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteColor, (const void *)&oclient->color);
-               }
-               if (oclient->width != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteWidth, (const void *)&oclient->width);
-               }
-               if (oclient->height != -1) {
-                       lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PidLidNoteHeight, (const void *)&oclient->height);
-               }
-       }
-
-       
-       retval = SetProps(obj_message, lpProps, cValues);
-       MAPIFreeBuffer(lpProps);
-       MAPI_RETVAL_IF(retval, retval, NULL);
-       
-       return MAPI_E_SUCCESS;
-}
-
-static bool openchangeclient_sendnote(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_note;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_note;        
-       char                    *uniq_id;
-
-       mapi_object_init(&obj_note);
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_note, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               /* Open Contact default folder */
-               retval = GetDefaultFolder(obj_store, &id_note, olFolderNotes);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_note, &obj_note);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       /* Create contact message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_note, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Set Note message properties */
-       retval = note_SetProps(mem_ctx, &obj_message, oclient);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = SaveChangesMessage(&obj_note, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Fetch and Display the message unique ID */
-       uniq_id = build_uniqueID(mem_ctx, &obj_note, &obj_message);
-       printf("    %-25s: %s\n", "Unique ID", uniq_id);
-       fflush(0);
-       talloc_free(uniq_id);
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_note);
-
-       return true;
-}
-
-
-static const char *get_container_class(TALLOC_CTX *mem_ctx, mapi_object_t *parent, mapi_id_t folder_id)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProps;
-       uint32_t                count;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_folder, SPropTagArray, &lpProps, &count);
-       MAPIFreeBuffer(SPropTagArray);
-       mapi_object_release(&obj_folder);
-       if ((lpProps[0].ulPropTag != PR_CONTAINER_CLASS) || (retval != MAPI_E_SUCCESS)) {
-               errno = 0;
-               return IPF_NOTE;
-       }
-       return lpProps[0].value.lpszA;
-}
-
-static bool get_child_folders(TALLOC_CTX *mem_ctx, mapi_object_t *parent, mapi_id_t folder_id, int count)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          rowset;
-       const char              *name;
-       const char              *comment;
-       const uint32_t          *total;
-       const uint32_t          *unread;
-       const uint32_t          *child;
-       uint32_t                index;
-       const uint64_t          *fid;
-       int                     i;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x6,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_FID,
-                                         PR_COMMENT_UNICODE,
-                                         PR_CONTENT_UNREAD,
-                                         PR_CONTENT_COUNT,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-               for (index = 0; index < rowset.cRows; index++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[index], PR_FID);
-                       name = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_DISPLAY_NAME_UNICODE);
-                       comment = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_COMMENT_UNICODE);
-                       total = (const uint32_t *)find_SPropValue_data(&rowset.aRow[index], PR_CONTENT_COUNT);
-                       unread = (const uint32_t *)find_SPropValue_data(&rowset.aRow[index], PR_CONTENT_UNREAD);
-                       child = (const uint32_t *)find_SPropValue_data(&rowset.aRow[index], PR_FOLDER_CHILD_COUNT);
-
-                       for (i = 0; i < count; i++) {
-                               printf("|   ");
-                       }
-                       printf("|---+ %-15s : %-20s (Total: %u / Unread: %u - Container class: %s) [FID: 0x%016"PRIx64"]\n", 
-                              name, comment?comment:"", total?*total:0, unread?*unread:0,
-                              get_container_class(mem_ctx, parent, *fid), *fid);
-                       if (child && *child) {
-                               ret = get_child_folders(mem_ctx, &obj_folder, *fid, count + 1);
-                               if (ret == false) return ret;
-                       }
-                       
-               }
-       }
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&obj_folder);
-
-       return true;
-}
-
-static bool get_child_folders_pf(TALLOC_CTX *mem_ctx, mapi_object_t *parent, mapi_id_t folder_id, int count)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          rowset;
-       const char              *name;
-       const uint32_t          *child;
-       uint32_t                index;
-       const uint64_t          *fid;
-       int                     i;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-               for (index = 0; index < rowset.cRows; index++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[index], PR_FID);
-                       name = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_DISPLAY_NAME_UNICODE);
-                       child = (const uint32_t *)find_SPropValue_data(&rowset.aRow[index], PR_FOLDER_CHILD_COUNT);
-
-                       for (i = 0; i < count; i++) {
-                               printf("|   ");
-                       }
-                       printf("|---+ %-15s [FID: 0x%016"PRIx64"]\n", name, *fid);
-                       if (*child) {
-                               ret = get_child_folders_pf(mem_ctx, &obj_folder, *fid, count + 1);
-                               if (ret == false) return ret;
-                       }
-                       
-               }
-       }
-       return true;
-}
-
-
-static bool openchangeclient_pf(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store)
-{
-       enum MAPISTATUS                 retval;
-       mapi_id_t                       id_pubroot;
-
-       retval = GetDefaultPublicFolder(obj_store, &id_pubroot, olFolderPublicRoot);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       return get_child_folders_pf(mem_ctx, obj_store, id_pubroot, 0);
-}
-
-
-static bool openchangeclient_mailbox(TALLOC_CTX *mem_ctx, 
-                                    mapi_object_t *obj_store)
-{
-       enum MAPISTATUS                 retval;
-       mapi_id_t                       id_mailbox;
-       struct SPropTagArray            *SPropTagArray;
-       struct SPropValue               *lpProps;
-       uint32_t                        cValues;
-       const char                      *mailbox_name;
-
-       /* Retrieve the mailbox folder name */
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_DISPLAY_NAME_UNICODE);
-       retval = GetProps(obj_store, SPropTagArray, &lpProps, &cValues);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       if (lpProps[0].value.lpszW) {
-               mailbox_name = lpProps[0].value.lpszW;
-       } else {
-               return false;
-       }
-
-       /* Prepare the directory listing */
-       retval = GetDefaultFolder(obj_store, &id_mailbox, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       printf("+ %s\n", mailbox_name);
-       return get_child_folders(mem_ctx, obj_store, id_mailbox, 0);
-}
-
-static bool openchangeclient_fetchitems(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, const char *item,
-                                       struct oclient *oclient)
-{
-       enum MAPISTATUS                 retval;
-       mapi_object_t                   obj_tis;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_table;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       fid;
-       uint32_t                        olFolder = 0;
-       struct SRowSet                  SRowSet;
-       struct SPropTagArray            *SPropTagArray;
-       struct mapi_SPropValue_array    properties_array;
-       uint32_t                        count;
-       uint32_t                        i;
-       char                            *id;
-       
-       if (!item) return false;
-
-       mapi_object_init(&obj_tis);
-       mapi_object_init(&obj_folder);
-
-       for (i = 0; defaultFolders[i].olFolder; i++) {
-               if (!strncasecmp(defaultFolders[i].container_class, item, strlen(defaultFolders[i].container_class))) {
-                       olFolder = defaultFolders[i].olFolder;
-               }
-       }
-       
-       if (!olFolder) return false;
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_folder, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               if (oclient->folder) {
-                       retval = GetDefaultFolder(obj_store, &fid, olFolderTopInformationStore);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-                       retval = OpenFolder(obj_store, fid, &obj_tis);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-
-                       retval = openchangeclient_getdir(mem_ctx, &obj_tis, &obj_folder, oclient->folder);
-                       MAPI_RETVAL_IF(retval, retval, mem_ctx);
-               } else {
-                       retval = GetDefaultFolder(obj_store, &fid, olFolder);
-                       if (retval != MAPI_E_SUCCESS) return false;
-
-                       /* We now open the folder */
-                       retval = OpenFolder(obj_store, fid, &obj_folder);
-                       if (retval != MAPI_E_SUCCESS) return false;
-               }
-       }
-
-       /* Operations on the  folder */
-       mapi_object_init(&obj_table);
-       retval = GetContentsTable(&obj_folder, &obj_table, 0, &count);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       printf("MAILBOX (%u messages)\n", count);
-       if (!count) {
-               mapi_object_release(&obj_table);
-               mapi_object_release(&obj_folder);
-               mapi_object_release(&obj_tis);
-
-               return true;
-       }
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x8,
-                                         PR_FID,
-                                         PR_MID,
-                                         PR_INST_ID,
-                                         PR_INSTANCE_NUM,
-                                         PR_SUBJECT,
-                                         PR_MESSAGE_CLASS,
-                                         PR_RULE_MSG_PROVIDER,
-                                         PR_RULE_MSG_NAME);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       while ((retval = QueryRows(&obj_table, count, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND && SRowSet.cRows) {
-               count -= SRowSet.cRows;
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       mapi_object_init(&obj_message);
-                       retval = OpenMessage(&obj_folder, 
-                                            SRowSet.aRow[i].lpProps[0].value.d,
-                                            SRowSet.aRow[i].lpProps[1].value.d,
-                                            &obj_message, 0);
-                       if (retval != MAPI_E_NOT_FOUND) {
-                               if (oclient->summary) {
-                                       mapidump_message_summary(&obj_message);
-                               } else {
-                                       retval = GetPropsAll(&obj_message, &properties_array);
-                                       if (retval == MAPI_E_SUCCESS) {
-                                               id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
-                                                                    SRowSet.aRow[i].lpProps[0].value.d,
-                                                                    SRowSet.aRow[i].lpProps[1].value.d);
-                                               mapi_SPropValue_array_named(&obj_message, 
-                                                                           &properties_array);
-                                               switch (olFolder) {
-                                               case olFolderInbox:
-                                                 mapidump_message(&properties_array, id, NULL);
-                                                       break;
-                                               case olFolderCalendar:
-                                                       mapidump_appointment(&properties_array, id);
-                                                       break;
-                                               case olFolderContacts:
-                                                       mapidump_contact(&properties_array, id);
-                                                       break;
-                                               case olFolderTasks:
-                                                       mapidump_task(&properties_array, id);
-                                                       break;
-                                               case olFolderNotes:
-                                                       mapidump_note(&properties_array, id);
-                                                       break;
-                                               }
-                                               talloc_free(id);
-                                       }
-                               }
-                               mapi_object_release(&obj_message);
-                       }
-               }
-       }
-       
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_tis);
-
-       return true;
-}
-
-/**
- * Update Item
- *
- * Edit the existing item specified on command line.
- * The function first loops over the mailbox, looking for the folder
- * ID, then it looks for the particular message ID. It finally opens
- * it, set properties and save the message.
- *
- */
-static enum MAPISTATUS folder_lookup(TALLOC_CTX *mem_ctx,
-                                    uint64_t sfid,
-                                    mapi_object_t *obj_parent,
-                                    mapi_id_t folder_id,
-                                    mapi_object_t *obj_ret)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                i;
-       const uint64_t          *fid;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(obj_parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_FID);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND && SRowSet.cRows)) {
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&SRowSet.aRow[i], PR_FID);
-                       if (fid && *fid == sfid) {
-                               retval = OpenFolder(&obj_folder, *fid, obj_ret);
-                               mapi_object_release(&obj_htable);
-                               mapi_object_release(&obj_folder);
-                               return MAPI_E_SUCCESS;
-                       } else if (fid) {
-                               retval = folder_lookup(mem_ctx, sfid, &obj_folder, *fid, obj_ret);
-                               if (retval == MAPI_E_SUCCESS) {
-                                       mapi_object_release(&obj_htable);
-                                       mapi_object_release(&obj_folder);
-                                       return MAPI_E_SUCCESS;
-                               }
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_htable);
-       mapi_object_release(&obj_folder);
-
-       errno = MAPI_E_NOT_FOUND;
-       return MAPI_E_NOT_FOUND;
-}
-
-static enum MAPISTATUS message_lookup(TALLOC_CTX *mem_ctx, 
-                                     uint64_t smid,
-                                     mapi_object_t *obj_folder, 
-                                     mapi_object_t *obj_message)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          SRowSet;
-       uint32_t                i;
-       const uint64_t          *fid;
-       const uint64_t          *mid;
-
-       mapi_object_init(&obj_htable);
-       retval = GetContentsTable(obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_FID, PR_MID);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return retval;
-
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND) && SRowSet.cRows) {
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&SRowSet.aRow[i], PR_FID);
-                       mid = (const uint64_t *)find_SPropValue_data(&SRowSet.aRow[i], PR_MID);
-                       if (mid && *mid == smid) {
-                               retval = OpenMessage(obj_folder, *fid, *mid, obj_message, ReadWrite);
-                               mapi_object_release(&obj_htable);
-                               return retval;
-                       }
-               }
-       }
-
-       mapi_object_release(&obj_htable);
-
-       errno = MAPI_E_NOT_FOUND;
-       return MAPI_E_NOT_FOUND;
-}
-
-static bool openchangeclient_updateitem(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store,
-                                       struct oclient *oclient, const char *container_class)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_tis;
-       char                    *fid_str;
-       uint64_t                fid;
-       uint64_t                mid;
-       const char              *item = NULL;
-
-       item = oclient->update;
-
-       if (!item) {
-               DEBUG(0, ("Missing ID\n"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       if (!container_class) {
-               DEBUG(0, ("Missing container class\n"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       fid_str = strsep((char **)&item, "/");
-       if (!fid_str || !item) {
-               DEBUG(0, ("    Invalid ID: %s\n", fid_str ? fid_str : "null"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       fid = strtoull(fid_str, NULL, 16);
-       mid = strtoull(item, NULL, 16);
-
-       /* Step 1: search the folder from Top Information Store */
-       mapi_object_init(&obj_folder);
-       retval = GetDefaultFolder(obj_store, &id_tis, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = folder_lookup(mem_ctx, fid, obj_store, id_tis, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 2: search the message */
-       mapi_object_init(&obj_message);
-       retval = message_lookup(mem_ctx, mid, &obj_folder, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 3: edit the message */
-       if (!strcmp(container_class, IPF_APPOINTMENT)) {
-               retval = appointment_SetProps(mem_ctx, &obj_folder, &obj_message, oclient);
-       } else if (!strcmp(container_class, IPF_CONTACT)) {
-               retval = contact_SetProps(mem_ctx, &obj_folder, &obj_message, oclient);
-       } else if (!strcmp(container_class, IPF_TASK)) {
-               retval = task_SetProps(mem_ctx, &obj_message, oclient);
-       } else if (!strcmp(container_class, IPF_STICKYNOTE)) {
-               retval = note_SetProps(mem_ctx, &obj_message, oclient);
-       }
-
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 4: save the message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-
-       return true;
-}
-
-/**
- * Delete an item given its unique ID
- */
-static bool openchangeclient_deleteitems(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, 
-                                        struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       mapi_id_t               id_tis;
-       char                    *fid_str;
-       uint64_t                fid;
-       uint64_t                mid;
-       const char              *item = NULL;
-
-       item = oclient->delete;
-
-       if (!item) {
-               DEBUG(0, ("Missing ID\n"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-       
-       fid_str = strsep((char **)&item, "/");
-       if (!fid_str || !item) {
-               DEBUG(0, ("    Invalid ID: %s\n", fid_str ? fid_str : "null"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       fid = strtoull(fid_str, NULL, 16);
-       mid = strtoull(item, NULL, 16);
-
-       /* Step 1: search the folder from Top Information Store */
-       mapi_object_init(&obj_folder);
-       retval = GetDefaultFolder(obj_store, &id_tis, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = folder_lookup(mem_ctx, fid, obj_store, id_tis, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       /* Step 2: search the message within returned folder */
-       mapi_object_init(&obj_message);
-       retval = message_lookup(mem_ctx, mid, &obj_folder, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 3: delete the message */
-       retval = DeleteMessage(&obj_folder, &mid, 1);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-
-       return true;
-}
-
-
-/**
- * Dump email
- * 
- * Assume msg is received in Inbox folder since we only register
- * notifications for this folder.
- *
- */
-
-static enum MAPISTATUS openchangeclient_findmail(mapi_object_t *obj_store, 
-                                                  mapi_id_t msgid)
-{
-       enum MAPISTATUS                 retval;
-       TALLOC_CTX                      *mem_ctx;
-       struct SRowSet                  SRowSet;
-       struct SPropValue               *lpProp;
-       struct mapi_SPropValue_array    properties_array;
-       mapi_id_t                       fid;
-       const mapi_id_t                 *mid;
-       mapi_object_t                   obj_inbox;
-       mapi_object_t                   obj_table;
-       mapi_object_t                   obj_message;
-       struct SPropTagArray            *SPropTagArray = NULL;
-       uint32_t                        count;
-       uint32_t                        i;
-       char                            *id;
-
-       mem_ctx = talloc_named(NULL, 0, "openchangeclient_findmail");
-
-       /* Get Inbox folder */
-       retval = GetDefaultFolder(obj_store, &fid, olFolderInbox);
-       MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);
-
-       /* Open Inbox */
-       mapi_object_init(&obj_inbox);
-       retval = OpenFolder(obj_store, fid, &obj_inbox);
-       MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);
-
-       /* Retrieve contents table */
-       mapi_object_init(&obj_table);
-       retval = GetContentsTable(&obj_inbox, &obj_table, 0, &count);
-       MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
-                                         PR_FID,
-                                         PR_MID);
-       retval = SetColumns(&obj_table, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       MAPI_RETVAL_IF(retval, GetLastError(), mem_ctx);
-
-       while ((retval = QueryRows(&obj_table, 0xa, TBL_ADVANCE, &SRowSet)) != MAPI_E_NOT_FOUND && SRowSet.cRows) {
-               for (i = 0; i < SRowSet.cRows; i++) {
-                       lpProp = get_SPropValue_SRowSet(&SRowSet, PR_MID);
-                       if (lpProp != NULL) {
-                               mid = (const uint64_t *)get_SPropValue(lpProp, PR_MID);
-                               if (*mid == msgid) {
-                                       mapi_object_init(&obj_message);
-                                       retval = OpenMessage(obj_store,
-                                                            SRowSet.aRow[i].lpProps[0].value.d,
-                                                            SRowSet.aRow[i].lpProps[1].value.d,
-                                                            &obj_message, 0);
-                                       if (GetLastError() == MAPI_E_SUCCESS) {
-                                               retval = GetPropsAll(&obj_message, &properties_array);
-                                               if (retval != MAPI_E_SUCCESS) return retval;
-                                               id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
-                                                                    SRowSet.aRow[i].lpProps[0].value.d,
-                                                                    SRowSet.aRow[i].lpProps[1].value.d);
-                                               mapidump_message(&properties_array, id, NULL);
-                                               mapi_object_release(&obj_message);
-                                               talloc_free(id);
-
-                                               goto end;
-                                       }
-                                       mapi_object_release(&obj_message);
-                               }
-                       }
-               }
-       }
-end:
-       mapi_object_release(&obj_table);
-       mapi_object_release(&obj_inbox);
-
-       talloc_free(mem_ctx);
-       return MAPI_E_SUCCESS;
-}
-
-
-static int callback(uint16_t NotificationType, void *NotificationData, void *private_data)
-{
-       struct NewMailNotification      *newmail;
-       struct HierarchyTableChange     *htable;
-       struct ContentsTableChange      *ctable;
-       struct ContentsTableChange      *stable;
-       enum MAPISTATUS                 retval;
-
-       switch(NotificationType) {
-       case fnevNewMail:
-       case fnevNewMail|fnevMbit:
-               DEBUG(0, ("[+] New mail Received\n"));
-               newmail = (struct NewMailNotification *) NotificationData;
-               mapidump_newmail(newmail, "\t");
-               retval = openchangeclient_findmail((mapi_object_t *)private_data, newmail->MID);
-               mapi_errstr("openchangeclient_findmail", GetLastError());
-               break;
-       case fnevObjectCreated:
-               DEBUG(0, ("[+] Folder Created\n"));
-               break;
-       case fnevObjectDeleted:
-               DEBUG(0, ("[+] Folder Deleted\n"));
-               break;
-       case fnevObjectModified:
-       case fnevTbit|fnevObjectModified:
-       case fnevUbit|fnevObjectModified:
-       case fnevTbit|fnevUbit|fnevObjectModified:
-               DEBUG(0, ("[+] Folder Modified\n"));
-               break;
-       case fnevObjectMoved:
-               DEBUG(0, ("[+] Folder Moved\n"));
-               break;
-       case fnevObjectCopied:
-               DEBUG(0, ("[+] Folder Copied\n"));
-               break;
-       case fnevSearchComplete:
-               DEBUG(0, ("[+] Search complete in search folder\n"));
-               break;
-       case fnevTableModified:
-               htable = (struct HierarchyTableChange *) NotificationData;
-               DEBUG(0, ("[+] Hierarchy Table: "));
-               switch (htable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       case fnevStatusObjectModified:
-               DEBUG(0, ("[+] ICS Notification\n"));
-               break;
-       case fnevMbit|fnevObjectCreated:
-               DEBUG(0, ("[+] Message created\n"));
-               break;
-       case fnevMbit|fnevObjectDeleted:
-               DEBUG(0, ("[+] Message deleted\n"));
-       case fnevMbit|fnevObjectModified:
-               DEBUG(0, ("[+] Message modified\n"));
-       case fnevMbit|fnevObjectMoved:
-               DEBUG(0, ("[+] Message moved\n"));
-       case fnevMbit|fnevObjectCopied:
-               DEBUG(0, ("[+] Message copied\n"));
-       case fnevMbit|fnevTableModified:
-               ctable = (struct ContentsTableChange *) NotificationData;
-               DEBUG(0, ("[+] Contents Table: "));
-               switch (ctable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       case fnevMbit|fnevSbit|fnevObjectDeleted:
-               DEBUG(0, ("[+] A message is no longer part of a search folder\n"));
-               break;
-       case fnevMbit|fnevSbit|fnevObjectModified:
-               DEBUG(0, ("[+] A property on a message in a search folder has changed\n"));
-       case fnevMbit|fnevSbit|fnevTableModified:
-               stable = (struct ContentsTableChange *) NotificationData;
-               DEBUG(0, ("[+] Search Table: "));
-               switch (stable->TableEvent) {
-               case TABLE_CHANGED:
-                       DEBUG(0, (" changed\n"));
-                       break;
-               case TABLE_ROW_ADDED:
-                       DEBUG(0, ("row added\n"));
-                       break;
-               case TABLE_ROW_DELETED:
-                       DEBUG(0, ("row deleted\n"));
-                       break;
-               case TABLE_ROW_MODIFIED:
-                       DEBUG(0, ("row modified\n"));
-                       break;
-               case TABLE_RESTRICT_DONE:
-                       DEBUG(0, ("restriction done\n"));
-                       break;
-               default:
-                       DEBUG(0, ("\n"));
-                       break;
-               }
-               break;
-       default:
-               printf("[+] Unsupported notification (0x%x)\n", NotificationType);
-               break;
-       }
-
-       return 0;
-}
-
-
-static bool openchangeclient_notifications(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_inbox;
-       mapi_id_t               fid;
-       uint32_t                ulConnection;
-       uint16_t                ulEventMask;
-       struct mapi_session     *session;
-
-       /* Register notification */
-       session = mapi_object_get_session(obj_store);
-       retval = RegisterNotification(session, 0);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       if (oclient->pf == true) {
-               retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_inbox, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return retval;
-       } else {
-               /* Retrieve Inbox folder ID */
-               retval = GetDefaultFolder(obj_store, &fid, olFolderInbox);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               /* Open Inbox folder */
-               mapi_object_init(&obj_inbox);
-               retval = OpenFolder(obj_store, fid, &obj_inbox);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       /* subscribe Inbox to receive newmail notifications */
-       ulEventMask = fnevNewMail|fnevObjectCreated|fnevObjectDeleted|
-               fnevObjectModified|fnevObjectMoved|fnevObjectCopied|
-               fnevSearchComplete|fnevTableModified|fnevStatusObjectModified;
-       retval = Subscribe(obj_store, &ulConnection, ulEventMask, true, (mapi_notify_callback_t)callback,
-               (void*) obj_store);
-       retval = Subscribe(&obj_inbox, &ulConnection, ulEventMask, true, (mapi_notify_callback_t)callback,
-               (void*) obj_store);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* wait for notifications: infinite loop */
-       retval = MonitorNotification(mapi_object_get_session(obj_store), (void *)obj_store, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = Unsubscribe(mapi_object_get_session(obj_store), ulConnection);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_release(&obj_inbox);
-
-       return true;
-}
-
-
-static bool openchangeclient_mkdir(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_child;
-       mapi_object_t           obj_tis;
-       mapi_id_t               id_inbox;
-
-       mapi_object_init(&obj_tis);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_child);
-
-       if (oclient->folder) {
-               retval = GetDefaultFolder(obj_store, &id_inbox, olFolderTopInformationStore);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_inbox, &obj_tis);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = openchangeclient_getdir(mem_ctx, &obj_tis, &obj_folder, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return false;
-       } else {
-               retval = GetDefaultFolder(obj_store, &id_inbox, olFolderInbox);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = OpenFolder(obj_store, id_inbox, &obj_folder);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-
-       retval = CreateFolder(&obj_folder, FOLDER_GENERIC, oclient->folder_name, 
-                             oclient->folder_comment, OPEN_IF_EXISTS, &obj_child);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_release(&obj_child);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_tis);
-
-       return true;
-}
-
-
-static bool openchangeclient_rmdir(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_child;
-       mapi_object_t           obj_tis;
-       mapi_id_t               id_inbox;
-
-       mapi_object_init(&obj_tis);
-       mapi_object_init(&obj_folder);
-       mapi_object_init(&obj_child);
-
-       if (oclient->folder) {
-               printf("Removing folder within %s\n", oclient->folder);
-               retval = GetDefaultFolder(obj_store, &id_inbox, olFolderTopInformationStore);
-               if (retval != MAPI_E_SUCCESS) return false;
-               
-               retval = OpenFolder(obj_store, id_inbox, &obj_tis);
-               if (retval != MAPI_E_SUCCESS) return false;
-
-               retval = openchangeclient_getdir(mem_ctx, &obj_tis, &obj_folder, oclient->folder);
-               if (retval != MAPI_E_SUCCESS) return false;
-       } else {
-               retval = GetDefaultFolder(obj_store, &id_inbox, olFolderInbox);
-               if (retval != MAPI_E_SUCCESS) return false;
-               
-               retval = OpenFolder(obj_store, id_inbox, &obj_folder);
-               if (retval != MAPI_E_SUCCESS) return false;
-       }
-       
-       retval = openchangeclient_getdir(mem_ctx, &obj_folder, &obj_child, oclient->folder_name);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       retval = EmptyFolder(&obj_child);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       printf("obj_child fid = 0x%"PRIx64"\n", mapi_object_get_id(&obj_child));
-
-       retval = DeleteFolder(&obj_folder, mapi_object_get_id(&obj_child),
-                             DEL_FOLDERS, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       mapi_object_release(&obj_child);
-       mapi_object_release(&obj_folder);
-       mapi_object_release(&obj_tis);
-       
-       return true;
-}
-
-static bool openchangeclient_userlist(TALLOC_CTX *mem_ctx, 
-                                     struct mapi_session *session)
-{
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
-       enum MAPISTATUS         retval;
-       uint32_t                i;
-       uint32_t                count;
-       uint8_t                 ulFlags;
-       uint32_t                rowsFetched = 0;
-       uint32_t                totalRecs = 0;
-
-       retval = GetGALTableCount(session, &totalRecs);
-       printf("Total Number of entries in GAL: %d\n", totalRecs);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0xc,
-                                         PR_INSTANCE_KEY,
-                                         PR_ENTRYID,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_EMAIL_ADDRESS_UNICODE,
-                                         PR_DISPLAY_TYPE,
-                                         PR_OBJECT_TYPE,
-                                         PR_ADDRTYPE_UNICODE,
-                                         PR_OFFICE_TELEPHONE_NUMBER_UNICODE,
-                                         PR_OFFICE_LOCATION_UNICODE,
-                                         PR_TITLE_UNICODE,
-                                         PR_COMPANY_NAME_UNICODE,
-                                         PR_ACCOUNT_UNICODE);
-
-       count = 0x7;
-       ulFlags = TABLE_START;
-       do {
-               count += 0x2;
-               retval = GetGALTable(session, SPropTagArray, &SRowSet, count, ulFlags);
-               if ((!SRowSet) || (!(SRowSet->aRow))) {
-                       return false;
-               }
-               rowsFetched = SRowSet->cRows;
-               if (rowsFetched) {
-                       for (i = 0; i < rowsFetched; i++) {
-                               mapidump_PAB_entry(&SRowSet->aRow[i]);
-                       }
-               }
-               ulFlags = TABLE_CUR;
-               MAPIFreeBuffer(SRowSet);
-       } while (rowsFetched == count);
-       mapi_errstr("GetPABTable", GetLastError());
-
-       MAPIFreeBuffer(SPropTagArray);
-
-       return true;
-}
-
-
-static bool openchangeclient_ocpf_syntax(struct oclient *oclient)
-{
-       int                     ret;
-       struct ocpf_file        *element;
-       uint32_t                context_id;
-
-       /* Sanity checks */
-       if (!oclient->ocpf_files || !oclient->ocpf_files->next) {
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       /* Step 1. Initialize OCPF context */
-       ret = ocpf_init();
-       if (ret == -1) {
-               errno = MAPI_E_CALL_FAILED;
-               return false;
-       }
-
-       /* Step2. Parse OCPF files */
-       for (element = oclient->ocpf_files; element->next; element = element->next) {
-         ret = ocpf_new_context(element->filename, &context_id, OCPF_FLAGS_READ);
-               if (ret == -1) {
-                       errno = MAPI_E_INVALID_PARAMETER;
-                       return false;
-               }
-               ret = ocpf_parse(context_id);
-               if (ret == -1) {
-                       DEBUG(0, ("ocpf_parse failed ...\n"));
-                       errno = MAPI_E_INVALID_PARAMETER;
-                       return false;
-               }
-
-               /* Dump OCPF contents */
-               ocpf_dump(context_id);
-
-               ret = ocpf_del_context(context_id);
-       }
-
-
-       /* Step4. Release OCPF context */
-       ret = ocpf_release();
-       if (ret == -1) {
-               errno = MAPI_E_CALL_FAILED;
-               return false;
-       }
-
-       return true;
-}
-
-
-static bool openchangeclient_ocpf_sender(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS         retval;
-       int                     ret;
-       struct ocpf_file        *element;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_message;
-       uint32_t                cValues = 0;
-       struct SPropValue       *lpProps;
-       uint32_t                context_id;
-
-       /* Sanity Check */
-       if (!oclient->ocpf_files || !oclient->ocpf_files->next) {
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       /* Step1. Initialize OCPF context */
-       ret = ocpf_init();
-       if (ret == -1) {
-               errno = MAPI_E_CALL_FAILED;
-               return false;
-       }
-
-       /* Step2. Parse OCPF files */
-       for (element = oclient->ocpf_files; element->next; element = element->next) {
-         ret = ocpf_new_context(element->filename, &context_id, OCPF_FLAGS_READ);
-               ret = ocpf_parse(context_id);
-               if (ret == -1) {
-                       errno = MAPI_E_INVALID_PARAMETER;
-                       return false;
-               }
-       }
-
-       /* Step3. Open destination folder using ocpf API */
-       mapi_object_init(&obj_folder);
-       retval = ocpf_OpenFolder(context_id, obj_store, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step4. Create the message */
-       mapi_object_init(&obj_message);
-       retval = CreateMessage(&obj_folder, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step5, Set message recipients */
-       retval = ocpf_set_Recipients(mem_ctx, context_id, &obj_message);
-       if (retval != MAPI_E_SUCCESS && GetLastError() != MAPI_E_NOT_FOUND) return false;
-       errno = MAPI_E_SUCCESS;
-
-       /* Step6. Set message properties */
-       retval = ocpf_set_SPropValue(mem_ctx, context_id, &obj_folder, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step7. Set message properties */
-       lpProps = ocpf_get_SPropValue(context_id, &cValues);
-
-       retval = SetProps(&obj_message, lpProps, cValues);
-       MAPIFreeBuffer(lpProps);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step8. Save message */
-       retval = SaveChangesMessage(&obj_folder, &obj_message, KeepOpenReadOnly);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-
-       ocpf_del_context(context_id);
-
-       return true;
-}
-
-
-static bool openchangeclient_ocpf_dump(TALLOC_CTX *mem_ctx, mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS                 retval;
-       int                             ret;
-       mapi_object_t                   obj_folder;
-       mapi_object_t                   obj_message;
-       mapi_id_t                       id_tis;
-       const char                      *fid_str;
-       uint64_t                        fid;
-       uint64_t                        mid;
-       const char                      *item = NULL;
-       char                            *filename = NULL;
-       struct mapi_SPropValue_array    lpProps;
-       uint32_t                        context_id;
-
-
-       /* retrieve the FID/MID for ocpf_dump parameter */
-       item = oclient->ocpf_dump;
-
-       fid_str = strsep((char **)&item, "/");
-       if (!fid_str || !item) {
-               DEBUG(0, ("    Invalid ID: %s\n", fid_str ? fid_str : "null"));
-               errno = MAPI_E_INVALID_PARAMETER;
-               return false;
-       }
-
-       fid = strtoull(fid_str, NULL, 16);
-       mid = strtoull(item, NULL, 16);
-
-       /* Step 1. search the folder from Top Information Store */
-       mapi_object_init(&obj_folder);
-       retval = GetDefaultFolder(obj_store, &id_tis, olFolderTopInformationStore);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       retval = folder_lookup(mem_ctx, fid, obj_store, id_tis, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 2. search the message */
-       mapi_object_init(&obj_message);
-       retval = message_lookup(mem_ctx, mid, &obj_folder, &obj_message);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 3. retrieve all message properties */
-       retval = GetPropsAll(&obj_message, &lpProps);
-
-       /* Step 4. save the message */
-       ret = ocpf_init();
-
-       filename = talloc_asprintf(mem_ctx, "%"PRIx64".ocpf", mid);
-       DEBUG(0, ("OCPF output file: %s\n", filename));
-
-       ret = ocpf_new_context(filename, &context_id, OCPF_FLAGS_CREATE);
-       talloc_free(filename);
-       ret = ocpf_write_init(context_id, fid);
-
-       ret = ocpf_write_auto(context_id, &obj_message, &lpProps);
-       if (ret == OCPF_SUCCESS) {
-               ret = ocpf_write_commit(context_id);
-       } 
-
-       ret = ocpf_del_context(context_id);
-
-       ret = ocpf_release();
-
-       mapi_object_release(&obj_message);
-       mapi_object_release(&obj_folder);
-
-       return true;
-}
-
-
-static bool openchangeclient_freebusy(mapi_object_t *obj_store, struct oclient *oclient)
-{
-       enum MAPISTATUS                 retval;
-       struct SRow                     aRow;
-       const char                      *message_name;
-       uint32_t                        i;
-       const uint32_t                  *publish_start;
-       const uint32_t                  *publish_end;
-       const struct LongArray_r        *busy_months;
-       const struct BinaryArray_r      *busy_events;
-       const struct LongArray_r        *tentative_months;
-       const struct BinaryArray_r      *tentative_events;
-       const struct LongArray_r        *oof_months;
-       const struct BinaryArray_r      *oof_events;
-       uint32_t                        year;
-       uint32_t                        event_year;
-
-       /* Step 1. Retrieve FreeBusy data for the given user */
-       retval = GetUserFreeBusyData(obj_store, oclient->freebusy, &aRow);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       /* Step 2. Dump properties */
-       message_name = (const char *) find_SPropValue_data(&aRow, PR_NORMALIZED_SUBJECT);
-       publish_start = (const uint32_t *) find_SPropValue_data(&aRow, PR_FREEBUSY_START_RANGE);
-       publish_end = (const uint32_t *) find_SPropValue_data(&aRow, PR_FREEBUSY_END_RANGE);
-       busy_months = (const struct LongArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_BUSY_MONTHS);
-       busy_events = (const struct BinaryArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_BUSY_EVENTS);
-       tentative_months = (const struct LongArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_TENTATIVE_MONTHS);
-       tentative_events = (const struct BinaryArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_TENTATIVE_EVENTS);
-       oof_months = (const struct LongArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_OOF_MONTHS);
-       oof_events = (const struct BinaryArray_r *) find_SPropValue_data(&aRow, PR_FREEBUSY_OOF_EVENTS);
-
-       year = GetFreeBusyYear(publish_start);
-
-       DEBUG(0, ("FreeBusy (%s):\n", message_name));
-       mapidump_date_SPropValue(aRow.lpProps[1], "* FreeBusy Last Modification Time", "\t");
-       mapidump_freebusy_date(*publish_start, "\t* FreeBusy Publishing Start:");
-       mapidump_freebusy_date(*publish_end, "\t *FreeBusy Publishing End:  ");
-
-       if (busy_months && ((*(const uint32_t *) busy_months) != MAPI_E_NOT_FOUND) &&
-           busy_events && ((*(const uint32_t *) busy_events) != MAPI_E_NOT_FOUND)) {
-               DEBUG(0, ("\t* Busy Events:\n"));
-               for (i = 0; i < busy_months->cValues; i++) {
-                       event_year = mapidump_freebusy_year(busy_months->lpl[i], year);
-                       DEBUG(0, ("\t\t* %s %u:\n", mapidump_freebusy_month(busy_months->lpl[i], event_year), event_year)); 
-                       mapidump_freebusy_event(&busy_events->lpbin[i], busy_months->lpl[i], event_year, "\t\t\t* ");
-               }
-       }
-
-       if (tentative_months && ((*(const uint32_t *) tentative_months) != MAPI_E_NOT_FOUND) &&
-           tentative_events && ((*(const uint32_t *) tentative_events) != MAPI_E_NOT_FOUND)) {
-               DEBUG(0, ("\t* Tentative Events:\n"));
-               for (i = 0; i < tentative_months->cValues; i++) {
-                       event_year = mapidump_freebusy_year(tentative_months->lpl[i], year);
-                       DEBUG(0, ("\t\t* %s %u:\n", mapidump_freebusy_month(tentative_months->lpl[i], event_year), event_year));
-                       mapidump_freebusy_event(&tentative_events->lpbin[i], tentative_months->lpl[i], event_year, "\t\t\t* ");
-               }
-       }
-
-       if (oof_months && ((*(const uint32_t *) oof_months) != MAPI_E_NOT_FOUND) &&
-           oof_events && ((*(const uint32_t *) oof_events) != MAPI_E_NOT_FOUND)) {
-               DEBUG(0, ("\t* Out Of Office Events:\n"));
-               for (i = 0; i < oof_months->cValues; i++) {
-                       event_year = mapidump_freebusy_year(oof_months->lpl[i], year);
-                       DEBUG(0, ("\t\t* %s %u:\n", mapidump_freebusy_month(oof_months->lpl[i], event_year), event_year));
-                       mapidump_freebusy_event(&oof_events->lpbin[i], oof_months->lpl[i], event_year, "\t\t\t* ");
-               }
-       }
-
-       MAPIFreeBuffer(aRow.lpProps);
-
-       return true;
-}
-
-
-static void list_argument(const char *label, struct oc_element *oc_items)
-{
-       uint32_t        i;
-
-       printf("Use one of the following %s values:\n", label);
-       for (i = 0; oc_items[i].status; i++) {
-               printf("%s\n", oc_items[i].status);
-       }
-}
-
-
-static uint32_t oc_get_argument(const char *name, struct oc_element *oc_items, const char *label)
-{
-       uint32_t        i;
-
-       for (i = 0; oc_items[i].status; i++) {
-               if (!strncasecmp(oc_items[i].status, name, strlen(oc_items[i].status))) {
-                       return oc_items[i].index;
-               }
-       }
-       list_argument(label, oc_items);
-       exit (1);
-}
-
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_session     *session = NULL;
-       mapi_object_t           obj_store;
-       struct oclient          oclient;
-       poptContext             pc;
-       int                     opt;
-       bool                    opt_sendmail = false;
-       bool                    opt_sendappointment = false;
-       bool                    opt_sendcontact = false;
-       bool                    opt_sendtask = false;
-       bool                    opt_sendnote = false;
-       bool                    opt_fetchmail = false;
-       bool                    opt_deletemail = false;
-       bool                    opt_mailbox = false;
-       bool                    opt_dumpdata = false;
-       bool                    opt_notifications = false;
-       bool                    opt_mkdir = false;
-       bool                    opt_rmdir = false;
-       bool                    opt_userlist = false;
-       bool                    opt_ocpf_syntax = false;
-       bool                    opt_ocpf_sender = false;
-       const char              *opt_profdb = NULL;
-       char                    *opt_profname = NULL;
-       const char              *opt_username = NULL;
-       const char              *opt_password = NULL;
-       const char              *opt_attachments = NULL;
-       const char              *opt_fetchitems = NULL;
-       const char              *opt_html_file = NULL;
-       const char              *opt_mapi_to = NULL;
-       const char              *opt_mapi_cc = NULL;
-       const char              *opt_mapi_bcc = NULL;
-       const char              *opt_debug = NULL;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_SENDMAIL, OPT_PASSWORD, OPT_SENDAPPOINTMENT, 
-             OPT_SENDCONTACT, OPT_SENDTASK, OPT_FETCHMAIL, OPT_STOREMAIL,  OPT_DELETEMAIL, 
-             OPT_ATTACH, OPT_HTML_INLINE, OPT_HTML_FILE, OPT_MAPI_TO, OPT_MAPI_CC, 
-             OPT_MAPI_BCC, OPT_MAPI_SUBJECT, OPT_MAPI_BODY, OPT_MAILBOX, 
-             OPT_FETCHITEMS, OPT_MAPI_LOCATION, OPT_MAPI_STARTDATE, OPT_MAPI_ENDDATE, 
-             OPT_MAPI_BUSYSTATUS, OPT_NOTIFICATIONS, OPT_DEBUG, OPT_DUMPDATA, 
-             OPT_MAPI_EMAIL, OPT_MAPI_FULLNAME, OPT_MAPI_CARDNAME,
-             OPT_MAPI_TASKSTATUS, OPT_MAPI_IMPORTANCE, OPT_MAPI_LABEL, OPT_PF, 
-             OPT_FOLDER, OPT_MAPI_COLOR, OPT_SENDNOTE, OPT_MKDIR, OPT_RMDIR,
-             OPT_FOLDER_NAME, OPT_FOLDER_COMMENT, OPT_USERLIST, OPT_MAPI_PRIVATE,
-             OPT_UPDATE, OPT_DELETEITEMS, OPT_OCPF_FILE, OPT_OCPF_SYNTAX,
-             OPT_OCPF_SENDER, OPT_OCPF_DUMP, OPT_FREEBUSY, OPT_FORCE, OPT_FETCHSUMMARY,
-             OPT_USERNAME };
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", NULL },
-               {"pf", 0, POPT_ARG_NONE, NULL, OPT_PF, "access public folders instead of mailbox", NULL },
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", NULL },
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", NULL },
-               {"username", 0, POPT_ARG_STRING, NULL, OPT_USERNAME, "set the username of the mailbox to use", NULL },
-               {"sendmail", 'S', POPT_ARG_NONE, NULL, OPT_SENDMAIL, "send a mail", NULL },
-               {"sendappointment", 0, POPT_ARG_NONE, NULL, OPT_SENDAPPOINTMENT, "send an appointment", NULL },
-               {"sendcontact", 0, POPT_ARG_NONE, NULL, OPT_SENDCONTACT, "send a contact", NULL },
-               {"sendtask", 0, POPT_ARG_NONE, NULL, OPT_SENDTASK, "send a task", NULL },
-               {"sendnote", 0, POPT_ARG_NONE, NULL, OPT_SENDNOTE, "send a note", NULL },
-               {"fetchmail", 'F', POPT_ARG_NONE, NULL, OPT_FETCHMAIL, "fetch user INBOX mails", NULL },
-               {"fetchsummary", 0, POPT_ARG_NONE, NULL, OPT_FETCHSUMMARY, "fetch message summaries only", NULL },
-               {"storemail", 'G', POPT_ARG_STRING, NULL, OPT_STOREMAIL, "retrieve a mail on the filesystem", NULL },
-               {"fetch-items", 'i', POPT_ARG_STRING, NULL, OPT_FETCHITEMS, "fetch specified user INBOX items", NULL },
-               {"freebusy", 0, POPT_ARG_STRING, NULL, OPT_FREEBUSY, "display free / busy information for the specified user", NULL },
-               {"force", 0, POPT_ARG_NONE, NULL, OPT_FORCE, "force openchangeclient behavior in some circumstances", NULL },
-               {"delete", 0, POPT_ARG_STRING, NULL, OPT_DELETEITEMS, "delete a message given its unique ID", NULL },
-               {"update", 'u', POPT_ARG_STRING, NULL, OPT_UPDATE, "update the specified item", NULL },
-               {"mailbox", 'm', POPT_ARG_NONE, NULL, OPT_MAILBOX, "list mailbox folder summary", NULL },
-               {"deletemail", 'D', POPT_ARG_NONE, NULL, OPT_DELETEMAIL, "delete a mail from user INBOX", NULL },
-               {"attachments", 'A', POPT_ARG_STRING, NULL, OPT_ATTACH, "send a list of attachments", NULL },
-               {"html-inline", 'I', POPT_ARG_STRING, NULL, OPT_HTML_INLINE, "send PR_HTML content", NULL },
-               {"html-file", 'W', POPT_ARG_STRING, NULL, OPT_HTML_FILE, "use HTML file as content", NULL },
-               {"to", 't', POPT_ARG_STRING, NULL, OPT_MAPI_TO, "set the To recipients", NULL },
-               {"cc", 'c', POPT_ARG_STRING, NULL, OPT_MAPI_CC, "set the Cc recipients", NULL },
-               {"bcc", 'b', POPT_ARG_STRING, NULL, OPT_MAPI_BCC, "set the Bcc recipients", NULL },
-               {"subject", 's', POPT_ARG_STRING, NULL, OPT_MAPI_SUBJECT, "set the mail subject", NULL },
-               {"body", 'B', POPT_ARG_STRING, NULL, OPT_MAPI_BODY, "set the mail body", NULL },
-               {"location", 0, POPT_ARG_STRING, NULL, OPT_MAPI_LOCATION, "set the item location", NULL },
-               {"label", 0, POPT_ARG_STRING, NULL, OPT_MAPI_LABEL, "set the event label", NULL },
-               {"dtstart", 0, POPT_ARG_STRING, NULL, OPT_MAPI_STARTDATE, "set the event start date", NULL },
-               {"dtend", 0, POPT_ARG_STRING, NULL, OPT_MAPI_ENDDATE, "set the event end date", NULL },
-               {"busystatus", 0, POPT_ARG_STRING, NULL, OPT_MAPI_BUSYSTATUS, "set the item busy status", NULL },
-               {"taskstatus", 0, POPT_ARG_STRING, NULL, OPT_MAPI_TASKSTATUS, "set the task status", NULL },
-               {"importance", 0, POPT_ARG_STRING, NULL, OPT_MAPI_IMPORTANCE, "Set the item importance", NULL },
-               {"email", 0, POPT_ARG_STRING, NULL, OPT_MAPI_EMAIL, "set the email address", NULL },
-               {"fullname", 0, POPT_ARG_STRING, NULL, OPT_MAPI_FULLNAME, "set the full name", NULL },
-               {"cardname", 0, POPT_ARG_STRING, NULL, OPT_MAPI_CARDNAME, "set a contact card name", NULL },
-               {"color", 0, POPT_ARG_STRING, NULL, OPT_MAPI_COLOR, "set the note color", NULL },
-               {"notifications", 0, POPT_ARG_NONE, NULL, OPT_NOTIFICATIONS, "monitor INBOX newmail notifications", NULL },
-               {"folder", 0, POPT_ARG_STRING, NULL, OPT_FOLDER, "set the folder to use instead of inbox", NULL },
-               {"mkdir", 0, POPT_ARG_NONE, NULL, OPT_MKDIR, "create a folder", NULL },
-               {"rmdir", 0, POPT_ARG_NONE, NULL, OPT_RMDIR, "delete a folder", NULL },
-               {"userlist", 0, POPT_ARG_NONE, NULL, OPT_USERLIST, "list Address Book entries", NULL },
-               {"folder-name", 0, POPT_ARG_STRING, NULL, OPT_FOLDER_NAME, "set the folder name", NULL },
-               {"folder-comment", 0, POPT_ARG_STRING, NULL, OPT_FOLDER_COMMENT, "set the folder comment", NULL },
-               {"debuglevel", 'd', POPT_ARG_STRING, NULL, OPT_DEBUG, "set Debug Level", NULL },
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "dump the hex data", NULL },
-               {"private", 0, POPT_ARG_NONE, NULL, OPT_MAPI_PRIVATE, "set the private flag on messages", NULL },
-               {"ocpf-file", 0, POPT_ARG_STRING, NULL, OPT_OCPF_FILE, "set OCPF file", NULL },
-               {"ocpf-dump", 0, POPT_ARG_STRING, NULL, OPT_OCPF_DUMP, "dump message into OCPF file", NULL },
-               {"ocpf-syntax", 0, POPT_ARG_NONE, NULL, OPT_OCPF_SYNTAX, "check OCPF files syntax", NULL },
-               {"ocpf-sender", 0, POPT_ARG_NONE, NULL, OPT_OCPF_SENDER, "send message using OCPF files contents", NULL },
-               POPT_OPENCHANGE_VERSION
-               {NULL, 0, 0, NULL, 0, NULL, NULL}
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "openchangeclient");
-
-       init_oclient(&oclient);
-
-       pc = poptGetContext("openchangeclient", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_PF:
-                       oclient.pf = true;
-                       break;
-               case OPT_FOLDER:
-                       oclient.folder = poptGetOptArg(pc);
-                       break;
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               case OPT_USERLIST:
-                       opt_userlist = true;
-                       break;
-               case OPT_MKDIR:
-                       opt_mkdir = true;
-                       break;
-               case OPT_RMDIR:
-                       opt_rmdir = true;
-                       break;
-               case OPT_FOLDER_NAME:
-                       oclient.folder_name = poptGetOptArg(pc);
-                       break;
-               case OPT_FOLDER_COMMENT:
-                       oclient.folder_comment = poptGetOptArg(pc);
-                       break;
-               case OPT_NOTIFICATIONS:
-                       opt_notifications = true;
-                       break;
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_USERNAME:
-                       opt_username = talloc_strdup(mem_ctx, poptGetOptArg(pc));
-                       break;
-               case OPT_MAILBOX:
-                       opt_mailbox = true;
-                       break;
-               case OPT_FETCHITEMS:
-                       opt_fetchitems = poptGetOptArg(pc);
-                       break;
-               case OPT_FETCHSUMMARY:
-                       oclient.summary = true;
-                       break;
-               case OPT_DELETEITEMS:
-                       oclient.delete = poptGetOptArg(pc);
-                       break;
-               case OPT_FREEBUSY:
-                       oclient.freebusy = poptGetOptArg(pc);
-                       break;
-               case OPT_UPDATE:
-                       oclient.update = poptGetOptArg(pc);
-                       break;
-               case OPT_SENDMAIL:
-                       opt_sendmail = true;
-                       break;
-               case OPT_SENDAPPOINTMENT:
-                       opt_sendappointment = true;
-                       break;
-               case OPT_SENDCONTACT:
-                       opt_sendcontact = true;
-                       break;
-               case OPT_SENDTASK:
-                       opt_sendtask = true;
-                       break;
-               case OPT_SENDNOTE:
-                       opt_sendnote = true;
-                       break;
-               case OPT_FETCHMAIL:
-                       opt_fetchmail = true;
-                       break;
-               case OPT_STOREMAIL:
-                       oclient.store_folder = poptGetOptArg(pc);
-                       break;
-               case OPT_DELETEMAIL:
-                       opt_deletemail = true;
-                       break;
-               case OPT_ATTACH:
-                       opt_attachments = poptGetOptArg(pc);
-                       break;
-               case OPT_HTML_INLINE:
-                       oclient.pr_html_inline = poptGetOptArg(pc);
-                       break;
-               case OPT_HTML_FILE:
-                       opt_html_file = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_TO:
-                       opt_mapi_to = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_CC:
-                       opt_mapi_cc = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_BCC:
-                       opt_mapi_bcc = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_SUBJECT:
-                       oclient.subject = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_BODY:
-                       oclient.pr_body = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_LOCATION:
-                       oclient.location = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_STARTDATE:
-                       oclient.dtstart = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_ENDDATE:
-                       oclient.dtend = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_BUSYSTATUS:
-                       oclient.busystatus = oc_get_argument(poptGetOptArg(pc),
-                                                            oc_busystatus,
-                                                            "busystatus");
-                       break;
-               case OPT_MAPI_LABEL:
-                       oclient.label = oc_get_argument(poptGetOptArg(pc),
-                                                       oc_label,
-                                                       "label");
-                       break;
-               case OPT_MAPI_IMPORTANCE:
-                       oclient.importance = oc_get_argument(poptGetOptArg(pc), 
-                                                            oc_importance, 
-                                                            "importance");
-                       break;
-               case OPT_MAPI_TASKSTATUS:
-                       oclient.taskstatus = oc_get_argument(poptGetOptArg(pc),
-                                                            oc_taskstatus,
-                                                            "taskstatus");
-                       break;
-               case OPT_MAPI_COLOR:
-                       oclient.color = oc_get_argument(poptGetOptArg(pc),
-                                                       oc_color,
-                                                       "color");
-                       break;
-               case OPT_MAPI_EMAIL:
-                       oclient.email = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_FULLNAME:
-                       oclient.full_name = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_CARDNAME:
-                       oclient.card_name = poptGetOptArg(pc);
-                       break;
-               case OPT_MAPI_PRIVATE:
-                       oclient.private = true;
-                       break;
-               case OPT_OCPF_FILE:
-               {
-                       struct ocpf_file        *element;
-                       
-                       if (!oclient.ocpf_files) {
-                               oclient.ocpf_files = talloc_zero(mem_ctx, struct ocpf_file);
-                       }
-                       
-                       element = talloc_zero(mem_ctx, struct ocpf_file);
-                       element->filename = talloc_strdup(mem_ctx, poptGetOptArg(pc));
-                       DLIST_ADD(oclient.ocpf_files, element);
-                       break;
-               }
-               case OPT_OCPF_SYNTAX:
-                       opt_ocpf_syntax = true;
-                       break;
-               case OPT_OCPF_SENDER:
-                       opt_ocpf_sender = true;
-                       break;
-               case OPT_OCPF_DUMP:
-                       oclient.ocpf_dump = poptGetOptArg(pc);
-                       break;
-               case OPT_FORCE:
-                       oclient.force = true;
-                       break;
-               }
-       }
-
-       /* Sanity check on options */
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       if (opt_sendmail && !opt_mapi_to && !opt_mapi_cc && !opt_mapi_bcc) {
-               printf("You need to specify at least one recipient\n");
-               exit (1);
-       }
-
-       if (opt_sendmail && (!oclient.pr_body && !oclient.pr_html_inline && !opt_html_file)) {
-               printf("No body specified (body, html-inline or html-file)\n");
-               exit (1);
-       }
-
-       if ((opt_sendmail && oclient.pf == true && !oclient.folder) ||
-           (oclient.pf == true && !oclient.folder && !opt_mailbox && !oclient.freebusy)) {
-               printf("--folder option is mandatory\n");
-               exit (1);
-       }
-
-       if (opt_html_file && oclient.pr_body) {
-               printf("PR_BODY and PR_HTML can't be set at the same time\n");
-               exit (1);
-       }
-
-       if (oclient.pr_body && oclient.pr_html_inline) {
-               printf("Inline HTML and PR_BODY content can't be set simulteanously\n");
-               exit (1);
-       }
-
-       if (opt_html_file && oclient.pr_html_inline) {
-               printf("PR_HTML from file and stdin can't be specified at the same time\n");
-               exit (1);
-       }
-       
-       if (opt_html_file) {
-               oclient_read_file(mem_ctx, opt_html_file, &oclient, PR_HTML);
-       }
-
-       if (opt_attachments) {
-               if (oclient_parse_attachments(mem_ctx, opt_attachments, &oclient) == false) {
-                       printf("Unable to parse one of the specified attachments\n");
-                       exit (1);
-               }
-       }
-
-       if (opt_mkdir && !oclient.folder_name) {
-               printf("mkdir requires --folder-name to be defined\n");
-               exit (1);
-       }
-
-       /* One of the rare options which doesn't require MAPI to get
-        *   initialized 
-        */
-       if (opt_ocpf_syntax) {
-               bool ret = openchangeclient_ocpf_syntax(&oclient);
-               mapi_errstr("OCPF Syntax", GetLastError());
-               if (ret != true) {
-                       exit(1);
-               }
-               exit (0);
-       }
-       
-       /**
-        * Initialize MAPI subsystem
-        */
-
-       retval = MAPIInitialize(&oclient.mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(oclient.mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(oclient.mapi_ctx, atoi(opt_debug));
-       }
-       
-       /* If no profile is specified try to load the default one from
-        * the database 
-        */
-
-       if (!opt_profname) {
-               retval = GetDefaultProfile(oclient.mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       exit (1);
-               }
-       }
-
-       retval = MapiLogonEx(oclient.mapi_ctx, &session, opt_profname, opt_password);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", GetLastError());
-               exit (1);
-       }
-
-       if (opt_userlist) {
-               if (false == openchangeclient_userlist(mem_ctx, session)) {
-                       exit(1);
-               } else {
-                       exit(0);
-               }
-       }
-
-       /**
-        * Open Default Message Store
-        */
-
-       mapi_object_init(&obj_store);
-       if (oclient.pf == true) {
-               retval = OpenPublicFolder(session, &obj_store);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("OpenPublicFolder", GetLastError());
-                       exit (1);
-               }
-       } else if (opt_username) {
-               retval = OpenUserMailbox(session, opt_username, &obj_store);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("OpenUserMailbox", GetLastError());
-                       exit (1);
-               }
-       } else {
-               retval = OpenMsgStore(session, &obj_store);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("OpenMsgStore", GetLastError());
-                       exit (1);
-               }
-       }
-
-       /**
-        * OCPF sending command
-        */
-       if (opt_ocpf_sender) {
-               bool ret = openchangeclient_ocpf_sender(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("OCPF Sender", GetLastError());
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       if (oclient.ocpf_dump) {
-               bool ret = openchangeclient_ocpf_dump(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("OCPF Dump", GetLastError());
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       if (opt_fetchitems) {
-               bool ret = openchangeclient_fetchitems(mem_ctx, &obj_store, opt_fetchitems, &oclient);
-               mapi_errstr("fetchitems", GetLastError());
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       if (oclient.delete) {
-               bool ret = openchangeclient_deleteitems(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("deleteitems", GetLastError());
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       if (opt_mailbox) {
-               if (oclient.pf == true) {
-                       bool ret = openchangeclient_pf(mem_ctx, &obj_store);
-                       mapi_errstr("public folder", GetLastError());
-                       if (ret != true) {
-                               goto end;
-                       }
-               } else {
-                       bool ret = openchangeclient_mailbox(mem_ctx, &obj_store);
-                       mapi_errstr("mailbox", GetLastError());
-                       if (ret != true) {
-                               goto end;
-                       }
-               }
-       }
-
-       /* MAPI email operations */
-       if (opt_sendmail) {
-               /* recipients management */
-               oclient.mapi_to = get_cmdline_recipients(mem_ctx, opt_mapi_to);
-               oclient.mapi_cc = get_cmdline_recipients(mem_ctx, opt_mapi_cc);
-               oclient.mapi_bcc = get_cmdline_recipients(mem_ctx, opt_mapi_bcc);
-
-               retval = openchangeclient_sendmail(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("sendmail", GetLastError());
-               if (retval != true) {
-                       goto end;
-               }
-       }
-
-       if (opt_fetchmail) {
-               retval = openchangeclient_fetchmail(&obj_store, &oclient);
-               mapi_errstr("fetchmail", GetLastError());
-               if (retval != true) {
-                       goto end;
-               }
-       }
-
-       if (opt_deletemail) {
-               bool ret = openchangeclient_deletemail(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("deletemail", GetLastError());
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       /* MAPI calendar operations */
-       if (opt_sendappointment) {
-               bool ret;
-               if (!oclient.dtstart && !oclient.update) {
-                       printf("You need to specify a start date (e.g: 2007-06-01 22:30:00)\n");
-                       goto end;
-               }
-               
-               if (!oclient.dtend && !oclient.update) {
-                       printf("Setting default end date\n");
-                       oclient.dtend = oclient.dtstart;
-               }
-
-               if (!oclient.update) {
-                       ret = openchangeclient_sendappointment(mem_ctx, &obj_store, &oclient);
-                       mapi_errstr("sendappointment", GetLastError());
-               } else {
-                       ret = openchangeclient_updateitem(mem_ctx, &obj_store, &oclient, IPF_APPOINTMENT);
-                       mapi_errstr("update appointment", GetLastError());
-               }
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       if (oclient.freebusy) {
-               bool ret = openchangeclient_freebusy(&obj_store, &oclient);
-               mapi_errstr("freebusy", GetLastError());
-
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       /* MAPI contact operations */
-       if (opt_sendcontact) {
-               bool ret;
-               if (!oclient.update) {
-                       ret = openchangeclient_sendcontact(mem_ctx, &obj_store, &oclient);
-                       mapi_errstr("sendcontact", GetLastError());
-               } else {
-                       ret = openchangeclient_updateitem(mem_ctx, &obj_store, &oclient, IPF_CONTACT);
-                       mapi_errstr("update contact", GetLastError());
-               }
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       /* MAPI task operations */
-       if (opt_sendtask) {
-               bool ret;
-               if (!oclient.dtstart && !oclient.update) {
-                       printf("You need to specify a start date (e.g: 2007-06-01 22:30:00)\n");
-                       goto end;
-               }
-               
-               if (!oclient.dtend && !oclient.update) {
-                       printf("Setting default end date\n");
-                       oclient.dtend = oclient.dtstart;
-               }
-
-               if (!oclient.update) {
-                       ret = openchangeclient_sendtask(mem_ctx, &obj_store, &oclient);
-                       mapi_errstr("sendtask", GetLastError());
-               } else {
-                       ret = openchangeclient_updateitem(mem_ctx, &obj_store, &oclient, IPF_TASK);
-                       mapi_errstr("update task", GetLastError());
-               }
-               if (ret != true) {
-                       goto end;
-               }
-       }
-
-       /* MAPI note operations */
-       if (opt_sendnote) {
-               bool ret;
-               if (!oclient.update) {
-                       ret = openchangeclient_sendnote(mem_ctx, &obj_store, &oclient);
-                       mapi_errstr("sendnote", GetLastError());
-               } else {
-                       ret = openchangeclient_updateitem(mem_ctx, &obj_store, &oclient, IPF_STICKYNOTE);
-                       mapi_errstr("update note", GetLastError());
-               }
-               if (ret != true) {
-                       goto end;
-               }
-       }
-       
-       /* Monitor newmail notifications */
-       if (opt_notifications) {
-               openchangeclient_notifications(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("notifications", GetLastError());
-               if (retval != true) {
-                       goto end;
-               }
-       }
-
-       /* Folder operations */
-       if (opt_mkdir) {
-               openchangeclient_mkdir(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("mkdir", GetLastError());
-               if (retval != true) {
-                       goto end;
-               }
-       }
-
-       if (opt_rmdir) {
-               openchangeclient_rmdir(mem_ctx, &obj_store, &oclient);
-               mapi_errstr("rmdir", GetLastError());
-               if (retval != true) {
-                       goto end;
-               }
-       }
-
-       /* Uninitialize MAPI subsystem */
-end:
-
-       poptFreeContext(pc);
-
-       mapi_object_release(&obj_store);
-
-       MAPIUninitialize(oclient.mapi_ctx);
-
-       talloc_free(mem_ctx);
-
-       return 0;
-}
diff --git a/branches/plugfest/utils/openchangeclient.h b/branches/plugfest/utils/openchangeclient.h
deleted file mode 100644 (file)
index 98f4275..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-   Stand-alone MAPI application
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __OPENCHANGECLIENT_H__
-#define        __OPENCHANGECLIENT_H__
-
-struct oc_property {
-       struct oc_property      *prev;
-       struct oc_property      *next;
-       uint32_t                ulPropTag;
-       const void              *data;
-       bool                    named;
-};
-
-struct ocpf_file {
-       struct ocpf_file        *prev;
-       struct ocpf_file        *next;
-       const char              *filename;
-};
-
-struct attach {
-       const char              *filename;
-       struct Binary_r         bin;
-       int                     fd;
-};
-
-struct oclient {
-       struct mapi_context     *mapi_ctx;
-       struct oc_property      *props;
-       const char              *update;
-       const char              *delete;
-       const char              *subject;
-       const char              *pr_body;
-       const char              *pr_html_inline;
-       char                    **usernames;
-       char                    **mapi_to;
-       char                    **mapi_cc;
-       char                    **mapi_bcc;
-       struct Binary_r         pr_html;
-       struct attach           *attach;
-       uint32_t                attach_num;
-       const char              *store_folder;
-       const char              *location;
-       const char              *dtstart;
-       const char              *dtend;
-       int                     busystatus;
-       int                     taskstatus;
-       int                     label;
-       bool                    private;
-       int                     importance;
-       int                     color;
-       int                     width;
-       int                     height;
-       const char              *email;
-       const char              *full_name;
-       const char              *card_name;
-       const char              *folder_name;
-       const char              *folder_comment;
-       const char              *freebusy;
-       bool                    force;
-       bool                    summary;
-       /* PF related options */
-       bool                    pf;
-       const char              *folder;
-       /* OCPF related options */
-       struct ocpf_file        *ocpf_files;
-       const char              *ocpf_dump;
-};
-
-struct itemfolder {
-       const uint32_t          olFolder;
-       const char              *container_class;
-};
-
-struct itemfolder      defaultFolders[] = {
-       {olFolderInbox,         "Mail"},
-       {olFolderCalendar,      "Appointment"},
-       {olFolderContacts,      "Contact"},
-       {olFolderTasks,         "Task"},
-       {olFolderNotes,         "Note"},
-       {0 , NULL}
-};
-
-struct oc_element {
-       uint8_t                 index;
-       const char              *status;
-};
-
-struct oc_element      oc_busystatus[] = {
-       {BUSY_STATUS_FREE,              "FREE"},
-       {BUSY_STATUS_TENTATIVE,         "TENTATIVE"},
-       {BUSY_STATUS_BUSY,              "BUSY"},
-       {BUSY_STATUS_OUTOFOFFICE,       "OUTOFOFFICE"},
-       {0 , NULL}
-};
-
-struct oc_element      oc_importance[] = {
-       {IMPORTANCE_LOW,        "LOW"},
-       {IMPORTANCE_NORMAL,     "NORMAL"},
-       {IMPORTANCE_HIGH,       "HIGH"},
-       {0, NULL}
-};
-
-struct oc_element      oc_taskstatus[] = {
-       {olTaskNotStarted,      "NOTSTARTED"},
-       {olTaskInProgress,      "PROGRESS"},
-       {olTaskComplete,        "COMPLETED"},
-       {olTaskWaiting,         "WAITING"},
-       {olTaskDeferred,        "DEFERRED"},
-       {0, NULL}
-};
-
-struct oc_element      oc_label[] = {
-       {0,                     "NONE"},
-       {1,                     "IMPORTANT"},
-       {2,                     "BUSINESS"},
-       {3,                     "PERSONAL"},
-       {4,                     "VACATION"},
-       {5,                     "MUST_ATTEND"},
-       {6,                     "TRAVEL_REQUIRED"},
-       {7,                     "NEEDS_PREPARATION"},
-       {8,                     "BIRTHDAY"},
-       {9,                     "ANNIVERSARY"},
-       {10,                    "PHONE_CALL"},
-       {0, NULL}
-};
-
-struct oc_element      oc_color[] = {
-       {olBlue,                "Blue"},
-       {olGreen,               "Green"},
-       {olPink,                "Pink"},
-       {olYellow,              "Yellow"},
-       {olWhite,               "White"},
-       {0, NULL}
-};
-
-#define        DATE_FORMAT     "%Y-%m-%d %H:%M:%S"
-
-#endif /* !__OPENCHANGECLIENT_H__ */
diff --git a/branches/plugfest/utils/openchangepfadmin.c b/branches/plugfest/utils/openchangepfadmin.c
deleted file mode 100644 (file)
index 2c6fb91..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
-   Public Folders Administration Tool
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include "libmapiadmin/libmapiadmin.h"
-#include <samba/popt.h>
-#include <param.h>
-
-#include "openchangepfadmin.h"
-#include "openchange-tools.h"
-
-static int32_t get_aclrights(const char *permission)
-{
-       uint32_t        i;
-
-       if (!permission) return -1;
-
-       for (i = 0; aclrights[i].name != NULL; i++) {
-               if (!strcmp(permission, aclrights[i].name)) {
-                       return aclrights[i].value;
-               }
-       }
-       return -1;
-}
-
-static void list_aclrights(void)
-{
-       uint32_t        i;
-
-       printf("Valid permissions:\n");
-       for (i = 0; aclrights[i].name != NULL; i++) {
-               printf("\t%s\n", aclrights[i].name);
-       }
-}
-
-static int32_t check_IPF_class(const char *dirclass)
-{
-       uint32_t        i;
-
-       if (!dirclass) return -1;
-
-       for (i = 0; IPF_class[i]; i++) {
-               if (!strcmp(dirclass, IPF_class[i])) {
-                       return 0;
-               }
-       }
-
-       return -1;
-}
-
-static void list_IPF_class(void)
-{
-       uint32_t        i;
-
-       printf("Valid IPF Classes:\n");
-       for (i = 0; IPF_class[i] != NULL; i++) {
-               printf("\t%s\n", IPF_class[i]);
-       }
-}
-
-static bool get_child_folders_pf(TALLOC_CTX *mem_ctx, mapi_object_t *parent, mapi_id_t folder_id, int count)
-{
-       enum MAPISTATUS         retval;
-       bool                    ret;
-       mapi_object_t           obj_folder;
-       mapi_object_t           obj_htable;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          rowset;
-       const char              *name;
-       const uint32_t          *child;
-       uint32_t                index;
-       const uint64_t          *fid;
-       int                     i;
-
-       mapi_object_init(&obj_folder);
-       retval = OpenFolder(parent, folder_id, &obj_folder);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(&obj_folder, &obj_htable, 0, NULL);
-       if (retval != MAPI_E_SUCCESS) return false;
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x3,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_FID,
-                                         PR_FOLDER_CHILD_COUNT);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return false;
-       
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-               for (index = 0; index < rowset.cRows; index++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[index], PR_FID);
-                       name = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_DISPLAY_NAME_UNICODE);
-                       child = (const uint32_t *)find_SPropValue_data(&rowset.aRow[index], PR_FOLDER_CHILD_COUNT);
-
-                       for (i = 0; i < count; i++) {
-                               printf("|   ");
-                       }
-                       printf("|---+ %-15s\n", name);
-                       if (*child) {
-                               ret = get_child_folders_pf(mem_ctx, &obj_folder, *fid, count + 1);
-                               if (ret == false) return ret;
-                       }
-                       
-               }
-       }
-       return true;
-}
-
-static enum MAPISTATUS openchangepfadmin_getdir(TALLOC_CTX *mem_ctx, 
-                                               mapi_object_t *obj_container,
-                                               mapi_object_t *obj_child,
-                                               const char *folder)
-{
-       enum MAPISTATUS         retval;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          rowset;
-       mapi_object_t           obj_htable;
-       const char              *name;
-       const uint64_t          *fid;
-       uint32_t                index;
-
-       mapi_object_init(&obj_htable);
-       retval = GetHierarchyTable(obj_container, &obj_htable, 0, NULL);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
-                                         PR_DISPLAY_NAME_UNICODE,
-                                         PR_FID);
-       retval = SetColumns(&obj_htable, SPropTagArray);
-       MAPIFreeBuffer(SPropTagArray);
-       if (retval != MAPI_E_SUCCESS) return MAPI_E_NOT_FOUND;
-       
-       while (((retval = QueryRows(&obj_htable, 0x32, TBL_ADVANCE, &rowset)) != MAPI_E_NOT_FOUND) && rowset.cRows) {
-               for (index = 0; index < rowset.cRows; index++) {
-                       fid = (const uint64_t *)find_SPropValue_data(&rowset.aRow[index], PR_FID);
-                       name = (const char *)find_SPropValue_data(&rowset.aRow[index], PR_DISPLAY_NAME_UNICODE);
-
-                       if (name && fid && !strcmp(name, folder)) {
-                               retval = OpenFolder(obj_container, *fid, obj_child);
-                               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-                               return MAPI_E_SUCCESS;
-                       }
-               }
-       }
-
-       errno = MAPI_E_NOT_FOUND;
-       return MAPI_E_NOT_FOUND;
-}
-
-static enum MAPISTATUS openchangepfadmin_mkdir(mapi_object_t *obj_container, 
-                                              const char *name, 
-                                              const char *comment, 
-                                              const char *type)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-       struct SPropValue       props[1];
-       uint32_t                prop_count = 0;
-
-       mapi_object_init(&obj_folder);
-       retval = CreateFolder(obj_container, FOLDER_GENERIC, name, comment, OPEN_IF_EXISTS, &obj_folder);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       if (type) {
-               set_SPropValue_proptag(&props[0], PR_CONTAINER_CLASS, (const void *) type);
-               prop_count++;
-
-               retval = SetProps(&obj_folder, props, prop_count);
-               mapi_object_release(&obj_folder);
-               MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-       }
-       
-       return MAPI_E_SUCCESS;
-}
-
-static enum MAPISTATUS openchangepfadmin_rmdir(TALLOC_CTX *mem_ctx,
-                                              mapi_object_t *obj_container,
-                                              const char *name)
-{
-       enum MAPISTATUS         retval;
-       mapi_object_t           obj_folder;
-
-       mapi_object_init(&obj_folder);
-
-       retval = openchangepfadmin_getdir(mem_ctx, obj_container, &obj_folder, name);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       retval = EmptyFolder(&obj_folder);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       retval = DeleteFolder(obj_container, mapi_object_get_id(&obj_folder),
-                             DEL_FOLDERS, NULL);
-       MAPI_RETVAL_IF(retval, GetLastError(), NULL);
-
-       mapi_object_release(&obj_folder);
-
-       return MAPI_E_SUCCESS;
-}
-
-int main(int argc, const char *argv[])
-{
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct mapi_session     *session = NULL;
-       mapi_object_t           obj_store;
-       mapi_object_t           obj_ipm_subtree;
-       mapi_object_t           obj_folder;
-       mapi_id_t               id_pf;
-       poptContext             pc;
-       int                     opt;
-       const char              *opt_profdb = NULL;
-       char                    *opt_profname = NULL;
-       const char              *opt_password = NULL;
-       const char              *opt_comment = NULL;
-       const char              *opt_dirclass = NULL;
-       const char              *opt_adduser = NULL;
-       const char              *opt_rmuser = NULL;
-       const char              *opt_apassword = NULL;
-       const char              *opt_adesc = NULL;
-       const char              *opt_acomment = NULL;
-       const char              *opt_afullname = NULL;
-       const char              *opt_addright = NULL;
-       bool                    opt_rmright = false;
-       const char              *opt_modright = NULL;
-       const char              *opt_folder = NULL;
-       const char              *opt_debug = NULL;
-       const char              *opt_username = NULL;   
-       int32_t                 opt_permission = -1;
-       bool                    opt_ipm_list = false;
-       bool                    opt_mkdir = false;
-       bool                    opt_rmdir = false;
-       bool                    opt_dumpdata = false;
-
-       enum {OPT_PROFILE_DB=1000, OPT_PROFILE, OPT_PASSWORD, OPT_IPM_LIST, 
-             OPT_MKDIR, OPT_RMDIR, OPT_COMMENT, OPT_DIRCLASS, OPT_ACL, 
-             OPT_ADDUSER, OPT_RMUSER, OPT_DEBUG, OPT_APASSWORD, OPT_ADESC, 
-             OPT_ACOMMENT, OPT_AFULLNAME, OPT_ADDRIGHT, OPT_RMRIGHT, 
-             OPT_MODRIGHT, OPT_USERNAME, OPT_FOLDER, OPT_DUMPDATA};
-
-       struct poptOption long_options[] = {
-               POPT_AUTOHELP
-               {"database", 'f', POPT_ARG_STRING, NULL, OPT_PROFILE_DB, "set the profile database path", "PATH"},
-               {"profile", 'p', POPT_ARG_STRING, NULL, OPT_PROFILE, "set the profile name", "PROFILE"},
-               {"password", 'P', POPT_ARG_STRING, NULL, OPT_PASSWORD, "set the profile password", "PASSWORD"},
-               {"apassword", 0, POPT_ARG_STRING, NULL, OPT_APASSWORD, "set the account password", "PASSWORD"},
-               {"adesc", 0, POPT_ARG_STRING, NULL, OPT_ADESC, "set the account description", "DESCRIPTION"},
-               {"acomment", 0, POPT_ARG_STRING, NULL, OPT_ACOMMENT, "set the account comment", "COMMENT"},
-               {"afullname", 0, POPT_ARG_STRING, NULL, OPT_AFULLNAME, "set the account full name", "NAME"},
-               {"list",0, POPT_ARG_NONE, NULL, OPT_IPM_LIST, "list IPM subtree directories", NULL},
-               {"mkdir", 0, POPT_ARG_NONE, NULL, OPT_MKDIR, "create a Public Folder directory", NULL},
-               {"rmdir", 0, POPT_ARG_NONE, NULL, OPT_RMDIR, "delete a Public Folder directory", NULL},
-               {"comment", 0, POPT_ARG_STRING, NULL, OPT_COMMENT, "set the folder comment", "COMMENT"},
-               {"dirclass", 0, POPT_ARG_STRING, NULL, OPT_DIRCLASS, "set the folder class", "CLASS"},
-               {"adduser", 0, POPT_ARG_STRING, NULL, OPT_ADDUSER, "add Exchange user", "USERNAME"},
-               {"rmuser", 0, POPT_ARG_STRING, NULL, OPT_RMUSER, "delete Exchange user", "USERNAME"},
-               {"addright", 0, POPT_ARG_STRING, NULL, OPT_ADDRIGHT, "add MAPI permissions to PF folder", "RIGHT"},
-               {"rmright", 0, POPT_ARG_NONE, NULL, OPT_RMRIGHT, "remove MAPI permissions to PF folder", NULL},
-               {"modright", 0, POPT_ARG_STRING, NULL, OPT_MODRIGHT, "modify MAPI permissions to PF folder", "RIGHT"},
-               {"debuglevel", 0, POPT_ARG_STRING, NULL, OPT_DEBUG, "set debug level", "LEVEL"},
-               {"dump-data", 0, POPT_ARG_NONE, NULL, OPT_DUMPDATA, "Dump the hex data", NULL},
-               {"folder", 0, POPT_ARG_STRING, NULL, OPT_FOLDER, "specify the Public Folder directory", "FOLDER"},
-               {"username", 0, POPT_ARG_STRING, NULL, OPT_USERNAME, "specify the username to use", "USERNAME"},
-               POPT_OPENCHANGE_VERSION
-               { NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
-       };
-
-       mem_ctx = talloc_named(NULL, 0, "openchangepfadmin");
-
-       pc = poptGetContext("openchangepfadmin", argc, argv, long_options, 0);
-
-       while ((opt = poptGetNextOpt(pc)) != -1) {
-               switch (opt) {
-               case OPT_DEBUG:
-                       opt_debug = poptGetOptArg(pc);
-                       break;
-               case OPT_DUMPDATA:
-                       opt_dumpdata = true;
-                       break;
-               case OPT_PROFILE_DB:
-                       opt_profdb = poptGetOptArg(pc);
-                       break;
-               case OPT_PROFILE:
-                       opt_profname = talloc_strdup(mem_ctx, poptGetOptArg(pc));
-                       break;
-               case OPT_PASSWORD:
-                       opt_password = poptGetOptArg(pc);
-                       break;
-               case OPT_IPM_LIST:
-                       opt_ipm_list = true;
-                       break;
-               case OPT_MKDIR:
-                       opt_mkdir = true;
-                       break;
-               case OPT_RMDIR:
-                       opt_rmdir = true;
-                       break;
-               case OPT_COMMENT:
-                       opt_comment = poptGetOptArg(pc);
-                       break;
-               case OPT_DIRCLASS:
-                       opt_dirclass = poptGetOptArg(pc);
-                       break;
-               case OPT_ADDUSER:
-                       opt_adduser = poptGetOptArg(pc);
-                       break;
-               case OPT_RMUSER:
-                       opt_rmuser = poptGetOptArg(pc);
-                       break;
-               case OPT_APASSWORD:
-                       opt_apassword = poptGetOptArg(pc);
-                       break;
-               case OPT_ADESC:
-                       opt_adesc = poptGetOptArg(pc);
-                       break;
-               case OPT_ACOMMENT:
-                       opt_acomment = poptGetOptArg(pc);
-                       break;
-               case OPT_AFULLNAME:
-                       opt_afullname = poptGetOptArg(pc);
-                       break;
-               case OPT_ADDRIGHT:
-                       opt_addright = poptGetOptArg(pc);
-                       break;
-               case OPT_RMRIGHT:
-                       opt_rmright = true;
-                       break;
-               case OPT_MODRIGHT:
-                       opt_modright = poptGetOptArg(pc);
-                       break;
-               case OPT_FOLDER:
-                       opt_folder = poptGetOptArg(pc);
-                       break;
-               case OPT_USERNAME:
-                       opt_username = poptGetOptArg(pc);
-                       break;
-               default:
-                       break;
-               };
-       }
-
-       /* Sanity check on options */
-
-       if ((opt_mkdir == true && !opt_folder) || (opt_rmdir == true && !opt_folder) ||
-           (opt_addright && !opt_folder) || (opt_rmright == true && !opt_folder) || 
-           (opt_modright && !opt_folder)) {
-               printf("You need to specify a directory with --folder option\n");
-               return (-1);
-       }
-
-       if ((opt_addright && !opt_username) || (opt_rmright == true && !opt_username) ||
-           (opt_modright && !opt_username)) {
-               printf("You need to specify a username with --username option\n");
-               return (-1);
-       }
-
-       /* dirclass sanity check */
-       if (opt_dirclass) {
-               if (check_IPF_class(opt_dirclass) == -1) {
-                       list_IPF_class();
-                       return (-1);
-               }
-       }
-
-       if (!opt_profdb) {
-               opt_profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
-       }
-
-       /**
-        * Initialize MAPI subsystem
-        */
-       retval = MAPIInitialize(&mapi_ctx, opt_profdb);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MAPIInitialize", GetLastError());
-               exit (1);
-       }
-
-       /* debug options */
-       SetMAPIDumpData(mapi_ctx, opt_dumpdata);
-
-       if (opt_debug) {
-               SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
-       }
-
-       /**
-        * If no profile is specified, try to load the default one
-        * from the database
-        */
-       if (!opt_profname) {
-               retval = GetDefaultProfile(mapi_ctx, &opt_profname);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("GetDefaultProfile", GetLastError());
-                       exit (1);
-               }
-       }
-
-       retval = MapiLogonEx(mapi_ctx, &session, opt_profname, opt_password);
-       talloc_free(opt_profname);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("MapiLogonEx", GetLastError());
-               exit (1);
-       }
-
-       /**
-        * User management operations
-        */
-
-       if (opt_adduser) {
-               struct mapiadmin_ctx    *mapiadmin_ctx;
-
-               mapiadmin_ctx = mapiadmin_init(session);
-               mapiadmin_ctx->username = opt_adduser;
-               mapiadmin_ctx->password = opt_apassword;
-               mapiadmin_ctx->description = opt_adesc;
-               mapiadmin_ctx->comment = opt_acomment;
-               mapiadmin_ctx->fullname = opt_afullname;
-
-               retval = mapiadmin_user_add(mapiadmin_ctx);
-               mapi_errstr("mapiadmin_user_add", GetLastError());
-               if (retval != MAPI_E_SUCCESS) {
-                       exit (1);
-               }
-               printf("username: %s\n", mapiadmin_ctx->username);
-               printf("password: %s\n", mapiadmin_ctx->password);
-       }
-
-       if (opt_rmuser) {
-               struct mapiadmin_ctx *mapiadmin_ctx;
-               
-               mapiadmin_ctx = mapiadmin_init(session);
-               mapiadmin_ctx->username = opt_rmuser;
-
-               retval = mapiadmin_user_del(mapiadmin_ctx);
-               mapi_errstr("mapiadmin_user_del", GetLastError());
-       }
-
-       /**
-        * Open Public Folder Store
-        */
-
-       mapi_object_init(&obj_store);
-       retval = OpenPublicFolder(session, &obj_store);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenPublicFolder", GetLastError());
-               goto end;
-       }
-
-       /* Open IPM Subtree (All Public Folders) */
-       retval = GetDefaultPublicFolder(&obj_store, &id_pf, olFolderPublicIPMSubtree);
-       if (retval != MAPI_E_SUCCESS) {
-               goto end;
-       }
-
-       mapi_object_init(&obj_ipm_subtree);
-       retval = OpenFolder(&obj_store, id_pf, &obj_ipm_subtree);
-       if (retval != MAPI_E_SUCCESS) {
-               mapi_errstr("OpenFolder", GetLastError());
-               goto end;
-       }
-
-       /* create directory */
-       if (opt_mkdir == true) {
-               retval = openchangepfadmin_mkdir(&obj_ipm_subtree, opt_folder, opt_comment, opt_dirclass);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("mkdir", GetLastError());
-                       goto end;
-               }
-       }
-
-       /* remove directory */
-       if (opt_rmdir == true) {
-               retval = openchangepfadmin_rmdir(mem_ctx, &obj_ipm_subtree, opt_folder);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("rmdir", GetLastError());
-                       goto end;
-               }
-               
-       }
-
-       /* add permissions */
-       if (opt_addright) {
-               if ((opt_permission = get_aclrights(opt_addright)) == -1) {
-                       printf("Invalid permission\n");
-                       list_aclrights();
-                       goto end;
-               } else {
-                       mapi_object_init(&obj_folder);
-                       retval = openchangepfadmin_getdir(mem_ctx, &obj_ipm_subtree, &obj_folder, opt_folder);
-                       if (retval != MAPI_E_SUCCESS) {
-                               printf("Invalid directory\n");
-                               goto end;
-                       }
-                       retval = AddUserPermission(&obj_folder, opt_username, opt_permission);
-                       if (retval != MAPI_E_SUCCESS) {
-                               mapi_errstr("AddUserPermission", GetLastError());
-                               mapi_object_release(&obj_folder);
-                               goto end;
-                       }
-                       mapi_object_release(&obj_folder);
-               }
-               printf("Permission %s added for %s on folder %s\n", opt_addright, opt_username, opt_folder);
-       }
-
-       /* remove permissions */
-       if (opt_rmright == true) {
-               mapi_object_init(&obj_folder);
-               retval = openchangepfadmin_getdir(mem_ctx, &obj_ipm_subtree, &obj_folder, opt_folder);
-               if (retval != MAPI_E_SUCCESS) {
-                       printf("Invalid directory\n");
-                       goto end;
-               }
-               retval = RemoveUserPermission(&obj_folder, opt_username);
-               if (retval != MAPI_E_SUCCESS) {
-                       mapi_errstr("RemoveUserPermission", GetLastError());
-                       mapi_object_release(&obj_folder);
-                       goto end;
-               }
-               mapi_object_release(&obj_folder);
-               printf("Permission removed for %s on folder %s\n", opt_username, opt_folder);
-       }
-
-       /* modify permissions */
-       if (opt_modright) {
-               opt_permission = get_aclrights(opt_modright);
-               if (opt_permission == -1) {
-                       printf("Invalid permission\n");
-                       list_aclrights();
-                       goto end;
-               } else {
-                       mapi_object_init(&obj_folder);
-                       retval = openchangepfadmin_getdir(mem_ctx, &obj_ipm_subtree, &obj_folder, opt_folder);
-                       if (retval != MAPI_E_SUCCESS) {
-                               printf("Invalid directory\n");
-                               goto end;
-                       }
-                       retval = ModifyUserPermission(&obj_folder, opt_username, opt_permission);
-                       if (retval != MAPI_E_SUCCESS) {
-                               mapi_errstr("ModifyUserPermission", GetLastError());
-                               mapi_object_release(&obj_folder);
-                               goto end;
-                       }
-                       mapi_object_release(&obj_folder);
-               }
-               printf("Permission changed to %s for %s on folder %s\n", opt_modright, opt_username, opt_folder);
-       }
-
-       /* list directories */
-       if (opt_ipm_list == true) {
-               printf("+ All Public Folders\n");
-               get_child_folders_pf(mem_ctx, &obj_ipm_subtree, id_pf, 0);
-       }
-
-       /**
-        * Uninitialize MAPI subsystem
-        */
-end:
-       mapi_object_release(&obj_store);
-
-       MAPIUninitialize(mapi_ctx);
-       talloc_free(mem_ctx);
-       return 0;
-}
diff --git a/branches/plugfest/utils/openchangepfadmin.h b/branches/plugfest/utils/openchangepfadmin.h
deleted file mode 100644 (file)
index 2a87e8c..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-   Public Folders Administration Tool
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2007
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __OPENCHANGEPFADMIN_H__
-#define        __OPENCHANGEPFADMIN_H__
-
-#define        DEFAULT_PROFDB  "%s/.openchange/profiles.ldb"
-
-struct aclrights {
-       const char      *name;
-       uint32_t        value;
-};
-
-const struct aclrights aclrights[] = {
-       {"RightsNone",                  0x00000000},
-        {"RightsReadItems",            0x00000001},
-        {"RightsCreateItems",          0x00000002},
-        {"RightsEditOwn",              0x00000008},
-        {"RightsDeleteOwn",            0x00000010},
-        {"RightsEditAll",              0x00000020},
-        {"RightsDeleteAll",            0x00000040},
-        {"RightsCreateSubfolders",     0x00000080},
-        {"RightsFolderOwner",          0x00000100},
-        {"RightsFolderContact",                0x00000200},
-        {"RoleNone",                   0x00000400},
-        {"RoleReviewer",               0x00000401},
-        {"RoleContributor",            0x00000402},
-        {"RoleNoneditingAuthor",       0x00000413},
-        {"RoleAuthor",                 0x0000041B},
-        {"RoleEditor",                 0x0000047B},
-        {"RolePublishAuthor",          0x0000049B},
-        {"RolePublishEditor",          0x000004FB},
-        {"RightsAll",                  0x000005FB},
-        {"RoleOwner",                  0x000007FB},
-       {NULL, 0}
-};
-
-const char * IPF_class[] = { IPF_APPOINTMENT, 
-                            IPF_CONTACT, 
-                            IPF_JOURNAL, 
-                            IPF_NOTE, 
-                            IPF_STICKYNOTE, 
-                            IPF_TASK, 
-                            IPF_POST, 
-                            NULL};
-
-#endif /* __OPENCHANGEPFADMIN_H__ */
diff --git a/branches/plugfest/utils/schemaIDGUID.c b/branches/plugfest/utils/schemaIDGUID.c
deleted file mode 100644 (file)
index a83c8db..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-   MAPI Implementation
-
-   OpenChange Project
-
-   Copyright (C) Julien Kerihuel 2006
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "libmapi/libmapi.h"
-#include <ldb.h>
-
-static void usage(void)
-{
-       printf("schemaIDGUID <base64 string>\n");
-       exit(0);
-}
-
-int main(int argc, char *argv[])
-{
-       TALLOC_CTX      *mem_ctx;
-       DATA_BLOB       blob;
-       struct GUID     *guid;
-       char            *schemaIDGUID;
-
-       if (argc != 2) {
-               usage();
-       }
-
-       mem_ctx = talloc_named(NULL, 0, "SchemaIDGUID");
-
-       blob = data_blob_talloc(mem_ctx, argv[1], strlen(argv[1])+1);
-       blob.length = ldb_base64_decode((char *)blob.data);
-       guid = (struct GUID *) blob.data;
-       schemaIDGUID = GUID_string(mem_ctx, guid);
-       printf("%s\n", schemaIDGUID);
-       return (0);
-}