Exemplo n.º 1
0
AutoStr* Uri_Resolved(Uri const* uri)
{
    SELF_CONST(uri);
    try
    {
        return AutoStr_FromTextStd(self->resolved().toUtf8().constData());
    }
    catch(de::Uri::ResolveError const& er)
    {
        LOG_RES_WARNING(er.asText());
    }
    return AutoStr_NewStd();
}
Exemplo n.º 2
0
static void writeUri(const Uri* uri, Writer* writer, int omitComponents = 0)
{
    SELF_CONST(uri);

    if(omitComponents & UCF_SCHEME)
    {
        ddstring_t emptyString;
        Str_InitStatic(&emptyString, "");
        Str_Write(&emptyString, writer);
    }
    else
    {
        Str_Write(DualString(self->scheme()).toStrUtf8(), writer);
    }
    Str_Write(DualString(self->path()).toStrUtf8(), writer);
}
Exemplo n.º 3
0
struct file1_s* FileHandle_File_const(struct filehandle_s const* hndl)
{
    SELF_CONST(hndl);
    return reinterpret_cast<struct file1_s*>(&self->file());
}
Exemplo n.º 4
0
size_t FileHandle_BaseOffset(struct filehandle_s const* hndl)
{
    SELF_CONST(hndl);
    return self->baseOffset();
}
Exemplo n.º 5
0
boolean FileHandle_IsValid(struct filehandle_s const* hndl)
{
    SELF_CONST(hndl);
    return self->isValid();
}
Exemplo n.º 6
0
AutoStr* Uri_ToString(Uri const* uri)
{
    SELF_CONST(uri);
    return AutoStr_FromTextStd(self->asText().toUtf8().constData());
}
Exemplo n.º 7
0
AutoStr* Uri_Compose(Uri const* uri)
{
    SELF_CONST(uri);
    return AutoStr_FromTextStd(self->compose().toUtf8().constData());
}
Exemplo n.º 8
0
AutoStr* Uri_Compose2(Uri const* uri, int flags)
{
    SELF_CONST(uri);
    return AutoStr_FromTextStd(self->compose(translateFlags(flags)).toUtf8().constData());
}
Exemplo n.º 9
0
const Str* Uri_Path(Uri const* uri)
{
    SELF_CONST(uri);
    return self->pathStr();
}
Exemplo n.º 10
0
const Str* Uri_Scheme(Uri const* uri)
{
    SELF_CONST(uri);
    return self->schemeStr();
}
Exemplo n.º 11
0
dd_bool Uri_IsEmpty(Uri const* uri)
{
    SELF_CONST(uri);
    return self->isEmpty();
}
Exemplo n.º 12
0
dd_bool Uri_Equality(Uri const* uri, Uri const* other)
{
    SELF_CONST(uri);
    DENG_ASSERT(other);
    return *self == (*(TOINTERNAL_CONST(other)));
}