From 3b5d143dc5da78f9506268334d13d170b048417a Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 5 Jun 2017 14:00:40 -0700 Subject: [PATCH] client: add application oem attribute --- omaha/client/client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/omaha/client/client.go b/omaha/client/client.go index 1cbf163..a4a6fc6 100644 --- a/omaha/client/client.go +++ b/omaha/client/client.go @@ -53,6 +53,7 @@ type AppClient struct { appID string track string version string + oem string } // New creates an omaha client for updating one or more applications. @@ -178,6 +179,12 @@ func (ac *AppClient) SetTrack(track string) error { return nil } +// SetOEM sets the application OEM name. +// This is a update_engine/Core Update protocol extension. +func (ac *AppClient) SetOEM(oem string) { + ac.oem = oem +} + func (ac *AppClient) UpdateCheck() (*omaha.UpdateResponse, error) { req := ac.newReq() app := req.Apps[0] @@ -265,6 +272,7 @@ func (ac *AppClient) newReq() *omaha.Request { app := req.AddApp(ac.appID, ac.version) app.Track = ac.track + app.OEM = ac.oem // MachineID and BootID are non-standard fields used by CoreOS' // update_engine and Core Update. Copy their values from the