From f87a49991a0a96c8cf11cbc9461711794aae3a72 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 Sep 2010 00:39:21 -0700 Subject: refactored notification template into own header file --- indra/llui/llnotificationtemplate.h | 274 ++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100644 indra/llui/llnotificationtemplate.h (limited to 'indra/llui/llnotificationtemplate.h') diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h new file mode 100644 index 0000000000..4a020bfe70 --- /dev/null +++ b/indra/llui/llnotificationtemplate.h @@ -0,0 +1,274 @@ +/** +* @file llnotificationtemplate.h +* @brief Description of notification contents +* @author Q (with assistance from Richard and Coco) +* +* $LicenseInfo:firstyear=2008&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2010, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#ifndef LL_LLNOTIFICATION_TEMPLATE_H +#define LL_LLNOTIFICATION_TEMPLATE_H + +//#include +//#include +//#include +//#include +//#include +//#include +//#include +// +//#include +//#include +//#include +//#include +// +//// we want to minimize external dependencies, but this one is important +//#include "llsd.h" +// +//// and we need this to manage the notification callbacks +//#include "llevents.h" +//#include "llfunctorregistry.h" +//#include "llpointer.h" +#include "llinitparam.h" +//#include "llnotificationslistener.h" +//#include "llnotificationptr.h" +//#include "llcachename.h" +#include "llnotifications.h" + + +typedef boost::shared_ptr LLNotificationFormPtr; + +// This is the class of object read from the XML file (notifications.xml, +// from the appropriate local language directory). +struct LLNotificationTemplate +{ + struct GlobalString : public LLInitParam::Block + { + Mandatory name, + value; + + GlobalString() + : name("name"), + value("value") + {} + }; + + struct UniquenessContext : public LLInitParam::Block + { + Mandatory key; + + UniquenessContext() + : key("key") + {} + + }; + + struct UniquenessConstraint : public LLInitParam::Block + { + Multiple contexts; + + UniquenessConstraint() + : contexts("context") + {} + }; + + // Templates are used to define common form types, such as OK/Cancel dialogs, etc. + + struct Template : public LLInitParam::Block