My app needs to delete all contacts from this device.  It looks like I
should use the Notification Manager to broadcast SysNotifyDBDeletedEvent
to the Contacts app to let it know I deleted the AddressDB.  Is this
correct?  

I haven't been able to find any documentation that speaks directly to
this.  Right now if I only delete the AddressDB it looks like the
contacts app is recreating the AddressDB from the ContactsDB-Padd
database.

Here is a snippet of code (is this right?):

   ETINT32 retval = ERR_Success;
   LocalID dbID;
   Err err = ERR_Success;
   

   dbID = DmFindDatabase(0, addrDBName);
   
   // Call the base class DeleteAllLocalRecords to remove the AdressDB
   retval = EPalmDatastoreBase::DeleteAllLocalRecords();
   
   if( retval == ERR_Success )
   {
      // Check for Notification feature
     ETUINT32 value;
     err = FtrGet( sysFtrCreator, sysFtrNumNotifyMgrVersion, &value );
      
      if( err == ERR_Success && value )
      {
         // Notification Manager is available
         
         SysNotifyDBDeletedType dbInfo;
         
         dbInfo.oldDBID    = dbID;
         dbInfo.cardNo     = 0;
         dbInfo.dbName     = addrDBName;
         dbInfo.creator    = addrDBCreator;
         dbInfo.type       = addrDBType;
         
         err = SysNotifyBroadcastDeferred( &dbInfo, sizeof(
SysNotifyDBDeletedType ) );
      }
   }

Thanks,

Aaron Hansen


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to