Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : |
michael@0 | 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef mozilla_downloads_SQLFunctions_h |
michael@0 | 7 | #define mozilla_downloads_SQLFunctions_h |
michael@0 | 8 | |
michael@0 | 9 | #include "mozIStorageFunction.h" |
michael@0 | 10 | #include "mozilla/Attributes.h" |
michael@0 | 11 | |
michael@0 | 12 | class nsCString; |
michael@0 | 13 | class mozIStorageConnection; |
michael@0 | 14 | |
michael@0 | 15 | namespace mozilla { |
michael@0 | 16 | namespace downloads { |
michael@0 | 17 | |
michael@0 | 18 | /** |
michael@0 | 19 | * SQL function to generate a GUID for a place or bookmark item. This is just |
michael@0 | 20 | * a wrapper around GenerateGUID in SQLFunctions.cpp. |
michael@0 | 21 | * |
michael@0 | 22 | * @return a guid for the item. |
michael@0 | 23 | * @see toolkit/components/places/SQLFunctions.h - keep this in sync |
michael@0 | 24 | */ |
michael@0 | 25 | class GenerateGUIDFunction MOZ_FINAL : public mozIStorageFunction |
michael@0 | 26 | { |
michael@0 | 27 | public: |
michael@0 | 28 | NS_DECL_THREADSAFE_ISUPPORTS |
michael@0 | 29 | NS_DECL_MOZISTORAGEFUNCTION |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * Registers the function with the specified database connection. |
michael@0 | 33 | * |
michael@0 | 34 | * @param aDBConn |
michael@0 | 35 | * The database connection to register with. |
michael@0 | 36 | */ |
michael@0 | 37 | static nsresult create(mozIStorageConnection *aDBConn); |
michael@0 | 38 | }; |
michael@0 | 39 | |
michael@0 | 40 | nsresult GenerateGUID(nsCString& _guid); |
michael@0 | 41 | |
michael@0 | 42 | } // namespace downloads |
michael@0 | 43 | } // namespace mozilla |
michael@0 | 44 | |
michael@0 | 45 | #endif |