#!/usr/bin/perl -w
# -*- perl -*-
package viewConfig ;
use strict ;
#
#
#################################################################
# Configuration file for special file viewer.
#################################################################
#
#
my %ExtensionToType ;
my %TypeData ;
BEGIN()
{
# Keys: file extension (in uppercase)
# value: A type code (must be unique)
%viewConfig::ExtensionToType =
(
HTML =>"HTML",
HTM =>"HTML",
GIF =>"GIF",
JPEG =>"JPEG",
JPG =>"JPEG",
DOC =>"WINWORD",
DOT =>"WINWORDT",
PPT =>"PWRPT",
RTF =>"RTF",
PDF =>"PDF",
) ;
# Special "about" url for html viewer
my $htmlAbout = &P4CGI::ahref(-url => &P4CGI::SFV_HTML_URL() ,
"TYPE=ABOUT",
"About the HTML viewer") ;
# Keys: Type code
# value: A referece to an array:
# [url for viewer,description of content, content type, optinal about]
%viewConfig::TypeData =
(
HTML =>[&P4CGI::SFV_HTML_URL(),"html file using \"smart\" viewer and a browser","text/html",
$htmlAbout],
GIF =>[&P4CGI::SFV_URL() ,"gif image using browser","image/gif"],
JPEG =>[&P4CGI::SFV_URL() ,"jpeg image using browser","image/jpeg"],
WINWORD =>[&P4CGI::SFV_URL() ,"MS-Word document","application/msword"],
WINWORDT =>[&P4CGI::SFV_URL() ,"MS-Word template","application/msword"],
PWRTP =>[&P4CGI::SFV_URL() ,"MS-PowerPoint document","application/ppt"],
RTF =>[&P4CGI::SFV_URL() ,"RTF document","application/rtf"],
PDF =>[&P4CGI::SFV_URL() ,"PDF document","application/pdf"]
) ;
} ;
1;