• Main Page
  • Classes
  • Files
  • File List
  • File Members

property.h

Go to the documentation of this file.
00001 //
00002 // begin license header
00003 //  
00004 // This file is part of Terk and TerkOS.
00005 //
00006 // All Terk and TerkOS source code is provided under the terms of the 
00007 // GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).  
00008 // Those wishing to use Terk and TerkOS source code, software and/or
00009 // technologies under different licensing terms should contact us at 
00010 // [email protected]. Such licensing terms are available for
00011 // all portions of the Terk and TerkOS codebase presented here.
00012 //
00013 // end license header
00014 //
00015 
00016 #ifndef _PROPERTY_H
00017 #define _PROPERTY_H
00018 
00019 // result codes
00020 #define PROP_OK                    0   // returned when set or get is successful
00021 #define PROP_ERROR                 -1
00022 #define PROP_ERROR_NOT_SUPPORTED   -2  // property id not supported
00023 #define PROP_ERROR_READ_ONLY       -3  // property is read only
00024 #define PROP_ERROR_ILLEGAL_VALUE   -4  // property value is out 
00025                                        //   of range or illegal
00026 
00027 // Globally unique property ID's are useful because we can merge all
00028 // property interfaces into one.....
00029 // The 0th object is reserved
00030 // 64K of properties should be plenty for each object
00031 #define PROP_MULTIPLIER                   0x10000
00032 #define PROP_ID(object, index)            ((object+1)*PROP_MULTIPLIER + index)
00033 
00034 // string related stuff-- some properties can be returned as null- 
00035 // terminated strings-- commented out for now, food for thought....
00036 //#define PROP_STRING                       0xc000
00037 //#define PROP_IS_STRING(id)                (id & PROP_STRING)
00038 //#define PROP_STRING_ID(object, index)     ((object+1)*PROP_MULTIPLIER + PROP_STRING + index)
00039 
00044 class IProperty
00045 {
00046 public:
00057   virtual int GetProperty(int property, long *value) = 0;
00058 
00070   virtual int SetProperty(int property, long value) = 0;
00071 };
00072 
00073 #endif

Generated on Mon Oct 3 2011 15:36:31 for libqwerk by  doxygen 1.7.1