2016-10-29 15:22:20 -07:00
|
|
|
using System.Collections.Generic;
|
2019-01-13 12:16:19 -07:00
|
|
|
using Emby.Dlna.Common;
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2016-10-29 15:34:54 -07:00
|
|
|
namespace Emby.Dlna.MediaReceiverRegistrar
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
public class ServiceActionListBuilder
|
|
|
|
{
|
|
|
|
public IEnumerable<ServiceAction> GetActions()
|
|
|
|
{
|
2019-01-13 12:16:19 -07:00
|
|
|
return new[]
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
GetIsValidated(),
|
|
|
|
GetIsAuthorized(),
|
|
|
|
GetRegisterDevice(),
|
|
|
|
GetGetAuthorizationDeniedUpdateID(),
|
|
|
|
GetGetAuthorizationGrantedUpdateID(),
|
|
|
|
GetGetValidationRevokedUpdateID(),
|
|
|
|
GetGetValidationSucceededUpdateID()
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-01-06 13:50:43 -07:00
|
|
|
private static ServiceAction GetIsValidated()
|
2016-10-29 15:22:20 -07: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 13:50:43 -07:00
|
|
|
private static ServiceAction GetIsAuthorized()
|
2016-10-29 15:22:20 -07: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 13:50:43 -07:00
|
|
|
private static ServiceAction GetRegisterDevice()
|
2016-10-29 15:22:20 -07: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 13:50:43 -07:00
|
|
|
private static ServiceAction GetGetValidationSucceededUpdateID()
|
2016-10-29 15:22:20 -07: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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|