Rev 4307 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4307 | Rev 4756 | ||
---|---|---|---|
Line 63... | Line 63... | ||
63 | }; |
63 | }; |
64 | 64 | ||
65 | /** Creates a new measured string bundled with a copy of the given string itself as one memory block. |
65 | /** Creates a new measured string bundled with a copy of the given string itself as one memory block. |
66 | * If the measured string is being freed, whole memory block is freed. |
66 | * If the measured string is being freed, whole memory block is freed. |
67 | * The measured string should be used only as a constant. |
67 | * The measured string should be used only as a constant. |
68 | * @param string The initial character string to be stored. Input parameter. |
68 | * @param[in] string The initial character string to be stored. |
69 | * @param length The length of the given string without the terminating zero ('/0') character. If the length is zero (0), the actual length is computed. The given length is used and appended with the terminating zero ('\\0') character otherwise. Input parameter. |
69 | * @param[in] length The length of the given string without the terminating zero ('/0') character. If the length is zero (0), the actual length is computed. The given length is used and appended with the terminating zero ('\\0') character otherwise. |
70 | * @returns The new bundled character string with measured length. |
70 | * @returns The new bundled character string with measured length. |
71 | * @returns NULL if there is not enough memory left. |
71 | * @returns NULL if there is not enough memory left. |
72 | */ |
72 | */ |
73 | measured_string_ref measured_string_create_bulk( const char * string, size_t length ); |
73 | measured_string_ref measured_string_create_bulk( const char * string, size_t length ); |
74 | 74 | ||
75 | /** Copies the given measured string with separated header and data parts. |
75 | /** Copies the given measured string with separated header and data parts. |
76 | * @param source The source measured string to be copied. Input parameter. |
76 | * @param[in] source The source measured string to be copied. |
77 | * @returns The copy of the given measured string. |
77 | * @returns The copy of the given measured string. |
78 | * @returns NULL if the source parameter is NULL. |
78 | * @returns NULL if the source parameter is NULL. |
79 | * @returns NULL if there is not enough memory left. |
79 | * @returns NULL if there is not enough memory left. |
80 | */ |
80 | */ |
81 | measured_string_ref measured_string_copy( measured_string_ref source ); |
81 | measured_string_ref measured_string_copy( measured_string_ref source ); |
82 | 82 | ||
83 | /** Receives a measured strings array from a calling module. |
83 | /** Receives a measured strings array from a calling module. |
84 | * Creates the array and the data memory blocks. |
84 | * Creates the array and the data memory blocks. |
85 | * This method should be used only while processing IPC messages as the array size has to be negotiated in advance. |
85 | * This method should be used only while processing IPC messages as the array size has to be negotiated in advance. |
86 | * @param strings The received measured strings array. Output parameter. |
86 | * @param[out] strings The received measured strings array. |
87 | * @param data The measured strings data. This memory block stores the actual character strings. Output parameter. |
87 | * @param[out] data The measured strings data. This memory block stores the actual character strings. |
88 | * @param count The size of the measured strings array. Input parameter. |
88 | * @param[in] count The size of the measured strings array. |
89 | * @returns EOK on success. |
89 | * @returns EOK on success. |
90 | * @returns EINVAL if the strings or data parameter is NULL. |
90 | * @returns EINVAL if the strings or data parameter is NULL. |
91 | * @returns EINVAL if the count parameter is zero (0). |
91 | * @returns EINVAL if the count parameter is zero (0). |
92 | * @returns EINVAL if the sent array differs in size. |
92 | * @returns EINVAL if the sent array differs in size. |
93 | * @returns EINVAL if there is inconsistency in sent measured strings' lengths (should not occur). |
93 | * @returns EINVAL if there is inconsistency in sent measured strings' lengths (should not occur). |
Line 96... | Line 96... | ||
96 | */ |
96 | */ |
97 | int measured_strings_receive( measured_string_ref * strings, char ** data, size_t count ); |
97 | int measured_strings_receive( measured_string_ref * strings, char ** data, size_t count ); |
98 | 98 | ||
99 | /** Replies the given measured strings array to a calling module. |
99 | /** Replies the given measured strings array to a calling module. |
100 | * This method should be used only while processing IPC messages as the array size has to be negotiated in advance. |
100 | * This method should be used only while processing IPC messages as the array size has to be negotiated in advance. |
101 | * @param strings The measured strings array to be transferred. Input parameter. |
101 | * @param[in] strings The measured strings array to be transferred. |
102 | * @param count The measured strings array size. Input parameter. |
102 | * @param[in] count The measured strings array size. |
103 | * @returns EOK on success. |
103 | * @returns EOK on success. |
104 | * @returns EINVAL if the strings parameter is NULL. |
104 | * @returns EINVAL if the strings parameter is NULL. |
105 | * @returns EINVAL if the count parameter is zero (0). |
105 | * @returns EINVAL if the count parameter is zero (0). |
106 | * @returns EINVAL if the calling module does not accept the given array size. |
106 | * @returns EINVAL if the calling module does not accept the given array size. |
107 | * @returns EINVAL if there is inconsistency in sent measured strings' lengths (should not occur). |
107 | * @returns EINVAL if there is inconsistency in sent measured strings' lengths (should not occur). |
Line 110... | Line 110... | ||
110 | int measured_strings_reply( const measured_string_ref strings, size_t count ); |
110 | int measured_strings_reply( const measured_string_ref strings, size_t count ); |
111 | 111 | ||
112 | /** Receives a measured strings array from another module. |
112 | /** Receives a measured strings array from another module. |
113 | * Creates the array and the data memory blocks. |
113 | * Creates the array and the data memory blocks. |
114 | * This method should be used only following other IPC messages as the array size has to be negotiated in advance. |
114 | * This method should be used only following other IPC messages as the array size has to be negotiated in advance. |
115 | * @param phone The other module phone. Input parameter. |
115 | * @param[in] phone The other module phone. |
116 | * @param strings The returned measured strings array. Output parameter. |
116 | * @param[out] strings The returned measured strings array. |
117 | * @param data The measured strings data. This memory block stores the actual character strings. Output parameter. |
117 | * @param[out] data The measured strings data. This memory block stores the actual character strings. |
118 | * @param count The size of the measured strings array. Input parameter. |
118 | * @param[in] count The size of the measured strings array. |
119 | * @returns EOK on success. |
119 | * @returns EOK on success. |
120 | * @returns EINVAL if the strings or data parameter is NULL. |
120 | * @returns EINVAL if the strings or data parameter is NULL. |
121 | * @returns EINVAL if the phone or count parameter is not positive (<=0). |
121 | * @returns EINVAL if the phone or count parameter is not positive (<=0). |
122 | * @returns EINVAL if the sent array differs in size. |
122 | * @returns EINVAL if the sent array differs in size. |
123 | * @returns ENOMEM if there is not enough memory left. |
123 | * @returns ENOMEM if there is not enough memory left. |
Line 125... | Line 125... | ||
125 | */ |
125 | */ |
126 | int measured_strings_return( int phone, measured_string_ref * strings, char ** data, size_t count ); |
126 | int measured_strings_return( int phone, measured_string_ref * strings, char ** data, size_t count ); |
127 | 127 | ||
128 | /** Sends the given measured strings array to another module. |
128 | /** Sends the given measured strings array to another module. |
129 | * This method should be used only following other IPC messages as the array size has to be negotiated in advance. |
129 | * This method should be used only following other IPC messages as the array size has to be negotiated in advance. |
130 | * @param phone The other module phone. Input parameter. |
130 | * @param[in] phone The other module phone. |
131 | * @param strings The measured strings array to be transferred. Input parameter. |
131 | * @param[in] strings The measured strings array to be transferred. |
132 | * @param count The measured strings array size. Input parameter. |
132 | * @param[in] count The measured strings array size. |
133 | * @returns EOK on success. |
133 | * @returns EOK on success. |
134 | * @returns EINVAL if the strings parameter is NULL. |
134 | * @returns EINVAL if the strings parameter is NULL. |
135 | * @returns EINVAL if the phone or count parameter is not positive (<=0). |
135 | * @returns EINVAL if the phone or count parameter is not positive (<=0). |
136 | * @returns Other error codes as defined for the ipc_data_write_start() function. |
136 | * @returns Other error codes as defined for the ipc_data_write_start() function. |
137 | */ |
137 | */ |