michael@0: /* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_downloads_SQLFunctions_h michael@0: #define mozilla_downloads_SQLFunctions_h michael@0: michael@0: #include "mozIStorageFunction.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: class nsCString; michael@0: class mozIStorageConnection; michael@0: michael@0: namespace mozilla { michael@0: namespace downloads { michael@0: michael@0: /** michael@0: * SQL function to generate a GUID for a place or bookmark item. This is just michael@0: * a wrapper around GenerateGUID in SQLFunctions.cpp. michael@0: * michael@0: * @return a guid for the item. michael@0: * @see toolkit/components/places/SQLFunctions.h - keep this in sync michael@0: */ michael@0: class GenerateGUIDFunction MOZ_FINAL : public mozIStorageFunction michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_MOZISTORAGEFUNCTION michael@0: michael@0: /** michael@0: * Registers the function with the specified database connection. michael@0: * michael@0: * @param aDBConn michael@0: * The database connection to register with. michael@0: */ michael@0: static nsresult create(mozIStorageConnection *aDBConn); michael@0: }; michael@0: michael@0: nsresult GenerateGUID(nsCString& _guid); michael@0: michael@0: } // namespace downloads michael@0: } // namespace mozilla michael@0: michael@0: #endif