javaextensions/pim/javasrc/com/nokia/mj/impl/pim/PIMListImpl.java
changeset 76 4ad59aaee882
parent 21 2a9601315dfc
child 83 26b2b12093af
equal deleted inserted replaced
69:773449708c84 76:4ad59aaee882
   109      * Given mode applies to all security vulnerable operations.
   109      * Given mode applies to all security vulnerable operations.
   110      */
   110      */
   111     PIMListImpl(int aListHandle, int aMode)
   111     PIMListImpl(int aListHandle, int aMode)
   112     {
   112     {
   113         iListHandle = aListHandle;
   113         iListHandle = aListHandle;
       
   114         iMode = aMode;
   114         Logger.LOG(Logger.EPim,Logger.EInfo,"+PIMListImpl() = iListHandle = "+iListHandle);
   115         Logger.LOG(Logger.EPim,Logger.EInfo,"+PIMListImpl() = iListHandle = "+iListHandle);
       
   116         if (iListHandle != 0)
       
   117         {
       
   118             iItems = new ItemTable();
       
   119         }
   115         setShutdownListener();
   120         setShutdownListener();
   116         iFinalizer = registerForFinalization();
   121         iFinalizer = registerForFinalization();
   117         iMode = aMode;
       
   118 
       
   119         iItems = new ItemTable();
       
   120     }
   122     }
   121 
   123 
   122     public Finalizer registerForFinalization()
   124     public Finalizer registerForFinalization()
   123     {
   125     {
   124         return new Finalizer()
   126         return new Finalizer()
   357     public synchronized void close() throws PIMException
   359     public synchronized void close() throws PIMException
   358     {
   360     {
   359         if (iIsOpen == true)
   361         if (iIsOpen == true)
   360         {
   362         {
   361             iIsOpen = false;
   363             iIsOpen = false;
   362             int err = _close(iListHandle);
   364             if (iListHandle != 0)
   363             NativeError.handlePIMListCloseError(err);
   365             {
       
   366                 int err = _close(iListHandle);
       
   367                 NativeError.handlePIMListCloseError(err);
       
   368             }
   364             iItems = null;
   369             iItems = null;
   365         }
   370         }
   366         else
   371         else
   367         {
   372         {
   368             throw new PIMException(ErrorString.LIST_IS_ALREADY_CLOSED,
   373             throw new PIMException(ErrorString.LIST_IS_ALREADY_CLOSED,