Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / mozab / mozillasrc / MNSMozabProxy.hxx
blob4e8c0241621c3e53205664ac4da633b67f5d3ca5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _CONNECTIVITY_MAB_MOZABHELPER_HXX_
21 #define _CONNECTIVITY_MAB_MOZABHELPER_HXX_
22 #include "MNSDeclares.hxx"
23 #include <osl/thread.hxx>
25 #include <MNSInclude.hxx>
26 #include <cppuhelper/compbase1.hxx>
27 #include <com/sun/star/mozilla/XCodeProxy.hpp>
28 #include "com/sun/star/mozilla/XProxyRunner.hpp"
30 namespace connectivity
32 namespace mozab
34 namespace ProxiedFunc
36 enum
38 FUNC_TESTLDAP_INIT_LDAP=1,
39 FUNC_TESTLDAP_IS_LDAP_CONNECTED,
40 FUNC_TESTLDAP_RELEASE_RESOURCE,
41 FUNC_GET_TABLE_STRINGS,
42 FUNC_EXECUTE_QUERY,
43 FUNC_QUERYHELPER_CREATE_NEW_CARD,
44 FUNC_QUERYHELPER_DELETE_CARD,
45 FUNC_QUERYHELPER_COMMIT_CARD,
46 FUNC_QUERYHELPER_RESYNC_CARD,
47 FUNC_NEW_ADDRESS_BOOK
51 struct RunArgs
53 sal_Int32 funcIndex; //Function Index
54 sal_Int32 argCount; //parameter count
55 void * arg1;
56 void * arg2;
57 void * arg3;
58 void * arg4;
59 void * arg5;
60 void * arg6;
61 RunArgs()
63 arg1 = NULL;
64 arg2 = NULL;
65 arg3 = NULL;
66 arg4 = NULL;
67 arg5 = NULL;
68 arg6 = NULL;
71 typedef RunArgs RunArgs;
72 typedef ::cppu::WeakImplHelper1< ::com::sun::star::mozilla::XCodeProxy > MNSMozabProxy_BASE;
75 class MNSMozabProxy : public MNSMozabProxy_BASE
77 public:
78 MNSMozabProxy();
79 virtual ~MNSMozabProxy();
81 //XCodeProxy
82 virtual sal_Int32 SAL_CALL run( ) throw (::com::sun::star::uno::RuntimeException);
83 virtual ::com::sun::star::mozilla::MozillaProductType SAL_CALL getProductType( ) throw (::com::sun::star::uno::RuntimeException);
84 virtual OUString SAL_CALL getProfileName( ) throw (::com::sun::star::uno::RuntimeException);
86 public:
87 sal_Int32 StartProxy(RunArgs * args,::com::sun::star::mozilla::MozillaProductType aProduct,const OUString &aProfile); //Call this to start proxy
89 protected:
90 nsresult testLDAPConnection();
91 nsresult InitLDAP(sal_Char* sUri, sal_Unicode* sBindDN, sal_Unicode* sPasswd,sal_Bool * nUseSSL);
92 nsresult QueryHelperStub();
93 private:
94 ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XProxyRunner > xRunner;
96 RunArgs * m_Args;
97 ::com::sun::star::mozilla::MozillaProductType m_Product;
98 OUString m_Profile;
99 #if OSL_DEBUG_LEVEL > 0
100 oslThreadIdentifier m_oThreadID;
101 #endif
105 #endif //_CONNECTIVITY_MAB_MOZABHELPER_HXX_
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */