00001 00032 //***************************************************************************** 00033 // llclassifiedflags.cpp 00034 // 00035 // Some exported symbols and functions for dealing with classified flags. 00036 // 00037 // Copyright 2005, Linden Research, Inc 00038 //***************************************************************************** 00039 00040 #include "linden_common.h" 00041 00042 #include "llclassifiedflags.h" 00043 00044 ClassifiedFlags pack_classified_flags(BOOL is_mature, BOOL auto_renew) 00045 { 00046 U8 rv = 0; 00047 if(is_mature) rv |= CLASSIFIED_FLAG_MATURE; 00048 if(auto_renew) rv |= CLASSIFIED_FLAG_AUTO_RENEW; 00049 return rv; 00050 } 00051 00052 bool is_cf_mature(ClassifiedFlags flags) 00053 { 00054 return ((flags & CLASSIFIED_FLAG_MATURE) != 0); 00055 } 00056 00057 // Deprecated, but leaving commented out because someday we might 00058 // want to let users enable/disable classifieds. JC 00059 //bool is_cf_enabled(ClassifiedFlags flags) 00060 //{ 00061 // return ((flags & CLASSIFIED_FLAG_ENABLED) == CLASSIFIED_FLAG_ENABLED); 00062 //} 00063 00064 bool is_cf_update_time(ClassifiedFlags flags) 00065 { 00066 return ((flags & CLASSIFIED_FLAG_UPDATE_TIME) != 0); 00067 } 00068 00069 bool is_cf_auto_renew(ClassifiedFlags flags) 00070 { 00071 return ((flags & CLASSIFIED_FLAG_AUTO_RENEW) != 0); 00072 }