Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef __nsDialogParamBlock_h
8 : #define __nsDialogParamBlock_h
9 :
10 : #include "nsIDialogParamBlock.h"
11 : #include "nsIMutableArray.h"
12 : #include "nsCOMPtr.h"
13 :
14 : // {4E4AAE11-8901-46cc-8217-DAD7C5415873}
15 : #define NS_DIALOGPARAMBLOCK_CID \
16 : {0x4e4aae11, 0x8901, 0x46cc, {0x82, 0x17, 0xda, 0xd7, 0xc5, 0x41, 0x58, 0x73}}
17 :
18 : class nsString;
19 :
20 : class nsDialogParamBlock : public nsIDialogParamBlock
21 : {
22 : public:
23 : nsDialogParamBlock();
24 :
25 : NS_DECL_NSIDIALOGPARAMBLOCK
26 : NS_DECL_ISUPPORTS
27 :
28 : protected:
29 : virtual ~nsDialogParamBlock();
30 :
31 : private:
32 : enum { kNumInts = 8, kNumStrings = 16 };
33 :
34 0 : nsresult InBounds(int32_t aIndex, int32_t aMax)
35 : {
36 0 : return aIndex >= 0 && aIndex < aMax ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
37 : }
38 :
39 : int32_t mInt[kNumInts];
40 : int32_t mNumStrings;
41 : nsString* mString;
42 : nsCOMPtr<nsIMutableArray> mObjects;
43 : };
44 :
45 : #endif
|