Merge pull request #344 from bnema/chore/upstream-foundations
chore(deps): integrate approved upstream foundations
921 files · +28709 -25527
M docs/first-presentation.md +5 -2
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||
| 46 | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | |
| 47 | 47 | do not use a device model or other identifier. Publish only the seven reviewed | |
| 48 | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | |
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | |
| 50 | - | invalid run fails collection. | |
| 49 | + | must not be published. `metadata.json` derives the selected | |
| 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git | |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |
| 53 | + | run also fails collection. | |
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||||
| 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | ||
| 47 | do not use a device model or other identifier. Publish only the seven reviewed | 47 | do not use a device model or other identifier. Publish only the seven reviewed | ||
| 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | ||
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | 49 | + | must not be published. `metadata.json` derives the selected |
| 50 | - | invalid run fails collection. | 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |||
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |||
| 53 | + | run also fails collection. | |||
M go.mod +5 -5
| @@ -6,11 +6,11 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.3 | |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | |
| 13 | - | github.com/bnema/puregotk v0.7.0 | |
| 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e | |
| 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | |
| 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | 14 | github.com/charmbracelet/bubbles v1.0.0 | |
| 15 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 16 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -6,11 +6,11 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.3 | 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c |
| 13 | - | github.com/bnema/puregotk v0.7.0 | 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 |
| 14 | github.com/charmbracelet/bubbles v1.0.0 | 14 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 15 | github.com/charmbracelet/bubbletea v1.3.10 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 16 | github.com/charmbracelet/lipgloss v1.1.0 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +12 -0 generated file: collapsed
A internal/infrastructure/persistence/sqlite/history_repo_benchmark_test.go +71 -0
| @@ -0,0 +1,71 @@ | |||
| 1 | + | package sqlite_test | |
| 2 | + | ||
| 3 | + | import ( | |
| 4 | + | "fmt" | |
| 5 | + | "path/filepath" | |
| 6 | + | "testing" | |
| 7 | + | ||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |
| 11 | + | ) | |
| 12 | + | ||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |
| 15 | + | // history suggestions use Search. | |
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |
| 17 | + | b.Helper() | |
| 18 | + | ||
| 19 | + | ctx := historyTestCtx() | |
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |
| 21 | + | if err != nil { | |
| 22 | + | b.Fatal(err) | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | b.Cleanup(func() { | |
| 26 | + | if err := db.Close(); err != nil { | |
| 27 | + | b.Errorf("close benchmark database: %v", err) | |
| 28 | + | } | |
| 29 | + | }) | |
| 30 | + | ||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |
| 32 | + | for i := range 200 { | |
| 33 | + | entry := &entity.HistoryEntry{ | |
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |
| 36 | + | } | |
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |
| 38 | + | b.Fatal(err) | |
| 39 | + | } | |
| 40 | + | } | |
| 41 | + | ||
| 42 | + | return repo, func() {} | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 47 | + | defer closeDB() | |
| 48 | + | ctx := historyTestCtx() | |
| 49 | + | ||
| 50 | + | b.ReportAllocs() | |
| 51 | + | b.ResetTimer() | |
| 52 | + | for range b.N { | |
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |
| 54 | + | b.Fatal(err) | |
| 55 | + | } | |
| 56 | + | } | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 61 | + | defer closeDB() | |
| 62 | + | ctx := historyTestCtx() | |
| 63 | + | ||
| 64 | + | b.ReportAllocs() | |
| 65 | + | b.ResetTimer() | |
| 66 | + | for range b.N { | |
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |
| 68 | + | b.Fatal(err) | |
| 69 | + | } | |
| 70 | + | } | |
| 71 | + | } | |
| @@ -0,0 +1,71 @@ | |||||
| 1 | + | package sqlite_test | |||
| 2 | + | ||||
| 3 | + | import ( | |||
| 4 | + | "fmt" | |||
| 5 | + | "path/filepath" | |||
| 6 | + | "testing" | |||
| 7 | + | ||||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |||
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |||
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |||
| 15 | + | // history suggestions use Search. | |||
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |||
| 17 | + | b.Helper() | |||
| 18 | + | ||||
| 19 | + | ctx := historyTestCtx() | |||
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |||
| 21 | + | if err != nil { | |||
| 22 | + | b.Fatal(err) | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | b.Cleanup(func() { | |||
| 26 | + | if err := db.Close(); err != nil { | |||
| 27 | + | b.Errorf("close benchmark database: %v", err) | |||
| 28 | + | } | |||
| 29 | + | }) | |||
| 30 | + | ||||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |||
| 32 | + | for i := range 200 { | |||
| 33 | + | entry := &entity.HistoryEntry{ | |||
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |||
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |||
| 36 | + | } | |||
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |||
| 38 | + | b.Fatal(err) | |||
| 39 | + | } | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | return repo, func() {} | |||
| 43 | + | } | |||
| 44 | + | ||||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |||
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 47 | + | defer closeDB() | |||
| 48 | + | ctx := historyTestCtx() | |||
| 49 | + | ||||
| 50 | + | b.ReportAllocs() | |||
| 51 | + | b.ResetTimer() | |||
| 52 | + | for range b.N { | |||
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |||
| 54 | + | b.Fatal(err) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |||
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 61 | + | defer closeDB() | |||
| 62 | + | ctx := historyTestCtx() | |||
| 63 | + | ||||
| 64 | + | b.ReportAllocs() | |||
| 65 | + | b.ResetTimer() | |||
| 66 | + | for range b.N { | |||
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |||
| 68 | + | b.Fatal(err) | |||
| 69 | + | } | |||
| 70 | + | } | |||
| 71 | + | } | |||
M internal/logging/first_presentation_collector_test.go +132 -1
| @@ -2,6 +2,7 @@ package logging | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "encoding/json" | |
| 5 | + | "fmt" | |
| 5 | 6 | "os" | |
| 6 | 7 | "os/exec" | |
| 7 | 8 | "path/filepath" | |
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 143 | 144 | } | |
| 144 | 145 | for _, required := range []string{ | |
| 145 | 146 | `"measured_source_revision"`, | |
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |
| 146 | 148 | `"tag": "v0.8.4"`, | |
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | |
| 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, | |
| 148 | 150 | } { | |
| 149 | 151 | require.Contains(t, artifacts.String(), required) | |
| 150 | 152 | } | |
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 166 | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | |
| 167 | 169 | } | |
| 168 | 170 | ||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 173 | + | require.NoError(t, err) | |
| 174 | + | temp := t.TempDir() | |
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 177 | + | binary := filepath.Join(temp, "dumber") | |
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 179 | + | ||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |
| 181 | + | // hardcode; the collector must report what the selected module says. | |
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |
| 185 | + | output := filepath.Join(temp, "artifacts") | |
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 187 | + | cmd.Dir = repoRoot | |
| 188 | + | cmd.Env = append(os.Environ(), | |
| 189 | + | "DISPLAY=:test", | |
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 195 | + | ) | |
| 196 | + | result, err := cmd.CombinedOutput() | |
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |
| 198 | + | ||
| 199 | + | var metadata struct { | |
| 200 | + | Upstream struct { | |
| 201 | + | Module string `json:"module"` | |
| 202 | + | Version string `json:"version"` | |
| 203 | + | Tag string `json:"tag"` | |
| 204 | + | Revision string `json:"revision"` | |
| 205 | + | } `json:"upstream"` | |
| 206 | + | } | |
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |
| 208 | + | require.NoError(t, err) | |
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |
| 214 | + | ||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 216 | + | require.NoError(t, err) | |
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |
| 218 | + | } | |
| 219 | + | ||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 222 | + | require.NoError(t, err) | |
| 223 | + | ||
| 224 | + | for _, test := range []struct { | |
| 225 | + | name, version, revision, ref string | |
| 226 | + | }{ | |
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |
| 230 | + | } { | |
| 231 | + | t.Run(test.name, func(t *testing.T) { | |
| 232 | + | temp := t.TempDir() | |
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 235 | + | binary := filepath.Join(temp, "dumber") | |
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 237 | + | ||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |
| 239 | + | output := filepath.Join(temp, "artifacts") | |
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 241 | + | cmd.Dir = repoRoot | |
| 242 | + | cmd.Env = append(os.Environ(), | |
| 243 | + | "DISPLAY=:test", | |
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 248 | + | ) | |
| 249 | + | result, runErr := cmd.CombinedOutput() | |
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |
| 252 | + | require.NotContains(t, string(result), temp) | |
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |
| 254 | + | for _, name := range runArtifactNames() { | |
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |
| 256 | + | } | |
| 257 | + | }) | |
| 258 | + | } | |
| 259 | + | } | |
| 260 | + | ||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |
| 262 | + | t.Helper() | |
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |
| 264 | + | info := map[string]any{"Version": version} | |
| 265 | + | if revision != "" { | |
| 266 | + | info["Origin"] = map[string]string{ | |
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |
| 268 | + | } | |
| 269 | + | } | |
| 270 | + | infoJSON, err := json.Marshal(info) | |
| 271 | + | require.NoError(t, err) | |
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |
| 273 | + | ||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |
| 276 | + | }) | |
| 277 | + | require.NoError(t, err) | |
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |
| 280 | + | }) | |
| 281 | + | require.NoError(t, err) | |
| 282 | + | binDir := filepath.Join(temp, "bin") | |
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |
| 284 | + | goBin := filepath.Join(binDir, "go") | |
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |
| 287 | + | printf '%%s\n' '%s' | |
| 288 | + | exit 0 | |
| 289 | + | fi | |
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |
| 291 | + | printf '%%s\n' '%s' | |
| 292 | + | exit 0 | |
| 293 | + | fi | |
| 294 | + | exit 1 | |
| 295 | + | `, selectedJSON, version, downloadedJSON) | |
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |
| 297 | + | return goBin | |
| 298 | + | } | |
| 299 | + | ||
| 169 | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | |
| 170 | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 171 | 302 | require.NoError(t, err) | |
| @@ -2,6 +2,7 @@ package logging | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "encoding/json" | 4 | "encoding/json" | ||
| 5 | + | "fmt" | |||
| 5 | "os" | 6 | "os" | ||
| 6 | "os/exec" | 7 | "os/exec" | ||
| 7 | "path/filepath" | 8 | "path/filepath" | ||
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 143 | } | 144 | } | ||
| 144 | for _, required := range []string{ | 145 | for _, required := range []string{ | ||
| 145 | `"measured_source_revision"`, | 146 | `"measured_source_revision"`, | ||
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |||
| 146 | `"tag": "v0.8.4"`, | 148 | `"tag": "v0.8.4"`, | ||
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, |
| 148 | } { | 150 | } { | ||
| 149 | require.Contains(t, artifacts.String(), required) | 151 | require.Contains(t, artifacts.String(), required) | ||
| 150 | } | 152 | } | ||
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 166 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | ||
| 167 | } | 169 | } | ||
| 168 | 170 | ||||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |||
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 173 | + | require.NoError(t, err) | |||
| 174 | + | temp := t.TempDir() | |||
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 177 | + | binary := filepath.Join(temp, "dumber") | |||
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 179 | + | ||||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |||
| 181 | + | // hardcode; the collector must report what the selected module says. | |||
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |||
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |||
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |||
| 185 | + | output := filepath.Join(temp, "artifacts") | |||
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 187 | + | cmd.Dir = repoRoot | |||
| 188 | + | cmd.Env = append(os.Environ(), | |||
| 189 | + | "DISPLAY=:test", | |||
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |||
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 195 | + | ) | |||
| 196 | + | result, err := cmd.CombinedOutput() | |||
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |||
| 198 | + | ||||
| 199 | + | var metadata struct { | |||
| 200 | + | Upstream struct { | |||
| 201 | + | Module string `json:"module"` | |||
| 202 | + | Version string `json:"version"` | |||
| 203 | + | Tag string `json:"tag"` | |||
| 204 | + | Revision string `json:"revision"` | |||
| 205 | + | } `json:"upstream"` | |||
| 206 | + | } | |||
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |||
| 208 | + | require.NoError(t, err) | |||
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |||
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |||
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |||
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |||
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |||
| 214 | + | ||||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 216 | + | require.NoError(t, err) | |||
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |||
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 222 | + | require.NoError(t, err) | |||
| 223 | + | ||||
| 224 | + | for _, test := range []struct { | |||
| 225 | + | name, version, revision, ref string | |||
| 226 | + | }{ | |||
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |||
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |||
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |||
| 230 | + | } { | |||
| 231 | + | t.Run(test.name, func(t *testing.T) { | |||
| 232 | + | temp := t.TempDir() | |||
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 235 | + | binary := filepath.Join(temp, "dumber") | |||
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 237 | + | ||||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |||
| 239 | + | output := filepath.Join(temp, "artifacts") | |||
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 241 | + | cmd.Dir = repoRoot | |||
| 242 | + | cmd.Env = append(os.Environ(), | |||
| 243 | + | "DISPLAY=:test", | |||
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 248 | + | ) | |||
| 249 | + | result, runErr := cmd.CombinedOutput() | |||
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |||
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |||
| 252 | + | require.NotContains(t, string(result), temp) | |||
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |||
| 254 | + | for _, name := range runArtifactNames() { | |||
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |||
| 256 | + | } | |||
| 257 | + | }) | |||
| 258 | + | } | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |||
| 262 | + | t.Helper() | |||
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |||
| 264 | + | info := map[string]any{"Version": version} | |||
| 265 | + | if revision != "" { | |||
| 266 | + | info["Origin"] = map[string]string{ | |||
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |||
| 268 | + | } | |||
| 269 | + | } | |||
| 270 | + | infoJSON, err := json.Marshal(info) | |||
| 271 | + | require.NoError(t, err) | |||
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |||
| 273 | + | ||||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |||
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |||
| 276 | + | }) | |||
| 277 | + | require.NoError(t, err) | |||
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |||
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |||
| 280 | + | }) | |||
| 281 | + | require.NoError(t, err) | |||
| 282 | + | binDir := filepath.Join(temp, "bin") | |||
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |||
| 284 | + | goBin := filepath.Join(binDir, "go") | |||
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |||
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |||
| 287 | + | printf '%%s\n' '%s' | |||
| 288 | + | exit 0 | |||
| 289 | + | fi | |||
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |||
| 291 | + | printf '%%s\n' '%s' | |||
| 292 | + | exit 0 | |||
| 293 | + | fi | |||
| 294 | + | exit 1 | |||
| 295 | + | `, selectedJSON, version, downloadedJSON) | |||
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |||
| 297 | + | return goBin | |||
| 298 | + | } | |||
| 299 | + | ||||
| 169 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | ||
| 170 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | ||
| 171 | require.NoError(t, err) | 302 | require.NoError(t, err) | ||
M scripts/collect_first_presentation.sh +78 -9
| @@ -31,8 +31,78 @@ else | |||
| 31 | 31 | fi | |
| 32 | 32 | readonly output | |
| 33 | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | |
| 34 | - | readonly upstream_tag="v0.8.4" | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | |
| 34 | + | ||
| 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS | |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |
| 38 | + | resolve_upstream_provenance() { | |
| 39 | + | local selected_metadata selected_version downloaded_metadata | |
| 40 | + | ||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 43 | + | exit 2 | |
| 44 | + | } | |
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |
| 46 | + | import json, sys | |
| 47 | + | try: | |
| 48 | + | metadata = json.loads(sys.argv[2]) | |
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |
| 50 | + | raise ValueError | |
| 51 | + | print(metadata["Version"]) | |
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 54 | + | PY | |
| 55 | + | )" || exit $? | |
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 58 | + | exit 2 | |
| 59 | + | } | |
| 60 | + | ||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |
| 62 | + | import json, re, sys | |
| 63 | + | ||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |
| 65 | + | ||
| 66 | + | def fail(): | |
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 69 | + | ||
| 70 | + | try: | |
| 71 | + | selected = json.loads(selected_raw) | |
| 72 | + | downloaded = json.loads(downloaded_raw) | |
| 73 | + | version = selected["Version"] | |
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |
| 75 | + | fail() | |
| 76 | + | if downloaded.get("Version") != version: | |
| 77 | + | fail() | |
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |
| 80 | + | if not match: | |
| 81 | + | fail() | |
| 82 | + | info_path = downloaded.get("Info") | |
| 83 | + | if not isinstance(info_path, str) or not info_path: | |
| 84 | + | fail() | |
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |
| 86 | + | info = json.load(info_file) | |
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |
| 89 | + | fail() | |
| 90 | + | revision = origin.get("Hash") | |
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |
| 92 | + | fail() | |
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |
| 94 | + | fail() | |
| 95 | + | if not revision.startswith(match.group(2)): | |
| 96 | + | fail() | |
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |
| 99 | + | fail() | |
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |
| 101 | + | fail() | |
| 102 | + | ||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |
| 104 | + | PY | |
| 105 | + | } | |
| 36 | 106 | ||
| 37 | 107 | # The artifact destination is caller-controlled. Never empty or recursively | |
| 38 | 108 | # clear it: collection only writes to a newly-created directory whose parent is | |
| @@ -66,10 +136,9 @@ prepare_output | |||
| 66 | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | |
| 67 | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | |
| 68 | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | |
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | |
| 71 | - | exit 2 | |
| 72 | - | } | |
| 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? | |
| 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" | |
| 141 | + | readonly upstream_version upstream_tag upstream_revision | |
| 73 | 142 | ||
| 74 | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | |
| 75 | 144 | # outside the committed artifact directory and always remove them. | |
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||
| 80 | 149 | rm -rf -- "$work_root" | |
| 81 | 150 | } | |
| 82 | 151 | trap cleanup_work_root EXIT | |
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 84 | 153 | import hashlib, json, os, platform, subprocess, sys | |
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | |
| 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] | |
| 86 | 155 | with open(binary, "rb") as candidate: | |
| 87 | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | |
| 88 | 157 | ||
| @@ -102,7 +171,7 @@ json.dump({ | |||
| 102 | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | |
| 103 | 172 | "timeout_seconds": int(timeout), | |
| 104 | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | |
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | |
| 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, | |
| 106 | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | |
| 107 | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | |
| 108 | 177 | }, open(path, "w"), indent=2, sort_keys=True) | |
| @@ -31,8 +31,78 @@ else | |||||
| 31 | fi | 31 | fi | ||
| 32 | readonly output | 32 | readonly output | ||
| 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | ||
| 34 | - | readonly upstream_tag="v0.8.4" | 34 | + | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |||
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |||
| 38 | + | resolve_upstream_provenance() { | |||
| 39 | + | local selected_metadata selected_version downloaded_metadata | |||
| 40 | + | ||||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |||
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 43 | + | exit 2 | |||
| 44 | + | } | |||
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |||
| 46 | + | import json, sys | |||
| 47 | + | try: | |||
| 48 | + | metadata = json.loads(sys.argv[2]) | |||
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |||
| 50 | + | raise ValueError | |||
| 51 | + | print(metadata["Version"]) | |||
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |||
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 54 | + | PY | |||
| 55 | + | )" || exit $? | |||
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |||
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 58 | + | exit 2 | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |||
| 62 | + | import json, re, sys | |||
| 63 | + | ||||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |||
| 65 | + | ||||
| 66 | + | def fail(): | |||
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |||
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 69 | + | ||||
| 70 | + | try: | |||
| 71 | + | selected = json.loads(selected_raw) | |||
| 72 | + | downloaded = json.loads(downloaded_raw) | |||
| 73 | + | version = selected["Version"] | |||
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |||
| 75 | + | fail() | |||
| 76 | + | if downloaded.get("Version") != version: | |||
| 77 | + | fail() | |||
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |||
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |||
| 80 | + | if not match: | |||
| 81 | + | fail() | |||
| 82 | + | info_path = downloaded.get("Info") | |||
| 83 | + | if not isinstance(info_path, str) or not info_path: | |||
| 84 | + | fail() | |||
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |||
| 86 | + | info = json.load(info_file) | |||
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |||
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |||
| 89 | + | fail() | |||
| 90 | + | revision = origin.get("Hash") | |||
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |||
| 92 | + | fail() | |||
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |||
| 94 | + | fail() | |||
| 95 | + | if not revision.startswith(match.group(2)): | |||
| 96 | + | fail() | |||
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |||
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |||
| 99 | + | fail() | |||
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |||
| 101 | + | fail() | |||
| 102 | + | ||||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |||
| 104 | + | PY | |||
| 105 | + | } | |||
| 36 | 106 | ||||
| 37 | # The artifact destination is caller-controlled. Never empty or recursively | 107 | # The artifact destination is caller-controlled. Never empty or recursively | ||
| 38 | # clear it: collection only writes to a newly-created directory whose parent is | 108 | # clear it: collection only writes to a newly-created directory whose parent is | ||
| @@ -66,10 +136,9 @@ prepare_output | |||||
| 66 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | ||
| 67 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | ||
| 68 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | ||
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" |
| 71 | - | exit 2 | 141 | + | readonly upstream_version upstream_tag upstream_revision |
| 72 | - | } | |||
| 73 | 142 | ||||
| 74 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | ||
| 75 | # outside the committed artifact directory and always remove them. | 144 | # outside the committed artifact directory and always remove them. | ||
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||||
| 80 | rm -rf -- "$work_root" | 149 | rm -rf -- "$work_root" | ||
| 81 | } | 150 | } | ||
| 82 | trap cleanup_work_root EXIT | 151 | trap cleanup_work_root EXIT | ||
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' |
| 84 | import hashlib, json, os, platform, subprocess, sys | 153 | import hashlib, json, os, platform, subprocess, sys | ||
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] |
| 86 | with open(binary, "rb") as candidate: | 155 | with open(binary, "rb") as candidate: | ||
| 87 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | ||
| 88 | 157 | ||||
| @@ -102,7 +171,7 @@ json.dump({ | |||||
| 102 | "binary": {"label": "dumber", "sha256": binary_sha256}, | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | ||
| 103 | "timeout_seconds": int(timeout), | 172 | "timeout_seconds": int(timeout), | ||
| 104 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | ||
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, |
| 106 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | ||
| 107 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | ||
| 108 | }, open(path, "w"), indent=2, sort_keys=True) | 177 | }, open(path, "w"), indent=2, sort_keys=True) | ||
M vendor/github.com/bnema/purego-cef/cef/bridge.go +8 -13 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/cefadapter/accelerated_paint.go +34 -37 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/dmabuf/frame.go +38 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/gtkgdk/renderer.go +89 -69 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player.go +5 -0 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player_rt.go +10 -6 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/pwbuffer.go +66 -32 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/driver/driver.go +268 -63 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/db.go +8 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/rows.go +13 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/loader/loader.go +23 -5 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/ports/in/ports_gen.go +3 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +21 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +120 -118 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +17 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +40 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +41 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +19 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +42 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +63 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +47 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +19 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +11 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +27 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevel.go +157 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevellayout.go +24 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevelsize.go +9 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktypes.go +95 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkvulkancontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-animation.go +26 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-core.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-io.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-loader.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-transform.go +11 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf.go +102 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/main.go +5 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gaction.go +59 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactiongroup.go +96 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactionmap.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gappinfo.go +244 -116 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplication.go +79 -55 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplicationcommandline.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncinitable.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncresult.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedinputstream.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedoutputstream.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbytesicon.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcancellable.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcharsetconverter.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcontenttype.go +30 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverter.go +23 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverterinputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverteroutputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcredentials.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatagrambased.go +45 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatainputstream.go +31 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdataoutputstream.go +14 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusactiongroup.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusaddress.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusauthobserver.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusconnection.go +77 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbuserror.go +16 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterface.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterfaceskeleton.go +25 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusintrospection.go +54 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmenumodel.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmessage.go +88 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmethodinvocation.go +35 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnameowning.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnamewatching.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobject.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanager.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerclient.go +16 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerserver.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectproxy.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectskeleton.go +12 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusproxy.go +42 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusserver.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusutils.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontroller.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontrollerdbus.go +4 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdrive.go +214 -82 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsclientconnection.go +34 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsconnection.go +207 -80 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsserverconnection.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblem.go +6 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblemedicon.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfile.go +1148 -450 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileattribute.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileenumerator.go +34 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileicon.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinfo.go +138 -84 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinputstream.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileiostream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilemonitor.go +9 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilenamecompleter.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileoutputstream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilterinputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilteroutputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gicon.go +32 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddress.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddressmask.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetsocketaddress.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginitable.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginputstream.go +52 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioenums.go +90 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioerror.go +6 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giomodule.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioscheduler.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giostream.go +25 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giotypes.go +70 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giptosmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gipv6tclassmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/glistmodel.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gliststore.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gloadableicon.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryinputstream.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemorymonitor.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryoutputstream.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenu.go +62 -50 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenumodel.go +31 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmount.go +215 -86 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmountoperation.go +40 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativesocketaddress.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativevolumemonitor.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkaddress.go +11 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworking.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkmonitor.go +49 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkservice.go +12 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnotification.go +26 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/goutputstream.go +86 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpermission.go +33 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableinputstream.go +30 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableoutputstream.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableutils.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpowerprofilemonitor.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpropertyaction.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxy.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddress.go +16 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddressenumerator.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyresolver.go +35 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gremoteactiongroup.go +12 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresolver.go +75 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresource.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gseekable.go +41 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettings.go +99 -67 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsbackend.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsschema.go +48 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleaction.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleactiongroup.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleasyncresult.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleiostream.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimplepermission.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleproxyresolver.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocket.go +87 -72
| @@ -375,6 +375,7 @@ type Socket struct { | |||
| 375 | 375 | var xSocketGLibType func() types.GType | |
| 376 | 376 | ||
| 377 | 377 | func SocketGLibType() types.GType { | |
| 378 | + | core.LazyRegister(&xSocketGLibType, "GIO", "g_socket_get_type", false) | |
| 378 | 379 | return xSocketGLibType() | |
| 379 | 380 | } | |
| 380 | 381 | ||
| @@ -400,6 +401,7 @@ var xNewSocket func(SocketFamily, SocketType, SocketProtocol, **glib.Error) uint | |||
| 400 | 401 | // system, so you can use protocols not listed in #GSocketProtocol if you | |
| 401 | 402 | // know the protocol number used for it. | |
| 402 | 403 | func NewSocket(FamilyVar SocketFamily, TypeVar SocketType, ProtocolVar SocketProtocol) (*Socket, error) { | |
| 404 | + | core.LazyRegister(&xNewSocket, "GIO", "g_socket_new", false) | |
| 403 | 405 | var cls *Socket | |
| 404 | 406 | var cerr *glib.Error | |
| 405 | 407 | ||
| @@ -432,6 +434,7 @@ var xNewSocketFromFd func(int, **glib.Error) uintptr | |||
| 432 | 434 | // Since GLib 2.46, it is no longer a fatal error to call this on a non-socket | |
| 433 | 435 | // descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED | |
| 434 | 436 | func NewSocketFromFd(FdVar int) (*Socket, error) { | |
| 437 | + | core.LazyRegister(&xNewSocketFromFd, "GIO", "g_socket_new_from_fd", false) | |
| 435 | 438 | var cls *Socket | |
| 436 | 439 | var cerr *glib.Error | |
| 437 | 440 | ||
| @@ -461,6 +464,7 @@ var xSocketAccept func(uintptr, uintptr, **glib.Error) uintptr | |||
| 461 | 464 | // or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. | |
| 462 | 465 | // To be notified of an incoming connection, wait for the %G_IO_IN condition. | |
| 463 | 466 | func (x *Socket) Accept(CancellableVar *Cancellable) (*Socket, error) { | |
| 467 | + | core.LazyRegister(&xSocketAccept, "GIO", "g_socket_accept", false) | |
| 464 | 468 | var cls *Socket | |
| 465 | 469 | var cerr *glib.Error | |
| 466 | 470 | ||
| @@ -503,6 +507,7 @@ var xSocketBind func(uintptr, uintptr, bool, **glib.Error) bool | |||
| 503 | 507 | // broadcast packets sent to that address. (The behavior of unicast | |
| 504 | 508 | // UDP packets to an address with multiple listeners is not defined.) | |
| 505 | 509 | func (x *Socket) Bind(AddressVar *SocketAddress, AllowReuseVar bool) (bool, error) { | |
| 510 | + | core.LazyRegister(&xSocketBind, "GIO", "g_socket_bind", false) | |
| 506 | 511 | var cerr *glib.Error | |
| 507 | 512 | ||
| 508 | 513 | cret := xSocketBind(x.GoPointer(), AddressVar.GoPointer(), AllowReuseVar, &cerr) | |
| @@ -518,6 +523,7 @@ var xSocketCheckConnectResult func(uintptr, **glib.Error) bool | |||
| 518 | 523 | // This is used to check for errors when g_socket_connect() is | |
| 519 | 524 | // used in non-blocking mode. | |
| 520 | 525 | func (x *Socket) CheckConnectResult() (bool, error) { | |
| 526 | + | core.LazyRegister(&xSocketCheckConnectResult, "GIO", "g_socket_check_connect_result", false) | |
| 521 | 527 | var cerr *glib.Error | |
| 522 | 528 | ||
| 523 | 529 | cret := xSocketCheckConnectResult(x.GoPointer(), &cerr) | |
| @@ -559,6 +565,7 @@ var xSocketClose func(uintptr, **glib.Error) bool | |||
| 559 | 565 | // only works if the client will close its connection after the server | |
| 560 | 566 | // does.) | |
| 561 | 567 | func (x *Socket) Close() (bool, error) { | |
| 568 | + | core.LazyRegister(&xSocketClose, "GIO", "g_socket_close", false) | |
| 562 | 569 | var cerr *glib.Error | |
| 563 | 570 | ||
| 564 | 571 | cret := xSocketClose(x.GoPointer(), &cerr) | |
| @@ -588,6 +595,8 @@ var xSocketConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition | |||
| 588 | 595 | // | |
| 589 | 596 | // This call never blocks. | |
| 590 | 597 | func (x *Socket) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition { | |
| 598 | + | core.LazyRegister(&xSocketConditionCheck, "GIO", "g_socket_condition_check", false) | |
| 599 | + | ||
| 591 | 600 | cret := xSocketConditionCheck(x.GoPointer(), ConditionVar) | |
| 592 | 601 | return cret | |
| 593 | 602 | } | |
| @@ -611,6 +620,7 @@ var xSocketConditionTimedWait func(uintptr, glib.IOCondition, int64, uintptr, ** | |||
| 611 | 620 | // resolution, and the behavior is undefined if @timeout_us is not an | |
| 612 | 621 | // exact number of milliseconds. | |
| 613 | 622 | func (x *Socket) ConditionTimedWait(ConditionVar glib.IOCondition, TimeoutUsVar int64, CancellableVar *Cancellable) (bool, error) { | |
| 623 | + | core.LazyRegister(&xSocketConditionTimedWait, "GIO", "g_socket_condition_timed_wait", false) | |
| 614 | 624 | var cerr *glib.Error | |
| 615 | 625 | ||
| 616 | 626 | cret := xSocketConditionTimedWait(x.GoPointer(), ConditionVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -633,6 +643,7 @@ var xSocketConditionWait func(uintptr, glib.IOCondition, uintptr, **glib.Error) | |||
| 633 | 643 | // | |
| 634 | 644 | // See also g_socket_condition_timed_wait(). | |
| 635 | 645 | func (x *Socket) ConditionWait(ConditionVar glib.IOCondition, CancellableVar *Cancellable) (bool, error) { | |
| 646 | + | core.LazyRegister(&xSocketConditionWait, "GIO", "g_socket_condition_wait", false) | |
| 636 | 647 | var cerr *glib.Error | |
| 637 | 648 | ||
| 638 | 649 | cret := xSocketConditionWait(x.GoPointer(), ConditionVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -661,6 +672,7 @@ var xSocketConnect func(uintptr, uintptr, uintptr, **glib.Error) bool | |||
| 661 | 672 | // for the G_IO_OUT condition. The result of the connection must then be | |
| 662 | 673 | // checked with g_socket_check_connect_result(). | |
| 663 | 674 | func (x *Socket) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) (bool, error) { | |
| 675 | + | core.LazyRegister(&xSocketConnect, "GIO", "g_socket_connect", false) | |
| 664 | 676 | var cerr *glib.Error | |
| 665 | 677 | ||
| 666 | 678 | cret := xSocketConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | |
| @@ -675,6 +687,7 @@ var xSocketConnectionFactoryCreateConnection func(uintptr) uintptr | |||
| 675 | 687 | // Creates a #GSocketConnection subclass of the right type for | |
| 676 | 688 | // @socket. | |
| 677 | 689 | func (x *Socket) ConnectionFactoryCreateConnection() *SocketConnection { | |
| 690 | + | core.LazyRegister(&xSocketConnectionFactoryCreateConnection, "GIO", "g_socket_connection_factory_create_connection", false) | |
| 678 | 691 | var cls *SocketConnection | |
| 679 | 692 | ||
| 680 | 693 | cret := xSocketConnectionFactoryCreateConnection(x.GoPointer()) | |
| @@ -710,6 +723,8 @@ var xSocketCreateSource func(uintptr, glib.IOCondition, uintptr) uintptr | |||
| 710 | 723 | // marked as having had a timeout, and so the next #GSocket I/O method | |
| 711 | 724 | // you call will then fail with a %G_IO_ERROR_TIMED_OUT. | |
| 712 | 725 | func (x *Socket) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source { | |
| 726 | + | core.LazyRegister(&xSocketCreateSource, "GIO", "g_socket_create_source", false) | |
| 727 | + | ||
| 713 | 728 | cret := xSocketCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer()) | |
| 714 | 729 | if cret == 0 { | |
| 715 | 730 | return nil | |
| @@ -732,6 +747,8 @@ var xSocketGetAvailableBytes func(uintptr) int | |||
| 732 | 747 | // g_socket_get_available_bytes() first and then doing a receive of | |
| 733 | 748 | // exactly the right size. | |
| 734 | 749 | func (x *Socket) GetAvailableBytes() int { | |
| 750 | + | core.LazyRegister(&xSocketGetAvailableBytes, "GIO", "g_socket_get_available_bytes", false) | |
| 751 | + | ||
| 735 | 752 | cret := xSocketGetAvailableBytes(x.GoPointer()) | |
| 736 | 753 | return cret | |
| 737 | 754 | } | |
| @@ -741,6 +758,8 @@ var xSocketGetBlocking func(uintptr) bool | |||
| 741 | 758 | // Gets the blocking mode of the socket. For details on blocking I/O, | |
| 742 | 759 | // see g_socket_set_blocking(). | |
| 743 | 760 | func (x *Socket) GetBlocking() bool { | |
| 761 | + | core.LazyRegister(&xSocketGetBlocking, "GIO", "g_socket_get_blocking", false) | |
| 762 | + | ||
| 744 | 763 | cret := xSocketGetBlocking(x.GoPointer()) | |
| 745 | 764 | return cret | |
| 746 | 765 | } | |
| @@ -751,6 +770,8 @@ var xSocketGetBroadcast func(uintptr) bool | |||
| 751 | 770 | // it is possible to send packets to broadcast | |
| 752 | 771 | // addresses. | |
| 753 | 772 | func (x *Socket) GetBroadcast() bool { | |
| 773 | + | core.LazyRegister(&xSocketGetBroadcast, "GIO", "g_socket_get_broadcast", false) | |
| 774 | + | ||
| 754 | 775 | cret := xSocketGetBroadcast(x.GoPointer()) | |
| 755 | 776 | return cret | |
| 756 | 777 | } | |
| @@ -778,6 +799,7 @@ var xSocketGetCredentials func(uintptr, **glib.Error) uintptr | |||
| 778 | 799 | // g_unix_connection_send_credentials() / | |
| 779 | 800 | // g_unix_connection_receive_credentials() functions. | |
| 780 | 801 | func (x *Socket) GetCredentials() (*Credentials, error) { | |
| 802 | + | core.LazyRegister(&xSocketGetCredentials, "GIO", "g_socket_get_credentials", false) | |
| 781 | 803 | var cls *Credentials | |
| 782 | 804 | var cerr *glib.Error | |
| 783 | 805 | ||
| @@ -798,6 +820,8 @@ var xSocketGetFamily func(uintptr) SocketFamily | |||
| 798 | 820 | ||
| 799 | 821 | // Gets the socket family of the socket. | |
| 800 | 822 | func (x *Socket) GetFamily() SocketFamily { | |
| 823 | + | core.LazyRegister(&xSocketGetFamily, "GIO", "g_socket_get_family", false) | |
| 824 | + | ||
| 801 | 825 | cret := xSocketGetFamily(x.GoPointer()) | |
| 802 | 826 | return cret | |
| 803 | 827 | } | |
| @@ -810,6 +834,8 @@ var xSocketGetFd func(uintptr) int | |||
| 810 | 834 | // doing platform specific or otherwise unusual operations | |
| 811 | 835 | // on the socket. | |
| 812 | 836 | func (x *Socket) GetFd() int { | |
| 837 | + | core.LazyRegister(&xSocketGetFd, "GIO", "g_socket_get_fd", false) | |
| 838 | + | ||
| 813 | 839 | cret := xSocketGetFd(x.GoPointer()) | |
| 814 | 840 | return cret | |
| 815 | 841 | } | |
| @@ -819,6 +845,8 @@ var xSocketGetKeepalive func(uintptr) bool | |||
| 819 | 845 | // Gets the keepalive mode of the socket. For details on this, | |
| 820 | 846 | // see g_socket_set_keepalive(). | |
| 821 | 847 | func (x *Socket) GetKeepalive() bool { | |
| 848 | + | core.LazyRegister(&xSocketGetKeepalive, "GIO", "g_socket_get_keepalive", false) | |
| 849 | + | ||
| 822 | 850 | cret := xSocketGetKeepalive(x.GoPointer()) | |
| 823 | 851 | return cret | |
| 824 | 852 | } | |
| @@ -828,6 +856,8 @@ var xSocketGetListenBacklog func(uintptr) int | |||
| 828 | 856 | // Gets the listen backlog setting of the socket. For details on this, | |
| 829 | 857 | // see g_socket_set_listen_backlog(). | |
| 830 | 858 | func (x *Socket) GetListenBacklog() int { | |
| 859 | + | core.LazyRegister(&xSocketGetListenBacklog, "GIO", "g_socket_get_listen_backlog", false) | |
| 860 | + | ||
| 831 | 861 | cret := xSocketGetListenBacklog(x.GoPointer()) | |
| 832 | 862 | return cret | |
| 833 | 863 | } | |
| @@ -838,6 +868,7 @@ var xSocketGetLocalAddress func(uintptr, **glib.Error) uintptr | |||
| 838 | 868 | // useful if the socket has been bound to a local address, | |
| 839 | 869 | // either explicitly or implicitly when connecting. | |
| 840 | 870 | func (x *Socket) GetLocalAddress() (*SocketAddress, error) { | |
| 871 | + | core.LazyRegister(&xSocketGetLocalAddress, "GIO", "g_socket_get_local_address", false) | |
| 841 | 872 | var cls *SocketAddress | |
| 842 | 873 | var cerr *glib.Error | |
| 843 | 874 | ||
| @@ -860,6 +891,8 @@ var xSocketGetMulticastLoopback func(uintptr) bool | |||
| 860 | 891 | // default), outgoing multicast packets will be looped back to | |
| 861 | 892 | // multicast listeners on the same host. | |
| 862 | 893 | func (x *Socket) GetMulticastLoopback() bool { | |
| 894 | + | core.LazyRegister(&xSocketGetMulticastLoopback, "GIO", "g_socket_get_multicast_loopback", false) | |
| 895 | + | ||
| 863 | 896 | cret := xSocketGetMulticastLoopback(x.GoPointer()) | |
| 864 | 897 | return cret | |
| 865 | 898 | } | |
| @@ -869,6 +902,8 @@ var xSocketGetMulticastTtl func(uintptr) uint | |||
| 869 | 902 | // Gets the multicast time-to-live setting on @socket; see | |
| 870 | 903 | // g_socket_set_multicast_ttl() for more details. | |
| 871 | 904 | func (x *Socket) GetMulticastTtl() uint { | |
| 905 | + | core.LazyRegister(&xSocketGetMulticastTtl, "GIO", "g_socket_get_multicast_ttl", false) | |
| 906 | + | ||
| 872 | 907 | cret := xSocketGetMulticastTtl(x.GoPointer()) | |
| 873 | 908 | return cret | |
| 874 | 909 | } | |
| @@ -889,6 +924,7 @@ var xSocketGetOption func(uintptr, int, int, *int, **glib.Error) bool | |||
| 889 | 924 | // @value is still a pointer to a #gint variable, not a #guchar; | |
| 890 | 925 | // g_socket_get_option() will handle the conversion internally. | |
| 891 | 926 | func (x *Socket) GetOption(LevelVar int, OptnameVar int, ValueVar *int) (bool, error) { | |
| 927 | + | core.LazyRegister(&xSocketGetOption, "GIO", "g_socket_get_option", false) | |
| 892 | 928 | var cerr *glib.Error | |
| 893 | 929 | ||
| 894 | 930 | cret := xSocketGetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | |
| @@ -903,6 +939,8 @@ var xSocketGetProtocol func(uintptr) SocketProtocol | |||
| 903 | 939 | // Gets the socket protocol id the socket was created with. | |
| 904 | 940 | // In case the protocol is unknown, -1 is returned. | |
| 905 | 941 | func (x *Socket) GetProtocol() SocketProtocol { | |
| 942 | + | core.LazyRegister(&xSocketGetProtocol, "GIO", "g_socket_get_protocol", false) | |
| 943 | + | ||
| 906 | 944 | cret := xSocketGetProtocol(x.GoPointer()) | |
| 907 | 945 | return cret | |
| 908 | 946 | } | |
| @@ -912,6 +950,7 @@ var xSocketGetRemoteAddress func(uintptr, **glib.Error) uintptr | |||
| 912 | 950 | // Try to get the remote address of a connected socket. This is only | |
| 913 | 951 | // useful for connection oriented sockets that have been connected. | |
| 914 | 952 | func (x *Socket) GetRemoteAddress() (*SocketAddress, error) { | |
| 953 | + | core.LazyRegister(&xSocketGetRemoteAddress, "GIO", "g_socket_get_remote_address", false) | |
| 915 | 954 | var cls *SocketAddress | |
| 916 | 955 | var cerr *glib.Error | |
| 917 | 956 | ||
| @@ -932,6 +971,8 @@ var xSocketGetSocketType func(uintptr) SocketType | |||
| 932 | 971 | ||
| 933 | 972 | // Gets the socket type of the socket. | |
| 934 | 973 | func (x *Socket) GetSocketType() SocketType { | |
| 974 | + | core.LazyRegister(&xSocketGetSocketType, "GIO", "g_socket_get_socket_type", false) | |
| 975 | + | ||
| 935 | 976 | cret := xSocketGetSocketType(x.GoPointer()) | |
| 936 | 977 | return cret | |
| 937 | 978 | } | |
| @@ -941,6 +982,8 @@ var xSocketGetTimeout func(uintptr) uint | |||
| 941 | 982 | // Gets the timeout setting of the socket. For details on this, see | |
| 942 | 983 | // g_socket_set_timeout(). | |
| 943 | 984 | func (x *Socket) GetTimeout() uint { | |
| 985 | + | core.LazyRegister(&xSocketGetTimeout, "GIO", "g_socket_get_timeout", false) | |
| 986 | + | ||
| 944 | 987 | cret := xSocketGetTimeout(x.GoPointer()) | |
| 945 | 988 | return cret | |
| 946 | 989 | } | |
| @@ -950,6 +993,8 @@ var xSocketGetTtl func(uintptr) uint | |||
| 950 | 993 | // Gets the unicast time-to-live setting on @socket; see | |
| 951 | 994 | // g_socket_set_ttl() for more details. | |
| 952 | 995 | func (x *Socket) GetTtl() uint { | |
| 996 | + | core.LazyRegister(&xSocketGetTtl, "GIO", "g_socket_get_ttl", false) | |
| 997 | + | ||
| 953 | 998 | cret := xSocketGetTtl(x.GoPointer()) | |
| 954 | 999 | return cret | |
| 955 | 1000 | } | |
| @@ -958,6 +1003,8 @@ var xSocketIsClosed func(uintptr) bool | |||
| 958 | 1003 | ||
| 959 | 1004 | // Checks whether a socket is closed. | |
| 960 | 1005 | func (x *Socket) IsClosed() bool { | |
| 1006 | + | core.LazyRegister(&xSocketIsClosed, "GIO", "g_socket_is_closed", false) | |
| 1007 | + | ||
| 961 | 1008 | cret := xSocketIsClosed(x.GoPointer()) | |
| 962 | 1009 | return cret | |
| 963 | 1010 | } | |
| @@ -972,6 +1019,8 @@ var xSocketIsConnected func(uintptr) bool | |||
| 972 | 1019 | // connect, this function will not return %TRUE until after you call | |
| 973 | 1020 | // g_socket_check_connect_result(). | |
| 974 | 1021 | func (x *Socket) IsConnected() bool { | |
| 1022 | + | core.LazyRegister(&xSocketIsConnected, "GIO", "g_socket_is_connected", false) | |
| 1023 | + | ||
| 975 | 1024 | cret := xSocketIsConnected(x.GoPointer()) | |
| 976 | 1025 | return cret | |
| 977 | 1026 | } | |
| @@ -993,6 +1042,7 @@ var xSocketJoinMulticastGroup func(uintptr, uintptr, bool, uintptr, **glib.Error | |||
| 993 | 1042 | // To bind to a given source-specific multicast address, use | |
| 994 | 1043 | // g_socket_join_multicast_group_ssm() instead. | |
| 995 | 1044 | func (x *Socket) JoinMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | |
| 1045 | + | core.LazyRegister(&xSocketJoinMulticastGroup, "GIO", "g_socket_join_multicast_group", false) | |
| 996 | 1046 | var cerr *glib.Error | |
| 997 | 1047 | ||
| 998 | 1048 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | |
| @@ -1023,6 +1073,7 @@ var xSocketJoinMulticastGroupSsm func(uintptr, uintptr, uintptr, uintptr, **glib | |||
| 1023 | 1073 | // @group with different @source_specific in order to receive multicast | |
| 1024 | 1074 | // packets from more than one source. | |
| 1025 | 1075 | func (x *Socket) JoinMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | |
| 1076 | + | core.LazyRegister(&xSocketJoinMulticastGroupSsm, "GIO", "g_socket_join_multicast_group_ssm", false) | |
| 1026 | 1077 | var cerr *glib.Error | |
| 1027 | 1078 | ||
| 1028 | 1079 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | |
| @@ -1047,6 +1098,7 @@ var xSocketLeaveMulticastGroup func(uintptr, uintptr, bool, uintptr, **glib.Erro | |||
| 1047 | 1098 | // To unbind to a given source-specific multicast address, use | |
| 1048 | 1099 | // g_socket_leave_multicast_group_ssm() instead. | |
| 1049 | 1100 | func (x *Socket) LeaveMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | |
| 1101 | + | core.LazyRegister(&xSocketLeaveMulticastGroup, "GIO", "g_socket_leave_multicast_group", false) | |
| 1050 | 1102 | var cerr *glib.Error | |
| 1051 | 1103 | ||
| 1052 | 1104 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | |
| @@ -1068,6 +1120,7 @@ var xSocketLeaveMulticastGroupSsm func(uintptr, uintptr, uintptr, uintptr, **gli | |||
| 1068 | 1120 | // @socket remains bound to its address and port, and can still receive | |
| 1069 | 1121 | // unicast messages after calling this. | |
| 1070 | 1122 | func (x *Socket) LeaveMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | |
| 1123 | + | core.LazyRegister(&xSocketLeaveMulticastGroupSsm, "GIO", "g_socket_leave_multicast_group_ssm", false) | |
| 1071 | 1124 | var cerr *glib.Error | |
| 1072 | 1125 | ||
| 1073 | 1126 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | |
| @@ -1091,6 +1144,7 @@ var xSocketListen func(uintptr, **glib.Error) bool | |||
| 1091 | 1144 | // To set the maximum amount of outstanding clients, use | |
| 1092 | 1145 | // g_socket_set_listen_backlog(). | |
| 1093 | 1146 | func (x *Socket) Listen() (bool, error) { | |
| 1147 | + | core.LazyRegister(&xSocketListen, "GIO", "g_socket_listen", false) | |
| 1094 | 1148 | var cerr *glib.Error | |
| 1095 | 1149 | ||
| 1096 | 1150 | cret := xSocketListen(x.GoPointer(), &cerr) | |
| @@ -1126,6 +1180,7 @@ var xSocketReceive func(uintptr, *[]byte, uint, uintptr, **glib.Error) int | |||
| 1126 | 1180 | // | |
| 1127 | 1181 | // On error -1 is returned and @error is set accordingly. | |
| 1128 | 1182 | func (x *Socket) Receive(BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | |
| 1183 | + | core.LazyRegister(&xSocketReceive, "GIO", "g_socket_receive", false) | |
| 1129 | 1184 | var cerr *glib.Error | |
| 1130 | 1185 | ||
| 1131 | 1186 | cret := xSocketReceive(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1147,6 +1202,7 @@ var xSocketReceiveBytes func(uintptr, uint, int64, uintptr, **glib.Error) uintpt | |||
| 1147 | 1202 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | |
| 1148 | 1203 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | |
| 1149 | 1204 | func (x *Socket) ReceiveBytes(SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | |
| 1205 | + | core.LazyRegister(&xSocketReceiveBytes, "GIO", "g_socket_receive_bytes", false) | |
| 1150 | 1206 | var cerr *glib.Error | |
| 1151 | 1207 | ||
| 1152 | 1208 | cret := xSocketReceiveBytes(x.GoPointer(), SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1176,6 +1232,7 @@ var xSocketReceiveBytesFrom func(uintptr, **SocketAddress, uint, int64, uintptr, | |||
| 1176 | 1232 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | |
| 1177 | 1233 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | |
| 1178 | 1234 | func (x *Socket) ReceiveBytesFrom(AddressVar **SocketAddress, SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | |
| 1235 | + | core.LazyRegister(&xSocketReceiveBytesFrom, "GIO", "g_socket_receive_bytes_from", false) | |
| 1179 | 1236 | var cerr *glib.Error | |
| 1180 | 1237 | ||
| 1181 | 1238 | cret := xSocketReceiveBytesFrom(x.GoPointer(), AddressVar, SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1198,6 +1255,7 @@ var xSocketReceiveFrom func(uintptr, **SocketAddress, *[]byte, uint, uintptr, ** | |||
| 1198 | 1255 | // | |
| 1199 | 1256 | // See g_socket_receive() for additional information. | |
| 1200 | 1257 | func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | |
| 1258 | + | core.LazyRegister(&xSocketReceiveFrom, "GIO", "g_socket_receive_from", false) | |
| 1201 | 1259 | var cerr *glib.Error | |
| 1202 | 1260 | ||
| 1203 | 1261 | cret := xSocketReceiveFrom(x.GoPointer(), AddressVar, BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1269,6 +1327,7 @@ var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *ui | |||
| 1269 | 1327 | // | |
| 1270 | 1328 | // On error -1 is returned and @error is set accordingly. | |
| 1271 | 1329 | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar *int, CancellableVar *Cancellable) (int, error) { | |
| 1330 | + | core.LazyRegister(&xSocketReceiveMessage, "GIO", "g_socket_receive_message", false) | |
| 1272 | 1331 | var cerr *glib.Error | |
| 1273 | 1332 | ||
| 1274 | 1333 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1329,6 +1388,7 @@ var xSocketReceiveMessages func(uintptr, []InputMessage, uint, int, uintptr, **g | |||
| 1329 | 1388 | // be returned if zero messages could be received; otherwise the number of | |
| 1330 | 1389 | // messages successfully received before the error will be returned. | |
| 1331 | 1390 | func (x *Socket) ReceiveMessages(MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | |
| 1391 | + | core.LazyRegister(&xSocketReceiveMessages, "GIO", "g_socket_receive_messages", false) | |
| 1332 | 1392 | var cerr *glib.Error | |
| 1333 | 1393 | ||
| 1334 | 1394 | cret := xSocketReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1344,6 +1404,7 @@ var xSocketReceiveWithBlocking func(uintptr, *[]byte, uint, bool, uintptr, **gli | |||
| 1344 | 1404 | // the choice of blocking or non-blocking behavior is determined by | |
| 1345 | 1405 | // the @blocking argument rather than by @socket's properties. | |
| 1346 | 1406 | func (x *Socket) ReceiveWithBlocking(BufferVar *[]byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | |
| 1407 | + | core.LazyRegister(&xSocketReceiveWithBlocking, "GIO", "g_socket_receive_with_blocking", false) | |
| 1347 | 1408 | var cerr *glib.Error | |
| 1348 | 1409 | ||
| 1349 | 1410 | cret := xSocketReceiveWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1370,6 +1431,7 @@ var xSocketSend func(uintptr, []byte, uint, uintptr, **glib.Error) int | |||
| 1370 | 1431 | // | |
| 1371 | 1432 | // On error -1 is returned and @error is set accordingly. | |
| 1372 | 1433 | func (x *Socket) Send(BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | |
| 1434 | + | core.LazyRegister(&xSocketSend, "GIO", "g_socket_send", false) | |
| 1373 | 1435 | var cerr *glib.Error | |
| 1374 | 1436 | ||
| 1375 | 1437 | cret := xSocketSend(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1424,6 +1486,7 @@ var xSocketSendMessage func(uintptr, uintptr, []OutputVector, int, uintptr, int, | |||
| 1424 | 1486 | // | |
| 1425 | 1487 | // On error -1 is returned and @error is set accordingly. | |
| 1426 | 1488 | func (x *Socket) SendMessage(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) (int, error) { | |
| 1489 | + | core.LazyRegister(&xSocketSendMessage, "GIO", "g_socket_send_message", false) | |
| 1427 | 1490 | var cerr *glib.Error | |
| 1428 | 1491 | ||
| 1429 | 1492 | cret := xSocketSendMessage(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1443,6 +1506,7 @@ var xSocketSendMessageWithTimeout func(uintptr, uintptr, []OutputVector, int, ui | |||
| 1443 | 1506 | // if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is | |
| 1444 | 1507 | // returned. @bytes_written will contain 0 in both cases. | |
| 1445 | 1508 | func (x *Socket) SendMessageWithTimeout(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, TimeoutUsVar int64, BytesWrittenVar *uint, CancellableVar *Cancellable) (PollableReturn, error) { | |
| 1509 | + | core.LazyRegister(&xSocketSendMessageWithTimeout, "GIO", "g_socket_send_message_with_timeout", false) | |
| 1446 | 1510 | var cerr *glib.Error | |
| 1447 | 1511 | ||
| 1448 | 1512 | cret := xSocketSendMessageWithTimeout(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, TimeoutUsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1489,6 +1553,7 @@ var xSocketSendMessages func(uintptr, []OutputMessage, uint, int, uintptr, **gli | |||
| 1489 | 1553 | // be returned if zero messages could be sent; otherwise the number of messages | |
| 1490 | 1554 | // successfully sent before the error will be returned. | |
| 1491 | 1555 | func (x *Socket) SendMessages(MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | |
| 1556 | + | core.LazyRegister(&xSocketSendMessages, "GIO", "g_socket_send_messages", false) | |
| 1492 | 1557 | var cerr *glib.Error | |
| 1493 | 1558 | ||
| 1494 | 1559 | cret := xSocketSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1506,6 +1571,7 @@ var xSocketSendTo func(uintptr, uintptr, []byte, uint, uintptr, **glib.Error) in | |||
| 1506 | 1571 | // | |
| 1507 | 1572 | // See g_socket_send() for additional information. | |
| 1508 | 1573 | func (x *Socket) SendTo(AddressVar *SocketAddress, BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | |
| 1574 | + | core.LazyRegister(&xSocketSendTo, "GIO", "g_socket_send_to", false) | |
| 1509 | 1575 | var cerr *glib.Error | |
| 1510 | 1576 | ||
| 1511 | 1577 | cret := xSocketSendTo(x.GoPointer(), AddressVar.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1521,6 +1587,7 @@ var xSocketSendWithBlocking func(uintptr, []byte, uint, bool, uintptr, **glib.Er | |||
| 1521 | 1587 | // the choice of blocking or non-blocking behavior is determined by | |
| 1522 | 1588 | // the @blocking argument rather than by @socket's properties. | |
| 1523 | 1589 | func (x *Socket) SendWithBlocking(BufferVar []byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | |
| 1590 | + | core.LazyRegister(&xSocketSendWithBlocking, "GIO", "g_socket_send_with_blocking", false) | |
| 1524 | 1591 | var cerr *glib.Error | |
| 1525 | 1592 | ||
| 1526 | 1593 | cret := xSocketSendWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1542,6 +1609,8 @@ var xSocketSetBlocking func(uintptr, bool) | |||
| 1542 | 1609 | // platform level socket is always non-blocking, and blocking mode | |
| 1543 | 1610 | // is a GSocket level feature. | |
| 1544 | 1611 | func (x *Socket) SetBlocking(BlockingVar bool) { | |
| 1612 | + | core.LazyRegister(&xSocketSetBlocking, "GIO", "g_socket_set_blocking", false) | |
| 1613 | + | ||
| 1545 | 1614 | xSocketSetBlocking(x.GoPointer(), BlockingVar) | |
| 1546 | 1615 | } | |
| 1547 | 1616 | ||
| @@ -1550,6 +1619,8 @@ var xSocketSetBroadcast func(uintptr, bool) | |||
| 1550 | 1619 | // Sets whether @socket should allow sending to broadcast addresses. | |
| 1551 | 1620 | // This is %FALSE by default. | |
| 1552 | 1621 | func (x *Socket) SetBroadcast(BroadcastVar bool) { | |
| 1622 | + | core.LazyRegister(&xSocketSetBroadcast, "GIO", "g_socket_set_broadcast", false) | |
| 1623 | + | ||
| 1553 | 1624 | xSocketSetBroadcast(x.GoPointer(), BroadcastVar) | |
| 1554 | 1625 | } | |
| 1555 | 1626 | ||
| @@ -1571,6 +1642,8 @@ var xSocketSetKeepalive func(uintptr, bool) | |||
| 1571 | 1642 | // periods of time, but also want to ensure that connections are eventually | |
| 1572 | 1643 | // garbage-collected if clients crash or become unreachable. | |
| 1573 | 1644 | func (x *Socket) SetKeepalive(KeepaliveVar bool) { | |
| 1645 | + | core.LazyRegister(&xSocketSetKeepalive, "GIO", "g_socket_set_keepalive", false) | |
| 1646 | + | ||
| 1574 | 1647 | xSocketSetKeepalive(x.GoPointer(), KeepaliveVar) | |
| 1575 | 1648 | } | |
| 1576 | 1649 | ||
| @@ -1584,6 +1657,8 @@ var xSocketSetListenBacklog func(uintptr, int) | |||
| 1584 | 1657 | // Note that this must be called before g_socket_listen() and has no | |
| 1585 | 1658 | // effect if called after that. | |
| 1586 | 1659 | func (x *Socket) SetListenBacklog(BacklogVar int) { | |
| 1660 | + | core.LazyRegister(&xSocketSetListenBacklog, "GIO", "g_socket_set_listen_backlog", false) | |
| 1661 | + | ||
| 1587 | 1662 | xSocketSetListenBacklog(x.GoPointer(), BacklogVar) | |
| 1588 | 1663 | } | |
| 1589 | 1664 | ||
| @@ -1593,6 +1668,8 @@ var xSocketSetMulticastLoopback func(uintptr, bool) | |||
| 1593 | 1668 | // listening on that multicast address on the same host. This is %TRUE | |
| 1594 | 1669 | // by default. | |
| 1595 | 1670 | func (x *Socket) SetMulticastLoopback(LoopbackVar bool) { | |
| 1671 | + | core.LazyRegister(&xSocketSetMulticastLoopback, "GIO", "g_socket_set_multicast_loopback", false) | |
| 1672 | + | ||
| 1596 | 1673 | xSocketSetMulticastLoopback(x.GoPointer(), LoopbackVar) | |
| 1597 | 1674 | } | |
| 1598 | 1675 | ||
| @@ -1602,6 +1679,8 @@ var xSocketSetMulticastTtl func(uintptr, uint) | |||
| 1602 | 1679 | // By default, this is 1, meaning that multicast packets will not leave | |
| 1603 | 1680 | // the local network. | |
| 1604 | 1681 | func (x *Socket) SetMulticastTtl(TtlVar uint) { | |
| 1682 | + | core.LazyRegister(&xSocketSetMulticastTtl, "GIO", "g_socket_set_multicast_ttl", false) | |
| 1683 | + | ||
| 1605 | 1684 | xSocketSetMulticastTtl(x.GoPointer(), TtlVar) | |
| 1606 | 1685 | } | |
| 1607 | 1686 | ||
| @@ -1617,6 +1696,7 @@ var xSocketSetOption func(uintptr, int, int, int, **glib.Error) bool | |||
| 1617 | 1696 | // platform-dependent options, you may need to include additional | |
| 1618 | 1697 | // headers. | |
| 1619 | 1698 | func (x *Socket) SetOption(LevelVar int, OptnameVar int, ValueVar int) (bool, error) { | |
| 1699 | + | core.LazyRegister(&xSocketSetOption, "GIO", "g_socket_set_option", false) | |
| 1620 | 1700 | var cerr *glib.Error | |
| 1621 | 1701 | ||
| 1622 | 1702 | cret := xSocketSetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | |
| @@ -1649,6 +1729,8 @@ var xSocketSetTimeout func(uintptr, uint) | |||
| 1649 | 1729 | // Note that if an I/O operation is interrupted by a signal, this may | |
| 1650 | 1730 | // cause the timeout to be reset. | |
| 1651 | 1731 | func (x *Socket) SetTimeout(TimeoutVar uint) { | |
| 1732 | + | core.LazyRegister(&xSocketSetTimeout, "GIO", "g_socket_set_timeout", false) | |
| 1733 | + | ||
| 1652 | 1734 | xSocketSetTimeout(x.GoPointer(), TimeoutVar) | |
| 1653 | 1735 | } | |
| 1654 | 1736 | ||
| @@ -1657,6 +1739,8 @@ var xSocketSetTtl func(uintptr, uint) | |||
| 1657 | 1739 | // Sets the time-to-live for outgoing unicast packets on @socket. | |
| 1658 | 1740 | // By default the platform-specific default value is used. | |
| 1659 | 1741 | func (x *Socket) SetTtl(TtlVar uint) { | |
| 1742 | + | core.LazyRegister(&xSocketSetTtl, "GIO", "g_socket_set_ttl", false) | |
| 1743 | + | ||
| 1660 | 1744 | xSocketSetTtl(x.GoPointer(), TtlVar) | |
| 1661 | 1745 | } | |
| 1662 | 1746 | ||
| @@ -1677,6 +1761,7 @@ var xSocketShutdown func(uintptr, bool, bool, **glib.Error) bool | |||
| 1677 | 1761 | // then wait for the other side to close the connection, thus ensuring that the | |
| 1678 | 1762 | // other side saw all sent data. | |
| 1679 | 1763 | func (x *Socket) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool) (bool, error) { | |
| 1764 | + | core.LazyRegister(&xSocketShutdown, "GIO", "g_socket_shutdown", false) | |
| 1680 | 1765 | var cerr *glib.Error | |
| 1681 | 1766 | ||
| 1682 | 1767 | cret := xSocketShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, &cerr) | |
| @@ -1698,6 +1783,8 @@ var xSocketSpeaksIpv4 func(uintptr) bool | |||
| 1698 | 1783 | // No other types of sockets are currently considered as being capable | |
| 1699 | 1784 | // of speaking IPv4. | |
| 1700 | 1785 | func (x *Socket) SpeaksIpv4() bool { | |
| 1786 | + | core.LazyRegister(&xSocketSpeaksIpv4, "GIO", "g_socket_speaks_ipv4", false) | |
| 1787 | + | ||
| 1701 | 1788 | cret := xSocketSpeaksIpv4(x.GoPointer()) | |
| 1702 | 1789 | return cret | |
| 1703 | 1790 | } | |
| @@ -1917,76 +2004,4 @@ func (x *Socket) Init(CancellableVar *Cancellable) (bool, error) { | |||
| 1917 | 2004 | func init() { | |
| 1918 | 2005 | core.SetPackageName("GIO", "gio-2.0") | |
| 1919 | 2006 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | |
| 1920 | - | var libs []uintptr | |
| 1921 | - | for _, libPath := range core.GetPaths("GIO") { | |
| 1922 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1923 | - | if err != nil { | |
| 1924 | - | panic(err) | |
| 1925 | - | } | |
| 1926 | - | libs = append(libs, lib) | |
| 1927 | - | } | |
| 1928 | - | ||
| 1929 | - | core.PuregoSafeRegister(&xSocketGLibType, libs, "g_socket_get_type") | |
| 1930 | - | ||
| 1931 | - | core.PuregoSafeRegister(&xNewSocket, libs, "g_socket_new") | |
| 1932 | - | core.PuregoSafeRegister(&xNewSocketFromFd, libs, "g_socket_new_from_fd") | |
| 1933 | - | ||
| 1934 | - | core.PuregoSafeRegister(&xSocketAccept, libs, "g_socket_accept") | |
| 1935 | - | core.PuregoSafeRegister(&xSocketBind, libs, "g_socket_bind") | |
| 1936 | - | core.PuregoSafeRegister(&xSocketCheckConnectResult, libs, "g_socket_check_connect_result") | |
| 1937 | - | core.PuregoSafeRegister(&xSocketClose, libs, "g_socket_close") | |
| 1938 | - | core.PuregoSafeRegister(&xSocketConditionCheck, libs, "g_socket_condition_check") | |
| 1939 | - | core.PuregoSafeRegister(&xSocketConditionTimedWait, libs, "g_socket_condition_timed_wait") | |
| 1940 | - | core.PuregoSafeRegister(&xSocketConditionWait, libs, "g_socket_condition_wait") | |
| 1941 | - | core.PuregoSafeRegister(&xSocketConnect, libs, "g_socket_connect") | |
| 1942 | - | core.PuregoSafeRegister(&xSocketConnectionFactoryCreateConnection, libs, "g_socket_connection_factory_create_connection") | |
| 1943 | - | core.PuregoSafeRegister(&xSocketCreateSource, libs, "g_socket_create_source") | |
| 1944 | - | core.PuregoSafeRegister(&xSocketGetAvailableBytes, libs, "g_socket_get_available_bytes") | |
| 1945 | - | core.PuregoSafeRegister(&xSocketGetBlocking, libs, "g_socket_get_blocking") | |
| 1946 | - | core.PuregoSafeRegister(&xSocketGetBroadcast, libs, "g_socket_get_broadcast") | |
| 1947 | - | core.PuregoSafeRegister(&xSocketGetCredentials, libs, "g_socket_get_credentials") | |
| 1948 | - | core.PuregoSafeRegister(&xSocketGetFamily, libs, "g_socket_get_family") | |
| 1949 | - | core.PuregoSafeRegister(&xSocketGetFd, libs, "g_socket_get_fd") | |
| 1950 | - | core.PuregoSafeRegister(&xSocketGetKeepalive, libs, "g_socket_get_keepalive") | |
| 1951 | - | core.PuregoSafeRegister(&xSocketGetListenBacklog, libs, "g_socket_get_listen_backlog") | |
| 1952 | - | core.PuregoSafeRegister(&xSocketGetLocalAddress, libs, "g_socket_get_local_address") | |
| 1953 | - | core.PuregoSafeRegister(&xSocketGetMulticastLoopback, libs, "g_socket_get_multicast_loopback") | |
| 1954 | - | core.PuregoSafeRegister(&xSocketGetMulticastTtl, libs, "g_socket_get_multicast_ttl") | |
| 1955 | - | core.PuregoSafeRegister(&xSocketGetOption, libs, "g_socket_get_option") | |
| 1956 | - | core.PuregoSafeRegister(&xSocketGetProtocol, libs, "g_socket_get_protocol") | |
| 1957 | - | core.PuregoSafeRegister(&xSocketGetRemoteAddress, libs, "g_socket_get_remote_address") | |
| 1958 | - | core.PuregoSafeRegister(&xSocketGetSocketType, libs, "g_socket_get_socket_type") | |
| 1959 | - | core.PuregoSafeRegister(&xSocketGetTimeout, libs, "g_socket_get_timeout") | |
| 1960 | - | core.PuregoSafeRegister(&xSocketGetTtl, libs, "g_socket_get_ttl") | |
| 1961 | - | core.PuregoSafeRegister(&xSocketIsClosed, libs, "g_socket_is_closed") | |
| 1962 | - | core.PuregoSafeRegister(&xSocketIsConnected, libs, "g_socket_is_connected") | |
| 1963 | - | core.PuregoSafeRegister(&xSocketJoinMulticastGroup, libs, "g_socket_join_multicast_group") | |
| 1964 | - | core.PuregoSafeRegister(&xSocketJoinMulticastGroupSsm, libs, "g_socket_join_multicast_group_ssm") | |
| 1965 | - | core.PuregoSafeRegister(&xSocketLeaveMulticastGroup, libs, "g_socket_leave_multicast_group") | |
| 1966 | - | core.PuregoSafeRegister(&xSocketLeaveMulticastGroupSsm, libs, "g_socket_leave_multicast_group_ssm") | |
| 1967 | - | core.PuregoSafeRegister(&xSocketListen, libs, "g_socket_listen") | |
| 1968 | - | core.PuregoSafeRegister(&xSocketReceive, libs, "g_socket_receive") | |
| 1969 | - | core.PuregoSafeRegister(&xSocketReceiveBytes, libs, "g_socket_receive_bytes") | |
| 1970 | - | core.PuregoSafeRegister(&xSocketReceiveBytesFrom, libs, "g_socket_receive_bytes_from") | |
| 1971 | - | core.PuregoSafeRegister(&xSocketReceiveFrom, libs, "g_socket_receive_from") | |
| 1972 | - | core.PuregoSafeRegister(&xSocketReceiveMessage, libs, "g_socket_receive_message") | |
| 1973 | - | core.PuregoSafeRegister(&xSocketReceiveMessages, libs, "g_socket_receive_messages") | |
| 1974 | - | core.PuregoSafeRegister(&xSocketReceiveWithBlocking, libs, "g_socket_receive_with_blocking") | |
| 1975 | - | core.PuregoSafeRegister(&xSocketSend, libs, "g_socket_send") | |
| 1976 | - | core.PuregoSafeRegister(&xSocketSendMessage, libs, "g_socket_send_message") | |
| 1977 | - | core.PuregoSafeRegister(&xSocketSendMessageWithTimeout, libs, "g_socket_send_message_with_timeout") | |
| 1978 | - | core.PuregoSafeRegister(&xSocketSendMessages, libs, "g_socket_send_messages") | |
| 1979 | - | core.PuregoSafeRegister(&xSocketSendTo, libs, "g_socket_send_to") | |
| 1980 | - | core.PuregoSafeRegister(&xSocketSendWithBlocking, libs, "g_socket_send_with_blocking") | |
| 1981 | - | core.PuregoSafeRegister(&xSocketSetBlocking, libs, "g_socket_set_blocking") | |
| 1982 | - | core.PuregoSafeRegister(&xSocketSetBroadcast, libs, "g_socket_set_broadcast") | |
| 1983 | - | core.PuregoSafeRegister(&xSocketSetKeepalive, libs, "g_socket_set_keepalive") | |
| 1984 | - | core.PuregoSafeRegister(&xSocketSetListenBacklog, libs, "g_socket_set_listen_backlog") | |
| 1985 | - | core.PuregoSafeRegister(&xSocketSetMulticastLoopback, libs, "g_socket_set_multicast_loopback") | |
| 1986 | - | core.PuregoSafeRegister(&xSocketSetMulticastTtl, libs, "g_socket_set_multicast_ttl") | |
| 1987 | - | core.PuregoSafeRegister(&xSocketSetOption, libs, "g_socket_set_option") | |
| 1988 | - | core.PuregoSafeRegister(&xSocketSetTimeout, libs, "g_socket_set_timeout") | |
| 1989 | - | core.PuregoSafeRegister(&xSocketSetTtl, libs, "g_socket_set_ttl") | |
| 1990 | - | core.PuregoSafeRegister(&xSocketShutdown, libs, "g_socket_shutdown") | |
| 1991 | - | core.PuregoSafeRegister(&xSocketSpeaksIpv4, libs, "g_socket_speaks_ipv4") | |
| 1992 | 2007 | } | |
| @@ -375,6 +375,7 @@ type Socket struct { | |||||
| 375 | var xSocketGLibType func() types.GType | 375 | var xSocketGLibType func() types.GType | ||
| 376 | 376 | ||||
| 377 | func SocketGLibType() types.GType { | 377 | func SocketGLibType() types.GType { | ||
| 378 | + | core.LazyRegister(&xSocketGLibType, "GIO", "g_socket_get_type", false) | |||
| 378 | return xSocketGLibType() | 379 | return xSocketGLibType() | ||
| 379 | } | 380 | } | ||
| 380 | 381 | ||||
| @@ -400,6 +401,7 @@ var xNewSocket func(SocketFamily, SocketType, SocketProtocol, **glib.Error) uint | |||||
| 400 | // system, so you can use protocols not listed in #GSocketProtocol if you | 401 | // system, so you can use protocols not listed in #GSocketProtocol if you | ||
| 401 | // know the protocol number used for it. | 402 | // know the protocol number used for it. | ||
| 402 | func NewSocket(FamilyVar SocketFamily, TypeVar SocketType, ProtocolVar SocketProtocol) (*Socket, error) { | 403 | func NewSocket(FamilyVar SocketFamily, TypeVar SocketType, ProtocolVar SocketProtocol) (*Socket, error) { | ||
| 404 | + | core.LazyRegister(&xNewSocket, "GIO", "g_socket_new", false) | |||
| 403 | var cls *Socket | 405 | var cls *Socket | ||
| 404 | var cerr *glib.Error | 406 | var cerr *glib.Error | ||
| 405 | 407 | ||||
| @@ -432,6 +434,7 @@ var xNewSocketFromFd func(int, **glib.Error) uintptr | |||||
| 432 | // Since GLib 2.46, it is no longer a fatal error to call this on a non-socket | 434 | // Since GLib 2.46, it is no longer a fatal error to call this on a non-socket | ||
| 433 | // descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED | 435 | // descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED | ||
| 434 | func NewSocketFromFd(FdVar int) (*Socket, error) { | 436 | func NewSocketFromFd(FdVar int) (*Socket, error) { | ||
| 437 | + | core.LazyRegister(&xNewSocketFromFd, "GIO", "g_socket_new_from_fd", false) | |||
| 435 | var cls *Socket | 438 | var cls *Socket | ||
| 436 | var cerr *glib.Error | 439 | var cerr *glib.Error | ||
| 437 | 440 | ||||
| @@ -461,6 +464,7 @@ var xSocketAccept func(uintptr, uintptr, **glib.Error) uintptr | |||||
| 461 | // or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. | 464 | // or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. | ||
| 462 | // To be notified of an incoming connection, wait for the %G_IO_IN condition. | 465 | // To be notified of an incoming connection, wait for the %G_IO_IN condition. | ||
| 463 | func (x *Socket) Accept(CancellableVar *Cancellable) (*Socket, error) { | 466 | func (x *Socket) Accept(CancellableVar *Cancellable) (*Socket, error) { | ||
| 467 | + | core.LazyRegister(&xSocketAccept, "GIO", "g_socket_accept", false) | |||
| 464 | var cls *Socket | 468 | var cls *Socket | ||
| 465 | var cerr *glib.Error | 469 | var cerr *glib.Error | ||
| 466 | 470 | ||||
| @@ -503,6 +507,7 @@ var xSocketBind func(uintptr, uintptr, bool, **glib.Error) bool | |||||
| 503 | // broadcast packets sent to that address. (The behavior of unicast | 507 | // broadcast packets sent to that address. (The behavior of unicast | ||
| 504 | // UDP packets to an address with multiple listeners is not defined.) | 508 | // UDP packets to an address with multiple listeners is not defined.) | ||
| 505 | func (x *Socket) Bind(AddressVar *SocketAddress, AllowReuseVar bool) (bool, error) { | 509 | func (x *Socket) Bind(AddressVar *SocketAddress, AllowReuseVar bool) (bool, error) { | ||
| 510 | + | core.LazyRegister(&xSocketBind, "GIO", "g_socket_bind", false) | |||
| 506 | var cerr *glib.Error | 511 | var cerr *glib.Error | ||
| 507 | 512 | ||||
| 508 | cret := xSocketBind(x.GoPointer(), AddressVar.GoPointer(), AllowReuseVar, &cerr) | 513 | cret := xSocketBind(x.GoPointer(), AddressVar.GoPointer(), AllowReuseVar, &cerr) | ||
| @@ -518,6 +523,7 @@ var xSocketCheckConnectResult func(uintptr, **glib.Error) bool | |||||
| 518 | // This is used to check for errors when g_socket_connect() is | 523 | // This is used to check for errors when g_socket_connect() is | ||
| 519 | // used in non-blocking mode. | 524 | // used in non-blocking mode. | ||
| 520 | func (x *Socket) CheckConnectResult() (bool, error) { | 525 | func (x *Socket) CheckConnectResult() (bool, error) { | ||
| 526 | + | core.LazyRegister(&xSocketCheckConnectResult, "GIO", "g_socket_check_connect_result", false) | |||
| 521 | var cerr *glib.Error | 527 | var cerr *glib.Error | ||
| 522 | 528 | ||||
| 523 | cret := xSocketCheckConnectResult(x.GoPointer(), &cerr) | 529 | cret := xSocketCheckConnectResult(x.GoPointer(), &cerr) | ||
| @@ -559,6 +565,7 @@ var xSocketClose func(uintptr, **glib.Error) bool | |||||
| 559 | // only works if the client will close its connection after the server | 565 | // only works if the client will close its connection after the server | ||
| 560 | // does.) | 566 | // does.) | ||
| 561 | func (x *Socket) Close() (bool, error) { | 567 | func (x *Socket) Close() (bool, error) { | ||
| 568 | + | core.LazyRegister(&xSocketClose, "GIO", "g_socket_close", false) | |||
| 562 | var cerr *glib.Error | 569 | var cerr *glib.Error | ||
| 563 | 570 | ||||
| 564 | cret := xSocketClose(x.GoPointer(), &cerr) | 571 | cret := xSocketClose(x.GoPointer(), &cerr) | ||
| @@ -588,6 +595,8 @@ var xSocketConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition | |||||
| 588 | // | 595 | // | ||
| 589 | // This call never blocks. | 596 | // This call never blocks. | ||
| 590 | func (x *Socket) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition { | 597 | func (x *Socket) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition { | ||
| 598 | + | core.LazyRegister(&xSocketConditionCheck, "GIO", "g_socket_condition_check", false) | |||
| 599 | + | ||||
| 591 | cret := xSocketConditionCheck(x.GoPointer(), ConditionVar) | 600 | cret := xSocketConditionCheck(x.GoPointer(), ConditionVar) | ||
| 592 | return cret | 601 | return cret | ||
| 593 | } | 602 | } | ||
| @@ -611,6 +620,7 @@ var xSocketConditionTimedWait func(uintptr, glib.IOCondition, int64, uintptr, ** | |||||
| 611 | // resolution, and the behavior is undefined if @timeout_us is not an | 620 | // resolution, and the behavior is undefined if @timeout_us is not an | ||
| 612 | // exact number of milliseconds. | 621 | // exact number of milliseconds. | ||
| 613 | func (x *Socket) ConditionTimedWait(ConditionVar glib.IOCondition, TimeoutUsVar int64, CancellableVar *Cancellable) (bool, error) { | 622 | func (x *Socket) ConditionTimedWait(ConditionVar glib.IOCondition, TimeoutUsVar int64, CancellableVar *Cancellable) (bool, error) { | ||
| 623 | + | core.LazyRegister(&xSocketConditionTimedWait, "GIO", "g_socket_condition_timed_wait", false) | |||
| 614 | var cerr *glib.Error | 624 | var cerr *glib.Error | ||
| 615 | 625 | ||||
| 616 | cret := xSocketConditionTimedWait(x.GoPointer(), ConditionVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | 626 | cret := xSocketConditionTimedWait(x.GoPointer(), ConditionVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -633,6 +643,7 @@ var xSocketConditionWait func(uintptr, glib.IOCondition, uintptr, **glib.Error) | |||||
| 633 | // | 643 | // | ||
| 634 | // See also g_socket_condition_timed_wait(). | 644 | // See also g_socket_condition_timed_wait(). | ||
| 635 | func (x *Socket) ConditionWait(ConditionVar glib.IOCondition, CancellableVar *Cancellable) (bool, error) { | 645 | func (x *Socket) ConditionWait(ConditionVar glib.IOCondition, CancellableVar *Cancellable) (bool, error) { | ||
| 646 | + | core.LazyRegister(&xSocketConditionWait, "GIO", "g_socket_condition_wait", false) | |||
| 636 | var cerr *glib.Error | 647 | var cerr *glib.Error | ||
| 637 | 648 | ||||
| 638 | cret := xSocketConditionWait(x.GoPointer(), ConditionVar, CancellableVar.GoPointer(), &cerr) | 649 | cret := xSocketConditionWait(x.GoPointer(), ConditionVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -661,6 +672,7 @@ var xSocketConnect func(uintptr, uintptr, uintptr, **glib.Error) bool | |||||
| 661 | // for the G_IO_OUT condition. The result of the connection must then be | 672 | // for the G_IO_OUT condition. The result of the connection must then be | ||
| 662 | // checked with g_socket_check_connect_result(). | 673 | // checked with g_socket_check_connect_result(). | ||
| 663 | func (x *Socket) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) (bool, error) { | 674 | func (x *Socket) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) (bool, error) { | ||
| 675 | + | core.LazyRegister(&xSocketConnect, "GIO", "g_socket_connect", false) | |||
| 664 | var cerr *glib.Error | 676 | var cerr *glib.Error | ||
| 665 | 677 | ||||
| 666 | cret := xSocketConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | 678 | cret := xSocketConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | ||
| @@ -675,6 +687,7 @@ var xSocketConnectionFactoryCreateConnection func(uintptr) uintptr | |||||
| 675 | // Creates a #GSocketConnection subclass of the right type for | 687 | // Creates a #GSocketConnection subclass of the right type for | ||
| 676 | // @socket. | 688 | // @socket. | ||
| 677 | func (x *Socket) ConnectionFactoryCreateConnection() *SocketConnection { | 689 | func (x *Socket) ConnectionFactoryCreateConnection() *SocketConnection { | ||
| 690 | + | core.LazyRegister(&xSocketConnectionFactoryCreateConnection, "GIO", "g_socket_connection_factory_create_connection", false) | |||
| 678 | var cls *SocketConnection | 691 | var cls *SocketConnection | ||
| 679 | 692 | ||||
| 680 | cret := xSocketConnectionFactoryCreateConnection(x.GoPointer()) | 693 | cret := xSocketConnectionFactoryCreateConnection(x.GoPointer()) | ||
| @@ -710,6 +723,8 @@ var xSocketCreateSource func(uintptr, glib.IOCondition, uintptr) uintptr | |||||
| 710 | // marked as having had a timeout, and so the next #GSocket I/O method | 723 | // marked as having had a timeout, and so the next #GSocket I/O method | ||
| 711 | // you call will then fail with a %G_IO_ERROR_TIMED_OUT. | 724 | // you call will then fail with a %G_IO_ERROR_TIMED_OUT. | ||
| 712 | func (x *Socket) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source { | 725 | func (x *Socket) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source { | ||
| 726 | + | core.LazyRegister(&xSocketCreateSource, "GIO", "g_socket_create_source", false) | |||
| 727 | + | ||||
| 713 | cret := xSocketCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer()) | 728 | cret := xSocketCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer()) | ||
| 714 | if cret == 0 { | 729 | if cret == 0 { | ||
| 715 | return nil | 730 | return nil | ||
| @@ -732,6 +747,8 @@ var xSocketGetAvailableBytes func(uintptr) int | |||||
| 732 | // g_socket_get_available_bytes() first and then doing a receive of | 747 | // g_socket_get_available_bytes() first and then doing a receive of | ||
| 733 | // exactly the right size. | 748 | // exactly the right size. | ||
| 734 | func (x *Socket) GetAvailableBytes() int { | 749 | func (x *Socket) GetAvailableBytes() int { | ||
| 750 | + | core.LazyRegister(&xSocketGetAvailableBytes, "GIO", "g_socket_get_available_bytes", false) | |||
| 751 | + | ||||
| 735 | cret := xSocketGetAvailableBytes(x.GoPointer()) | 752 | cret := xSocketGetAvailableBytes(x.GoPointer()) | ||
| 736 | return cret | 753 | return cret | ||
| 737 | } | 754 | } | ||
| @@ -741,6 +758,8 @@ var xSocketGetBlocking func(uintptr) bool | |||||
| 741 | // Gets the blocking mode of the socket. For details on blocking I/O, | 758 | // Gets the blocking mode of the socket. For details on blocking I/O, | ||
| 742 | // see g_socket_set_blocking(). | 759 | // see g_socket_set_blocking(). | ||
| 743 | func (x *Socket) GetBlocking() bool { | 760 | func (x *Socket) GetBlocking() bool { | ||
| 761 | + | core.LazyRegister(&xSocketGetBlocking, "GIO", "g_socket_get_blocking", false) | |||
| 762 | + | ||||
| 744 | cret := xSocketGetBlocking(x.GoPointer()) | 763 | cret := xSocketGetBlocking(x.GoPointer()) | ||
| 745 | return cret | 764 | return cret | ||
| 746 | } | 765 | } | ||
| @@ -751,6 +770,8 @@ var xSocketGetBroadcast func(uintptr) bool | |||||
| 751 | // it is possible to send packets to broadcast | 770 | // it is possible to send packets to broadcast | ||
| 752 | // addresses. | 771 | // addresses. | ||
| 753 | func (x *Socket) GetBroadcast() bool { | 772 | func (x *Socket) GetBroadcast() bool { | ||
| 773 | + | core.LazyRegister(&xSocketGetBroadcast, "GIO", "g_socket_get_broadcast", false) | |||
| 774 | + | ||||
| 754 | cret := xSocketGetBroadcast(x.GoPointer()) | 775 | cret := xSocketGetBroadcast(x.GoPointer()) | ||
| 755 | return cret | 776 | return cret | ||
| 756 | } | 777 | } | ||
| @@ -778,6 +799,7 @@ var xSocketGetCredentials func(uintptr, **glib.Error) uintptr | |||||
| 778 | // g_unix_connection_send_credentials() / | 799 | // g_unix_connection_send_credentials() / | ||
| 779 | // g_unix_connection_receive_credentials() functions. | 800 | // g_unix_connection_receive_credentials() functions. | ||
| 780 | func (x *Socket) GetCredentials() (*Credentials, error) { | 801 | func (x *Socket) GetCredentials() (*Credentials, error) { | ||
| 802 | + | core.LazyRegister(&xSocketGetCredentials, "GIO", "g_socket_get_credentials", false) | |||
| 781 | var cls *Credentials | 803 | var cls *Credentials | ||
| 782 | var cerr *glib.Error | 804 | var cerr *glib.Error | ||
| 783 | 805 | ||||
| @@ -798,6 +820,8 @@ var xSocketGetFamily func(uintptr) SocketFamily | |||||
| 798 | 820 | ||||
| 799 | // Gets the socket family of the socket. | 821 | // Gets the socket family of the socket. | ||
| 800 | func (x *Socket) GetFamily() SocketFamily { | 822 | func (x *Socket) GetFamily() SocketFamily { | ||
| 823 | + | core.LazyRegister(&xSocketGetFamily, "GIO", "g_socket_get_family", false) | |||
| 824 | + | ||||
| 801 | cret := xSocketGetFamily(x.GoPointer()) | 825 | cret := xSocketGetFamily(x.GoPointer()) | ||
| 802 | return cret | 826 | return cret | ||
| 803 | } | 827 | } | ||
| @@ -810,6 +834,8 @@ var xSocketGetFd func(uintptr) int | |||||
| 810 | // doing platform specific or otherwise unusual operations | 834 | // doing platform specific or otherwise unusual operations | ||
| 811 | // on the socket. | 835 | // on the socket. | ||
| 812 | func (x *Socket) GetFd() int { | 836 | func (x *Socket) GetFd() int { | ||
| 837 | + | core.LazyRegister(&xSocketGetFd, "GIO", "g_socket_get_fd", false) | |||
| 838 | + | ||||
| 813 | cret := xSocketGetFd(x.GoPointer()) | 839 | cret := xSocketGetFd(x.GoPointer()) | ||
| 814 | return cret | 840 | return cret | ||
| 815 | } | 841 | } | ||
| @@ -819,6 +845,8 @@ var xSocketGetKeepalive func(uintptr) bool | |||||
| 819 | // Gets the keepalive mode of the socket. For details on this, | 845 | // Gets the keepalive mode of the socket. For details on this, | ||
| 820 | // see g_socket_set_keepalive(). | 846 | // see g_socket_set_keepalive(). | ||
| 821 | func (x *Socket) GetKeepalive() bool { | 847 | func (x *Socket) GetKeepalive() bool { | ||
| 848 | + | core.LazyRegister(&xSocketGetKeepalive, "GIO", "g_socket_get_keepalive", false) | |||
| 849 | + | ||||
| 822 | cret := xSocketGetKeepalive(x.GoPointer()) | 850 | cret := xSocketGetKeepalive(x.GoPointer()) | ||
| 823 | return cret | 851 | return cret | ||
| 824 | } | 852 | } | ||
| @@ -828,6 +856,8 @@ var xSocketGetListenBacklog func(uintptr) int | |||||
| 828 | // Gets the listen backlog setting of the socket. For details on this, | 856 | // Gets the listen backlog setting of the socket. For details on this, | ||
| 829 | // see g_socket_set_listen_backlog(). | 857 | // see g_socket_set_listen_backlog(). | ||
| 830 | func (x *Socket) GetListenBacklog() int { | 858 | func (x *Socket) GetListenBacklog() int { | ||
| 859 | + | core.LazyRegister(&xSocketGetListenBacklog, "GIO", "g_socket_get_listen_backlog", false) | |||
| 860 | + | ||||
| 831 | cret := xSocketGetListenBacklog(x.GoPointer()) | 861 | cret := xSocketGetListenBacklog(x.GoPointer()) | ||
| 832 | return cret | 862 | return cret | ||
| 833 | } | 863 | } | ||
| @@ -838,6 +868,7 @@ var xSocketGetLocalAddress func(uintptr, **glib.Error) uintptr | |||||
| 838 | // useful if the socket has been bound to a local address, | 868 | // useful if the socket has been bound to a local address, | ||
| 839 | // either explicitly or implicitly when connecting. | 869 | // either explicitly or implicitly when connecting. | ||
| 840 | func (x *Socket) GetLocalAddress() (*SocketAddress, error) { | 870 | func (x *Socket) GetLocalAddress() (*SocketAddress, error) { | ||
| 871 | + | core.LazyRegister(&xSocketGetLocalAddress, "GIO", "g_socket_get_local_address", false) | |||
| 841 | var cls *SocketAddress | 872 | var cls *SocketAddress | ||
| 842 | var cerr *glib.Error | 873 | var cerr *glib.Error | ||
| 843 | 874 | ||||
| @@ -860,6 +891,8 @@ var xSocketGetMulticastLoopback func(uintptr) bool | |||||
| 860 | // default), outgoing multicast packets will be looped back to | 891 | // default), outgoing multicast packets will be looped back to | ||
| 861 | // multicast listeners on the same host. | 892 | // multicast listeners on the same host. | ||
| 862 | func (x *Socket) GetMulticastLoopback() bool { | 893 | func (x *Socket) GetMulticastLoopback() bool { | ||
| 894 | + | core.LazyRegister(&xSocketGetMulticastLoopback, "GIO", "g_socket_get_multicast_loopback", false) | |||
| 895 | + | ||||
| 863 | cret := xSocketGetMulticastLoopback(x.GoPointer()) | 896 | cret := xSocketGetMulticastLoopback(x.GoPointer()) | ||
| 864 | return cret | 897 | return cret | ||
| 865 | } | 898 | } | ||
| @@ -869,6 +902,8 @@ var xSocketGetMulticastTtl func(uintptr) uint | |||||
| 869 | // Gets the multicast time-to-live setting on @socket; see | 902 | // Gets the multicast time-to-live setting on @socket; see | ||
| 870 | // g_socket_set_multicast_ttl() for more details. | 903 | // g_socket_set_multicast_ttl() for more details. | ||
| 871 | func (x *Socket) GetMulticastTtl() uint { | 904 | func (x *Socket) GetMulticastTtl() uint { | ||
| 905 | + | core.LazyRegister(&xSocketGetMulticastTtl, "GIO", "g_socket_get_multicast_ttl", false) | |||
| 906 | + | ||||
| 872 | cret := xSocketGetMulticastTtl(x.GoPointer()) | 907 | cret := xSocketGetMulticastTtl(x.GoPointer()) | ||
| 873 | return cret | 908 | return cret | ||
| 874 | } | 909 | } | ||
| @@ -889,6 +924,7 @@ var xSocketGetOption func(uintptr, int, int, *int, **glib.Error) bool | |||||
| 889 | // @value is still a pointer to a #gint variable, not a #guchar; | 924 | // @value is still a pointer to a #gint variable, not a #guchar; | ||
| 890 | // g_socket_get_option() will handle the conversion internally. | 925 | // g_socket_get_option() will handle the conversion internally. | ||
| 891 | func (x *Socket) GetOption(LevelVar int, OptnameVar int, ValueVar *int) (bool, error) { | 926 | func (x *Socket) GetOption(LevelVar int, OptnameVar int, ValueVar *int) (bool, error) { | ||
| 927 | + | core.LazyRegister(&xSocketGetOption, "GIO", "g_socket_get_option", false) | |||
| 892 | var cerr *glib.Error | 928 | var cerr *glib.Error | ||
| 893 | 929 | ||||
| 894 | cret := xSocketGetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | 930 | cret := xSocketGetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | ||
| @@ -903,6 +939,8 @@ var xSocketGetProtocol func(uintptr) SocketProtocol | |||||
| 903 | // Gets the socket protocol id the socket was created with. | 939 | // Gets the socket protocol id the socket was created with. | ||
| 904 | // In case the protocol is unknown, -1 is returned. | 940 | // In case the protocol is unknown, -1 is returned. | ||
| 905 | func (x *Socket) GetProtocol() SocketProtocol { | 941 | func (x *Socket) GetProtocol() SocketProtocol { | ||
| 942 | + | core.LazyRegister(&xSocketGetProtocol, "GIO", "g_socket_get_protocol", false) | |||
| 943 | + | ||||
| 906 | cret := xSocketGetProtocol(x.GoPointer()) | 944 | cret := xSocketGetProtocol(x.GoPointer()) | ||
| 907 | return cret | 945 | return cret | ||
| 908 | } | 946 | } | ||
| @@ -912,6 +950,7 @@ var xSocketGetRemoteAddress func(uintptr, **glib.Error) uintptr | |||||
| 912 | // Try to get the remote address of a connected socket. This is only | 950 | // Try to get the remote address of a connected socket. This is only | ||
| 913 | // useful for connection oriented sockets that have been connected. | 951 | // useful for connection oriented sockets that have been connected. | ||
| 914 | func (x *Socket) GetRemoteAddress() (*SocketAddress, error) { | 952 | func (x *Socket) GetRemoteAddress() (*SocketAddress, error) { | ||
| 953 | + | core.LazyRegister(&xSocketGetRemoteAddress, "GIO", "g_socket_get_remote_address", false) | |||
| 915 | var cls *SocketAddress | 954 | var cls *SocketAddress | ||
| 916 | var cerr *glib.Error | 955 | var cerr *glib.Error | ||
| 917 | 956 | ||||
| @@ -932,6 +971,8 @@ var xSocketGetSocketType func(uintptr) SocketType | |||||
| 932 | 971 | ||||
| 933 | // Gets the socket type of the socket. | 972 | // Gets the socket type of the socket. | ||
| 934 | func (x *Socket) GetSocketType() SocketType { | 973 | func (x *Socket) GetSocketType() SocketType { | ||
| 974 | + | core.LazyRegister(&xSocketGetSocketType, "GIO", "g_socket_get_socket_type", false) | |||
| 975 | + | ||||
| 935 | cret := xSocketGetSocketType(x.GoPointer()) | 976 | cret := xSocketGetSocketType(x.GoPointer()) | ||
| 936 | return cret | 977 | return cret | ||
| 937 | } | 978 | } | ||
| @@ -941,6 +982,8 @@ var xSocketGetTimeout func(uintptr) uint | |||||
| 941 | // Gets the timeout setting of the socket. For details on this, see | 982 | // Gets the timeout setting of the socket. For details on this, see | ||
| 942 | // g_socket_set_timeout(). | 983 | // g_socket_set_timeout(). | ||
| 943 | func (x *Socket) GetTimeout() uint { | 984 | func (x *Socket) GetTimeout() uint { | ||
| 985 | + | core.LazyRegister(&xSocketGetTimeout, "GIO", "g_socket_get_timeout", false) | |||
| 986 | + | ||||
| 944 | cret := xSocketGetTimeout(x.GoPointer()) | 987 | cret := xSocketGetTimeout(x.GoPointer()) | ||
| 945 | return cret | 988 | return cret | ||
| 946 | } | 989 | } | ||
| @@ -950,6 +993,8 @@ var xSocketGetTtl func(uintptr) uint | |||||
| 950 | // Gets the unicast time-to-live setting on @socket; see | 993 | // Gets the unicast time-to-live setting on @socket; see | ||
| 951 | // g_socket_set_ttl() for more details. | 994 | // g_socket_set_ttl() for more details. | ||
| 952 | func (x *Socket) GetTtl() uint { | 995 | func (x *Socket) GetTtl() uint { | ||
| 996 | + | core.LazyRegister(&xSocketGetTtl, "GIO", "g_socket_get_ttl", false) | |||
| 997 | + | ||||
| 953 | cret := xSocketGetTtl(x.GoPointer()) | 998 | cret := xSocketGetTtl(x.GoPointer()) | ||
| 954 | return cret | 999 | return cret | ||
| 955 | } | 1000 | } | ||
| @@ -958,6 +1003,8 @@ var xSocketIsClosed func(uintptr) bool | |||||
| 958 | 1003 | ||||
| 959 | // Checks whether a socket is closed. | 1004 | // Checks whether a socket is closed. | ||
| 960 | func (x *Socket) IsClosed() bool { | 1005 | func (x *Socket) IsClosed() bool { | ||
| 1006 | + | core.LazyRegister(&xSocketIsClosed, "GIO", "g_socket_is_closed", false) | |||
| 1007 | + | ||||
| 961 | cret := xSocketIsClosed(x.GoPointer()) | 1008 | cret := xSocketIsClosed(x.GoPointer()) | ||
| 962 | return cret | 1009 | return cret | ||
| 963 | } | 1010 | } | ||
| @@ -972,6 +1019,8 @@ var xSocketIsConnected func(uintptr) bool | |||||
| 972 | // connect, this function will not return %TRUE until after you call | 1019 | // connect, this function will not return %TRUE until after you call | ||
| 973 | // g_socket_check_connect_result(). | 1020 | // g_socket_check_connect_result(). | ||
| 974 | func (x *Socket) IsConnected() bool { | 1021 | func (x *Socket) IsConnected() bool { | ||
| 1022 | + | core.LazyRegister(&xSocketIsConnected, "GIO", "g_socket_is_connected", false) | |||
| 1023 | + | ||||
| 975 | cret := xSocketIsConnected(x.GoPointer()) | 1024 | cret := xSocketIsConnected(x.GoPointer()) | ||
| 976 | return cret | 1025 | return cret | ||
| 977 | } | 1026 | } | ||
| @@ -993,6 +1042,7 @@ var xSocketJoinMulticastGroup func(uintptr, uintptr, bool, uintptr, **glib.Error | |||||
| 993 | // To bind to a given source-specific multicast address, use | 1042 | // To bind to a given source-specific multicast address, use | ||
| 994 | // g_socket_join_multicast_group_ssm() instead. | 1043 | // g_socket_join_multicast_group_ssm() instead. | ||
| 995 | func (x *Socket) JoinMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | 1044 | func (x *Socket) JoinMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | ||
| 1045 | + | core.LazyRegister(&xSocketJoinMulticastGroup, "GIO", "g_socket_join_multicast_group", false) | |||
| 996 | var cerr *glib.Error | 1046 | var cerr *glib.Error | ||
| 997 | 1047 | ||||
| 998 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | 1048 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | ||
| @@ -1023,6 +1073,7 @@ var xSocketJoinMulticastGroupSsm func(uintptr, uintptr, uintptr, uintptr, **glib | |||||
| 1023 | // @group with different @source_specific in order to receive multicast | 1073 | // @group with different @source_specific in order to receive multicast | ||
| 1024 | // packets from more than one source. | 1074 | // packets from more than one source. | ||
| 1025 | func (x *Socket) JoinMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | 1075 | func (x *Socket) JoinMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | ||
| 1076 | + | core.LazyRegister(&xSocketJoinMulticastGroupSsm, "GIO", "g_socket_join_multicast_group_ssm", false) | |||
| 1026 | var cerr *glib.Error | 1077 | var cerr *glib.Error | ||
| 1027 | 1078 | ||||
| 1028 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | 1079 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | ||
| @@ -1047,6 +1098,7 @@ var xSocketLeaveMulticastGroup func(uintptr, uintptr, bool, uintptr, **glib.Erro | |||||
| 1047 | // To unbind to a given source-specific multicast address, use | 1098 | // To unbind to a given source-specific multicast address, use | ||
| 1048 | // g_socket_leave_multicast_group_ssm() instead. | 1099 | // g_socket_leave_multicast_group_ssm() instead. | ||
| 1049 | func (x *Socket) LeaveMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | 1100 | func (x *Socket) LeaveMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar *string) (bool, error) { | ||
| 1101 | + | core.LazyRegister(&xSocketLeaveMulticastGroup, "GIO", "g_socket_leave_multicast_group", false) | |||
| 1050 | var cerr *glib.Error | 1102 | var cerr *glib.Error | ||
| 1051 | 1103 | ||||
| 1052 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | 1104 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | ||
| @@ -1068,6 +1120,7 @@ var xSocketLeaveMulticastGroupSsm func(uintptr, uintptr, uintptr, uintptr, **gli | |||||
| 1068 | // @socket remains bound to its address and port, and can still receive | 1120 | // @socket remains bound to its address and port, and can still receive | ||
| 1069 | // unicast messages after calling this. | 1121 | // unicast messages after calling this. | ||
| 1070 | func (x *Socket) LeaveMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | 1122 | func (x *Socket) LeaveMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar *string) (bool, error) { | ||
| 1123 | + | core.LazyRegister(&xSocketLeaveMulticastGroupSsm, "GIO", "g_socket_leave_multicast_group_ssm", false) | |||
| 1071 | var cerr *glib.Error | 1124 | var cerr *glib.Error | ||
| 1072 | 1125 | ||||
| 1073 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | 1126 | IfaceVarPtr := core.GStrdupNullable(IfaceVar) | ||
| @@ -1091,6 +1144,7 @@ var xSocketListen func(uintptr, **glib.Error) bool | |||||
| 1091 | // To set the maximum amount of outstanding clients, use | 1144 | // To set the maximum amount of outstanding clients, use | ||
| 1092 | // g_socket_set_listen_backlog(). | 1145 | // g_socket_set_listen_backlog(). | ||
| 1093 | func (x *Socket) Listen() (bool, error) { | 1146 | func (x *Socket) Listen() (bool, error) { | ||
| 1147 | + | core.LazyRegister(&xSocketListen, "GIO", "g_socket_listen", false) | |||
| 1094 | var cerr *glib.Error | 1148 | var cerr *glib.Error | ||
| 1095 | 1149 | ||||
| 1096 | cret := xSocketListen(x.GoPointer(), &cerr) | 1150 | cret := xSocketListen(x.GoPointer(), &cerr) | ||
| @@ -1126,6 +1180,7 @@ var xSocketReceive func(uintptr, *[]byte, uint, uintptr, **glib.Error) int | |||||
| 1126 | // | 1180 | // | ||
| 1127 | // On error -1 is returned and @error is set accordingly. | 1181 | // On error -1 is returned and @error is set accordingly. | ||
| 1128 | func (x *Socket) Receive(BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | 1182 | func (x *Socket) Receive(BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | ||
| 1183 | + | core.LazyRegister(&xSocketReceive, "GIO", "g_socket_receive", false) | |||
| 1129 | var cerr *glib.Error | 1184 | var cerr *glib.Error | ||
| 1130 | 1185 | ||||
| 1131 | cret := xSocketReceive(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | 1186 | cret := xSocketReceive(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1147,6 +1202,7 @@ var xSocketReceiveBytes func(uintptr, uint, int64, uintptr, **glib.Error) uintpt | |||||
| 1147 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | 1202 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | ||
| 1148 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | 1203 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | ||
| 1149 | func (x *Socket) ReceiveBytes(SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | 1204 | func (x *Socket) ReceiveBytes(SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | ||
| 1205 | + | core.LazyRegister(&xSocketReceiveBytes, "GIO", "g_socket_receive_bytes", false) | |||
| 1150 | var cerr *glib.Error | 1206 | var cerr *glib.Error | ||
| 1151 | 1207 | ||||
| 1152 | cret := xSocketReceiveBytes(x.GoPointer(), SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | 1208 | cret := xSocketReceiveBytes(x.GoPointer(), SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1176,6 +1232,7 @@ var xSocketReceiveBytesFrom func(uintptr, **SocketAddress, uint, int64, uintptr, | |||||
| 1176 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | 1232 | // timeout from [property@Gio.Socket:timeout], or pass a positive number to wait | ||
| 1177 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | 1233 | // for that many microseconds for data before returning `G_IO_ERROR_TIMED_OUT`. | ||
| 1178 | func (x *Socket) ReceiveBytesFrom(AddressVar **SocketAddress, SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | 1234 | func (x *Socket) ReceiveBytesFrom(AddressVar **SocketAddress, SizeVar uint, TimeoutUsVar int64, CancellableVar *Cancellable) (*glib.Bytes, error) { | ||
| 1235 | + | core.LazyRegister(&xSocketReceiveBytesFrom, "GIO", "g_socket_receive_bytes_from", false) | |||
| 1179 | var cerr *glib.Error | 1236 | var cerr *glib.Error | ||
| 1180 | 1237 | ||||
| 1181 | cret := xSocketReceiveBytesFrom(x.GoPointer(), AddressVar, SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | 1238 | cret := xSocketReceiveBytesFrom(x.GoPointer(), AddressVar, SizeVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1198,6 +1255,7 @@ var xSocketReceiveFrom func(uintptr, **SocketAddress, *[]byte, uint, uintptr, ** | |||||
| 1198 | // | 1255 | // | ||
| 1199 | // See g_socket_receive() for additional information. | 1256 | // See g_socket_receive() for additional information. | ||
| 1200 | func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | 1257 | func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar *[]byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | ||
| 1258 | + | core.LazyRegister(&xSocketReceiveFrom, "GIO", "g_socket_receive_from", false) | |||
| 1201 | var cerr *glib.Error | 1259 | var cerr *glib.Error | ||
| 1202 | 1260 | ||||
| 1203 | cret := xSocketReceiveFrom(x.GoPointer(), AddressVar, BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | 1261 | cret := xSocketReceiveFrom(x.GoPointer(), AddressVar, BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1269,6 +1327,7 @@ var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *ui | |||||
| 1269 | // | 1327 | // | ||
| 1270 | // On error -1 is returned and @error is set accordingly. | 1328 | // On error -1 is returned and @error is set accordingly. | ||
| 1271 | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar *int, CancellableVar *Cancellable) (int, error) { | 1329 | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar *int, CancellableVar *Cancellable) (int, error) { | ||
| 1330 | + | core.LazyRegister(&xSocketReceiveMessage, "GIO", "g_socket_receive_message", false) | |||
| 1272 | var cerr *glib.Error | 1331 | var cerr *glib.Error | ||
| 1273 | 1332 | ||||
| 1274 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | 1333 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1329,6 +1388,7 @@ var xSocketReceiveMessages func(uintptr, []InputMessage, uint, int, uintptr, **g | |||||
| 1329 | // be returned if zero messages could be received; otherwise the number of | 1388 | // be returned if zero messages could be received; otherwise the number of | ||
| 1330 | // messages successfully received before the error will be returned. | 1389 | // messages successfully received before the error will be returned. | ||
| 1331 | func (x *Socket) ReceiveMessages(MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | 1390 | func (x *Socket) ReceiveMessages(MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | ||
| 1391 | + | core.LazyRegister(&xSocketReceiveMessages, "GIO", "g_socket_receive_messages", false) | |||
| 1332 | var cerr *glib.Error | 1392 | var cerr *glib.Error | ||
| 1333 | 1393 | ||||
| 1334 | cret := xSocketReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | 1394 | cret := xSocketReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1344,6 +1404,7 @@ var xSocketReceiveWithBlocking func(uintptr, *[]byte, uint, bool, uintptr, **gli | |||||
| 1344 | // the choice of blocking or non-blocking behavior is determined by | 1404 | // the choice of blocking or non-blocking behavior is determined by | ||
| 1345 | // the @blocking argument rather than by @socket's properties. | 1405 | // the @blocking argument rather than by @socket's properties. | ||
| 1346 | func (x *Socket) ReceiveWithBlocking(BufferVar *[]byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | 1406 | func (x *Socket) ReceiveWithBlocking(BufferVar *[]byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | ||
| 1407 | + | core.LazyRegister(&xSocketReceiveWithBlocking, "GIO", "g_socket_receive_with_blocking", false) | |||
| 1347 | var cerr *glib.Error | 1408 | var cerr *glib.Error | ||
| 1348 | 1409 | ||||
| 1349 | cret := xSocketReceiveWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | 1410 | cret := xSocketReceiveWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1370,6 +1431,7 @@ var xSocketSend func(uintptr, []byte, uint, uintptr, **glib.Error) int | |||||
| 1370 | // | 1431 | // | ||
| 1371 | // On error -1 is returned and @error is set accordingly. | 1432 | // On error -1 is returned and @error is set accordingly. | ||
| 1372 | func (x *Socket) Send(BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | 1433 | func (x *Socket) Send(BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | ||
| 1434 | + | core.LazyRegister(&xSocketSend, "GIO", "g_socket_send", false) | |||
| 1373 | var cerr *glib.Error | 1435 | var cerr *glib.Error | ||
| 1374 | 1436 | ||||
| 1375 | cret := xSocketSend(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | 1437 | cret := xSocketSend(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1424,6 +1486,7 @@ var xSocketSendMessage func(uintptr, uintptr, []OutputVector, int, uintptr, int, | |||||
| 1424 | // | 1486 | // | ||
| 1425 | // On error -1 is returned and @error is set accordingly. | 1487 | // On error -1 is returned and @error is set accordingly. | ||
| 1426 | func (x *Socket) SendMessage(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) (int, error) { | 1488 | func (x *Socket) SendMessage(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) (int, error) { | ||
| 1489 | + | core.LazyRegister(&xSocketSendMessage, "GIO", "g_socket_send_message", false) | |||
| 1427 | var cerr *glib.Error | 1490 | var cerr *glib.Error | ||
| 1428 | 1491 | ||||
| 1429 | cret := xSocketSendMessage(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | 1492 | cret := xSocketSendMessage(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1443,6 +1506,7 @@ var xSocketSendMessageWithTimeout func(uintptr, uintptr, []OutputVector, int, ui | |||||
| 1443 | // if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is | 1506 | // if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is | ||
| 1444 | // returned. @bytes_written will contain 0 in both cases. | 1507 | // returned. @bytes_written will contain 0 in both cases. | ||
| 1445 | func (x *Socket) SendMessageWithTimeout(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, TimeoutUsVar int64, BytesWrittenVar *uint, CancellableVar *Cancellable) (PollableReturn, error) { | 1508 | func (x *Socket) SendMessageWithTimeout(AddressVar *SocketAddress, VectorsVar []OutputVector, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, TimeoutUsVar int64, BytesWrittenVar *uint, CancellableVar *Cancellable) (PollableReturn, error) { | ||
| 1509 | + | core.LazyRegister(&xSocketSendMessageWithTimeout, "GIO", "g_socket_send_message_with_timeout", false) | |||
| 1446 | var cerr *glib.Error | 1510 | var cerr *glib.Error | ||
| 1447 | 1511 | ||||
| 1448 | cret := xSocketSendMessageWithTimeout(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, TimeoutUsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | 1512 | cret := xSocketSendMessageWithTimeout(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, TimeoutUsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1489,6 +1553,7 @@ var xSocketSendMessages func(uintptr, []OutputMessage, uint, int, uintptr, **gli | |||||
| 1489 | // be returned if zero messages could be sent; otherwise the number of messages | 1553 | // be returned if zero messages could be sent; otherwise the number of messages | ||
| 1490 | // successfully sent before the error will be returned. | 1554 | // successfully sent before the error will be returned. | ||
| 1491 | func (x *Socket) SendMessages(MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | 1555 | func (x *Socket) SendMessages(MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) { | ||
| 1556 | + | core.LazyRegister(&xSocketSendMessages, "GIO", "g_socket_send_messages", false) | |||
| 1492 | var cerr *glib.Error | 1557 | var cerr *glib.Error | ||
| 1493 | 1558 | ||||
| 1494 | cret := xSocketSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | 1559 | cret := xSocketSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1506,6 +1571,7 @@ var xSocketSendTo func(uintptr, uintptr, []byte, uint, uintptr, **glib.Error) in | |||||
| 1506 | // | 1571 | // | ||
| 1507 | // See g_socket_send() for additional information. | 1572 | // See g_socket_send() for additional information. | ||
| 1508 | func (x *Socket) SendTo(AddressVar *SocketAddress, BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | 1573 | func (x *Socket) SendTo(AddressVar *SocketAddress, BufferVar []byte, SizeVar uint, CancellableVar *Cancellable) (int, error) { | ||
| 1574 | + | core.LazyRegister(&xSocketSendTo, "GIO", "g_socket_send_to", false) | |||
| 1509 | var cerr *glib.Error | 1575 | var cerr *glib.Error | ||
| 1510 | 1576 | ||||
| 1511 | cret := xSocketSendTo(x.GoPointer(), AddressVar.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | 1577 | cret := xSocketSendTo(x.GoPointer(), AddressVar.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1521,6 +1587,7 @@ var xSocketSendWithBlocking func(uintptr, []byte, uint, bool, uintptr, **glib.Er | |||||
| 1521 | // the choice of blocking or non-blocking behavior is determined by | 1587 | // the choice of blocking or non-blocking behavior is determined by | ||
| 1522 | // the @blocking argument rather than by @socket's properties. | 1588 | // the @blocking argument rather than by @socket's properties. | ||
| 1523 | func (x *Socket) SendWithBlocking(BufferVar []byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | 1589 | func (x *Socket) SendWithBlocking(BufferVar []byte, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) { | ||
| 1590 | + | core.LazyRegister(&xSocketSendWithBlocking, "GIO", "g_socket_send_with_blocking", false) | |||
| 1524 | var cerr *glib.Error | 1591 | var cerr *glib.Error | ||
| 1525 | 1592 | ||||
| 1526 | cret := xSocketSendWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | 1593 | cret := xSocketSendWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1542,6 +1609,8 @@ var xSocketSetBlocking func(uintptr, bool) | |||||
| 1542 | // platform level socket is always non-blocking, and blocking mode | 1609 | // platform level socket is always non-blocking, and blocking mode | ||
| 1543 | // is a GSocket level feature. | 1610 | // is a GSocket level feature. | ||
| 1544 | func (x *Socket) SetBlocking(BlockingVar bool) { | 1611 | func (x *Socket) SetBlocking(BlockingVar bool) { | ||
| 1612 | + | core.LazyRegister(&xSocketSetBlocking, "GIO", "g_socket_set_blocking", false) | |||
| 1613 | + | ||||
| 1545 | xSocketSetBlocking(x.GoPointer(), BlockingVar) | 1614 | xSocketSetBlocking(x.GoPointer(), BlockingVar) | ||
| 1546 | } | 1615 | } | ||
| 1547 | 1616 | ||||
| @@ -1550,6 +1619,8 @@ var xSocketSetBroadcast func(uintptr, bool) | |||||
| 1550 | // Sets whether @socket should allow sending to broadcast addresses. | 1619 | // Sets whether @socket should allow sending to broadcast addresses. | ||
| 1551 | // This is %FALSE by default. | 1620 | // This is %FALSE by default. | ||
| 1552 | func (x *Socket) SetBroadcast(BroadcastVar bool) { | 1621 | func (x *Socket) SetBroadcast(BroadcastVar bool) { | ||
| 1622 | + | core.LazyRegister(&xSocketSetBroadcast, "GIO", "g_socket_set_broadcast", false) | |||
| 1623 | + | ||||
| 1553 | xSocketSetBroadcast(x.GoPointer(), BroadcastVar) | 1624 | xSocketSetBroadcast(x.GoPointer(), BroadcastVar) | ||
| 1554 | } | 1625 | } | ||
| 1555 | 1626 | ||||
| @@ -1571,6 +1642,8 @@ var xSocketSetKeepalive func(uintptr, bool) | |||||
| 1571 | // periods of time, but also want to ensure that connections are eventually | 1642 | // periods of time, but also want to ensure that connections are eventually | ||
| 1572 | // garbage-collected if clients crash or become unreachable. | 1643 | // garbage-collected if clients crash or become unreachable. | ||
| 1573 | func (x *Socket) SetKeepalive(KeepaliveVar bool) { | 1644 | func (x *Socket) SetKeepalive(KeepaliveVar bool) { | ||
| 1645 | + | core.LazyRegister(&xSocketSetKeepalive, "GIO", "g_socket_set_keepalive", false) | |||
| 1646 | + | ||||
| 1574 | xSocketSetKeepalive(x.GoPointer(), KeepaliveVar) | 1647 | xSocketSetKeepalive(x.GoPointer(), KeepaliveVar) | ||
| 1575 | } | 1648 | } | ||
| 1576 | 1649 | ||||
| @@ -1584,6 +1657,8 @@ var xSocketSetListenBacklog func(uintptr, int) | |||||
| 1584 | // Note that this must be called before g_socket_listen() and has no | 1657 | // Note that this must be called before g_socket_listen() and has no | ||
| 1585 | // effect if called after that. | 1658 | // effect if called after that. | ||
| 1586 | func (x *Socket) SetListenBacklog(BacklogVar int) { | 1659 | func (x *Socket) SetListenBacklog(BacklogVar int) { | ||
| 1660 | + | core.LazyRegister(&xSocketSetListenBacklog, "GIO", "g_socket_set_listen_backlog", false) | |||
| 1661 | + | ||||
| 1587 | xSocketSetListenBacklog(x.GoPointer(), BacklogVar) | 1662 | xSocketSetListenBacklog(x.GoPointer(), BacklogVar) | ||
| 1588 | } | 1663 | } | ||
| 1589 | 1664 | ||||
| @@ -1593,6 +1668,8 @@ var xSocketSetMulticastLoopback func(uintptr, bool) | |||||
| 1593 | // listening on that multicast address on the same host. This is %TRUE | 1668 | // listening on that multicast address on the same host. This is %TRUE | ||
| 1594 | // by default. | 1669 | // by default. | ||
| 1595 | func (x *Socket) SetMulticastLoopback(LoopbackVar bool) { | 1670 | func (x *Socket) SetMulticastLoopback(LoopbackVar bool) { | ||
| 1671 | + | core.LazyRegister(&xSocketSetMulticastLoopback, "GIO", "g_socket_set_multicast_loopback", false) | |||
| 1672 | + | ||||
| 1596 | xSocketSetMulticastLoopback(x.GoPointer(), LoopbackVar) | 1673 | xSocketSetMulticastLoopback(x.GoPointer(), LoopbackVar) | ||
| 1597 | } | 1674 | } | ||
| 1598 | 1675 | ||||
| @@ -1602,6 +1679,8 @@ var xSocketSetMulticastTtl func(uintptr, uint) | |||||
| 1602 | // By default, this is 1, meaning that multicast packets will not leave | 1679 | // By default, this is 1, meaning that multicast packets will not leave | ||
| 1603 | // the local network. | 1680 | // the local network. | ||
| 1604 | func (x *Socket) SetMulticastTtl(TtlVar uint) { | 1681 | func (x *Socket) SetMulticastTtl(TtlVar uint) { | ||
| 1682 | + | core.LazyRegister(&xSocketSetMulticastTtl, "GIO", "g_socket_set_multicast_ttl", false) | |||
| 1683 | + | ||||
| 1605 | xSocketSetMulticastTtl(x.GoPointer(), TtlVar) | 1684 | xSocketSetMulticastTtl(x.GoPointer(), TtlVar) | ||
| 1606 | } | 1685 | } | ||
| 1607 | 1686 | ||||
| @@ -1617,6 +1696,7 @@ var xSocketSetOption func(uintptr, int, int, int, **glib.Error) bool | |||||
| 1617 | // platform-dependent options, you may need to include additional | 1696 | // platform-dependent options, you may need to include additional | ||
| 1618 | // headers. | 1697 | // headers. | ||
| 1619 | func (x *Socket) SetOption(LevelVar int, OptnameVar int, ValueVar int) (bool, error) { | 1698 | func (x *Socket) SetOption(LevelVar int, OptnameVar int, ValueVar int) (bool, error) { | ||
| 1699 | + | core.LazyRegister(&xSocketSetOption, "GIO", "g_socket_set_option", false) | |||
| 1620 | var cerr *glib.Error | 1700 | var cerr *glib.Error | ||
| 1621 | 1701 | ||||
| 1622 | cret := xSocketSetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | 1702 | cret := xSocketSetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr) | ||
| @@ -1649,6 +1729,8 @@ var xSocketSetTimeout func(uintptr, uint) | |||||
| 1649 | // Note that if an I/O operation is interrupted by a signal, this may | 1729 | // Note that if an I/O operation is interrupted by a signal, this may | ||
| 1650 | // cause the timeout to be reset. | 1730 | // cause the timeout to be reset. | ||
| 1651 | func (x *Socket) SetTimeout(TimeoutVar uint) { | 1731 | func (x *Socket) SetTimeout(TimeoutVar uint) { | ||
| 1732 | + | core.LazyRegister(&xSocketSetTimeout, "GIO", "g_socket_set_timeout", false) | |||
| 1733 | + | ||||
| 1652 | xSocketSetTimeout(x.GoPointer(), TimeoutVar) | 1734 | xSocketSetTimeout(x.GoPointer(), TimeoutVar) | ||
| 1653 | } | 1735 | } | ||
| 1654 | 1736 | ||||
| @@ -1657,6 +1739,8 @@ var xSocketSetTtl func(uintptr, uint) | |||||
| 1657 | // Sets the time-to-live for outgoing unicast packets on @socket. | 1739 | // Sets the time-to-live for outgoing unicast packets on @socket. | ||
| 1658 | // By default the platform-specific default value is used. | 1740 | // By default the platform-specific default value is used. | ||
| 1659 | func (x *Socket) SetTtl(TtlVar uint) { | 1741 | func (x *Socket) SetTtl(TtlVar uint) { | ||
| 1742 | + | core.LazyRegister(&xSocketSetTtl, "GIO", "g_socket_set_ttl", false) | |||
| 1743 | + | ||||
| 1660 | xSocketSetTtl(x.GoPointer(), TtlVar) | 1744 | xSocketSetTtl(x.GoPointer(), TtlVar) | ||
| 1661 | } | 1745 | } | ||
| 1662 | 1746 | ||||
| @@ -1677,6 +1761,7 @@ var xSocketShutdown func(uintptr, bool, bool, **glib.Error) bool | |||||
| 1677 | // then wait for the other side to close the connection, thus ensuring that the | 1761 | // then wait for the other side to close the connection, thus ensuring that the | ||
| 1678 | // other side saw all sent data. | 1762 | // other side saw all sent data. | ||
| 1679 | func (x *Socket) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool) (bool, error) { | 1763 | func (x *Socket) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool) (bool, error) { | ||
| 1764 | + | core.LazyRegister(&xSocketShutdown, "GIO", "g_socket_shutdown", false) | |||
| 1680 | var cerr *glib.Error | 1765 | var cerr *glib.Error | ||
| 1681 | 1766 | ||||
| 1682 | cret := xSocketShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, &cerr) | 1767 | cret := xSocketShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, &cerr) | ||
| @@ -1698,6 +1783,8 @@ var xSocketSpeaksIpv4 func(uintptr) bool | |||||
| 1698 | // No other types of sockets are currently considered as being capable | 1783 | // No other types of sockets are currently considered as being capable | ||
| 1699 | // of speaking IPv4. | 1784 | // of speaking IPv4. | ||
| 1700 | func (x *Socket) SpeaksIpv4() bool { | 1785 | func (x *Socket) SpeaksIpv4() bool { | ||
| 1786 | + | core.LazyRegister(&xSocketSpeaksIpv4, "GIO", "g_socket_speaks_ipv4", false) | |||
| 1787 | + | ||||
| 1701 | cret := xSocketSpeaksIpv4(x.GoPointer()) | 1788 | cret := xSocketSpeaksIpv4(x.GoPointer()) | ||
| 1702 | return cret | 1789 | return cret | ||
| 1703 | } | 1790 | } | ||
| @@ -1917,76 +2004,4 @@ func (x *Socket) Init(CancellableVar *Cancellable) (bool, error) { | |||||
| 1917 | func init() { | 2004 | func init() { | ||
| 1918 | core.SetPackageName("GIO", "gio-2.0") | 2005 | core.SetPackageName("GIO", "gio-2.0") | ||
| 1919 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | 2006 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | ||
| 1920 | - | var libs []uintptr | |||
| 1921 | - | for _, libPath := range core.GetPaths("GIO") { | |||
| 1922 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1923 | - | if err != nil { | |||
| 1924 | - | panic(err) | |||
| 1925 | - | } | |||
| 1926 | - | libs = append(libs, lib) | |||
| 1927 | - | } | |||
| 1928 | - | ||||
| 1929 | - | core.PuregoSafeRegister(&xSocketGLibType, libs, "g_socket_get_type") | |||
| 1930 | - | ||||
| 1931 | - | core.PuregoSafeRegister(&xNewSocket, libs, "g_socket_new") | |||
| 1932 | - | core.PuregoSafeRegister(&xNewSocketFromFd, libs, "g_socket_new_from_fd") | |||
| 1933 | - | ||||
| 1934 | - | core.PuregoSafeRegister(&xSocketAccept, libs, "g_socket_accept") | |||
| 1935 | - | core.PuregoSafeRegister(&xSocketBind, libs, "g_socket_bind") | |||
| 1936 | - | core.PuregoSafeRegister(&xSocketCheckConnectResult, libs, "g_socket_check_connect_result") | |||
| 1937 | - | core.PuregoSafeRegister(&xSocketClose, libs, "g_socket_close") | |||
| 1938 | - | core.PuregoSafeRegister(&xSocketConditionCheck, libs, "g_socket_condition_check") | |||
| 1939 | - | core.PuregoSafeRegister(&xSocketConditionTimedWait, libs, "g_socket_condition_timed_wait") | |||
| 1940 | - | core.PuregoSafeRegister(&xSocketConditionWait, libs, "g_socket_condition_wait") | |||
| 1941 | - | core.PuregoSafeRegister(&xSocketConnect, libs, "g_socket_connect") | |||
| 1942 | - | core.PuregoSafeRegister(&xSocketConnectionFactoryCreateConnection, libs, "g_socket_connection_factory_create_connection") | |||
| 1943 | - | core.PuregoSafeRegister(&xSocketCreateSource, libs, "g_socket_create_source") | |||
| 1944 | - | core.PuregoSafeRegister(&xSocketGetAvailableBytes, libs, "g_socket_get_available_bytes") | |||
| 1945 | - | core.PuregoSafeRegister(&xSocketGetBlocking, libs, "g_socket_get_blocking") | |||
| 1946 | - | core.PuregoSafeRegister(&xSocketGetBroadcast, libs, "g_socket_get_broadcast") | |||
| 1947 | - | core.PuregoSafeRegister(&xSocketGetCredentials, libs, "g_socket_get_credentials") | |||
| 1948 | - | core.PuregoSafeRegister(&xSocketGetFamily, libs, "g_socket_get_family") | |||
| 1949 | - | core.PuregoSafeRegister(&xSocketGetFd, libs, "g_socket_get_fd") | |||
| 1950 | - | core.PuregoSafeRegister(&xSocketGetKeepalive, libs, "g_socket_get_keepalive") | |||
| 1951 | - | core.PuregoSafeRegister(&xSocketGetListenBacklog, libs, "g_socket_get_listen_backlog") | |||
| 1952 | - | core.PuregoSafeRegister(&xSocketGetLocalAddress, libs, "g_socket_get_local_address") | |||
| 1953 | - | core.PuregoSafeRegister(&xSocketGetMulticastLoopback, libs, "g_socket_get_multicast_loopback") | |||
| 1954 | - | core.PuregoSafeRegister(&xSocketGetMulticastTtl, libs, "g_socket_get_multicast_ttl") | |||
| 1955 | - | core.PuregoSafeRegister(&xSocketGetOption, libs, "g_socket_get_option") | |||
| 1956 | - | core.PuregoSafeRegister(&xSocketGetProtocol, libs, "g_socket_get_protocol") | |||
| 1957 | - | core.PuregoSafeRegister(&xSocketGetRemoteAddress, libs, "g_socket_get_remote_address") | |||
| 1958 | - | core.PuregoSafeRegister(&xSocketGetSocketType, libs, "g_socket_get_socket_type") | |||
| 1959 | - | core.PuregoSafeRegister(&xSocketGetTimeout, libs, "g_socket_get_timeout") | |||
| 1960 | - | core.PuregoSafeRegister(&xSocketGetTtl, libs, "g_socket_get_ttl") | |||
| 1961 | - | core.PuregoSafeRegister(&xSocketIsClosed, libs, "g_socket_is_closed") | |||
| 1962 | - | core.PuregoSafeRegister(&xSocketIsConnected, libs, "g_socket_is_connected") | |||
| 1963 | - | core.PuregoSafeRegister(&xSocketJoinMulticastGroup, libs, "g_socket_join_multicast_group") | |||
| 1964 | - | core.PuregoSafeRegister(&xSocketJoinMulticastGroupSsm, libs, "g_socket_join_multicast_group_ssm") | |||
| 1965 | - | core.PuregoSafeRegister(&xSocketLeaveMulticastGroup, libs, "g_socket_leave_multicast_group") | |||
| 1966 | - | core.PuregoSafeRegister(&xSocketLeaveMulticastGroupSsm, libs, "g_socket_leave_multicast_group_ssm") | |||
| 1967 | - | core.PuregoSafeRegister(&xSocketListen, libs, "g_socket_listen") | |||
| 1968 | - | core.PuregoSafeRegister(&xSocketReceive, libs, "g_socket_receive") | |||
| 1969 | - | core.PuregoSafeRegister(&xSocketReceiveBytes, libs, "g_socket_receive_bytes") | |||
| 1970 | - | core.PuregoSafeRegister(&xSocketReceiveBytesFrom, libs, "g_socket_receive_bytes_from") | |||
| 1971 | - | core.PuregoSafeRegister(&xSocketReceiveFrom, libs, "g_socket_receive_from") | |||
| 1972 | - | core.PuregoSafeRegister(&xSocketReceiveMessage, libs, "g_socket_receive_message") | |||
| 1973 | - | core.PuregoSafeRegister(&xSocketReceiveMessages, libs, "g_socket_receive_messages") | |||
| 1974 | - | core.PuregoSafeRegister(&xSocketReceiveWithBlocking, libs, "g_socket_receive_with_blocking") | |||
| 1975 | - | core.PuregoSafeRegister(&xSocketSend, libs, "g_socket_send") | |||
| 1976 | - | core.PuregoSafeRegister(&xSocketSendMessage, libs, "g_socket_send_message") | |||
| 1977 | - | core.PuregoSafeRegister(&xSocketSendMessageWithTimeout, libs, "g_socket_send_message_with_timeout") | |||
| 1978 | - | core.PuregoSafeRegister(&xSocketSendMessages, libs, "g_socket_send_messages") | |||
| 1979 | - | core.PuregoSafeRegister(&xSocketSendTo, libs, "g_socket_send_to") | |||
| 1980 | - | core.PuregoSafeRegister(&xSocketSendWithBlocking, libs, "g_socket_send_with_blocking") | |||
| 1981 | - | core.PuregoSafeRegister(&xSocketSetBlocking, libs, "g_socket_set_blocking") | |||
| 1982 | - | core.PuregoSafeRegister(&xSocketSetBroadcast, libs, "g_socket_set_broadcast") | |||
| 1983 | - | core.PuregoSafeRegister(&xSocketSetKeepalive, libs, "g_socket_set_keepalive") | |||
| 1984 | - | core.PuregoSafeRegister(&xSocketSetListenBacklog, libs, "g_socket_set_listen_backlog") | |||
| 1985 | - | core.PuregoSafeRegister(&xSocketSetMulticastLoopback, libs, "g_socket_set_multicast_loopback") | |||
| 1986 | - | core.PuregoSafeRegister(&xSocketSetMulticastTtl, libs, "g_socket_set_multicast_ttl") | |||
| 1987 | - | core.PuregoSafeRegister(&xSocketSetOption, libs, "g_socket_set_option") | |||
| 1988 | - | core.PuregoSafeRegister(&xSocketSetTimeout, libs, "g_socket_set_timeout") | |||
| 1989 | - | core.PuregoSafeRegister(&xSocketSetTtl, libs, "g_socket_set_ttl") | |||
| 1990 | - | core.PuregoSafeRegister(&xSocketShutdown, libs, "g_socket_shutdown") | |||
| 1991 | - | core.PuregoSafeRegister(&xSocketSpeaksIpv4, libs, "g_socket_speaks_ipv4") | |||
| 1992 | } | 2007 | } | ||