Ejemplo n.º 1
0
 static int openContacts() {
   // #ifdef api.pim
   s_contacts = new JSContact[s_nbContacts + 64];
   s_nbContacts = 0;
   try {
     s_PIMList = PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
     Enumeration itemEnum = s_PIMList.items();
     while (itemEnum.hasMoreElements()) {
       try {
         addContact(s_PIMList, (Contact) itemEnum.nextElement());
       } catch (Exception e) {
         Logger.println("Exception while opening contacts: " + e);
       }
     }
   } catch (Exception e) {
     Logger.println("Exception while opening list: " + e);
   }
   // #endif
   return s_nbContacts;
 }