nss: upgrade to release 3.73
[LibreOffice.git] / svl / source / svdde / ddeimp.hxx
blob060711bbf32e748ea953c7a7a60bd972a68b1fb3
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 INCLUDED_SVL_SOURCE_SVDDE_DDEIMP_HXX
21 #define INCLUDED_SVL_SOURCE_SVDDE_DDEIMP_HXX
23 #if !defined WIN32_LEAN_AND_MEAN
24 # define WIN32_LEAN_AND_MEAN
25 #endif
26 #include <windows.h>
27 #include <ddeml.h>
29 #include <rtl/ustring.hxx>
30 #include <svl/svdde.hxx>
31 #include <vector>
34 struct Conversation
36 HCONV hConv;
37 DdeTopic* pTopic;
41 class DdeInternal
43 public:
44 static HDDEDATA CALLBACK CliCallback
45 ( UINT, UINT, HCONV, HSZ, HSZ, HDDEDATA, ULONG_PTR, ULONG_PTR );
46 static HDDEDATA CALLBACK SvrCallback
47 ( UINT, UINT, HCONV, HSZ, HSZ, HDDEDATA, ULONG_PTR, ULONG_PTR );
48 static DdeService* FindService( HSZ );
49 static DdeTopic* FindTopic( DdeService&, HSZ );
50 static DdeItem* FindItem( DdeTopic&, HSZ );
51 static void DisconnectTopic(DdeTopic &, HCONV);
52 static void IncMonitor(DdeItem *pItem, HCONV);
53 static void DecMonitor(DdeItem *pItem, HCONV);
57 class DdeString
59 private:
60 OUString m_aString;
61 protected:
62 HSZ hString;
63 DWORD hInst;
65 public:
66 DdeString( DWORD, const OUString& );
67 ~DdeString();
69 bool operator==( HSZ ) const;
70 HSZ getHSZ();
71 const OUString & toOUString() const { return m_aString; }
75 struct DdeDataImp
77 HDDEDATA hData;
78 void const * pData;
79 DWORD nData;
80 SotClipboardFormatId nFmt;
83 class DdeConnection;
85 class DdeInstData
87 public:
88 sal_uInt16 nRefCount;
89 std::vector<DdeConnection*> aConnections;
90 // Server
91 DWORD hDdeInstSvr;
92 short nInstanceSvr;
93 DdeServices* pServicesSvr;
94 // Client
95 DWORD hDdeInstCli;
96 short nInstanceCli;
98 DdeInstData()
99 : nRefCount(0)
100 , hDdeInstSvr(0)
101 , nInstanceSvr(0)
102 , pServicesSvr(nullptr)
103 , hDdeInstCli(0)
104 , nInstanceCli(0)
107 DdeInstData(const DdeInstData&) = delete;
108 DdeInstData& operator=(const DdeInstData&) = delete;
111 DdeInstData* ImpGetInstData();
112 DdeInstData* ImpInitInstData();
113 void ImpDeinitInstData();
115 #endif // INCLUDED_SVL_SOURCE_SVDDE_DDEIMP_HXX
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */