aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/addrbook/msoutlook/com/MsOutlookAddrBookServer.h
blob: 6dcaa1e2127e1b396824769b39250d51db284979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
#ifndef __MSOUTLOOKADDRBOOKCOM_MSOUTLOOKADDRBOOKSERVER_H
#define __MSOUTLOOKADDRBOOKCOM_MSOUTLOOKADDRBOOKSERVER_H

#include <stdio.h>
#include <unknwn.h>

#include "IMsOutlookAddrBookServer.h"

EXTERN_C const GUID DECLSPEC_SELECTANY CLSID_MsOutlookAddrBookServer
    = {0x22435A40, 0xAB57, 0x11E2,
        {0x9E, 0x96, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66}}; // generated.

EXTERN_C const GUID DECLSPEC_SELECTANY IID_IMsOutlookAddrBookServer
    = {0x5DDE9FF0, 0xAC48, 0x11E2,
        {0x9E, 0x96, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66}}; // generated

/**
 * @author Vincent Lucas
 */
class MsOutlookAddrBookServer:
    public IMsOutlookAddrBookServer
{
    public:
        MsOutlookAddrBookServer();

        // IUnknown
        STDMETHODIMP QueryInterface(REFIID, PVOID *);
        STDMETHODIMP_(ULONG) AddRef();
        STDMETHODIMP_(ULONG) Release();

        // IMsOutlookAddrBookServer
        HRESULT STDMETHODCALLTYPE foreachMailUser(BSTR query);

        HRESULT STDMETHODCALLTYPE IMAPIProp_GetProps( 
                BSTR entryId,
                int nbPropIds,
                SAFEARRAY * propIds,
                long flags,
                SAFEARRAY ** props,
                SAFEARRAY ** propsLength,
                SAFEARRAY ** propsType);

        HRESULT STDMETHODCALLTYPE createContact( 
                BSTR *id);

        HRESULT STDMETHODCALLTYPE deleteContact( 
                BSTR id);

        HRESULT STDMETHODCALLTYPE IMAPIProp_DeleteProp( 
                long propId,
                BSTR entryId);

        HRESULT STDMETHODCALLTYPE IMAPIProp_SetPropString( 
                long propId,
                BSTR value,
                BSTR entryId);

    protected:
            virtual ~MsOutlookAddrBookServer();

    private:
            ULONG _refCount;

            static boolean foreachMailUserCallback(
                    LPSTR iUnknown,
                    void * object);
};

#endif