PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llcapabilityprovider.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 56 lines | 13 code | 4 blank | 39 comment | 0 complexity | 70e723851f262863c99c8dd28c8838fd MD5 | raw file
 1/**
 2 * @file   llcapabilityprovider.h
 3 * @author Nat Goodspeed
 4 * @date   2009-01-07
 5 * @brief  Interface by which to reference (e.g.) LLViewerRegion to obtain a
 6 *         capability.
 7 * 
 8 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
 9 * Second Life Viewer Source Code
10 * Copyright (C) 2010, Linden Research, Inc.
11 * 
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation;
15 * version 2.1 of the License only.
16 * 
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 * Lesser General Public License for more details.
21 * 
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
25 * 
26 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
27 * $/LicenseInfo$
28 */
29
30#if ! defined(LL_LLCAPABILITYPROVIDER_H)
31#define LL_LLCAPABILITYPROVIDER_H
32
33#include "llhost.h"
34#include <string>
35
36/// Interface for obtaining a capability URL, given a capability name
37class LLCapabilityProvider
38{
39public:
40    virtual ~LLCapabilityProvider() {}
41    /**
42     * Get a capability URL, given a capability name. Returns empty string if
43     * no such capability is defined on this provider.
44     */
45    virtual std::string getCapability(const std::string& name) const = 0;
46    /**
47     * Get host to which to send that capability request.
48     */
49    virtual const LLHost& getHost() const = 0;
50    /**
51     * Describe this LLCapabilityProvider for logging etc.
52     */
53    virtual std::string getDescription() const = 0;
54};
55
56#endif /* ! defined(LL_LLCAPABILITYPROVIDER_H) */