• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef LIBEXIF_MNOTE_HUAWEI_ENTRY_H
17 #define LIBEXIF_MNOTE_HUAWEI_ENTRY_H
18 
19 #include <libexif/exif-format.h>
20 #include <libexif/exif-byte-order.h>
21 #include <libexif/huawei/mnote-huawei-tag.h>
22 
23 typedef struct _MnoteHuaweiEntry        MnoteHuaweiEntry;
24 typedef struct _ExifMnoteDataHuawei     ExifMnoteDataHuawei;
25 
26 struct _MnoteHuaweiEntry {
27 	MnoteHuaweiTag tag;
28 	ExifFormat format;
29 	unsigned long components;
30 
31 	unsigned char *data;
32 	unsigned int size;
33 	ExifByteOrder order;
34 
35 	void *md;
36 	void *parent_md;
37 	ExifMem *mem;
38 };
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif /* __cplusplus */
43 
44 char *mnote_huawei_entry_get_value (MnoteHuaweiEntry *entry, char *v, unsigned int maxlen);
45 int mnote_huawei_entry_set_value(MnoteHuaweiEntry *entry, const char *v, int strlen);
46 
47 MnoteHuaweiEntry *mnote_huawei_entry_new(ExifMnoteData *n);
48 void mnote_huawei_entry_replace_mem(MnoteHuaweiEntry *e, ExifMem *mem);
49 void mnote_huawei_entry_free_content(MnoteHuaweiEntry *e);
50 void mnote_huawei_entry_free_contour(MnoteHuaweiEntry *e);
51 void mnote_huawei_entry_free(MnoteHuaweiEntry *e);
52 void mnote_huawei_entry_initialize(MnoteHuaweiEntry *e, MnoteHuaweiTag tag, ExifByteOrder order);
53 
54 #ifdef __cplusplus
55 }
56 #endif /* __cplusplus */
57 
58 #endif /* !defined(LIBEXIF_MNOTE_HUAWEI_ENTRY_H) */
59