001    
002    package com.skype.api;
003    
004    import java.util.HashMap;
005    
006    import com.skype.api.Skype;
007    
008    public abstract class SkypeObject {
009    
010            protected int mObjectId;
011            protected HashMap<Integer, Object> mPropCache;
012            protected Skype skype;
013            
014            protected SkypeObject(int oid, Skype skype) {
015                    mObjectId = oid;
016                    mPropCache = new HashMap<Integer, Object>();
017                    this.skype = skype;
018                    skype.object_list.put(oid, this);
019            }
020            
021            public int getOid() {
022                    return mObjectId;
023            }
024            
025            public void close() {
026                    flush_cache();
027                    skype.object_list.remove(mObjectId);
028            }
029            
030            public abstract Object GetPropertyAsEnum(int propid);
031            
032            void flush_cache()
033            {
034                    mPropCache.clear();
035            }
036    }
037