LINUX: afs_create infinite fetchStatus loop
[pkg-k5-afs_openafs.git] / src / WINNT / client_exp / shell_ext.h
blob394070328ca22b3132d04497e399605ccc82f0ad
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #if !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)
11 #define AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_
13 #if _MSC_VER >= 1000
14 #pragma once
15 #endif // _MSC_VER >= 1000
16 // shell_ext.h : header file
19 #include <shlobj.h>
21 extern ULONG nCMRefCount; // IContextMenu ref count
22 extern ULONG nSERefCount; // IShellExtInit ref count
23 extern ULONG nICRefCount; // IContextMenu ref count
24 extern ULONG nTPRefCount; // IQueryInfo ref count
25 extern ULONG nXPRefCount; // IPersistFile ref count
27 #define _STR_EXT_TITLE "AfsClientContextMenu"
28 #define _STR_EXT_TITLE2 "AfsClientOverlayHandler"
29 #define STR_EXT_TITLE TEXT(_STR_EXT_TITLE)
30 #define STR_EXT_TITLE2 TEXT(_STR_EXT_TITLE2)
31 #define STR_REG_PATH TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers")
33 /////////////////////////////////////////////////////////////////////////////
34 // CShellExt command target
36 class CShellExt : public CCmdTarget
38 DECLARE_DYNCREATE(CShellExt)
40 BOOL m_bDirSelected;
41 BOOL m_bIsSymlink; // is symbolic link!
42 BOOL m_bIsMountpoint; // is mount point!
43 BOOL m_bIsPathInAFS; // path is in AFS
44 TCHAR m_szFile[MAX_PATH];
45 BOOL m_bIsOverlayEnabled;
46 int m_overlayObject;
47 BOOL IsOverlayEnabled(){return m_bIsOverlayEnabled;}
49 CStringArray m_astrFileNames;
50 CShellExt(); // protected constructor used by dynamic creation
51 LPMALLOC m_pAlloc;
53 // Attributes
54 public:
56 // Operations
57 public:
58 int GetOverlayObject() {return m_overlayObject;}
59 // Overrides
60 // ClassWizard generated virtual function overrides
61 //{{AFX_VIRTUAL(CShellExt)
62 public:
63 virtual void OnFinalRelease();
64 //}}AFX_VIRTUAL
66 // Implementation
67 protected:
68 virtual ~CShellExt();
70 // Generated message map functions
71 //{{AFX_MSG(CShellExt)
72 // NOTE - the ClassWizard will add and remove member functions here.
73 //}}AFX_MSG
75 DECLARE_MESSAGE_MAP()
76 // Generated OLE dispatch map functions
77 //{{AFX_DISPATCH(CShellExt)
78 // NOTE - the ClassWizard will add and remove member functions here.
79 //}}AFX_DISPATCH
80 DECLARE_DISPATCH_MAP()
82 DECLARE_OLECREATE(CShellExt)
84 // IFileViewer interface
85 BEGIN_INTERFACE_PART(MenuExt, IContextMenu)
86 STDMETHOD(QueryContextMenu)( HMENU hmenu,UINT indexMenu,UINT idCmdFirst,
87 UINT idCmdLast,UINT uFlags);
88 STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
89 STDMETHOD(GetCommandString)(UINT_PTR idCmd,UINT uType,UINT* pwReserved,LPSTR pszName,
90 UINT cchMax);
91 END_INTERFACE_PART(MenuExt)
93 // IShellExtInit interface
94 BEGIN_INTERFACE_PART(ShellInit, IShellExtInit)
95 STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,IDataObject *lpdobj, HKEY hkeyProgID);
96 END_INTERFACE_PART(ShellInit)
98 BEGIN_INTERFACE_PART(IconExt, IShellIconOverlayIdentifier)
99 STDMETHOD(GetOverlayInfo)(LPWSTR pwszIconFile,int cchMax,int* pIndex,DWORD* pdwFlags);
100 STDMETHOD(GetPriority)(int* pPriority);
101 STDMETHOD(IsMemberOf)(LPCWSTR pwszPath,DWORD dwAttrib);
102 END_INTERFACE_PART(IconExt)
104 BEGIN_INTERFACE_PART(ToolTipExt, IQueryInfo)
105 STDMETHOD(GetInfoTip)(DWORD dwFlags, LPWSTR *ppwszTip);
106 STDMETHOD(GetInfoFlags)(LPDWORD pdwFlags);
107 END_INTERFACE_PART(ToolTipExt)
109 BEGIN_INTERFACE_PART(PersistFileExt, IPersistFile)
110 STDMETHOD(Load)(LPCOLESTR wszFile, DWORD dwMode);
111 STDMETHOD(GetClassID)(LPCLSID);
112 STDMETHOD(IsDirty)(VOID);
113 STDMETHOD(Save)(LPCOLESTR, BOOL);
114 STDMETHOD(SaveCompleted)(LPCOLESTR);
115 STDMETHOD(GetCurFile)(LPOLESTR FAR*);
116 END_INTERFACE_PART(PersistFileExt)
118 BEGIN_INTERFACE_PART(PropertySheetExt, IShellPropSheetExt)
119 STDMETHOD(AddPages)(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
120 STDMETHOD(ReplacePage)(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam);
121 END_INTERFACE_PART(PropertySheetExt)
123 DECLARE_INTERFACE_MAP()
126 class CShellExt2 : public CShellExt
128 public:
129 DECLARE_DYNCREATE(CShellExt2)
130 CShellExt2() : CShellExt()
132 m_overlayObject = 1;
134 ~CShellExt2()
137 DECLARE_OLECREATE(CShellExt2)
140 /////////////////////////////////////////////////////////////////////////////
142 //{{AFX_INSERT_LOCATION}}
143 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
145 #endif // !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)