toolkit/components/downloads/SQLFunctions.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

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

mercurial