File: windows.data.json.idl

package info (click to toggle)
wine 10.0~repack-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 325,920 kB
  • sloc: ansic: 4,156,003; perl: 23,800; yacc: 22,031; javascript: 15,872; makefile: 12,346; pascal: 9,519; objc: 6,923; lex: 5,273; xml: 3,219; python: 2,673; cpp: 1,741; sh: 893; java: 750; asm: 299; cs: 62
file content (176 lines) | stat: -rw-r--r-- 7,877 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
 * Copyright (C) 2024 Mohamad Al-Jaf
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifdef __WIDL__
#pragma winrt ns_prefix
#endif

import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";

namespace Windows.Data.Json {
    typedef enum JsonValueType JsonValueType;

    interface IJsonArray;
    interface IJsonArrayStatics;
    interface IJsonObject;
    interface IJsonObjectStatics;
    interface IJsonObjectWithDefaultValues;
    interface IJsonValue;
    interface IJsonValueStatics;
    interface IJsonValueStatics2;

    runtimeclass JsonArray;
    runtimeclass JsonObject;
    runtimeclass JsonValue;

    declare {
        interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IIterable<Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue *> *>;
        interface Windows.Foundation.Collections.IIterator<Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue *> *>;
        interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IMap<HSTRING, Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IVectorView<Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IVector<Windows.Data.Json.IJsonValue *>;
    }

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0)
    ]
    enum JsonValueType
    {
        Null    = 0,
        Boolean = 1,
        Number  = 2,
        String  = 3,
        Array   = 4,
        Object  = 5,
    };

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        exclusiveto(Windows.Data.Json.JsonArray),
        uuid(08c1ddb6-0cbd-4a9a-b5d3-2f852dc37e81)
    ]
    interface IJsonArray : IInspectable
        requires Windows.Data.Json.IJsonValue
    {
        HRESULT GetObjectAt([in] UINT32 index, [out, retval] Windows.Data.Json.JsonObject **value);
        HRESULT GetArrayAt([in] UINT32 index, [out, retval] Windows.Data.Json.JsonArray **value);
        HRESULT GetStringAt([in] UINT32 index, [out, retval] HSTRING *value);
        HRESULT GetNumberAt([in] UINT32 index, [out, retval] DOUBLE *value);
        HRESULT GetBooleanAt([in] UINT32 index, [out, retval] boolean *value);
    }

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        exclusiveto(Windows.Data.Json.JsonObject),
        uuid(064e24dd-29c2-4f83-9ac1-9ee11578beb3)
    ]
    interface IJsonObject : IInspectable
        requires Windows.Data.Json.IJsonValue
    {
        HRESULT GetNamedValue([in] HSTRING name, [out, retval] Windows.Data.Json.JsonValue **value);
        HRESULT SetNamedValue([in] HSTRING name, [in] Windows.Data.Json.IJsonValue *value);
        HRESULT GetNamedObject([in] HSTRING name, [out, retval] Windows.Data.Json.JsonObject **value);
        HRESULT GetNamedArray([in] HSTRING name, [out, retval] Windows.Data.Json.JsonArray **value);
        HRESULT GetNamedString([in] HSTRING name, [out, retval] HSTRING *value);
        HRESULT GetNamedNumber([in] HSTRING name, [out, retval] DOUBLE *value);
        HRESULT GetNamedBoolean([in] HSTRING name, [out, retval] boolean *value);
    }

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        uuid(a3219ecb-f0b3-4dcd-beee-19d48cd3ed1e)
    ]
    interface IJsonValue : IInspectable
    {
        [propget] HRESULT ValueType([out, retval] Windows.Data.Json.JsonValueType *value);
        HRESULT Stringify([out, retval] HSTRING *value);
        HRESULT GetString([out, retval] HSTRING *value);
        HRESULT GetNumber([out, retval] DOUBLE *value);
        HRESULT GetBoolean([out, retval] boolean *value);
        HRESULT GetArray([out, retval] Windows.Data.Json.JsonArray **value);
        HRESULT GetObject([out, retval] Windows.Data.Json.JsonObject **value);
    }

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        exclusiveto(Windows.Data.Json.JsonValue),
        uuid(5f6b544a-2f53-48e1-91a3-f78b50a6345c)
    ]
    interface IJsonValueStatics : IInspectable
    {
        HRESULT Parse([in] HSTRING input, [out, retval] Windows.Data.Json.JsonValue **value);
        HRESULT TryParse([in] HSTRING input, [out] Windows.Data.Json.JsonValue **result, [out, retval] boolean *succeeded);
        HRESULT CreateBooleanValue([in] boolean input, [out, retval] Windows.Data.Json.JsonValue **value);
        HRESULT CreateNumberValue([in] DOUBLE input, [out, retval] Windows.Data.Json.JsonValue **value);
        HRESULT CreateStringValue([in] HSTRING input, [out, retval] Windows.Data.Json.JsonValue **value);
    }

    [
        activatable(Windows.Foundation.UniversalApiContract, 1.0),
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        marshaling_behavior(agile),
        static(Windows.Data.Json.IJsonArrayStatics, Windows.Foundation.UniversalApiContract, 1.0),
        threading(both)
    ]
    runtimeclass JsonArray
    {
        [default] interface Windows.Data.Json.IJsonArray;
        interface Windows.Data.Json.IJsonValue;
        interface Windows.Foundation.Collections.IVector<Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IIterable<Windows.Data.Json.IJsonValue *>;
        [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
    }

    [
        activatable(Windows.Foundation.UniversalApiContract, 1.0),
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        marshaling_behavior(agile),
        static(Windows.Data.Json.IJsonObjectStatics, Windows.Foundation.UniversalApiContract, 1.0),
        threading(both)
    ]
    runtimeclass JsonObject
    {
        [default] interface Windows.Data.Json.IJsonObject;
        interface Windows.Data.Json.IJsonValue;
        interface Windows.Foundation.Collections.IMap<HSTRING, Windows.Data.Json.IJsonValue *>;
        interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue *> *>;
        [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Data.Json.IJsonObjectWithDefaultValues;
        [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
    }

    [
        contract(Windows.Foundation.UniversalApiContract, 1.0),
        marshaling_behavior(agile),
        static(Windows.Data.Json.IJsonValueStatics, Windows.Foundation.UniversalApiContract, 1.0),
        static(Windows.Data.Json.IJsonValueStatics2, Windows.Foundation.UniversalApiContract, 1.0),
        threading(both)
    ]
    runtimeclass JsonValue
    {
        [default] interface Windows.Data.Json.IJsonValue;
        [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
    }
}