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 * GROUP-VIEW COLUMNS _________________________________________________________
24 void Group_SetDefaultView (LPVIEWINFO lpvi, ICONVIEW *piv)
26 lpvi->lvsView = FLS_VIEW_SMALL;
27 lpvi->nColsAvail = nGROUPCOLUMNS;
29 for (size_t iCol = 0; iCol < nGROUPCOLUMNS; ++iCol)
31 lpvi->cxColumns[ iCol ] = GROUPCOLUMNS[ iCol ].cxWidth;
32 lpvi->idsColumns[ iCol ] = GROUPCOLUMNS[ iCol ].idsColumn;
35 lpvi->iSort = grpcolNAME;
38 lpvi->aColumns[0] = (int)grpcolNAME;
39 lpvi->aColumns[1] = (int)grpcolUID;
40 lpvi->aColumns[2] = (int)grpcolCMEMBERS;
46 void Group_GetColumn (ASID idObject, GROUPCOLUMN iCol, LPTSTR pszText, LPSYSTEMTIME pstDate, LONG *pcsec, COLUMNTYPE *pcType)
49 *pszText = TEXT('\0');
51 memset (pstDate, 0x00, sizeof(SYSTEMTIME));
55 *pcType = ctALPHABETIC;
58 if (asc_ObjectPropertiesGet_Fast (g.idClient, g.idCell, idObject, &Properties))
64 *pcType = ctALPHABETIC;
66 lstrcpy (pszText, Properties.szName);
73 wsprintf (pszText, TEXT("%lu"), Properties.u.GroupProperties.nMembers);
80 wsprintf (pszText, TEXT("%ld"), Properties.u.GroupProperties.uidName);
85 *pcType = ctALPHABETIC;
88 if (Properties.u.GroupProperties.szOwner[0])
89 wsprintf (pszText, TEXT("%s (%ld)"), Properties.u.GroupProperties.szOwner, Properties.u.GroupProperties.uidOwner);
91 wsprintf (pszText, TEXT("%ld"), Properties.u.GroupProperties.uidOwner);
97 *pcType = ctALPHABETIC;
100 if (Properties.u.GroupProperties.szCreator[0])
101 wsprintf (pszText, TEXT("%s (%ld)"), Properties.u.GroupProperties.szCreator, Properties.u.GroupProperties.uidCreator);
103 wsprintf (pszText, TEXT("%ld"), Properties.u.GroupProperties.uidCreator);