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
24 #pragma warning(push, 1)
25 #pragma warning(disable:4917)
32 // {AE424E85-F6DF-4910-A6A9-438797986431}
33 const CLSID CLSID_PROPERTY_HANDLER
=
34 { 0xae424e85, 0xf6df, 0x4910, { 0xa6, 0xa9, 0x43, 0x87, 0x97, 0x98, 0x64, 0x31 } };
36 class CMetaInfoReader
;
38 class CPropertyHdl
: public IPropertyStore
,
39 public IPropertyStoreCapabilities
,
40 public IInitializeWithStream
43 CPropertyHdl(long RefCnt
= 1);
44 virtual ~CPropertyHdl();
49 virtual HRESULT STDMETHODCALLTYPE
QueryInterface(
51 void __RPC_FAR
*__RPC_FAR
*ppvObject
);
52 virtual ULONG STDMETHODCALLTYPE
AddRef();
53 virtual ULONG STDMETHODCALLTYPE
Release();
58 virtual HRESULT STDMETHODCALLTYPE
GetCount( DWORD
*pcProps
);
59 virtual HRESULT STDMETHODCALLTYPE
GetAt( DWORD iProp
, PROPERTYKEY
*pkey
);
60 virtual HRESULT STDMETHODCALLTYPE
GetValue( REFPROPERTYKEY key
, PROPVARIANT
*pPropVar
);
61 virtual HRESULT STDMETHODCALLTYPE
SetValue( REFPROPERTYKEY key
, REFPROPVARIANT propVar
);
62 virtual HRESULT STDMETHODCALLTYPE
Commit();
65 // IPropertyStoreCapabilities
67 virtual HRESULT STDMETHODCALLTYPE
IsPropertyWritable( REFPROPERTYKEY key
);
70 // IInitializeWithStream
72 virtual HRESULT STDMETHODCALLTYPE
Initialize(IStream
*pStream
, DWORD grfMode
);
75 void LoadProperties( CMetaInfoReader
*pMetaInfoReader
);
76 HRESULT
GetItemData( CMetaInfoReader
*pMetaInfoReader
, UINT nIndex
, PROPVARIANT
*pVarData
);
80 IPropertyStoreCache
* m_pCache
;
83 class CClassFactory
: public IClassFactory
86 CClassFactory( const CLSID
& clsid
);
87 virtual ~CClassFactory();
92 virtual HRESULT STDMETHODCALLTYPE
QueryInterface(
94 void __RPC_FAR
*__RPC_FAR
*ppvObject
);
95 virtual ULONG STDMETHODCALLTYPE
AddRef();
96 virtual ULONG STDMETHODCALLTYPE
Release();
99 // IClassFactory methods
101 virtual HRESULT STDMETHODCALLTYPE
CreateInstance(
102 IUnknown __RPC_FAR
*pUnkOuter
,
104 void __RPC_FAR
*__RPC_FAR
*ppvObject
);
106 virtual HRESULT STDMETHODCALLTYPE
LockServer( BOOL fLock
);
107 static bool IsLocked();
112 static long s_ServerLocks
;
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */