2 * Copyright 2000, International Business Machines Corporation and others.
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
11 #include <afs/param.h>
15 #include "TaAfsUsrMgr.h"
20 * USER-VIEW COLUMNS __________________________________________________________
24 void Machine_SetDefaultView (LPVIEWINFO lpvi, ICONVIEW *piv)
26 lpvi->lvsView = FLS_VIEW_SMALL;
27 lpvi->nColsAvail = nMACHINECOLUMNS;
29 for (size_t iCol = 0; iCol < nMACHINECOLUMNS; ++iCol)
31 lpvi->cxColumns[ iCol ] = MACHINECOLUMNS[ iCol ].cxWidth;
32 lpvi->idsColumns[ iCol ] = MACHINECOLUMNS[ iCol ].idsColumn;
35 lpvi->iSort = mchcolNAME;
38 lpvi->aColumns[0] = (int)mchcolNAME;
39 lpvi->aColumns[1] = (int)mchcolUID;
45 void Machine_GetColumn (ASID idObject, MACHINECOLUMN iCol, LPTSTR pszText, LPSYSTEMTIME pstDate, LONG *pcsec, COLUMNTYPE *pcType)
48 *pszText = TEXT('\0');
50 memset (pstDate, 0x00, sizeof(SYSTEMTIME));
54 *pcType = ctALPHABETIC;
57 if (asc_ObjectPropertiesGet_Fast (g.idClient, g.idCell, idObject, &Properties))
63 *pcType = ctALPHABETIC;
65 lstrcpy (pszText, Properties.szName);
71 if (Properties.u.UserProperties.fHavePtsInfo)
74 wsprintf (pszText, TEXT("%ld"), Properties.u.UserProperties.PTSINFO.cgroupCreationQuota);
81 if (Properties.u.UserProperties.fHavePtsInfo)
84 wsprintf (pszText, TEXT("%ld"), Properties.u.UserProperties.PTSINFO.uidName);
90 *pcType = ctALPHABETIC;
91 if (Properties.u.UserProperties.fHavePtsInfo)
95 if (Properties.u.UserProperties.PTSINFO.szOwner[0])
96 wsprintf (pszText, TEXT("%s (%ld)"), Properties.u.UserProperties.PTSINFO.szOwner, Properties.u.UserProperties.PTSINFO.uidOwner);
98 wsprintf (pszText, TEXT("%ld"), Properties.u.UserProperties.PTSINFO.uidOwner);
105 *pcType = ctALPHABETIC;
106 if (Properties.u.UserProperties.fHavePtsInfo)
110 if (Properties.u.UserProperties.PTSINFO.szCreator[0])
111 wsprintf (pszText, TEXT("%s (%ld)"), Properties.u.UserProperties.PTSINFO.szCreator, Properties.u.UserProperties.PTSINFO.uidCreator);
113 wsprintf (pszText, TEXT("%ld"), Properties.u.UserProperties.PTSINFO.uidCreator);