PageRenderTime 17ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llmessage/llclassifiedflags.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 62 lines | 19 code | 9 blank | 34 comment | 0 complexity | c05562a5c6979672f6e1e3b8324976c5 MD5 | raw file
 1/** 
 2 * @file llclassifiedflags.h
 3 * @brief Flags used in the classifieds.
 4 *
 5 * $LicenseInfo:firstyear=2005&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLCLASSIFIEDFLAGS_H
28#define LL_LLCLASSIFIEDFLAGS_H
29
30typedef U8 ClassifiedFlags;
31
32const U8 CLASSIFIED_FLAG_NONE   	= 1 << 0;
33const U8 CLASSIFIED_FLAG_MATURE 	= 1 << 1;
34//const U8 CLASSIFIED_FLAG_ENABLED	= 1 << 2; // see llclassifiedflags.cpp
35//const U8 CLASSIFIED_FLAG_HAS_PRICE= 1 << 3; // deprecated
36const U8 CLASSIFIED_FLAG_UPDATE_TIME= 1 << 4;
37const U8 CLASSIFIED_FLAG_AUTO_RENEW = 1 << 5;
38
39const U8 CLASSIFIED_QUERY_FILTER_MATURE		= 1 << 1;
40//const U8 CLASSIFIED_QUERY_FILTER_ENABLED	= 1 << 2;
41//const U8 CLASSIFIED_QUERY_FILTER_PRICE	= 1 << 3;
42
43// These are new with Adult-enabled viewers (1.23 and later)
44const U8 CLASSIFIED_QUERY_INC_PG			= 1 << 2;
45const U8 CLASSIFIED_QUERY_INC_MATURE		= 1 << 3;
46const U8 CLASSIFIED_QUERY_INC_ADULT			= 1 << 6;
47const U8 CLASSIFIED_QUERY_INC_NEW_VIEWER	= (CLASSIFIED_QUERY_INC_PG | CLASSIFIED_QUERY_INC_MATURE | CLASSIFIED_QUERY_INC_ADULT);
48
49const S32 MAX_CLASSIFIEDS = 100;
50
51// This function is used in AO viewers to pack old query flags into the request 
52// so that they can talk to old dataservers properly. When the AO servers are deployed on agni
53// we can revert back to ClassifiedFlags pack_classified_flags and get rider of this one.
54ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult);
55
56ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult);
57bool is_cf_mature(ClassifiedFlags flags);
58//bool is_cf_enabled(ClassifiedFlags flags);
59bool is_cf_update_time(ClassifiedFlags flags);
60bool is_cf_auto_renew(ClassifiedFlags flags);
61
62#endif