2020-01-22 20:00:07 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2016-10-29 22:22:20 +00:00
|
|
|
using System.Collections.Generic;
|
2019-01-13 19:16:19 +00:00
|
|
|
using Emby.Dlna.Common;
|
2016-10-29 22:22:20 +00:00
|
|
|
|
2016-10-29 22:34:54 +00:00
|
|
|
namespace Emby.Dlna.MediaReceiverRegistrar
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
public class ServiceActionListBuilder
|
|
|
|
{
|
|
|
|
public IEnumerable<ServiceAction> GetActions()
|
|
|
|
{
|
2019-01-13 19:16:19 +00:00
|
|
|
return new[]
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
GetIsValidated(),
|
|
|
|
GetIsAuthorized(),
|
|
|
|
GetRegisterDevice(),
|
|
|
|
GetGetAuthorizationDeniedUpdateID(),
|
|
|
|
GetGetAuthorizationGrantedUpdateID(),
|
|
|
|
GetGetValidationRevokedUpdateID(),
|
|
|
|
GetGetValidationSucceededUpdateID()
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-01-06 20:50:43 +00:00
|
|
|
private static ServiceAction GetIsValidated()
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "IsValidated"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "DeviceID",
|
|
|
|
Direction = "in"
|
|
|
|
});
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "Result",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
2019-01-06 20:50:43 +00:00
|
|
|
private static ServiceAction GetIsAuthorized()
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "IsAuthorized"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "DeviceID",
|
|
|
|
Direction = "in"
|
|
|
|
});
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "Result",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
2019-01-06 20:50:43 +00:00
|
|
|
private static ServiceAction GetRegisterDevice()
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "RegisterDevice"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "RegistrationReqMsg",
|
|
|
|
Direction = "in"
|
|
|
|
});
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "RegistrationRespMsg",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
2019-01-06 20:50:43 +00:00
|
|
|
private static ServiceAction GetGetValidationSucceededUpdateID()
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "GetValidationSucceededUpdateID"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "ValidationSucceededUpdateID",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
|
|
|
private ServiceAction GetGetAuthorizationDeniedUpdateID()
|
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "GetAuthorizationDeniedUpdateID"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "AuthorizationDeniedUpdateID",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
|
|
|
private ServiceAction GetGetValidationRevokedUpdateID()
|
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "GetValidationRevokedUpdateID"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "ValidationRevokedUpdateID",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
|
|
|
|
private ServiceAction GetGetAuthorizationGrantedUpdateID()
|
|
|
|
{
|
|
|
|
var action = new ServiceAction
|
|
|
|
{
|
|
|
|
Name = "GetAuthorizationGrantedUpdateID"
|
|
|
|
};
|
|
|
|
|
|
|
|
action.ArgumentList.Add(new Argument
|
|
|
|
{
|
|
|
|
Name = "AuthorizationGrantedUpdateID",
|
|
|
|
Direction = "out"
|
|
|
|
});
|
|
|
|
|
|
|
|
return action;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|