2020-05-03 14:09:42 -03:00
|
|
|
/***************************************************************************
|
|
|
|
|
* Copyright (C) 2020 by Gustavo Sousa - gustavocms@gmail.com *
|
2020-11-28 10:37:24 +00:00
|
|
|
* Copyright (C) 2020 by Stephen Lyons - slysven@virginmedia.com *
|
2020-05-03 14:09:42 -03:00
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
#ifndef MUDLET_TENTITYTAGHANDLER_H
|
|
|
|
|
#define MUDLET_TENTITYTAGHANDLER_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "TMxpClient.h"
|
|
|
|
|
#include "TMxpContext.h"
|
|
|
|
|
#include "TMxpTagHandler.h"
|
|
|
|
|
|
|
|
|
|
//<!ENTITY Name Value [DESC=description] [PRIVATE] [PUBLISH] [DELETE] [ADD] [REMOVE]>
|
|
|
|
|
class TMxpEntityTagHandler : public TMxpTagHandler
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool supports(TMxpContext& ctx, TMxpClient& client, MxpTag* tag) override {
|
2020-11-28 10:37:24 +00:00
|
|
|
Q_UNUSED(ctx)
|
|
|
|
|
Q_UNUSED(client)
|
2021-12-07 06:21:39 +01:00
|
|
|
return tag->isNamed(qsl("!ENTITY")) || tag->isNamed(qsl("!EN"));
|
2020-05-03 14:09:42 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TMxpTagHandlerResult handleStartTag(TMxpContext& ctx, TMxpClient& client, MxpStartTag* tag) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //MUDLET_TENTITYTAGHANDLER_H
|