# kdeprint Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# util.h

    00001 /*
    00002  *  This file is part of the KDE libraries
    00003  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
    00004  *
    00005  *  This library is free software; you can redistribute it and/or
    00006  *  modify it under the terms of the GNU Library General Public
    00007  *  License version 2 as published by the Free Software Foundation.
    00008  *
    00009  *  This library is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  *  Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this library; see the file COPYING.LIB.  If not, write to
    00016  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017  *  Boston, MA 02111-1307, USA.
    00018  **/
    00019
    00020 #ifndef UTIL_H
    00021 #define UTIL_H
    00022
    00023 #include "kprinter.h"
    00024 #include <qstring.h>
    00025 #include <kurl.h>
    00026 #include <klocale.h>
    00027
    00028 KURL smbToUrl(const QString& work, const QString& server, const QString& printer);
    00029 void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer);
    00030 // those 2 are only workarounds when the login/password may contain
    00031 // strange characters ('@', '/'). In this case, those chars are not encoded
    00032 // as other SMB tools (smbspool) doesn't seem to support encoding. This
    00033 // utilities allow to continue working KURL class (and encoding) within
    00034 // KDEPrint, but without encoding outside KDEPrint (shoudl fix bug #38733)
    00035 KURL smbToUrl(const QString& s);
    00036 QString urlToSmb(const KURL& url);
    00037 KDEPRINT_EXPORT QString buildSmbURI( const QString& work, const QString& server, const QString& printer, const QString& user, const QString& passwd );
    00038 KDEPRINT_EXPORT bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& printer, QString& user, QString& passwd );
    00039 KDEPRINT_EXPORT QString shadowPassword( const QString& uri );
    00040
    00041 static const struct pagesizestruct
    00042 {
    00043     const char* text;
    00044     int     ID;
    00045 } page_sizes[] =
    00046 {
    00047     { "A0", KPrinter::A0 },
    00048     { "A1", KPrinter::A1 },
    00049     { "A2", KPrinter::A2 },
    00050     { "A3", KPrinter::A3 },
    00051     { "A4", KPrinter::A4 },
    00052     { "A5", KPrinter::A5 },
    00053     { "A6", KPrinter::A6 },
    00054     { "A7", KPrinter::A7 },
    00055     { "A8", KPrinter::A8 },
    00056     { "A9", KPrinter::A9 },
    00057     { "B1", KPrinter::B1 },
    00058     { "B10", KPrinter::B10 },
    00059     { "B2", KPrinter::B2 },
    00060     { "B3", KPrinter::B3 },
    00061     { "B4", KPrinter::B4 },
    00062     { "B5", KPrinter::B5 },
    00063     { "B6", KPrinter::B6 },
    00064     { "B7", KPrinter::B7 },
    00065     { "B8", KPrinter::B8 },
    00066     { "B9", KPrinter::B9 },
    00067     { I18N_NOOP("Envelope C5"), KPrinter::C5E },
    00068     { I18N_NOOP("Envelope DL"), KPrinter::DLE },
    00069     { I18N_NOOP("Envelope US #10"), KPrinter::Comm10E },
    00070     { I18N_NOOP("Executive"), KPrinter::Executive },
    00071     { I18N_NOOP("Folio"), KPrinter::Folio },
    00072     { I18N_NOOP("Ledger"), KPrinter::Ledger },
    00073     { I18N_NOOP("Tabloid"), KPrinter::Tabloid },
    00074     { I18N_NOOP("US Legal"), KPrinter::Legal },
    00075     { I18N_NOOP("US Letter"), KPrinter::Letter }
    00076 };
    00077 int findIndex(int ID);
    00078
    00079 #endif

This file is part of the documentation for kdeprint Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:31:06 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003