Back to index

lightning-sunbird  0.9+nobinonly
Functions
rdi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL UndoDesktopIntegration (void)
int CleanupMailIntegration (void)

Function Documentation

Definition at line 570 of file rdi.c.

{
  char szCMISection[] = "Cleanup Mail Integration";
  char szUninstallApp[MAX_BUF];
  char szBuf[MAX_BUF];
  skn  *sknWinRegKeyList = NULL;

  /* Check to see if uninstall.ini has indicated to cleanup
   * the mail integration performed by mail */
  GetPrivateProfileString(szCMISection,
                          "Enabled",
                          "",
                          szBuf,
                          sizeof(szBuf),
                          szFileIniUninstall);
  if(lstrcmpi(szBuf, "TRUE") != 0)
    return(CMI_OK);

  /* Get the full app name we're going to uninstall */
  if(GetUninstallAppPathName(szUninstallApp, sizeof(szUninstallApp)) != CMI_OK)
    return(CMI_APP_PATHNAME_NOT_FOUND);

  /* Build a list of UnreadMail subkeys that needs to be deleted */
  if(GetUnreadMailKeyList(szUninstallApp, &sknWinRegKeyList))
    /* Delete the UnreadMail subkeys using the list built by
     * GetUnreadMailKeyList() */
    DeleteUnreadMailKeys(sknWinRegKeyList);

  /* Clean up the linked list */
  DeInitSknList(&sknWinRegKeyList);
  return(CMI_OK);
}

Definition at line 367 of file rdi.c.

{
  char szMozillaKey[] = "Software\\Mozilla";
  char szBuf[MAX_BUF];

  /* Check to see if uninstall.ini has indicated to restore
   * the destktop integration performed by the browser/mail */
  GetPrivateProfileString(szRDISection, "Enabled", "", szBuf, sizeof(szBuf), szFileIniUninstall);
  if(lstrcmpi(szBuf, "TRUE") == 0)
  {
    RestoreDesktopIntegration();
    RestoreMozMapi();

    DeleteWinRegKey(HKEY_LOCAL_MACHINE, szMozillaDesktopKey, TRUE);
    DeleteWinRegKey(HKEY_LOCAL_MACHINE, szMozillaKey, FALSE);
  }

  return(0);
}