findlanabyname-20040228
[openafs.git] / src / WINNT / afssvrmgr / display.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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  */
9
10 #ifndef DISPLAY_H
11 #define DISPLAY_H
12
13 /*
14  * DEFINITIONS ________________________________________________________________
15  *
16  */
17
18 typedef enum
19    {
20    dtINVALID = 0,
21    dtCELL,
22    dtSERVERS,
23    dtSERVICES,
24    dtAGGREGATES,
25    dtFILESETS,
26    dtREPLICAS,
27    dtSERVERWINDOW
28    } DISPLAYTARGET;
29
30 #define ACT_ENDCHANGE  0x0002
31 #define ACT_UNCOVER    0x0004
32 #define ACT_SELPREVIEW 0x0008
33
34 typedef struct
35    {
36    HWND hChild; // g.hMain or server window to update
37    DISPLAYTARGET dt;    // expect which kind of listview?
38    LPIDENT lpiNotify;   // NULL or specific LPIDENT to update
39    ULONG status;        // if (lpiNotify), associated error code
40    LPIDENT lpiServer;   // NULL or parent server
41    LPIDENT lpiAggregate;        // NULL or parent aggregate
42    LPIDENT lpiToSelect; // NULL or LPIDENT to select when done
43    LPVIEWINFO lpvi;     // NULL or specific viewinfo to use
44    HWND hList;  // (worker routines set this)
45    WORD actOnDone;      // (worker routines set this)
46    BOOL fList;  // (worker routines set this)
47    } DISPLAYREQUEST, *LPDISPLAYREQUEST;
48
49
50 /*
51  * PROTOTYPES _________________________________________________________________
52  *
53  */
54
55 ICONVIEW Display_GetServerIconView (void);
56
57 BOOL CALLBACK GetItemText (HWND hList, LPFLN_GETITEMTEXT_PARAMS pfln, DWORD dwCookie);
58
59 /*
60  *** HandleColumnNotify
61  *
62  * This routine handles the FLN_COLUMNCLICK and FLN_COLUMNRESIZE notifications.
63  * This routine returns TRUE if it handled the message; if so, its caller
64  * should return FASLE from the dlgproc.
65  *
66  */
67
68 BOOL HandleColumnNotify (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp, LPVIEWINFO pvi);
69
70 /*
71  *** UpdateDisplay
72  *
73  * This routine is the interface to updating any list-of-LPIDENTs in the tool;
74  * that includes the list-of-servers, the listviews and treeviews on each
75  * of the server window's tabs, and things like aggregate lists and fileset
76  * replica lists in various dialogs.
77  *
78  * If called with fWait=FALSE, the request is queued and performed on a
79  * separate worker thread; if it's TRUE, the request is performed before
80  * returning (as always, don't ever block the main thread this way).
81  *
82  * You'll need to pass in a filled-in DISPLAYREQUEST structure; this is copied
83  * to local storage, so it can be a local variable even if !fWait.
84  *
85  */
86
87 void UpdateDisplay (LPDISPLAYREQUEST pdr, BOOL fWait);
88
89
90 /*
91  *** UpdateDisplay_*
92  *
93  * These routines act as wrappers to UpdateDisplay(); they create an
94  * appropriate DISPLAYREQUEST packet and pass it along.
95  *
96  */
97
98 void UpdateDisplay_Cell (BOOL fWait);
99 void UpdateDisplay_Servers (BOOL fWait, LPIDENT lpiNotify, ULONG status);
100 void UpdateDisplay_Services (BOOL fWait, HWND hChild, LPIDENT lpiNotify, ULONG status);
101 void UpdateDisplay_Aggregates (BOOL fWait, HWND hListOrCombo, LPIDENT lpiNotify, ULONG status, LPIDENT lpiServer, LPIDENT lpiToSelect, LPVIEWINFO lpvi);
102 void UpdateDisplay_Filesets (BOOL fWait, HWND hListOrCombo, LPIDENT lpiNotify, ULONG status, LPIDENT lpiServer, LPIDENT lpiAggregate, LPIDENT lpiToSelect);
103 void UpdateDisplay_Replicas (BOOL fWait, HWND hList, LPIDENT lpiRW, LPIDENT lpiRO);
104 void UpdateDisplay_ServerWindow (BOOL fWait, LPIDENT lpiServer);
105 void UpdateDisplay_SetIconView (BOOL fWait, HWND hDialog, LPICONVIEW piv, ICONVIEW ivNew);
106
107
108 #endif
109