Back to index

lightning-sunbird  0.9+nobinonly
VerReg.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Mozilla Communicator client code, released
00017  * March 31, 1998.
00018  *
00019  * The Initial Developer of the Original Code is
00020  * Netscape Communications Corporation.
00021  * Portions created by the Initial Developer are Copyright (C) 1998
00022  * the Initial Developer. All Rights Reserved.
00023  *
00024  * Contributor(s):
00025  *   Daniel Veditz <dveditz@netscape.com>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either the GNU General Public License Version 2 or later (the "GPL"), or
00029  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 /* VerReg.h
00041  * XP Version Registry functions
00042  */
00043 #ifndef _VERREG_H_
00044 #define _VERREG_H_
00045 
00046 #include "NSReg.h"
00047 
00048 typedef struct _version
00049 {
00050    int32   major;
00051    int32   minor;
00052    int32   release;
00053    int32   build;
00054    int32   check;
00055 } VERSION;
00056 
00057 
00058 /* CreateRegistry flags */
00059 #define CR_NEWREGISTRY 1
00060 
00061 PR_BEGIN_EXTERN_C
00062 /* ---------------------------------------------------------------------
00063  * Version Registry Operations
00064  * ---------------------------------------------------------------------
00065  */
00066 /* global registry operations */
00067 /* VR_CreateRegistry is available only in the STANDALONE_REGISTRY builds */
00068 VR_INTERFACE(REGERR) VR_CreateRegistry(char *installation, char *programPath, char *versionStr);
00069 VR_INTERFACE(REGERR) VR_SetRegDirectory(const char *path);
00070 VR_INTERFACE(REGERR) VR_PackRegistry(void *userData,  nr_RegPackCallbackFunc pdCallbackFunction);
00071 VR_INTERFACE(REGERR) VR_Close(void);
00072 
00073 /* component-level functions */
00074 VR_INTERFACE(REGERR) VR_Install(char *component_path, char *filepath, char *version, int bDirectory);
00075 VR_INTERFACE(REGERR) VR_Remove(char *component_path);
00076 VR_INTERFACE(REGERR) VR_InRegistry(char *path);
00077 VR_INTERFACE(REGERR) VR_ValidateComponent(char *path);
00078 VR_INTERFACE(REGERR) VR_Enum(char *component_path, REGENUM *state, char *buffer, uint32 buflen);
00079 
00080 /* dealing with parts of individual components */
00081 VR_INTERFACE(REGERR) VR_GetVersion(char *component_path, VERSION *result);
00082 VR_INTERFACE(REGERR) VR_GetPath(char *component_path, uint32 sizebuf, char *buf);
00083 VR_INTERFACE(REGERR) VR_SetRefCount(char *component_path, int refcount);
00084 VR_INTERFACE(REGERR) VR_GetRefCount(char *component_path, int *result);
00085 VR_INTERFACE(REGERR) VR_GetDefaultDirectory(char *component_path, uint32 sizebuf, char *buf);
00086 VR_INTERFACE(REGERR) VR_SetDefaultDirectory(char *component_path, char *directory);
00087 
00088 /* uninstall functions */
00089 VR_INTERFACE(REGERR) VR_UninstallCreateNode(char *regPackageName, char *userPackageName);
00090 VR_INTERFACE(REGERR) VR_UninstallAddFileToList(char *regPackageName, char *vrName);
00091 VR_INTERFACE(REGERR) VR_UninstallFileExistsInList(char *regPackageName, char *vrName);
00092 VR_INTERFACE(REGERR) VR_UninstallEnumSharedFiles(char *component_path, REGENUM *state, char *buffer, uint32 buflen);
00093 VR_INTERFACE(REGERR) VR_UninstallDeleteFileFromList(char *component_path, char *vrName);
00094 VR_INTERFACE(REGERR) VR_UninstallDeleteSharedFilesKey(char *regPackageName);
00095 VR_INTERFACE(REGERR) VR_UninstallDestroy(char *regPackageName);
00096 VR_INTERFACE(REGERR) VR_EnumUninstall(REGENUM *state, char* userPackageName,
00097                                     int32 len1, char*regPackageName, int32 len2, PRBool bSharedList);
00098 VR_INTERFACE(REGERR) VR_GetUninstallUserName(char *regPackageName, char *outbuf, uint32 buflen);
00099 
00100 PR_END_EXTERN_C
00101 
00102 #endif   /* _VERREG_H_ */
00103 
00104 /* EOF: VerReg.h */
00105