/*
* Authors:
* MenTaLguY <mental@rydia.net>
* Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2003 MenTaLguY
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glib.h>
#include "uri.h"
#include <string>
#include <glibmm/miscutils.h>
namespace Inkscape {
}
}
if (!preformed) {
throw MalformedURIException();
}
if (!uri) {
throw MalformedURIException();
}
}
_impl->unreference();
}
// No check for self-assignment needed, as _impl refcounting increments first.
_impl->unreference();
return *this;
}
}
if (_uri) {
}
}
_refcount++;
}
if (!--_refcount) {
delete this;
}
}
return opq;
}
}
bool isNet = false;
if ( isRelative() )
{
}
return isNet;
}
bool isRel = false;
if ( isRelative() )
{
}
return isRel;
}
bool isAbs = false;
if ( isRelative() )
{
}
return isAbs;
}
}
}
}
}
}
{
return filename;
}
/*
* Returns the absolute path to an existing file referenced in this URI,
* if the uri is data, the path is empty or the file doesn't exist, then
* an empty string is returned.
*
* Does not check if the returned path is the local document's path (local)
* and thus redundent. Caller is expected to check against the document's path.
*/
return "";
}
// Calculate the absolute path from an available base
}
// Check the existance of the file
}
return path;
}
/* TODO !!! proper error handling */
if (isRelativePath()) {
return uriString;
} else {
if (filename) {
return filename;
} else {
throw MalformedURIException();
}
}
}
if ( !path ) {
throw MalformedURIException();
}
for ( int i = 0; path[i]; i++ )
{
|| one == '_'
|| one == '-'
|| one == '!'
|| one == '.'
|| one == '~'
|| one == '\''
|| one == '('
|| one == ')'
|| one == '*'
) {
} else {
}
}
return result;
}
/* TODO !!! proper error handling */
return result;
}
if (string) {
/* hand the string off to glib memory management */
return glib_string;
} else {
return NULL;
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :