// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wIconView: // The icon view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wHtml.h" #include "p4wView.h" #include "p4wIconView.h" #include <p4wIcons.h> // ------------------------------------- // Constructors and destructor. // p4wIconView::p4wIconView(p4wRequest & Request) : p4wView(Request) { } p4wIconView::~p4wIconView() { } // ------------------------------------- // Render this view. // void p4wIconView::Render() { // // Generate the HTTP headers. p4wHtml htm; htm.httpHeader( 200 ); if (!strstr(fRequest.GetHTTPVersion().Text(), "1.0")) htm.CacheControl(86400); htm.contentType( "image/gif", 0 ); // // Send the requested icon. if( fRequest.GetURL() == "addIcon" ) { htm.contentLength( sizeof(addIcon) ); fRequest << htm; fRequest.Write( addIcon, sizeof(addIcon) ); return; } if( fRequest.GetURL() == "bangIcon" ) { htm.contentLength( sizeof(bangIcon) ); fRequest << htm; fRequest.Write( bangIcon, sizeof(bangIcon) ); return; } if( fRequest.GetURL() == "deleteIcon" ) { htm.contentLength( sizeof(deleteIcon) ); fRequest << htm; fRequest.Write( deleteIcon, sizeof(deleteIcon) ); return; } if( fRequest.GetURL() == "editIcon" ) { htm.contentLength( sizeof(editIcon) ); fRequest << htm; fRequest.Write( editIcon, sizeof(editIcon) ); return; } if( fRequest.GetURL() == "headdeletedIcon" ) { htm.contentLength( sizeof(headdeletedIcon) ); fRequest << htm; fRequest.Write( headdeletedIcon, sizeof(headdeletedIcon) ); return; } if( fRequest.GetURL() == "helpIcon" ) { htm.contentLength( sizeof(helpIcon) ); fRequest << htm; fRequest.Write( helpIcon, sizeof(helpIcon) ); return; } if( fRequest.GetURL() == "lockedIcon" ) { htm.contentLength( sizeof(lockedIcon) ); fRequest << htm; fRequest.Write( lockedIcon, sizeof(lockedIcon) ); return; } if( fRequest.GetURL() == "resolveIcon" ) { htm.contentLength( sizeof(resolveIcon) ); fRequest << htm; fRequest.Write( resolveIcon, sizeof(resolveIcon) ); return; } if( fRequest.GetURL() == "subdirIcon" ) { htm.contentLength( sizeof(subdirIcon) ); fRequest << htm; fRequest.Write( subdirIcon, sizeof(subdirIcon) ); return; } if( fRequest.GetURL() == "syncIcon" ) { htm.contentLength( sizeof(syncIcon) ); fRequest << htm; fRequest.Write( syncIcon, sizeof(syncIcon) ); return; } if( fRequest.GetURL() == "syncedIcon" ) { htm.contentLength( sizeof(syncedIcon) ); fRequest << htm; fRequest.Write( syncedIcon, sizeof(syncedIcon) ); return; } if( fRequest.GetURL() == "theiropenIcon" ) { htm.contentLength( sizeof(theiropenIcon) ); fRequest << htm; fRequest.Write( theiropenIcon, sizeof(theiropenIcon) ); return; } if( fRequest.GetURL() == "theirlockIcon" ) { htm.contentLength( sizeof(theirlockIcon) ); fRequest << htm; fRequest.Write( theirlockIcon, sizeof(theirlockIcon) ); return; } if( fRequest.GetURL() == "blankIcon" ) { htm.contentLength( sizeof(blankIcon) ); fRequest << htm; fRequest.Write( blankIcon, sizeof(blankIcon) ); return; } if( fRequest.GetURL() == "logoIcon" ) { htm.contentLength( sizeof(logoIcon) ); fRequest << htm; fRequest.Write( logoIcon, sizeof(logoIcon) ); return; } if( fRequest.GetURL() == "runsyncnIcon" ) { htm.contentLength( sizeof(runsyncnIcon) ); fRequest << htm; fRequest.Write( runsyncnIcon, sizeof(runsyncnIcon) ); return; } if( fRequest.GetURL() == "runresolveIcon" ) { htm.contentLength( sizeof(runresolveIcon) ); fRequest << htm; fRequest.Write( runresolveIcon, sizeof(runresolveIcon) ); return; } if( fRequest.GetURL() == "runresolve17Icon" ) { htm.contentLength( sizeof(runresolve17Icon) ); fRequest << htm; fRequest.Write( runresolve17Icon, sizeof(runresolve17Icon) ); return; } if( fRequest.GetURL() == "runresolve17highlightedIcon" ) { htm.contentLength( sizeof(runresolve17highlightedIcon) ); fRequest << htm; fRequest.Write( runresolve17highlightedIcon, sizeof(runresolve17highlightedIcon) ); return; } if( fRequest.GetURL() == "runsubmitIcon" ) { htm.contentLength( sizeof(runsubmitIcon) ); fRequest << htm; fRequest.Write( runsubmitIcon, sizeof(runsubmitIcon) ); return; } if( fRequest.GetURL() == "runlockIcon" ) { htm.contentLength( sizeof(runlockIcon) ); fRequest << htm; fRequest.Write( runlockIcon, sizeof(runlockIcon) ); return; } if( fRequest.GetURL() == "runlockhighlightedIcon" ) { htm.contentLength( sizeof(runlockhighlightedIcon) ); fRequest << htm; fRequest.Write( runlockhighlightedIcon, sizeof(runlockhighlightedIcon) ); return; } if( fRequest.GetURL() == "runrevertIcon" ) { htm.contentLength( sizeof(runrevertIcon) ); fRequest << htm; fRequest.Write( runrevertIcon, sizeof(runrevertIcon) ); return; } if( fRequest.GetURL() == "runrevert17Icon" ) { htm.contentLength( sizeof(runrevert17Icon) ); fRequest << htm; fRequest.Write( runrevert17Icon, sizeof(runrevert17Icon) ); return; } if( fRequest.GetURL() == "runrevert17highlightedIcon" ) { htm.contentLength( sizeof(runrevert17highlightedIcon) ); fRequest << htm; fRequest.Write( runrevert17highlightedIcon, sizeof(runrevert17highlightedIcon) ); return; } if( fRequest.GetURL() == "hidefilesIcon" ) { htm.contentLength( sizeof(hidefilesIcon) ); fRequest << htm; fRequest.Write( hidefilesIcon, sizeof(hidefilesIcon) ); return; } if( fRequest.GetURL() == "showfilesIcon" ) { htm.contentLength( sizeof(showfilesIcon) ); fRequest << htm; fRequest.Write( showfilesIcon, sizeof(showfilesIcon) ); return; } if( fRequest.GetURL() == "hiderecentIcon" ) { htm.contentLength( sizeof(hiderecentIcon) ); fRequest << htm; fRequest.Write( hiderecentIcon, sizeof(hiderecentIcon) ); return; } if( fRequest.GetURL() == "showrecentIcon" ) { htm.contentLength( sizeof(showrecentIcon) ); fRequest << htm; fRequest.Write( showrecentIcon, sizeof(showrecentIcon) ); return; } if( fRequest.GetURL() == "editclientIcon" ) { htm.contentLength( sizeof(editclientIcon) ); fRequest << htm; fRequest.Write( editclientIcon, sizeof(editclientIcon) ); return; } if( fRequest.GetURL() == "runsyncIcon" ) { htm.contentLength( sizeof(runsyncIcon) ); fRequest << htm; fRequest.Write( runsyncIcon, sizeof(runsyncIcon) ); return; } if( fRequest.GetURL() == "runsync17Icon" ) { htm.contentLength( sizeof(runsync17Icon) ); fRequest << htm; fRequest.Write( runsync17Icon, sizeof(runsync17Icon) ); return; } if( fRequest.GetURL() == "runsync17highlightedIcon" ) { htm.contentLength( sizeof(runsync17highlightedIcon) ); fRequest << htm; fRequest.Write( runsync17highlightedIcon, sizeof(runsync17highlightedIcon) ); return; } if( fRequest.GetURL() == "returnIcon" ) { htm.contentLength( sizeof(returnIcon) ); fRequest << htm; fRequest.Write( returnIcon, sizeof(returnIcon) ); return; } if( fRequest.GetURL() == "branchIcon" ) { htm.contentLength( sizeof(branchIcon) ); fRequest << htm; fRequest.Write( branchIcon, sizeof(branchIcon) ); return; } if( fRequest.GetURL() == "integIcon" ) { htm.contentLength( sizeof(integIcon) ); fRequest << htm; fRequest.Write( integIcon, sizeof(integIcon) ); return; } if( fRequest.GetURL() == "runaddIcon" ) { htm.contentLength( sizeof(runaddIcon) ); fRequest << htm; fRequest.Write( runaddIcon, sizeof(runaddIcon) ); return; } if( fRequest.GetURL() == "runadd17Icon" ) { htm.contentLength( sizeof(runadd17Icon) ); fRequest << htm; fRequest.Write( runadd17Icon, sizeof(runadd17Icon) ); return; } if( fRequest.GetURL() == "runadd17highlightedIcon" ) { htm.contentLength( sizeof(runadd17highlightedIcon) ); fRequest << htm; fRequest.Write( runadd17highlightedIcon, sizeof(runadd17highlightedIcon) ); return; } if( fRequest.GetURL() == "runeditIcon" ) { htm.contentLength( sizeof(runeditIcon) ); fRequest << htm; fRequest.Write( runeditIcon, sizeof(runeditIcon) ); return; } if( fRequest.GetURL() == "runedit17Icon" ) { htm.contentLength( sizeof(runedit17Icon) ); fRequest << htm; fRequest.Write( runedit17Icon, sizeof(runedit17Icon) ); return; } if( fRequest.GetURL() == "runedit17highlightedIcon" ) { htm.contentLength( sizeof(runedit17highlightedIcon) ); fRequest << htm; fRequest.Write( runedit17highlightedIcon, sizeof(runedit17highlightedIcon) ); return; } if( fRequest.GetURL() == "rundeleteIcon" ) { htm.contentLength( sizeof(rundeleteIcon) ); fRequest << htm; fRequest.Write( rundeleteIcon, sizeof(rundeleteIcon) ); return; } if( fRequest.GetURL() == "rundelete17Icon" ) { htm.contentLength( sizeof(rundelete17Icon) ); fRequest << htm; fRequest.Write( rundelete17Icon, sizeof(rundelete17Icon) ); return; } if( fRequest.GetURL() == "rundelete17highlightedIcon" ) { htm.contentLength( sizeof(rundelete17highlightedIcon) ); fRequest << htm; fRequest.Write( rundelete17highlightedIcon, sizeof(rundelete17highlightedIcon) ); return; } if( fRequest.GetURL() == "rundiffIcon" ) { htm.contentLength( sizeof(rundiffIcon) ); fRequest << htm; fRequest.Write( rundiffIcon, sizeof(rundiffIcon) ); return; } if( fRequest.GetURL() == "rundiff17Icon" ) { htm.contentLength( sizeof(rundiff17Icon) ); fRequest << htm; fRequest.Write( rundiff17Icon, sizeof(rundiff17Icon) ); return; } if( fRequest.GetURL() == "rundiffsmallIcon" ) { htm.contentLength( sizeof(rundiffsmallIcon) ); fRequest << htm; fRequest.Write( rundiffsmallIcon, sizeof(rundiffsmallIcon) ); return; } if( fRequest.GetURL() == "rundiffprevsmallIcon" ) { htm.contentLength( sizeof(rundiffprevsmallIcon) ); fRequest << htm; fRequest.Write( rundiffprevsmallIcon, sizeof(rundiffprevsmallIcon) ); return; } if( fRequest.GetURL() == "rundiffprev17Icon" ) { htm.contentLength( sizeof(rundiffprev17Icon) ); fRequest << htm; fRequest.Write( rundiffprev17Icon, sizeof(rundiffprev17Icon) ); return; } if( fRequest.GetURL() == "rundiffprev17highlightedIcon" ) { htm.contentLength( sizeof(rundiffprev17highlightedIcon) ); fRequest << htm; fRequest.Write( rundiffprev17highlightedIcon, sizeof(rundiffprev17highlightedIcon) ); return; } if( fRequest.GetURL() == "showtextIcon" ) { htm.contentLength( sizeof(showtextIcon) ); fRequest << htm; fRequest.Write( showtextIcon, sizeof(showtextIcon) ); return; } if( fRequest.GetURL() == "showtextsmallIcon" ) { htm.contentLength( sizeof(showtextsmallIcon) ); fRequest << htm; fRequest.Write( showtextsmallIcon, sizeof(showtextsmallIcon) ); return; } if( fRequest.GetURL() == "showtext17Icon" ) { htm.contentLength( sizeof(showtext17Icon) ); fRequest << htm; fRequest.Write( showtext17Icon, sizeof(showtext17Icon) ); return; } if( fRequest.GetURL() == "showtext17highlightedIcon" ) { htm.contentLength( sizeof(showtext17highlightedIcon) ); fRequest << htm; fRequest.Write( showtext17highlightedIcon, sizeof(showtext17highlightedIcon) ); return; } if( fRequest.GetURL() == "rununlockIcon" ) { htm.contentLength( sizeof(rununlockIcon) ); fRequest << htm; fRequest.Write( rununlockIcon, sizeof(rununlockIcon) ); return; } if( fRequest.GetURL() == "rununlockhighlightedIcon" ) { htm.contentLength( sizeof(rununlockhighlightedIcon) ); fRequest << htm; fRequest.Write( rununlockhighlightedIcon, sizeof(rununlockhighlightedIcon) ); return; } if( fRequest.GetURL() == "showfilelogIcon" ) { htm.contentLength( sizeof(showfilelogIcon) ); fRequest << htm; fRequest.Write( showfilelogIcon, sizeof(showfilelogIcon) ); return; } if( fRequest.GetURL() == "showfilelog17Icon" ) { htm.contentLength( sizeof(showfilelog17Icon) ); fRequest << htm; fRequest.Write( showfilelog17Icon, sizeof(showfilelog17Icon) ); return; } if( fRequest.GetURL() == "showfilelog17highlightedIcon" ) { htm.contentLength( sizeof(showfilelog17highlightedIcon) ); fRequest << htm; fRequest.Write( showfilelog17highlightedIcon, sizeof(showfilelog17highlightedIcon) ); return; } if( fRequest.GetURL() == "showextlogIcon" ) { htm.contentLength( sizeof(showextlogIcon) ); fRequest << htm; fRequest.Write( showextlogIcon, sizeof(showextlogIcon) ); return; } if( fRequest.GetURL() == "showviewIcon" ) { htm.contentLength( sizeof(showviewIcon) ); fRequest << htm; fRequest.Write( showviewIcon, sizeof(showviewIcon) ); return; } if( fRequest.GetURL() == "syncednoneIcon" ) { htm.contentLength( sizeof(syncednoneIcon) ); fRequest << htm; fRequest.Write( syncednoneIcon, sizeof(syncednoneIcon) ); return; } if( fRequest.GetURL() == "unmappedIcon" ) { htm.contentLength( sizeof(unmappedIcon) ); fRequest << htm; fRequest.Write( unmappedIcon, sizeof(unmappedIcon) ); return; } if( fRequest.GetURL() == "launcheditIcon" ) { htm.contentLength( sizeof(launcheditIcon ) ); fRequest << htm; fRequest.Write( launcheditIcon, sizeof(launcheditIcon) ); } if( fRequest.GetURL() == "launchedit17Icon" ) { htm.contentLength( sizeof(launchedit17Icon ) ); fRequest << htm; fRequest.Write( launchedit17Icon, sizeof(launchedit17Icon) ); return; } if( fRequest.GetURL() == "launchedit17highlightedIcon" ) { htm.contentLength( sizeof(launchedit17highlightedIcon ) ); fRequest << htm; fRequest.Write( launchedit17highlightedIcon, sizeof(launchedit17highlightedIcon) ); } if( fRequest.GetURL() == "launcheditsmallIcon" ) { htm.contentLength( sizeof(launcheditsmallIcon ) ); fRequest << htm; fRequest.Write( launcheditsmallIcon, sizeof(launcheditsmallIcon) ); return; } if( fRequest.GetURL() == "cancelIcon" ) { htm.contentLength( sizeof(cancelIcon) ); fRequest << htm; fRequest.Write( cancelIcon, sizeof(cancelIcon) ); return; } if( fRequest.GetURL() == "logoutIcon" ) { htm.contentLength( sizeof(logoutIcon) ); fRequest << htm; fRequest.Write( logoutIcon, sizeof(logoutIcon) ); return; } if( fRequest.GetURL() == "logoproIcon" ) { htm.contentLength( sizeof(logoproIcon) ); fRequest << htm; fRequest.Write( logoproIcon, sizeof(logoproIcon) ); return; } if( fRequest.GetURL() == "logomultiIcon" ) { htm.contentLength( sizeof(logomultiIcon) ); fRequest << htm; fRequest.Write( logomultiIcon, sizeof(logomultiIcon) ); return; } if( fRequest.GetURL() == "logoviewerIcon" ) { htm.contentLength( sizeof(logoviewerIcon) ); fRequest << htm; fRequest.Write( logoviewerIcon, sizeof(logoviewerIcon) ); return; } if( fRequest.GetURL() == "headerBkgrndIcon" ) { htm.contentLength( sizeof(headerBkgrndIcon) ); fRequest << htm; fRequest.Write( headerBkgrndIcon, sizeof(headerBkgrndIcon) ); return; } if( fRequest.GetURL() == "clearpixelIcon" ) { htm.contentLength( sizeof(clearpixelIcon) ); fRequest << htm; fRequest.Write( clearpixelIcon, sizeof(clearpixelIcon) ); return; } if( fRequest.GetURL() == "branchesIcon" ) { htm.contentLength( sizeof(branchesIcon) ); fRequest << htm; fRequest.Write( branchesIcon, sizeof(branchesIcon) ); return; } if( fRequest.GetURL() == "clientIcon" ) { htm.contentLength( sizeof(clientIcon) ); fRequest << htm; fRequest.Write( clientIcon, sizeof(clientIcon) ); return; } if( fRequest.GetURL() == "fileIcon" ) { htm.contentLength( sizeof(fileIcon) ); fRequest << htm; fRequest.Write( fileIcon, sizeof(fileIcon) ); return; } if( fRequest.GetURL() == "grayPixelIcon" ) { htm.contentLength( sizeof(grayPixelIcon) ); fRequest << htm; fRequest.Write( grayPixelIcon, sizeof(grayPixelIcon) ); return; } if( fRequest.GetURL() == "jobIcon" ) { htm.contentLength( sizeof(jobIcon) ); fRequest << htm; fRequest.Write( jobIcon, sizeof(jobIcon) ); return; } if( fRequest.GetURL() == "labelIcon" ) { htm.contentLength( sizeof(labelIcon) ); fRequest << htm; fRequest.Write( labelIcon, sizeof(labelIcon) ); return; } if( fRequest.GetURL() == "pendingChangelistIcon" ) { htm.contentLength( sizeof(pendingChangelistIcon) ); fRequest << htm; fRequest.Write( pendingChangelistIcon, sizeof(pendingChangelistIcon) ); return; } if( fRequest.GetURL() == "submittedChangelistIcon" ) { htm.contentLength( sizeof(submittedChangelistIcon) ); fRequest << htm; fRequest.Write( submittedChangelistIcon, sizeof(submittedChangelistIcon) ); return; } if( fRequest.GetURL() == "userIcon" ) { htm.contentLength( sizeof(userIcon) ); fRequest << htm; fRequest.Write( userIcon, sizeof(userIcon) ); return; } if( fRequest.GetURL() == "infoIcon" ) { htm.contentLength( sizeof(infoIcon) ); fRequest << htm; fRequest.Write( infoIcon, sizeof(infoIcon) ); return; } if( fRequest.GetURL() == "recentactivityIcon" ) { htm.contentLength( sizeof(recentactivityIcon) ); fRequest << htm; fRequest.Write( recentactivityIcon, sizeof(recentactivityIcon) ); return; } if( fRequest.GetURL() == "recentactivityOnIcon" ) { htm.contentLength( sizeof(recentactivityOnIcon) ); fRequest << htm; fRequest.Write( recentactivityOnIcon, sizeof(recentactivityOnIcon) ); return; } if( fRequest.GetURL() == "settingsIcon" ) { htm.contentLength( sizeof(settingsIcon) ); fRequest << htm; fRequest.Write( settingsIcon, sizeof(settingsIcon) ); return; } if( fRequest.GetURL() == "p4cmdIcon" ) { htm.contentLength( sizeof(p4cmdIcon) ); fRequest << htm; fRequest.Write( p4cmdIcon, sizeof(p4cmdIcon) ); return; } if( fRequest.GetURL() == "p4cmdOnIcon" ) { htm.contentLength( sizeof(p4cmdOnIcon) ); fRequest << htm; fRequest.Write( p4cmdOnIcon, sizeof(p4cmdOnIcon) ); return; } if( fRequest.GetURL() == "goIcon" ) { htm.contentLength( sizeof(goIcon) ); fRequest << htm; fRequest.Write( goIcon, sizeof(goIcon) ); return; } if( fRequest.GetURL() == "goOnIcon" ) { htm.contentLength( sizeof(goOnIcon) ); fRequest << htm; fRequest.Write( goOnIcon, sizeof(goOnIcon) ); return; } if( fRequest.GetURL() == "theiraddIcon" ) { htm.contentLength( sizeof(theiraddIcon) ); fRequest << htm; fRequest.Write( theiraddIcon, sizeof(theiraddIcon) ); return; } if( fRequest.GetURL() == "theirdeleteIcon" ) { htm.contentLength( sizeof(theirdeleteIcon) ); fRequest << htm; fRequest.Write( theirdeleteIcon, sizeof(theirdeleteIcon) ); return; } if( fRequest.GetURL() == "notdepotIcon" ) { htm.contentLength( sizeof(notdepotIcon) ); fRequest << htm; fRequest.Write( notdepotIcon, sizeof(notdepotIcon) ); return; } if( fRequest.GetURL() == "depotfolderIcon" ) { htm.contentLength( sizeof(depotfolderIcon) ); fRequest << htm; fRequest.Write( depotfolderIcon, sizeof(depotfolderIcon) ); return; } if( fRequest.GetURL() == "workspacefolderIcon" ) { htm.contentLength( sizeof(workspacefolderIcon) ); fRequest << htm; fRequest.Write( workspacefolderIcon, sizeof(workspacefolderIcon) ); return; } if( fRequest.GetURL() == "gotreeIcon" ) { htm.contentLength( sizeof(gotreeIcon) ); fRequest << htm; fRequest.Write( gotreeIcon, sizeof(gotreeIcon) ); return; } if( fRequest.GetURL() == "rssIcon" ) { htm.contentLength( sizeof(rssIcon) ); fRequest << htm; fRequest.Write( rssIcon, sizeof(rssIcon) ); return; } if( fRequest.GetURL() == "bulletIcon" ) { htm.contentLength( sizeof(bulletIcon) ); fRequest << htm; fRequest.Write( bulletIcon, sizeof(bulletIcon) ); return; } if( fRequest.GetURL() == "bullethighlightedIcon" ) { htm.contentLength( sizeof(bullethighlightedIcon) ); fRequest << htm; fRequest.Write( bullethighlightedIcon, sizeof(bullethighlightedIcon) ); return; } if( fRequest.GetURL() == "checkmarkIcon" ) { htm.contentLength( sizeof(checkmarkIcon) ); fRequest << htm; fRequest.Write( checkmarkIcon, sizeof(checkmarkIcon) ); return; } if( fRequest.GetURL() == "checkmarkhighlightedIcon" ) { htm.contentLength( sizeof(checkmarkhighlightedIcon) ); fRequest << htm; fRequest.Write( checkmarkhighlightedIcon, sizeof(checkmarkhighlightedIcon) ); return; } if( fRequest.GetURL() == "notselectedIcon" ) { htm.contentLength( sizeof(notselectedIcon) ); fRequest << htm; fRequest.Write( notselectedIcon, sizeof(notselectedIcon) ); return; } if( fRequest.GetURL() == "arrowdownIcon" ) { htm.contentLength( sizeof(arrowdownIcon) ); fRequest << htm; fRequest.Write( arrowdownIcon, sizeof(arrowdownIcon) ); return; } if( fRequest.GetURL() == "arrowupIcon" ) { htm.contentLength( sizeof(arrowupIcon) ); fRequest << htm; fRequest.Write( arrowupIcon, sizeof(arrowupIcon) ); return; } if( fRequest.GetURL() == "arrowdbldownIcon" ) { htm.contentLength( sizeof(arrowdbldownIcon) ); fRequest << htm; fRequest.Write( arrowdbldownIcon, sizeof(arrowdbldownIcon) ); return; } if( fRequest.GetURL() == "depot_icon_offIcon" ) { htm.contentLength( sizeof(depot_icon_offIcon) ); fRequest << htm; fRequest.Write( depot_icon_offIcon, sizeof(depot_icon_offIcon) ); return; } if( fRequest.GetURL() == "depot_icon_onIcon" ) { htm.contentLength( sizeof(depot_icon_onIcon) ); fRequest << htm; fRequest.Write( depot_icon_onIcon, sizeof(depot_icon_onIcon) ); return; } if( fRequest.GetURL() == "details_icon_offIcon" ) { htm.contentLength( sizeof(details_icon_offIcon) ); fRequest << htm; fRequest.Write( details_icon_offIcon, sizeof(details_icon_offIcon) ); return; } if( fRequest.GetURL() == "details_icon_onIcon" ) { htm.contentLength( sizeof(details_icon_onIcon) ); fRequest << htm; fRequest.Write( details_icon_onIcon, sizeof(details_icon_onIcon) ); return; } if( fRequest.GetURL() == "list_icon_offIcon" ) { htm.contentLength( sizeof(list_icon_offIcon) ); fRequest << htm; fRequest.Write( list_icon_offIcon, sizeof(list_icon_offIcon) ); return; } if( fRequest.GetURL() == "list_icon_onIcon" ) { htm.contentLength( sizeof(list_icon_onIcon) ); fRequest << htm; fRequest.Write( list_icon_onIcon, sizeof(list_icon_onIcon) ); return; } if( fRequest.GetURL() == "depottree17Icon" ) { htm.contentLength( sizeof(depottree17Icon) ); fRequest << htm; fRequest.Write( depottree17Icon, sizeof(depottree17Icon) ); return; } if( fRequest.GetURL() == "depottree17highlightedIcon" ) { htm.contentLength( sizeof(depottree17highlightedIcon) ); fRequest << htm; fRequest.Write( depottree17highlightedIcon, sizeof(depottree17highlightedIcon) ); return; } if( fRequest.GetURL() == "workspacetree17Icon" ) { htm.contentLength( sizeof(workspacetree17Icon) ); fRequest << htm; fRequest.Write( workspacetree17Icon, sizeof(workspacetree17Icon) ); return; } if( fRequest.GetURL() == "workspacetree17highlightedIcon" ) { htm.contentLength( sizeof(workspacetree17highlightedIcon) ); fRequest << htm; fRequest.Write( workspacetree17highlightedIcon, sizeof(workspacetree17highlightedIcon) ); return; } if( fRequest.GetURL() == "menuarrowIcon" ) { htm.contentLength( sizeof(menuarrowIcon) ); fRequest << htm; fRequest.Write( menuarrowIcon, sizeof(menuarrowIcon) ); return; } if( fRequest.GetURL() == "menuarrowhoverIcon" ) { htm.contentLength( sizeof(menuarrowhoverIcon) ); fRequest << htm; fRequest.Write( menuarrowhoverIcon, sizeof(menuarrowhoverIcon) ); return; } if( fRequest.GetURL() == "menuarrowtoolbarIcon" ) { htm.contentLength( sizeof(menuarrowtoolbarIcon) ); fRequest << htm; fRequest.Write( menuarrowtoolbarIcon, sizeof(menuarrowtoolbarIcon) ); return; } if( fRequest.GetURL() == "thumbnails_icon_offIcon" ) { htm.contentLength( sizeof(thumbnails_icon_offIcon) ); fRequest << htm; fRequest.Write( thumbnails_icon_offIcon, sizeof(thumbnails_icon_offIcon) ); return; } if( fRequest.GetURL() == "thumbnails_icon_onIcon" ) { htm.contentLength( sizeof(thumbnails_icon_onIcon) ); fRequest << htm; fRequest.Write( thumbnails_icon_onIcon, sizeof(thumbnails_icon_onIcon) ); return; } if( fRequest.GetURL() == "workspace_icon_offIcon" ) { htm.contentLength( sizeof(workspace_icon_offIcon) ); fRequest << htm; fRequest.Write( workspace_icon_offIcon, sizeof(workspace_icon_offIcon) ); return; } if( fRequest.GetURL() == "workspace_icon_onIcon" ) { htm.contentLength( sizeof(workspace_icon_onIcon) ); fRequest << htm; fRequest.Write( workspace_icon_onIcon, sizeof(workspace_icon_onIcon) ); return; } if( fRequest.GetURL() == "branchHistOnIcon" ) { htm.contentLength( sizeof(branchHistOnIcon) ); fRequest << htm; fRequest.Write( branchHistOnIcon, sizeof(branchHistOnIcon) ); return; } if( fRequest.GetURL() == "branchHistOffIcon" ) { htm.contentLength( sizeof(branchHistOffIcon) ); fRequest << htm; fRequest.Write( branchHistOffIcon, sizeof(branchHistOffIcon) ); return; } if( fRequest.GetURL() == "showfilterIcon" ) { htm.contentLength( sizeof(showfilterIcon) ); fRequest << htm; fRequest.Write( showfilterIcon, sizeof(showfilterIcon) ); return; } if( fRequest.GetURL() == "hidefilterIcon" ) { htm.contentLength( sizeof(hidefilterIcon) ); fRequest << htm; fRequest.Write( hidefilterIcon, sizeof(hidefilterIcon) ); return; } if( fRequest.GetURL() == "plusBoxIcon" ) { htm.contentLength( sizeof(plusBoxIcon) ); fRequest << htm; fRequest.Write( plusBoxIcon, sizeof(plusBoxIcon) ); return; } if( fRequest.GetURL() == "minusBoxIcon" ) { htm.contentLength( sizeof(minusBoxIcon) ); fRequest << htm; fRequest.Write( minusBoxIcon, sizeof(minusBoxIcon) ); return; } if( fRequest.GetURL() == "showhideIcon" ) { htm.contentLength( sizeof(showhideIcon) ); fRequest << htm; fRequest.Write( showhideIcon, sizeof(showhideIcon) ); return; } if( fRequest.GetURL() == "tabBackgroundIcon" ) { htm.contentLength( sizeof(tabBackgroundIcon) ); fRequest << htm; fRequest.Write( tabBackgroundIcon, sizeof(tabBackgroundIcon) ); return; } if( fRequest.GetURL() == "activeTabBackgroundIcon" ) { htm.contentLength( sizeof(activeTabBackgroundIcon) ); fRequest << htm; fRequest.Write( activeTabBackgroundIcon, sizeof(activeTabBackgroundIcon) ); return; } if( fRequest.GetURL() == "green_checkmarkIcon" ) { htm.contentLength( sizeof(green_checkmarkIcon) ); fRequest << htm; fRequest.Write( green_checkmarkIcon, sizeof(green_checkmarkIcon) ); return; } if( fRequest.GetURL() == "greendotIcon" ) { htm.contentLength( sizeof(greendotIcon) ); fRequest << htm; fRequest.Write( greendotIcon, sizeof(greendotIcon) ); return; } if( fRequest.GetURL() == "yellowdotIcon" ) { htm.contentLength( sizeof(yellowdotIcon) ); fRequest << htm; fRequest.Write( yellowdotIcon, sizeof(yellowdotIcon) ); return; } if( fRequest.GetURL() == "p4Icon" ) { htm.contentLength( sizeof(p4Icon) ); fRequest << htm; fRequest.Write( p4Icon, sizeof(p4Icon) ); return; } if( fRequest.GetURL() == "favicon.ico" ) { if( fRequest.GetJavascriptMode() == 2 || fRequest.IsHTTPS()) { p4wHtml htm; // MSIE && https require header htm.httpHeader( 200 ); // Opera requires no header htm.contentType( "image/vnd.microsoft.icon", 0 ); // Mozilla* handles both htm.contentLength( sizeof(faviconIcon) ); fRequest << htm; } fRequest.Write( faviconIcon, sizeof(faviconIcon) ); return; } if (strchr(fRequest.GetURL().Text(), '.')) { Error e; StrBuf buf; FileSys *f = FileSys::Create( FST_BINARY ); f->Set(fRequest.GetURL().Text()); f->Open( FOM_READ, &e ); if(!e.Test()) f->ReadWhole( &buf, &e ); if(!e.Test()) f->Close( &e ); delete f; fRequest.Write( buf.Text(), buf.Length() ); return; } fRequest.Write( blankIcon, sizeof(blankIcon) ); return; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wIconView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |