Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions com/win32comext/mapi/src/PyIMsgStore.i
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,32 @@ PyObject *PyIMsgStore::OpenEntry(PyObject *self, PyObject *args)

%}

%native(StoreLogoff) StoreLogoff;
%{
// @pyswig <o PyIInterface>|StoreLogoff|Enables the orderly logoff of the message store.
PyObject *PyIMsgStore::StoreLogoff(PyObject *self, PyObject *args)
{
HRESULT _result;
unsigned long flags;

IMsgStore *_swig_self;
if ((_swig_self=GetI(self))==NULL) return NULL;
// @pyparm int|flags||Bitmask of flags that controls how the message store is closed.
if(!PyArg_ParseTuple(args,"k:StoreLogoff", &flags))
return NULL;

Py_BEGIN_ALLOW_THREADS
_result = (HRESULT )_swig_self->StoreLogoff(&flags);
Py_END_ALLOW_THREADS
if (FAILED(_result)) {
return OleSetOleError(_result);
}

return PyLong_FromLong(flags);
}

%}

%native(GetReceiveFolder) GetReceiveFolder;
%{
// @pyswig <o PyIID>, string|GetReceiveFolder|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.
Expand Down
10 changes: 10 additions & 0 deletions com/win32comext/mapi/src/mapi.i
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ static PyObject *PyMAPIUninitialize(PyObject *self, PyObject *args)
#define MAPI_BEST_ACCESS MAPI_BEST_ACCESS
#define MAPI_MODIFY MAPI_MODIFY

#define LOGOFF_NO_WAIT LOGOFF_NO_WAIT
#define LOGOFF_ORDERLY LOGOFF_ORDERLY
#define LOGOFF_PURGE LOGOFF_PURGE
#define LOGOFF_ABORT LOGOFF_ABORT
#define LOGOFF_QUIET LOGOFF_QUIET
#define LOGOFF_COMPLETE LOGOFF_COMPLETE
#define LOGOFF_INBOUND LOGOFF_INBOUND
#define LOGOFF_OUTBOUND LOGOFF_OUTBOUND
#define LOGOFF_OUTBOUND_QUEUE LOGOFF_OUTBOUND_QUEUE

#define MAPI_DEFERRED_ERRORS MAPI_DEFERRED_ERRORS // Allows a method to return successfully, possibly before the changes have been fully committed.
#define MAPI_INIT_VERSION MAPI_INIT_VERSION

Expand Down