xref: /trunk/main/shell/inc/internal/columninfo.hxx (revision ed2f6d3b)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef COLUMNINFO_HXX_INCLUDED
25 #define COLUMNINFO_HXX_INCLUDED
26 
27 #if defined _MSC_VER
28 #pragma warning(push, 1)
29 #pragma warning(disable:4917)
30 #endif
31 #include <shlobj.h>
32 #if defined _MSC_VER
33 #pragma warning(pop)
34 #endif
35 
36 
37 class CColumnInfo : public IColumnProvider
38 {
39 public:
40 	CColumnInfo(long RefCnt = 1);
41 	virtual ~CColumnInfo();
42 
43 	//-----------------------------
44 	// IUnknown methods
45 	//-----------------------------
46 
47 	virtual HRESULT STDMETHODCALLTYPE QueryInterface(
48             REFIID riid,
49             void __RPC_FAR *__RPC_FAR *ppvObject);
50 
51     virtual ULONG STDMETHODCALLTYPE AddRef( void);
52 
53     virtual ULONG STDMETHODCALLTYPE Release( void);
54 
55 	//-----------------------------
56 	// IColumnProvider
57 	//-----------------------------
58 
59     virtual HRESULT STDMETHODCALLTYPE Initialize(LPCSHCOLUMNINIT psci);
60 
61     virtual HRESULT STDMETHODCALLTYPE GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci);
62 
63     virtual HRESULT STDMETHODCALLTYPE GetItemData(
64 		LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData);
65 
66 private:
67 	bool IsOOFileExtension(wchar_t* Extension) const;
68 
69 private:
70 	long	m_RefCnt;
71 };
72 
73 #endif
74