1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** USBX Component                                                        */
17 /**                                                                       */
18 /**   Pictbridge Application                                              */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 
24 /* Include necessary system files.  */
25 
26 #define UX_SOURCE_CODE
27 
28 #include "ux_api.h"
29 #include "ux_pictbridge.h"
30 #include "ux_device_class_pima.h"
31 
32 
33 /**************************************************************************/
34 /*                                                                        */
35 /*  FUNCTION                                               RELEASE        */
36 /*                                                                        */
37 /*    _ux_pictbridge_dpsclient_input_continuejob                          */
38 /*                                                        PORTABLE C      */
39 /*                                                           6.1          */
40 /*  AUTHOR                                                                */
41 /*                                                                        */
42 /*    Chaoqiong Xiao, Microsoft Corporation                               */
43 /*                                                                        */
44 /*  DESCRIPTION                                                           */
45 /*                                                                        */
46 /*    This function creates the tag lines of the continue job             */
47 /*    request.                                                            */
48 /*                                                                        */
49 /*  INPUT                                                                 */
50 /*                                                                        */
51 /*    pictbridge                            Pictbridge instance           */
52 /*    pima_object_buffer                    Pointer to object buffer      */
53 /*    object_length                         Length of the object          */
54 /*    pima_object_buffer_updated            Updated Address of the object */
55 /*    object_length_updated                 Updated length                */
56 /*                                                                        */
57 /*                                                                        */
58 /*  OUTPUT                                                                */
59 /*                                                                        */
60 /*    Completion Status                                                   */
61 /*                                                                        */
62 /*  CALLS                                                                 */
63 /*                                                                        */
64 /*                                                                        */
65 /*  CALLED BY                                                             */
66 /*                                                                        */
67 /*    _ux_pictbridge_dpsclient_input_object_prepare                       */
68 /*                                                                        */
69 /*  RELEASE HISTORY                                                       */
70 /*                                                                        */
71 /*    DATE              NAME                      DESCRIPTION             */
72 /*                                                                        */
73 /*  05-19-2020     Chaoqiong Xiao           Initial Version 6.0           */
74 /*  09-30-2020     Chaoqiong Xiao           Modified comment(s),          */
75 /*                                            resulting in version 6.1    */
76 /*                                                                        */
77 /**************************************************************************/
_ux_pictbridge_dpsclient_input_object_continuejob(UX_PICTBRIDGE * pictbridge,ULONG input_subcode,ULONG input_parameter,UCHAR * pima_object_buffer,ULONG object_length,UCHAR ** pima_object_buffer_updated,ULONG * object_length_updated)78 UINT _ux_pictbridge_dpsclient_input_object_continuejob(UX_PICTBRIDGE *pictbridge,
79                                ULONG input_subcode,
80                                ULONG input_parameter,
81                                UCHAR *pima_object_buffer,
82                                ULONG object_length,
83                                UCHAR **pima_object_buffer_updated,
84                                ULONG *object_length_updated)
85 {
86 
87 UINT                status;
88 
89 
90     UX_PARAMETER_NOT_USED(pictbridge);
91     UX_PARAMETER_NOT_USED(input_subcode);
92     UX_PARAMETER_NOT_USED(input_parameter);
93 
94     /* Add the line <continueJob/>  */
95     status = _ux_pictbridge_object_tag_line_add(pima_object_buffer, object_length, _ux_pictbridge_xml_tag_line_continuejob,
96                                                 UX_PICTBRIDGE_TAG_FLAG_BEGIN | UX_PICTBRIDGE_TAG_FLAG_FORCE_SLASH_AT_END | UX_PICTBRIDGE_TAG_FLAG_FORCE_LF,
97                                                 UX_NULL, 0, UX_NULL, &pima_object_buffer, &object_length);
98     if (status != UX_SUCCESS)
99         return(status);
100 
101     /* Update the caller's object position.  */
102     *pima_object_buffer_updated = pima_object_buffer;
103 
104     /* Update the caller's object length .  */
105     *object_length_updated = object_length;
106 
107     /* Return completion status.  */
108     return(UX_SUCCESS);
109 }
110 
111