handle mime: and ext: in qlang
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.48 2007-06-21 11:14:45 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.49 2007-06-22 06:14:04 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -351,6 +351,17 @@ bool RclConfig::getMimeCategories(list<string>& cats)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RclConfig::isMimeCategory(string& cat)
|
||||
{
|
||||
list<string>cats;
|
||||
getMimeCategories(cats);
|
||||
for (list<string>::iterator it = cats.begin(); it != cats.end(); it++) {
|
||||
if (!stringicmp(*it,cat))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get list of mime types for category from mimeconf */
|
||||
bool RclConfig::getMimeCatTypes(const string& cat, list<string>& tps)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
#ifndef _RCLCONFIG_H_INCLUDED_
|
||||
#define _RCLCONFIG_H_INCLUDED_
|
||||
/* @(#$Id: rclconfig.h,v 1.35 2007-06-19 08:36:24 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
/* @(#$Id: rclconfig.h,v 1.36 2007-06-22 06:14:04 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -134,6 +134,8 @@ class RclConfig {
|
||||
|
||||
/** mimeconf: get list of file categories */
|
||||
bool getMimeCategories(list<string>&);
|
||||
/** mimeconf: is parameter one of the categories ? */
|
||||
bool isMimeCategory(string&);
|
||||
/** mimeconf: get list of mime types for category */
|
||||
bool getMimeCatTypes(const string& cat, list<string>&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user