1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SHELL_INC_INTERNAL_PROPERTYHDL_HXX
21 #define INCLUDED_SHELL_INC_INTERNAL_PROPERTYHDL_HXX
25 // {AE424E85-F6DF-4910-A6A9-438797986431}
26 const CLSID CLSID_PROPERTY_HANDLER
=
27 { 0xae424e85, 0xf6df, 0x4910, { 0xa6, 0xa9, 0x43, 0x87, 0x97, 0x98, 0x64, 0x31 } };
29 class CMetaInfoReader
;
31 class CPropertyHdl
: public IPropertyStore
,
32 public IPropertyStoreCapabilities
,
33 public IInitializeWithStream
36 CPropertyHdl(LONG RefCnt
= 1);
37 virtual ~CPropertyHdl();
42 virtual HRESULT STDMETHODCALLTYPE
QueryInterface(
44 void __RPC_FAR
*__RPC_FAR
*ppvObject
) override
;
45 virtual ULONG STDMETHODCALLTYPE
AddRef() override
;
46 virtual ULONG STDMETHODCALLTYPE
Release() override
;
51 virtual HRESULT STDMETHODCALLTYPE
GetCount( DWORD
*pcProps
) override
;
52 virtual HRESULT STDMETHODCALLTYPE
GetAt( DWORD iProp
, PROPERTYKEY
*pkey
) override
;
53 virtual HRESULT STDMETHODCALLTYPE
GetValue( REFPROPERTYKEY key
, PROPVARIANT
*pPropVar
) override
;
54 virtual HRESULT STDMETHODCALLTYPE
SetValue( REFPROPERTYKEY key
, REFPROPVARIANT propVar
) override
;
55 virtual HRESULT STDMETHODCALLTYPE
Commit() override
;
58 // IPropertyStoreCapabilities
60 virtual HRESULT STDMETHODCALLTYPE
IsPropertyWritable( REFPROPERTYKEY key
) override
;
63 // IInitializeWithStream
65 virtual HRESULT STDMETHODCALLTYPE
Initialize(IStream
*pStream
, DWORD grfMode
) override
;
68 void LoadProperties( CMetaInfoReader
*pMetaInfoReader
);
72 IPropertyStoreCache
* m_pCache
;
75 class CClassFactory
: public IClassFactory
78 CClassFactory( const CLSID
& clsid
);
79 virtual ~CClassFactory();
84 virtual HRESULT STDMETHODCALLTYPE
QueryInterface(
86 void __RPC_FAR
*__RPC_FAR
*ppvObject
) override
;
87 virtual ULONG STDMETHODCALLTYPE
AddRef() override
;
88 virtual ULONG STDMETHODCALLTYPE
Release() override
;
91 // IClassFactory methods
93 virtual HRESULT STDMETHODCALLTYPE
CreateInstance(
94 IUnknown __RPC_FAR
*pUnkOuter
,
96 void __RPC_FAR
*__RPC_FAR
*ppvObject
) override
;
98 virtual HRESULT STDMETHODCALLTYPE
LockServer( BOOL fLock
) override
;
99 static bool IsLocked();
104 static LONG s_ServerLocks
;
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */