Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
bbec2a66
Commit
bbec2a66
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add request tag to xml.
parent
07c8d1e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/zmapApp/zmapAppremote.c
+45
-11
45 additions, 11 deletions
src/zmapApp/zmapAppremote.c
src/zmapControl/zmapControl.c
+3
-3
3 additions, 3 deletions
src/zmapControl/zmapControl.c
src/zmapControl/zmapControlRemoteReceive.c
+26
-3
26 additions, 3 deletions
src/zmapControl/zmapControlRemoteReceive.c
with
74 additions
and
17 deletions
src/zmapApp/zmapAppremote.c
+
45
−
11
View file @
bbec2a66
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: None
* HISTORY:
* Last edited:
Dec 19 09:58
200
8
(edgrif)
* Last edited:
Aug 13 18:01
200
9
(edgrif)
* Created: Thu May 5 18:19:30 2005 (rds)
* CVS info: $Id: zmapAppremote.c,v 1.3
7
2008-1
2-19 10:00:5
6 edgrif Exp $
* CVS info: $Id: zmapAppremote.c,v 1.3
8
20
09-
08-1
4 09:52:3
6 edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -78,6 +78,8 @@ typedef struct
static
char
*
application_execute_command
(
char
*
command_text
,
gpointer
app_context
,
int
*
statusCode
);
static
gboolean
start
(
void
*
userData
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
);
static
gboolean
end
(
void
*
userData
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
);
static
gboolean
req_start
(
void
*
userData
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
);
static
gboolean
req_end
(
void
*
userData
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
);
static
void
createZMap
(
ZMapAppContext
app
,
RequestData
request_data
,
ResponseContext
response
);
static
void
send_finalised
(
ZMapXRemoteObj
client
);
...
...
@@ -85,10 +87,12 @@ static gboolean finalExit(gpointer data) ;
static
ZMapXMLObjTagFunctionsStruct
start_handlers_G
[]
=
{
{
"zmap"
,
start
},
{
"request"
,
req_start
},
{
NULL
,
NULL
}
};
static
ZMapXMLObjTagFunctionsStruct
end_handlers_G
[]
=
{
{
"zmap"
,
end
},
{
"zmap"
,
end
},
{
"request"
,
req_end
},
{
NULL
,
NULL
}
};
...
...
@@ -131,11 +135,13 @@ void zmapAppRemoteInstaller(GtkWidget *widget, gpointer app_context_data)
zMapXRemoteSetResponseAtomName
(
client
,
ZMAP_CLIENT_RESPONSE_ATOM_NAME
);
req
=
g_strdup_printf
(
"<zmap action=
\"
register_client
\"
>
\n
"
" <client xwid=
\"
0x%lx
\"
request_atom=
\"
%s
\"
response_atom=
\"
%s
\"
>
\n
"
" <action>%s</action>
\n
"
" <action>%s</action>
\n
"
" </client>
\n
"
req
=
g_strdup_printf
(
"<zmap>
\n
"
" <request action=
\"
register_client
\"
>
\n
"
" <client xwid=
\"
0x%lx
\"
request_atom=
\"
%s
\"
response_atom=
\"
%s
\"
>
\n
"
" <action>%s</action>
\n
"
" <action>%s</action>
\n
"
" </client>
\n
"
" </request>
\n
"
"</zmap>"
,
id
,
ZMAP_DEFAULT_REQUEST_ATOM_NAME
,
...
...
@@ -287,7 +293,9 @@ static void createZMap(ZMapAppContext app, RequestData request_data, ResponseCon
static
void
send_finalised
(
ZMapXRemoteObj
client
)
{
char
*
request
=
"<zmap action=
\"
finalised
\"
/>"
;
char
*
request
=
"<zmap>
\n
"
" <request action=
\"
finalised
\"
/>
\n
"
"</zmap>"
;
char
*
response
=
NULL
;
g_return_if_fail
(
client
!=
NULL
);
...
...
@@ -314,7 +322,33 @@ static gboolean finalExit(gpointer data)
}
/* all the action has been moved from <zmap> to <request> */
static
gboolean
start
(
void
*
user_data
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
)
{
gboolean
handled
=
FALSE
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
RequestData
request_data
=
(
RequestData
)
user_data
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
return
handled
;
}
static
gboolean
end
(
void
*
user_data
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
)
{
gboolean
handled
=
TRUE
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
RequestData
request_data
=
(
RequestData
)
user_data
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
return
handled
;
}
static
gboolean
req_start
(
void
*
user_data
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
)
{
gboolean
handled
=
FALSE
;
RequestData
request_data
=
(
RequestData
)
user_data
;
...
...
@@ -336,12 +370,12 @@ static gboolean start(void *user_data, ZMapXMLElement element, ZMapXMLParser par
}
}
else
zMapXMLParserRaiseParsingError
(
parser
,
"Attribute 'action' is required for element '
zmap
'."
);
zMapXMLParserRaiseParsingError
(
parser
,
"Attribute 'action' is required for element '
request
'."
);
return
handled
;
}
static
gboolean
end
(
void
*
user_data
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
)
static
gboolean
req_
end
(
void
*
user_data
,
ZMapXMLElement
element
,
ZMapXMLParser
parser
)
{
gboolean
handled
=
TRUE
;
RequestData
request_data
=
(
RequestData
)
user_data
;
...
...
This diff is collapsed.
Click to expand it.
src/zmapControl/zmapControl.c
+
3
−
3
View file @
bbec2a66
...
...
@@ -26,9 +26,9 @@
* the window code and the threaded server code.
* Exported functions: See ZMap.h
* HISTORY:
* Last edited:
Jun 12 14:4
1 2009 (edgrif)
* Last edited:
Aug 14 09:1
1 2009 (edgrif)
* Created: Thu Jul 24 16:06:44 2003 (edgrif)
* CVS info: $Id: zmapControl.c,v 1.9
4
2009-0
6
-1
2 13:58:49
edgrif Exp $
* CVS info: $Id: zmapControl.c,v 1.9
5
2009-0
8
-1
4 09:54:18
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -1046,7 +1046,7 @@ static void remoteSendViewClosed(ZMapXRemoteObj client, unsigned long xwid)
char
*
request
;
char
*
response
=
NULL
;
request
=
g_strdup_printf
(
"<zmap action=
\"
view_closed
\"
> <client xwid=
\"
0x%lx
\"
/> </zmap>"
,
xwid
)
;
request
=
g_strdup_printf
(
"<zmap
> <request
action=
\"
view_closed
\"
> <client xwid=
\"
0x%lx
\"
/>
</request>
</zmap>"
,
xwid
)
;
if
(
zMapXRemoteSendRemoteCommand
(
client
,
request
,
&
response
)
!=
ZMAPXREMOTE_SENDCOMMAND_SUCCEED
)
{
...
...
This diff is collapsed.
Click to expand it.
src/zmapControl/zmapControlRemoteReceive.c
+
26
−
3
View file @
bbec2a66
...
...
@@ -28,9 +28,9 @@
* Exported functions: See zmapControl_P.h
*
* HISTORY:
* Last edited:
Dec
1
8
1
1:02
200
8
(edgrif)
* Last edited:
Aug
1
3
1
7:26
200
9
(edgrif)
* Created: Thu Jul 12 14:54:30 2007 (rds)
* CVS info: $Id: zmapControlRemoteReceive.c,v 1.
4
200
8-12-18 13:29:44
edgrif Exp $
* CVS info: $Id: zmapControlRemoteReceive.c,v 1.
5
200
9-08-14 09:55:20
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -104,6 +104,9 @@ static void findView(gpointer data, gpointer user_data) ;
static
gboolean
xml_zmap_start_cb
(
gpointer
user_data
,
ZMapXMLElement
zmap_element
,
ZMapXMLParser
parser
);
static
gboolean
xml_request_start_cb
(
gpointer
user_data
,
ZMapXMLElement
zmap_element
,
ZMapXMLParser
parser
);
static
gboolean
xml_segment_end_cb
(
gpointer
user_data
,
ZMapXMLElement
segment
,
ZMapXMLParser
parser
);
...
...
@@ -121,20 +124,26 @@ static gboolean control_execute_debug_G = FALSE;
static
ZMapXMLObjTagFunctionsStruct
control_starts_G
[]
=
{
{
"zmap"
,
xml_zmap_start_cb
},
{
"request"
,
xml_request_start_cb
},
#ifdef NOT_YET
{
"featureset"
,
xml_featureset_start_cb
},
{
"feature"
,
xml_feature_start_cb
},
#endif
{
"client"
,
zMapXRemoteXMLGenericClientStartCB
},
{
NULL
,
NULL
}
};
static
ZMapXMLObjTagFunctionsStruct
control_ends_G
[]
=
{
{
"zmap"
,
xml_return_true_cb
},
{
"request"
,
xml_return_true_cb
},
{
"feature"
,
xml_return_true_cb
},
{
"segment"
,
xml_segment_end_cb
},
#ifdef NOT_YET
{
"subfeature"
,
xml_subfeature_end_cb
},
#endif
{
"location"
,
xml_location_end_cb
},
{
"style"
,
xml_style_end_cb
},
{
NULL
,
NULL
}
...
...
@@ -380,9 +389,23 @@ static void createClient(ZMap zmap, ZMapXRemoteParseCommandData input_data, Resp
/* Handlers */
/* all the action happens in <request> now. */
static
gboolean
xml_zmap_start_cb
(
gpointer
user_data
,
ZMapXMLElement
zmap_element
,
ZMapXMLParser
parser
)
{
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
ZMapXRemoteParseCommandData
parsing_data
=
(
ZMapXRemoteParseCommandData
)
user_data
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
return
FALSE
;
}
static
gboolean
xml_request_start_cb
(
gpointer
user_data
,
ZMapXMLElement
zmap_element
,
ZMapXMLParser
parser
)
{
ZMapXMLAttribute
attr
=
NULL
;
ZMapXRemoteParseCommandData
parsing_data
=
(
ZMapXRemoteParseCommandData
)
user_data
;
GQuark
action
=
0
;
...
...
@@ -410,7 +433,7 @@ static gboolean xml_zmap_start_cb(gpointer user_data, ZMapXMLElement zmap_elemen
}
else
{
zMapXMLParserRaiseParsingError
(
parser
,
"action is a required attribute for
zmap
."
);
zMapXMLParserRaiseParsingError
(
parser
,
"action is a required attribute for
request
."
);
parsing_data
->
common
.
action
=
ZMAPCONTROL_REMOTE_INVALID
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment