Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
6d11711a
Commit
6d11711a
authored
Dec 03, 2009
by
Viliam Mateicka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoder: add get_mime_type() method to determine content type by httpd output plugin
parent
bae03e17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
encoder_plugin.h
src/encoder_plugin.h
+17
-0
No files found.
src/encoder_plugin.h
View file @
6d11711a
...
...
@@ -58,6 +58,8 @@ struct encoder_plugin {
GError
**
error
);
size_t
(
*
read
)(
struct
encoder
*
encoder
,
void
*
dest
,
size_t
length
);
const
char
*
(
*
get_mime_type
)(
struct
encoder
*
encoder
);
};
/**
...
...
@@ -192,4 +194,19 @@ encoder_read(struct encoder *encoder, void *dest, size_t length)
return
encoder
->
plugin
->
read
(
encoder
,
dest
,
length
);
}
/**
* Get mime type of encoded content.
*
* @param plugin the encoder plugin
* @return an constant string, NULL on failure
*/
static
inline
const
char
*
encoder_get_mime_type
(
struct
encoder
*
encoder
)
{
/* this method is optional */
return
encoder
->
plugin
->
get_mime_type
!=
NULL
?
encoder
->
plugin
->
get_mime_type
(
encoder
)
:
NULL
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment